Browse Source

Merge remote-tracking branch 'origin/master'

ZhangWenQiang 4 years atrás
parent
commit
8a9873a277

+ 5 - 5
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwaccount/controller/HlwCompanyAccountCalculationController.java

@@ -97,7 +97,7 @@ public class HlwCompanyAccountCalculationController extends JeecgController<HlwC
         Double totalOut = hlwCompanyAccountCalculationService.getTotalOut();
         Double totalIn = hlwCompanyAccountCalculationService.getTotalIn();
         //-1小于;0等于;1:大于
-        if (totalOut.compareTo(totalIn) != 0) {
+        if (totalOut.compareTo(totalIn) == 0) {
             return Result.ok("平台流水正确(通过平台)1");
         }else{
             return Result.error("平台流水出错(通过平台)1");
@@ -118,7 +118,7 @@ public class HlwCompanyAccountCalculationController extends JeecgController<HlwC
         Double totalOut = hlwCompanyAccountCalculationService.getTotalOutTwo();
         Double totalIn = hlwCompanyAccountCalculationService.getTotalInTwo();
         //-1小于;0等于;1:大于
-        if (totalOut.compareTo(totalIn) != 0) {
+        if (totalOut.compareTo(totalIn) == 0) {
             return Result.ok("平台流水正确(通过平台)2");
         }else{
             return Result.error("平台流水出错(通过平台)2");
@@ -141,7 +141,7 @@ public class HlwCompanyAccountCalculationController extends JeecgController<HlwC
         Double payment2 = hlwCompanyAccountCalculationService.getPayment2();
         Double totalIn= businessAccountUtils.add(payment1,payment2);
         //-1小于;0等于;1:大于
-        if (totalOut.compareTo(totalIn) != 0) {
+        if (totalOut.compareTo(totalIn) == 0) {
             return Result.ok("平台流水正确(通过平台)3");
         }else{
             return Result.error("平台流水出错(通过平台)3");
@@ -163,7 +163,7 @@ public class HlwCompanyAccountCalculationController extends JeecgController<HlwC
         Double totalOut = hlwCompanyAccountCalculationService.getTotalOutNotOne();
         Double totalIn = hlwCompanyAccountCalculationService.getTotalInNotOne();
         //-1小于;0等于;1:大于
-        if (totalOut.compareTo(totalIn) != 0) {
+        if (totalOut.compareTo(totalIn) == 0) {
             return Result.ok("平台流水正确(不通过平台)1");
         }else{
             return Result.error("平台流水出错(不通过平台)1");
@@ -186,7 +186,7 @@ public class HlwCompanyAccountCalculationController extends JeecgController<HlwC
         Double payment2 = hlwCompanyAccountCalculationService.getPaymentNot2();
         Double totalIn= businessAccountUtils.add(payment1,payment2);
         //-1小于;0等于;1:大于
-        if (totalOut.compareTo(totalIn) != 0) {
+        if (totalOut.compareTo(totalIn) == 0) {
             return Result.ok("平台流水正确(不通过平台)2");
         }else{
             return Result.error("平台流水出错(不通过平台)2");

+ 3 - 3
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwaccount/mapper/xml/HlwCompanyAccountCalculationMapper.xml

@@ -36,7 +36,7 @@
 		a.application_id AS "applicationId",
 		a.company_code AS "companyCode",
 		a.company_name AS "companyName",
-		sum(hca.total_deposit) as "sumDeposit",
+		(select sum(hcas.total_deposit) from hlw_company_account hcas where hcas.company_id=a.id and hcas.application_id=a.application_id and total_deposit>0.00) as "sumDeposit",
 		sum(hcad.amount) as "sumAmountIn",
 		sum(hcads.amount) as "sumAmountOut"
 		FROM hlw_company a
@@ -55,7 +55,7 @@
 		a.application_id AS "applicationId",
 		a.company_code AS "companyCode",
 		a.company_name AS "companyName",
-		sum(hca.total_deposit) as "sumDeposit",
+		(select sum(hcas.total_deposit) from hlw_company_account hcas where hcas.company_id=a.id and hcas.application_id=a.application_id and total_deposit>0.00) as "sumDeposit",
 		sum(hcas.total_payment) as "sumTotalPayment",
 		sum(hcas.balance) as "sumBalance"
 		FROM hlw_company a
@@ -73,7 +73,7 @@
 		a.application_id AS "applicationId",
 		a.company_code AS "companyCode",
 		a.company_name AS "companyName",
-		sum(hcas.total_payment) as "sumTotalPayment",
+		(select sum(hcas.total_payment) from hlw_company_account hcas where hcas.company_id=a.id and hcas.application_id=a.application_id and total_deposit>0.00) as "sumTotalPayment",
 		sum(hcad.amount) as "sumAmount",
 		sum(hcad.service_fee) as "sumServiceFee"
 		FROM hlw_company a