|
|
|
@ -969,4 +969,42 @@
|
|
|
|
|
ON VIP.SITE = SIP.SITE AND VIP.ITEM_BO = SIP.ITEM_BO AND VIP.REQUIRED_QTY > 0
|
|
|
|
|
ORDER BY VIP.WORK_ORDER, VIP.ITEM
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="findCallItemInfoList" resultMap="FullResultMap">
|
|
|
|
|
SELECT CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.STATUS AS 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
|
|
|
|
|
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'
|
|
|
|
|
INNER JOIN BOM_COMPONENT BC ON CI.COMPONENT_BO = BC.COMPONENT_GBO
|
|
|
|
|
LEFT JOIN BOM B ON BC.BOM_BO = B.HANDLE
|
|
|
|
|
INNER JOIN Z_SFC_DISPATCH SD ON CI.SFC_DISPATCH_BO = SD.HANDLE
|
|
|
|
|
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SD.WORK_CENTER
|
|
|
|
|
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}
|
|
|
|
|
<if test="workCenter != null and workCenter != ''">
|
|
|
|
|
AND SD.WORK_CENTER = #{workCenter}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resrce != null and resrce != ''">
|
|
|
|
|
AND CI.RESRCE = #{resrce}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="component != null and component != ''">
|
|
|
|
|
AND I.ITEM = #{component}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
AND CI.STATUS = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startFromDate_S != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE >= #{startFromDate_S}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startToDate_S != null">
|
|
|
|
|
AND SD.PLANNED_START_DATE <= #{startToDate_S}
|
|
|
|
|
</if>
|
|
|
|
|
ORDER BY CF.VALUE ,CI.RESRCE, I.ITEM
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|