From 0f81d8fe016701bb96ced57e0156d286d2085569 Mon Sep 17 00:00:00 2001 From: mx <1@qq.com> Date: Thu, 20 Mar 2025 15:44:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pusong/business/service/impl/PsContractInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pusong-modules/pusong-business/src/main/java/com/pusong/business/service/impl/PsContractInfoServiceImpl.java b/pusong-modules/pusong-business/src/main/java/com/pusong/business/service/impl/PsContractInfoServiceImpl.java index 6eca039..ff8d76c 100644 --- a/pusong-modules/pusong-business/src/main/java/com/pusong/business/service/impl/PsContractInfoServiceImpl.java +++ b/pusong-modules/pusong-business/src/main/java/com/pusong/business/service/impl/PsContractInfoServiceImpl.java @@ -410,7 +410,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService { } QueryWrapper lqw = buildQueryWrapper(bo); if (bo.getAllReturn() != null){ - String sql = "IFNULL((select sum(money) from ps_contract_pay where pay_status = 1 and business_type = 1 and contract_code = info.contract_code),0) - IFNULL((select sum(money) from ps_contract_pay where pay_status = 1 and business_type = 2 and contract_code = info.contract_code),0)"; + String sql = "IFNULL((select sum(money) from ps_contract_pay where contract_code = info.contract_code and pay_status = 1 and business_type = 1),0) - IFNULL((select sum(money) from ps_contract_pay where contract_code = info.contract_code and pay_status = 1 and business_type = 2),0)"; if (bo.getAllReturn() == 1){ lqw.apply("info.contract_amount <= " + sql); } else if (bo.getAllReturn() == 0) {