@ -679,7 +679,7 @@
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
FROM (
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION,
CASE WHEN SD.DISPATCH_STATUS = 'COMPLETE' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
@ -772,13 +772,13 @@
<if test= "completeToDate != null" >
AND SD.PLANNED_COMPLETE_DATE < = TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION,
SD.DISPATCH_STATUS, SD.DISPATCH_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
CC.VALUE, SD.TURN_OPERATION, SD.BLANKING_SIZE, WR.WORK_CENTER
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND VI .ROUTER_BO = WIP.ROUTER_BO AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1 .ROUTER_BO = WIP.ROUTER_BO AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ
LEFT JOIN Z_SFC_DISPATCH V2 ON V2.SITE = WIP.SITE AND V2.SFC = WIP.SFC AND V2.ROUTER_BO = WIP.ROUTER_BO AND V2.DISPATCH_SEQ = WIP.AFTER_SEQ
) WIP
<if test= "isCompleted != null and isCompleted != ''" >