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 a1c86243..784c9548 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 @@ -1376,6 +1376,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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}, '%') diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/task/TmTaskMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/task/TmTaskMapper.xml index faf85c2f..512c470d 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/task/TmTaskMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/task/TmTaskMapper.xml @@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into tm_task @@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from tm_task where task_id in + delete from tm_task where task_id in #{taskId} @@ -273,5 +273,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from tm_task tt left join tm_task_agreement tta on tta.task_id = tt.task_id 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 + ) + - \ No newline at end of file +