diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java index c32a643c..835985e5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java @@ -307,5 +307,9 @@ public interface SltAgreementInfoMapper { */ List selectPeriodCostListForCharge(PeriodCostQueryDto queryDto); + /** + * 查询某个协议未完成的维修单列表 + * @param bean 协议ID + */ List getRepairCodeList(SltAgreementInfo bean); } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index f862fd5e..674a9144 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -1370,27 +1370,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tt.task_id as taskId, tt.code as repairCode, tt.task_type as taskType, - sdd.dict_label as repairStatus - - from tm_task tt - left join tm_task_agreement tta on tta.task_id = tt.task_id - left join sys_dict_data sdd on sdd.dict_value = tt.task_status and sdd.dict_type = 'repair_task_status' - where tta.agreement_id = #{agreementId} and tt.task_type = 4 and tt.task_status != 1 - - and tt.task_id not in ( select - tt.task_id as taskId - - from tm_task tt - left join tm_task_agreement tta on tta.task_id = tt.task_id - LEFT JOIN repair_apply_details rad on tt.task_id = rad.task_id and is_ds =1 - where tta.agreement_id = #{agreementId} and tt.task_type = 4 and tt.task_status != 1 - AND IFNULL(rad.repaired_num,0) > 0 - ) - - - - and tt.code like concat('%', #{repairCode}, '%') - + sdd.dict_label as repairStatus + from + tm_task tt + left join tm_task_agreement tta on tta.task_id = tt.task_id + left join sys_dict_data sdd on sdd.dict_value = tt.task_status and sdd.dict_type = 'repair_task_status' + where + tta.agreement_id = #{agreementId} and tt.task_type = 4 and tt.task_status != 1 + and tt.task_id not in ( + select + tt.task_id as taskId + from tm_task tt + left join tm_task_agreement tta on tta.task_id = tt.task_id + left join repair_apply_details rad on tt.task_id = rad.task_id and is_ds =1 + where + tta.agreement_id = #{agreementId} and tt.task_type = 4 and tt.task_status != 1 + AND IFNULL(rad.repaired_num,0) > 0 + ) + + and tt.code like concat('%', #{repairCode}, '%') +