|
|
|
@ -95,22 +95,44 @@ |
|
|
|
and c.run_status = 3 |
|
|
|
and c.run_status = 3 |
|
|
|
</where> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="getBeforePlatOutCardNo" resultType="org.springblade.desk.produce.pojo.entity.PlateAround"> |
|
|
|
<select id="getBeforePlatOutCardNo" resultType="org.springblade.desk.produce.pojo.vo.BeforePlatInVO"> |
|
|
|
SELECT * FROM MES_PLATE_AROUND a |
|
|
|
SELECT |
|
|
|
INNER JOIN MES_WORK_PLAN b ON a.WP_ID = b.ID |
|
|
|
a.ID AS wpId, |
|
|
|
INNER JOIN MES_WORK_PLAN c ON b.NEXT_WP_ID = c.ID |
|
|
|
c.WO_CODE AS woCode, |
|
|
|
INNER JOIN MES_WORK_ORDER d ON b.WO_ID = d.ID |
|
|
|
c.BATCH_NO AS batchNo, |
|
|
|
|
|
|
|
c.CARD_NO AS cardNo, |
|
|
|
|
|
|
|
d.TS_NAME AS teamCode, |
|
|
|
|
|
|
|
a.MAKE_TEAM AS teamId, |
|
|
|
|
|
|
|
e.NAME AS processName, |
|
|
|
|
|
|
|
a.ORDERS AS processCode, |
|
|
|
|
|
|
|
a.WORK_QTY AS inQuantity, |
|
|
|
|
|
|
|
d2.TS_NAME as nextTeamCode, |
|
|
|
|
|
|
|
b.ORDERS as nextProcessCode, |
|
|
|
|
|
|
|
e2.NAME as nextProcessName, |
|
|
|
|
|
|
|
b.MAKE_TEAM AS nextTeamId |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
MES_PLATE_AROUND pa |
|
|
|
|
|
|
|
INNER JOIN MES_WORK_PLAN a ON pa.WP_ID = a.ID |
|
|
|
|
|
|
|
INNER JOIN MES_WORK_PLAN b ON a.NEXT_WP_ID = b.ID |
|
|
|
|
|
|
|
INNER JOIN MES_WORK_ORDER c ON a.WO_ID = c.ID |
|
|
|
|
|
|
|
LEFT JOIN BS_TEAM_SET d ON a.MAKE_TEAM = d.id |
|
|
|
|
|
|
|
LEFT JOIN BS_PROCESS_SET e ON a.pps_id = e.id |
|
|
|
|
|
|
|
LEFT JOIN BS_TEAM_SET d2 ON b.MAKE_TEAM = d2.id |
|
|
|
|
|
|
|
LEFT JOIN BS_PROCESS_SET e2 ON b.pps_id = e2.id |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
a.PA_TYPE = 1 AND a.CUR_STATUS = 1 AND (c.MAKE_TEAM in |
|
|
|
pa.PA_TYPE = 1 AND pa.CUR_STATUS = 1 |
|
|
|
<foreach collection="tsIds" item="tsId" open="(" separator="," close=")"> |
|
|
|
<if test="tsIds != null and tsIds.size() > 0"> |
|
|
|
#{tsId} |
|
|
|
AND (c.MAKE_TEAM in |
|
|
|
</foreach> |
|
|
|
<foreach collection="tsIds" item="tsId" open="(" separator="," close=")"> |
|
|
|
or c.SUBSIDIARY_TEAM in |
|
|
|
#{tsId} |
|
|
|
<foreach collection="tsIds" item="tsId" open="(" separator="," close=")"> |
|
|
|
</foreach> |
|
|
|
#{tsId} |
|
|
|
or c.SUBSIDIARY_TEAM in |
|
|
|
</foreach> |
|
|
|
<foreach collection="tsIds" item="tsId" open="(" separator="," close=")"> |
|
|
|
or (c.MAKE_TEAM is null and c.OC_ID is null and d.dispatcher is not null and d.dispatcher = #{userId})) |
|
|
|
#{tsId} |
|
|
|
and d.ID = #{id} |
|
|
|
</foreach> |
|
|
|
|
|
|
|
or (c.MAKE_TEAM is null and c.OC_ID is null and d.dispatcher is not null and d.dispatcher = #{userId})) |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
and c.ID = #{id} |
|
|
|
</where> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="getAfterPlatInCardNo" resultType="org.springblade.desk.produce.pojo.entity.WorkPlan"> |
|
|
|
<select id="getAfterPlatInCardNo" resultType="org.springblade.desk.produce.pojo.entity.WorkPlan"> |
|
|
|
|