From 24b3d742b2ab9d64f850b032f0e60d1a33c0f99e Mon Sep 17 00:00:00 2001 From: duLingLing Date: Sat, 17 Aug 2019 14:58:46 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=E4=BF=AE=E5=A4=8D=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=90=88=E4=BC=99=E4=BA=BA=E6=95=B0=E6=8D=AE=E8=AF=AF=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../payment/manage/analysis/mappers/BDAnalysisMapper.xml | 2 +- .../manage/analysis/mappers/TransactionAnalysisMapper.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ded40941b..a93200a3d 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.19 + 1.1.20 UTF-8 diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml index 6e06c0c03..83c14dbac 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml @@ -203,7 +203,7 @@ org.type AS org_type, org.name AS org_name, if(org.org_id=1,1,0) AS isOrg, - SUM( IF ( temp.transaction_type = 'Credit', temp.clearing_amount, 0 )) clearing_amount, + SUM( IF ( temp.transaction_type = 'Credit', temp.clearing_amount, -t.clearing_amount )) clearing_amount, SUM(if(temp.transaction_type = 'Credit',temp.clearing_amount * clinetBD.proportion, -temp.clearing_amount * clinetBD.proportion)) pay_amount, ifnull(SUM(if(temp.refund_id IS NOT NULL, if(temp.transaction_type='Debit', temp.clearing_amount, -temp.clearing_amount) * clinetBD.proportion, 0)), 0) refund_amount, (SUM(if(temp.transaction_type = 'Credit', temp.clearing_amount * clinetBD.proportion, -temp.clearing_amount * clinetBD.proportion))) - (ifnull(SUM(if(temp.refund_id IS NOT NULL, if(temp.transaction_type='Debit', temp.clearing_amount, -temp.clearing_amount) * clinetBD.proportion, 0)), 0)) AS net_amount diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml index 7990d193a..50d9072a6 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml @@ -719,7 +719,7 @@ SELECT org.org_id, org.name org_name, - SUM(if(trans.transaction_type='Credit',trans.clearing_amount,0)) AS amount + SUM(if(trans.transaction_type='Credit',trans.clearing_amount,-t.clearing_amount)) AS amount FROM pmt_transactions AS trans RIGHT JOIN sys_clients AS clinet ON trans.client_id = clinet.client_id