生产报废导出功能

master
赵嘉伟 3 years ago
parent 7606c37090
commit 1819d8f44c

@ -439,13 +439,13 @@
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZNU.FULL_NAME,' ') DUTY_USER
FROM
SHOP_ORDER SO
LEFT JOIN WORK_CENTER WC ON SO.PLANNED_WORK_CENTER_BO = WC.HANDLE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SUBSTR(O.OPERATION,1,INSTR(O.OPERATION,'_')-1)
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = I.HANDLE AND WO2."ATTRIBUTE" = 'DWG_NO'
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSS.DUTY_USER

Loading…
Cancel
Save