CASE WHEN IM.LOT_SIZE = 1 THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE,
WR.WORK_CENTER RESOURCE_WORK_CENTER
FROM Z_SFC_DISPATCH SD
INNER JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
INNER JOIN SHOP_ORDER SO ON SO.SITE = SD.SITE AND SO.SHOP_ORDER = SD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER'
@ -696,7 +696,7 @@
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
WHERE SD.SITE = #{site}
<iftest="workCenter != null and workCenter != ''">
AND SD.WORK_CENTER = #{workCenter}
AND SD.OPERATION LIKE #{workCenter}||'%'
</if>
<iftest="dispatchStatus != null and dispatchStatus != ''">