任务列表是否老账新接

This commit is contained in:
mx 2025-04-09 12:45:06 +08:00
parent 0f81d8fe01
commit 677fedb6c2
2 changed files with 3 additions and 3 deletions

View File

@ -410,7 +410,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
}
QueryWrapper<PsContractInfo> lqw = buildQueryWrapper(bo);
if (bo.getAllReturn() != null){
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)";
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) {

View File

@ -37,7 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
con.contract_amount con_contract_amount,
con.custom_scene con_custom_scene,
con.sign_desc con_sign_desc,
con.is_old con_is_old,
con.roll_back_pdf con_roll_back_pdf,
scom.id scom_id,
scom.company_adress scom_company_adress,
@ -73,7 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- (select GROUP_CONCAT(appoint.executor SEPARATOR ',') from ps_task_appoint appoint where appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0') as executors,
-- (select GROUP_CONCAT(appoint.task_desc SEPARATOR ',') from ps_task_appoint appoint where appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0') as taskDesc,
(select GROUP_CONCAT(business.business_type SEPARATOR ',') from ps_contract_business business where business.contract_code = con.contract_code and business.company_id = main.service_company_id and business.del_flag = '0') as business_type_name,
(select 1 from ps_contract_business business2 where business2.contract_code = con.contract_code and business2.company_id = main.service_company_id and business2.del_flag = '0' and business2.is_proxy = '1' limit 1) as scom_is_proxy
(select 1 from ps_contract_business business2 where business2.contract_code = con.contract_code and business2.company_id = main.service_company_id and business2.del_flag = '0' and business2.is_proxy = '1' limit 1) as scom_is_proxy,
(select 1 from ps_contract_business business2 where business2.contract_code = con.contract_code and business2.company_id = main.service_company_id and business2.del_flag = '0' and business2.is_old = 'true' limit 1) as con_is_old
from ps_task_main main
left join ps_contract_info con on main.contract_code = con.contract_code
left join ps_company_info scom on main.service_company_id = scom.id