生产叫料数据查询功能修改

master
zpl 3 years ago
parent fc14e0fa23
commit 531e8cbd89

@ -987,15 +987,15 @@
SUM(ZCI.REQUIRED_QTY) REQUIRED_QTY SUM(ZCI.REQUIRED_QTY) REQUIRED_QTY
FROM Z_CALL_ITEM ZCI FROM Z_CALL_ITEM ZCI
INNER JOIN Z_SFC_DISPATCH ZSD ON ZSD.HANDLE = ZCI.SFC_DISPATCH_BO INNER JOIN Z_SFC_DISPATCH ZSD ON ZSD.HANDLE = ZCI.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZCI.SITE AND SO.SHOP_ORDER = ZCI.SHOP_ORDER INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZCI.SHOP_ORDER AND SO.SITE = ZCI.SITE
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER' LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN WORK_CENTER WC ON WC.HANDLE = SO.PLANNED_WORK_CENTER_BO INNER JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = ZCI.SITE
INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = #{local} INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO
INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE AND ITT.LOCALE = #{local} INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE
WHERE ZCI.SITE = #{site} WHERE ZCI.SITE = #{site} AND WCT.LOCALE = #{local} AND IT.LOCALE = #{local} AND ITT.LOCALE = #{local}
<if test="callItem.callType != null and callItem.callType != ''"> <if test="callItem.callType != null and callItem.callType != ''">
AND ZCI.CALL_TYPE = #{callItem.callType} AND ZCI.CALL_TYPE = #{callItem.callType}
</if> </if>

Loading…
Cancel
Save