-- CASE WHEN ss.STEP_ID = zsd.STEP_ID AND zsd.DISPATCH_STATUS != 'START' AND o.OPERATION = zsd.OPERATION THEN ''
-- ELSE ot.DESCRIPTION
-- END CURRENT_OPERATION_DESCRIPTION,
ot2.DESCRIPTION OPERATION_DESCRIPTION,
CASE WHEN zab.HANDLE IS NOT NULL THEN '是'
ELSE '否'
END IS_ANOMALY,
CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL AND zsd.ACTUAL_COMPLETE_DATE IS NULL THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE + 8/24 - SYSDATE),'FM9999990.000')
CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL AND zsd.ACTUAL_COMPLETE_DATE IS NULL AND zsd.DISPATCH_STATUS != 'CANCEL' THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE + 8/24 - SYSDATE),'FM9999990.000')
ELSE ''
END SURPLUS_DAY,
CASE WHEN zsd.ACTUAL_START_DATE IS NOT NULL AND cf3.VALUE IS NOT NULL AND cf3.VALUE != 0 AND zsd.ACTUAL_COMPLETE_DATE IS NULL
@ -537,6 +559,6 @@
AND zsd.PLANNED_COMP_DATE <= TO_DATE(#{endDateTime}|| '15:59:59','YYYY-MM-DD HH24:MI:SS')