结算维修单号去掉定损单号

This commit is contained in:
bonus 2025-09-25 11:40:25 +08:00
parent 5388327dbb
commit cf935f714f
2 changed files with 28 additions and 5 deletions

View File

@ -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 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' 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 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
)
<if test="repairCode != null"> <if test="repairCode != null">
and tt.code like concat('%', #{repairCode}, '%') and tt.code like concat('%', #{repairCode}, '%')
</if> </if>

View File

@ -273,5 +273,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from tm_task tt from tm_task tt
left join tm_task_agreement tta on tta.task_id = tt.task_id 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 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
)
</select> </select>
</mapper> </mapper>