退料审核

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}
and tt.task_type = '29'
and mt.`level`='4'
<if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or
and mt2.type_name like concat('%', #{keyWord}, '%')
and (mt.type_name like concat('%', #{keyWord}, '%') or
mt2.type_name like concat('%', #{keyWord}, '%'))
</if>
GROUP BY mt.type_id
) AS subquery1
@ -435,8 +434,8 @@
and tt.task_type = '36'
and mt.`level`='4'
<if test="keyWord != null and keyWord != ''">
and mt.type_name like concat('%', #{keyWord}, '%') or
and mt2.type_name like concat('%', #{keyWord}, '%')
and (mt.type_name like concat('%', #{keyWord}, '%') or
mt2.type_name like concat('%', #{keyWord}, '%'))
</if>
GROUP BY mt.type_id
) AS subquery2
@ -448,18 +447,13 @@
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
mt.type_name typeCode,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeName,
bad.pre_num as num,
mm.ma_code as maCode
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
bad.pre_num as num
FROM
back_apply_details bad
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 mt1 ON mt1.type_id=bad.type_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
LEFT JOIN ma_type mt2 ON mt2.type_id=mt.parent_id
WHERE
bai.id=#{id}
</select>
@ -491,6 +485,7 @@
WHERE
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
ORDER BY bai.create_time desc
</select>
<select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT

View File

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