From 1c6f4ee3baa9a2924df25fc9d89e46aaeaebb25d Mon Sep 17 00:00:00 2001 From: linfso Date: Wed, 18 Jun 2025 11:45:43 +0800 Subject: [PATCH] md --- .../src/main/resources/mapper/EmisSettleBillMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml index 6f62c3eb5..471e479e0 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml @@ -655,7 +655,10 @@ sum(if( tbMA.settleType=2,1, 0 ) ) AS totalMonthBillCount, sum(if( tbMA.settleType=2,tbMA.recMoney, 0 ) ) AS totalMonthRecAmount, sum(if( tbMA.settleType=2,tbMA.recdMoneyIn, 0 ) ) AS totalMonthRecdIn, - sum(if( tbMA.settleType=2,tbMA.recdPayMoney60D, 0 ) ) AS totalMonthRecd70 + sum(if( tbMA.settleType=2,tbMA.recdPayMoney60D, 0 ) ) AS totalMonthRecd70, + + ifnull(ecp.money,0) as moneyProfit, + ifnull(ecp.month_money,0) as monthProfit from ( SELECT @@ -879,7 +882,7 @@ GROUP BY a.settle_bill_no ) tbc ON tba.settle_bill_no = tbc.settle_bill_no - ) tbMA + ) tbMA left join emis_commission_profit ecp on tbMA.salesmen=ecp.emp_name and tbMA.billMonth = ecp.bill_month group by tbMA.salesmen,tbMA.billMonth