|
|
|
@ -833,6 +833,14 @@
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateCallItemStatusByHandle">
|
|
|
|
|
UPDATE Z_CALL_ITEM SET CALL_STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
|
|
|
|
|
WHERE HANDLE IN
|
|
|
|
|
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateCallItemStatusByCallItemNo">
|
|
|
|
|
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
|
|
|
|
|
WHERE STATUS != '804' AND CALL_ITEM_NO IN
|
|
|
|
@ -971,10 +979,10 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="findCallItemInfoList" resultMap="FullResultMap">
|
|
|
|
|
SELECT CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.STATUS AS CALL_STATUS,
|
|
|
|
|
SELECT CI.HANDLE ,CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.CALL_STATUS,
|
|
|
|
|
B.BOM AS ITEM, B.DESCRIPTION ITEM_DESCRIPTION ,
|
|
|
|
|
SD.WORK_CENTER , WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION, SD.BLANKING_SIZE, SD.REMARK, SD.PLANNED_START_DATE,
|
|
|
|
|
I.ITEM AS ITEM_NO ,IT.DESCRIPTION AS COMPONENT_DESCRIPTION
|
|
|
|
|
I.ITEM AS COMPONENT ,IT.DESCRIPTION AS COMPONENT_DESCRIPTION
|
|
|
|
|
FROM Z_CALL_ITEM CI
|
|
|
|
|
LEFT JOIN SHOP_ORDER SO ON CI.SHOP_ORDER = SO.SHOP_ORDER
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
|
|
|
|
@ -985,7 +993,7 @@
|
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT ON WC.HANDLE = WCT.WORK_CENTER_BO
|
|
|
|
|
LEFT JOIN ITEM I ON CI.COMPONENT_BO = I.HANDLE
|
|
|
|
|
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO
|
|
|
|
|
WHERE CI.SITE = #{site}
|
|
|
|
|
WHERE CI.SITE = #{site} AND WCT.LOCALE = 'zh'
|
|
|
|
|
<if test="workCenter != null and workCenter != ''">
|
|
|
|
|
AND SD.WORK_CENTER = #{workCenter}
|
|
|
|
|
</if>
|
|
|
|
@ -998,13 +1006,28 @@
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
AND CI.STATUS = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startFromDate_S != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE >= #{startFromDate_S}
|
|
|
|
|
<if test="startFromDate != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE >= #{startFromDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startToDate_S != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE <= #{startToDate_S}
|
|
|
|
|
<if test="startToDate != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE <= #{startToDate}
|
|
|
|
|
</if>
|
|
|
|
|
ORDER BY CF.VALUE ,CI.RESRCE, I.ITEM
|
|
|
|
|
</select>
|
|
|
|
|
<select id="findRefreshCallItemPda" resultMap="FullResultMap">
|
|
|
|
|
SELECT CI.HANDLE ,CI.SFC ,CI.COMPONENT_BO ,BC.QTY REQUIRED_QTY, CF.VALUE STEP_ID
|
|
|
|
|
--BC.BOM_BO , CI.STEP_ID ,
|
|
|
|
|
FROM Z_CALL_ITEM CI
|
|
|
|
|
LEFT JOIN SFC S ON S.SFC = CI.SFC
|
|
|
|
|
LEFT JOIN SFC_BOM SB ON SB.SFC_BO = S.HANDLE
|
|
|
|
|
LEFT JOIN BOM_COMPONENT BC ON BC.BOM_BO = SB.BOM_BO AND BC.COMPONENT_GBO = CI.COMPONENT_BO
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = BC.HANDLE AND CF."ATTRIBUTE" = 'STEP_ID' AND CF.VALUE = CI.STEP_ID
|
|
|
|
|
WHERE HANDLE IN
|
|
|
|
|
(
|
|
|
|
|
<foreach item="item" index="index" collection="coll" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
)
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|