材料站优化
This commit is contained in:
parent
b2db646d30
commit
a13ecb62eb
|
|
@ -1602,6 +1602,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = 0
|
||||
AND is_slt = '0'
|
||||
AND type_id = #{typeId}
|
||||
AND ma_id = #{maId}
|
||||
order by start_time asc
|
||||
|
|
@ -1743,6 +1744,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = 0
|
||||
AND is_slt = '0'
|
||||
AND source = '2'
|
||||
AND type_id = #{typeId}
|
||||
AND agreement_id = #{agreementId}
|
||||
|
|
@ -1925,6 +1927,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
status = 0
|
||||
AND (source = 1 OR source is NULL)
|
||||
AND is_slt = '0'
|
||||
AND type_id = #{info.typeId}
|
||||
AND ma_id = #{info.maId}
|
||||
AND agreement_id in
|
||||
|
|
|
|||
|
|
@ -321,6 +321,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN clz_lease_apply_info lai ON lai.id = sai.lease_id
|
||||
WHERE
|
||||
sai.STATUS = '0'
|
||||
AND sai.is_slt = '0'
|
||||
<if test="agreementIds != null and agreementIds.size > 0">
|
||||
and sai.agreement_id in
|
||||
<foreach item="item" collection="agreementIds" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = 0
|
||||
AND is_slt = '0'
|
||||
<if test="agreementIds != null">
|
||||
AND agreement_id in
|
||||
<foreach item="item" index="index" collection="agreementIds" open="(" separator="," close=")">
|
||||
|
|
@ -771,6 +772,7 @@
|
|||
LEFT JOIN clz_lease_apply_info clai ON sai.lease_id = clai.id
|
||||
WHERE
|
||||
sai.STATUS = '0'
|
||||
AND sai.is_slt = '0'
|
||||
|
||||
<if test="agreementIds != null ">
|
||||
and sai.agreement_id in
|
||||
|
|
@ -806,6 +808,7 @@
|
|||
LEFT JOIN clz_bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND mt.type_id = #{typeId}
|
||||
AND ba.unit_id = #{teamId}
|
||||
AND ba.project_id = #{proId}
|
||||
|
|
@ -834,6 +837,7 @@
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = '0'
|
||||
AND is_slt = '0'
|
||||
AND agreement_id = #{agreementId}
|
||||
AND type_id = #{typeId}
|
||||
<if test="maId != null">
|
||||
|
|
@ -849,6 +853,7 @@
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = '0'
|
||||
AND is_slt = '0'
|
||||
<if test="agreementIds != null ">
|
||||
and agreement_id in
|
||||
<foreach item="item" collection="agreementIds" open="(" separator="," close=")">
|
||||
|
|
@ -894,6 +899,7 @@
|
|||
AND bu.del_flag = '0'
|
||||
WHERE
|
||||
cs.`status` = '0'
|
||||
AND cs.is_slt = '0'
|
||||
AND ba.unit_id = #{teamId}
|
||||
AND ba.project_id = #{proId}
|
||||
<if test="maCode != null and maCode != ''">
|
||||
|
|
@ -963,6 +969,7 @@
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = 0
|
||||
AND is_slt = '0'
|
||||
and source = '2'
|
||||
AND agreement_id = #{agreementId}
|
||||
AND type_id = #{typeId}
|
||||
|
|
|
|||
|
|
@ -760,6 +760,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT DISTINCT csa.ma_id
|
||||
FROM clz_slt_agreement_info csa
|
||||
WHERE csa.status = '0'
|
||||
AND csa.is_slt = '0'
|
||||
AND csa.ma_id IN
|
||||
<foreach collection="maIds" item="maId" open="(" separator="," close=")">
|
||||
#{maId}
|
||||
|
|
@ -1115,6 +1116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ma_id IS NULL
|
||||
AND
|
||||
status = '0'
|
||||
AND is_slt = '0'
|
||||
<if test="publishTask != null and publishTask != ''">
|
||||
AND publish_task = #{publishTask}
|
||||
</if>
|
||||
|
|
@ -1161,6 +1163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = '0'
|
||||
AND is_slt = '0'
|
||||
AND type_id = #{typeId}
|
||||
AND ma_id = #{maId}
|
||||
</select>
|
||||
|
|
@ -1218,6 +1221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN clz_bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND mt.type_id = #{typeId}
|
||||
AND ba.project_id = #{proId}
|
||||
GROUP BY mm.ma_id
|
||||
|
|
@ -1375,6 +1379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0'
|
||||
where
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
and mm.qr_code = #{qrCode}
|
||||
<if test="typeId != null and typeId != ''">
|
||||
and mt.type_id = #{typeId}
|
||||
|
|
@ -1452,6 +1457,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0'
|
||||
where
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
<if test="maId != null">
|
||||
AND mm.ma_id = #{maId}
|
||||
</if>
|
||||
|
|
@ -1528,6 +1534,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND mt1.del_flag = '0'
|
||||
WHERE
|
||||
sai.STATUS = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.agreement_id in
|
||||
<foreach item="agreement" collection="agreementIds" open="(" separator="," close=")">
|
||||
#{agreement.agreementId}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bu.del_flag = '0'
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
GROUP BY mt.type_id, bp.pro_id
|
||||
|
|
@ -308,6 +309,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND sai.is_slt = '0'
|
||||
<if test="teamId != null and teamId != ''">
|
||||
AND bt.unit_id = #{teamId}
|
||||
</if>
|
||||
|
|
@ -361,6 +363,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_machine mm ON mm.ma_id = sai.ma_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND sai.ma_id IS NOT NULL
|
||||
|
|
@ -485,6 +488,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bu.del_flag = '0'
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
GROUP BY mt.type_id
|
||||
|
|
@ -537,6 +541,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_machine mm ON mm.ma_id = sai.ma_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="typeId != null">
|
||||
|
|
@ -657,6 +662,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
status as status
|
||||
FROM clz_slt_agreement_info
|
||||
WHERE status = '0' and ma_id = #{maId}
|
||||
AND is_slt = '0'
|
||||
</select>
|
||||
|
||||
<select id="getSltAgreementInfo" resultType="com.bonus.material.ma.domain.Machine">
|
||||
|
|
@ -728,6 +734,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="typeId != null">
|
||||
|
|
@ -884,6 +891,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bz.bzmc = bu.unit_name
|
||||
WHERE
|
||||
sai.`status` = 0 and bu.type_id = 1731 and bp.pro_id is not null
|
||||
AND sai.is_slt = '0'
|
||||
and bp.pro_id not in (3414,1192,3321,3595)
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
|
|
@ -949,6 +957,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
WHERE
|
||||
sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND bt.unit_id = #{teamId}
|
||||
AND bai.project_id = #{proId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
|
|
@ -977,6 +986,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_machine mm ON mm.ma_id = sai.ma_id
|
||||
WHERE
|
||||
sai.STATUS = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.agreement_id = #{agreementId}
|
||||
AND sai.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
|
|
@ -1046,6 +1056,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="proId != null">
|
||||
|
|
@ -1435,6 +1446,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
and sd.dept_id not in (342,345,347,348,101,344)
|
||||
|
|
@ -1540,6 +1552,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND bu.unit_name is not null
|
||||
|
|
@ -1620,6 +1633,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN clz_lease_apply_info lai ON lai.id = sai.lease_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
WHERE sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="typeId !=null ">
|
||||
|
|
@ -1808,6 +1822,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND bu.unit_name is not null
|
||||
|
|
@ -1986,6 +2001,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
|
|
@ -2196,6 +2212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
and bp.pro_id not in (3414,1192,3321,3595)
|
||||
|
|
@ -2878,6 +2895,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND bu.unit_name is not null
|
||||
|
|
@ -3091,6 +3109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN clz_lease_apply_info lai ON lai.id = sai.lease_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
WHERE sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="list != null and list.size() > 0">
|
||||
|
|
|
|||
|
|
@ -1817,6 +1817,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
STATUS = '0'
|
||||
AND (source = 1 OR source is NULL)
|
||||
AND is_slt = '0'
|
||||
AND type_id = #{type.typeId}
|
||||
AND agreement_id in
|
||||
<foreach item="agreement" collection="agreementIds" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@
|
|||
left join clz_bm_agreement_info col on col.agreement_id=sai.agreement_id
|
||||
left join bm_project pro on pro.pro_id=col.project_id
|
||||
where pro.pro_id = #{projectId} and sai.status = '0'
|
||||
AND sai.is_slt = '0'
|
||||
GROUP BY
|
||||
sai.ma_id,sai.type_id
|
||||
</select>
|
||||
|
|
@ -520,6 +521,7 @@
|
|||
clz_slt_agreement_info
|
||||
WHERE
|
||||
status = 0
|
||||
AND is_slt = '0'
|
||||
AND source = '2'
|
||||
AND type_id = #{typeId}
|
||||
AND agreement_id = #{agreementId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue