退料审核

This commit is contained in:
bns_han 2024-01-19 14:55:21 +08:00
parent 0733651fd4
commit aa3ca8b7c3
2 changed files with 16 additions and 21 deletions

View File

@ -410,10 +410,9 @@
WHERE tta.agreement_id = #{agreementId} WHERE tta.agreement_id = #{agreementId}
and tt.task_type = '29' and tt.task_type = '29'
and mt.`level`='4' and mt.`level`='4'
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or and (mt.type_name like concat('%', #{keyWord}, '%') or
and mt2.type_name like concat('%', #{keyWord}, '%') mt2.type_name like concat('%', #{keyWord}, '%'))
</if> </if>
GROUP BY mt.type_id GROUP BY mt.type_id
) AS subquery1 ) AS subquery1
@ -435,8 +434,8 @@
and tt.task_type = '36' and tt.task_type = '36'
and mt.`level`='4' and mt.`level`='4'
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or and (mt.type_name like concat('%', #{keyWord}, '%') or
and mt2.type_name like concat('%', #{keyWord}, '%') mt2.type_name like concat('%', #{keyWord}, '%'))
</if> </if>
GROUP BY mt.type_id GROUP BY mt.type_id
) AS subquery2 ) AS subquery2
@ -448,18 +447,13 @@
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo"> <select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT SELECT
mt.type_name typeCode, mt.type_name typeCode,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeName, CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
bad.pre_num as num, bad.pre_num as num
mm.ma_code as maCode
FROM FROM
back_apply_details bad back_apply_details bad
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
LEFT JOIN ma_type mt on mt.type_id=bad.type_id LEFT JOIN ma_type mt on mt.type_id=bad.type_id
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id LEFT JOIN ma_type mt2 ON mt2.type_id=mt.parent_id
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
LEFT JOIN ma_machine mm on mm.type_id=bad.type_id
WHERE WHERE
bai.id=#{id} bai.id=#{id}
</select> </select>
@ -491,6 +485,7 @@
WHERE WHERE
bad.type_id is not null bad.type_id is not null
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
ORDER BY bai.create_time desc
</select> </select>
<select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo"> <select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT SELECT

View File

@ -339,9 +339,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
1=1 1=1
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and bai.`code` like concat('%', #{keyWord}, '%') or and (bai.`code` like concat('%', #{keyWord}, '%') or
bai.back_person like concat('%', #{keyWord}, '%') or bai.back_person like concat('%', #{keyWord}, '%') or
bai.phone like concat('%', #{keyWord}, '%') bai.phone like concat('%', #{keyWord}, '%'))
</if> </if>
<if test="unitId != null and unitId != ''"> <if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId} and bui.unit_id = #{unitId}
@ -391,8 +391,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt.`level`='4' and mt.`level`='4'
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or and (mt.type_name like concat('%', #{keyWord}, '%') or
mt2.type_name like concat('%', #{keyWord}, '%') mt2.type_name like concat('%', #{keyWord}, '%'))
</if> </if>
GROUP BY mt.type_id GROUP BY mt.type_id
) AS subquery1 ) AS subquery1
@ -416,8 +416,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and tt.task_type = '36' and tt.task_type = '36'
and mt.`level`='4' and mt.`level`='4'
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or and (mt.type_name like concat('%', #{keyWord}, '%') or
mt2.type_name like concat('%', #{keyWord}, '%') mt2.type_name like concat('%', #{keyWord}, '%'))
</if> </if>
GROUP BY mt.type_id GROUP BY mt.type_id
) AS subquery2 ) AS subquery2
@ -565,9 +565,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where where
1=1 1=1
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and bai.`code` like concat('%', #{keyWord}, '%') or and (bai.`code` like concat('%', #{keyWord}, '%') or
bai.back_person like concat('%', #{keyWord}, '%') or bai.back_person like concat('%', #{keyWord}, '%') or
bai.phone like concat('%', #{keyWord}, '%') bai.phone like concat('%', #{keyWord}, '%'))
</if> </if>
<if test="unitId != null and unitId != ''"> <if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId} and bui.unit_id = #{unitId}