This commit is contained in:
parent
e21189cf9b
commit
082330c4a2
|
|
@ -32,15 +32,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
rd.task_id AS taskId,
|
rd.task_id AS taskId,
|
||||||
tt1.CODE AS repairCode,
|
tt1.CODE AS repairCode,
|
||||||
null AS backCode,
|
bai.`code` AS backCode,
|
||||||
rd.create_time AS createTime,
|
rd.create_time AS createTime,
|
||||||
tt.task_status AS taskStatus,
|
tt.task_status AS taskStatus,
|
||||||
CASE tt.task_status
|
CASE tt.task_status
|
||||||
WHEN '0' THEN '入库进行中'
|
WHEN '0' THEN '入库进行中'
|
||||||
WHEN '1' THEN '入库完成'
|
WHEN '1' THEN '入库完成'
|
||||||
WHEN '2' THEN '入库驳回'
|
WHEN '2' THEN '入库驳回'
|
||||||
ELSE '未知状态'
|
ELSE '未知状态'
|
||||||
END AS statusName,
|
END AS statusName,
|
||||||
rd.remark AS remark,
|
rd.remark AS remark,
|
||||||
bui.unit_name AS backUnit,
|
bui.unit_name AS backUnit,
|
||||||
bpi.pro_name AS backPro,
|
bpi.pro_name AS backPro,
|
||||||
|
|
@ -57,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
LEFT JOIN tm_task tt on rd.task_id = tt.task_id
|
LEFT JOIN tm_task tt on rd.task_id = tt.task_id
|
||||||
LEFT JOIN tm_task tt1 on rd.repair_id = tt1.task_id
|
LEFT JOIN tm_task tt1 on rd.repair_id = tt1.task_id
|
||||||
|
|
||||||
|
LEFT JOIN repair_apply_details rad ON rad.task_id = rd.repair_id
|
||||||
|
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
||||||
LEFT JOIN tm_task_agreement tta ON rd.repair_id = tta.task_id
|
LEFT JOIN tm_task_agreement tta ON rd.repair_id = tta.task_id
|
||||||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||||
|
|
@ -68,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
rd.create_time < '2025-08-20 00:00:00'
|
rad.create_time < '2025-08-20 00:00:00'
|
||||||
<if test="inputCode != null and inputCode != ''">
|
<if test="inputCode != null and inputCode != ''">
|
||||||
AND tt.CODE = #{inputCode}
|
AND tt.CODE = #{inputCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -121,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
rd.create_time >= '2025-08-20 00:00:00'
|
rad.create_time >= '2025-08-20 00:00:00'
|
||||||
<if test="inputCode != null and inputCode != ''">
|
<if test="inputCode != null and inputCode != ''">
|
||||||
AND tt.CODE = #{inputCode}
|
AND tt.CODE = #{inputCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -133,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
) AS combined_results
|
) AS combined_results
|
||||||
ORDER BY
|
ORDER BY
|
||||||
taskStatus,
|
taskStatus,
|
||||||
createTime DESC;
|
createTime DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRepairInputDetailsById" resultType="com.bonus.material.repair.domain.RepairInputInfo">
|
<select id="selectRepairInputDetailsById" resultType="com.bonus.material.repair.domain.RepairInputInfo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue