Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit 671eca95f9

@ -158,15 +158,12 @@
END ITEM_DESCRIPTION, END ITEM_DESCRIPTION,
CF.VALUE ITEM_SPEC, CF.VALUE ITEM_SPEC,
ZRRT.ACTUAL_START_DATE ACTUAL_START_DATE,ZRRT.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE, ZRRT.ACTUAL_START_DATE ACTUAL_START_DATE,ZRRT.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE,
CASE WHEN ZRRT.STOP_MACHINE = 'Y' THEN TO_CHAR(TO_NUMBER((ZRRT.ACTUAL_COMPLETE_DATE-ZRRT.CREATED_DATE_TIME)*24),'FM9999990.00') '' SHUT_DOWN_TIME,/*暂时无法计算*/
WHEN ZRRT.STOP_MACHINE = 'N' THEN TO_CHAR(TO_NUMBER((SYSDATE-ZRRT.CREATED_DATE_TIME)*24),'FM9999990.00') CASE WHEN ZRRT.WAIT_END_DATE IS NOT NULL THEN TO_CHAR(TO_NUMBER((ZRRT.WAIT_END_DATE -ZRRT.WAIT_START_DATE)*24),'FM9999990.000')
END SHUT_DOWN_TIME, ELSE TO_CHAR(TO_NUMBER((SYSDATE-ZRRT.WAIT_START_DATE)*24),'FM9999990.000')
CASE WHEN ZRRT.STOP_MACHINE = 'Y' THEN TO_CHAR(TO_NUMBER((ZRRT.WAIT_END_DATE -ZRRT.WAIT_START_DATE)*24),'FM9999990.00')
WHEN ZRRT.STOP_MACHINE = 'N' THEN TO_CHAR(TO_NUMBER((SYSDATE-ZRRT.WAIT_START_DATE)*24),'FM9999990.00')
END REPAIR_WAIT_TIME, END REPAIR_WAIT_TIME,
CASE WHEN ZRRT.ACTUAL_COMPLETE_DATE IS NOT NULL THEN TO_CHAR(TO_NUMBER((ZRRT.ACTUAL_COMPLETE_DATE-ZRRT.CREATED_DATE_TIME-ZRRT.WAIT_TIME)*24),'FM9999990.000')
CASE WHEN ZRRT.STOP_MACHINE = 'Y' THEN TO_CHAR(TO_NUMBER((ZRRT.ACTUAL_COMPLETE_DATE-ZRRT.CREATED_DATE_TIME-ZRRT.WAIT_TIME)*24),'FM9999990.00') ELSE TO_CHAR(TO_NUMBER((SYSDATE-ZRRT.CREATED_DATE_TIME-ZRRT.WAIT_TIME)*24),'FM9999990.000')
WHEN ZRRT.STOP_MACHINE = 'N' THEN TO_CHAR(TO_NUMBER((SYSDATE-ZRRT.CREATED_DATE_TIME-ZRRT.WAIT_TIME)*24),'FM9999990.00')
END REPAIR_TIME, END REPAIR_TIME,
CASE WHEN ZRRT.STATUS = '401' THEN '待维修' CASE WHEN ZRRT.STATUS = '401' THEN '待维修'
WHEN ZRRT.STATUS = '501' THEN '维修中' WHEN ZRRT.STATUS = '501' THEN '维修中'
@ -290,7 +287,7 @@
zsd.EMPLOYEE_DESCRIPTION DISPATCH_USER ,ot.DESCRIPTION OPERATION , zsd.EMPLOYEE_DESCRIPTION DISPATCH_USER ,ot.DESCRIPTION OPERATION ,
r2.RESRCE RESRCE,r2.DESCRIPTION RESRCE_DESCRIPTION,zsd.RESOURCE_TYPE RESOURCE_TYPE, r2.RESRCE RESRCE,r2.DESCRIPTION RESRCE_DESCRIPTION,zsd.RESOURCE_TYPE RESOURCE_TYPE,
rt.DESCRIPTION RESOURCE_TYPE_DESCRIPTION,zabd.DUTY_CAUSE_TYPE DUTY_CAUSE_TYPE,zabd.DUTY_TYPE DUTY_TYPE, rt.DESCRIPTION RESOURCE_TYPE_DESCRIPTION,zabd.DUTY_CAUSE_TYPE DUTY_CAUSE_TYPE,zabd.DUTY_TYPE DUTY_TYPE,
zabd.DUTY_DEPART DUTY_DEPART,TO_CHAR(TO_NUMBER(zabd.CLOSED_DATE_TIME - zab.RESPONSE_DATE_TIME)*24,'FM9999990.00') WORKING_HOURS, zabd.DUTY_DEPART DUTY_DEPART,TO_CHAR(TO_NUMBER(zabd.CLOSED_DATE_TIME - zab.RESPONSE_DATE_TIME)*24,'FM9999990.000') WORKING_HOURS,
CASE WHEN zab.SFC IS NOT NULL THEN '质量异常' CASE WHEN zab.SFC IS NOT NULL THEN '质量异常'
ELSE '外协质量异常' ELSE '外协质量异常'
END ABNORMAL_TYPE END ABNORMAL_TYPE
@ -403,8 +400,8 @@
znu4.FULL_NAME CANCEL_USER,zabd.RESOLVE_REMARK RESOLVE_REMARK, znu4.FULL_NAME CANCEL_USER,zabd.RESOLVE_REMARK RESOLVE_REMARK,
zabd.ABNORMAL_REASON ABNORMAL_REASON,zabd.BEFORE_MEASURE BEFORE_MEASURE, zabd.ABNORMAL_REASON ABNORMAL_REASON,zabd.BEFORE_MEASURE BEFORE_MEASURE,
ug.DESCRIPTION RESOLVE_SEND_USER_GROUP, ug.DESCRIPTION RESOLVE_SEND_USER_GROUP,
CASE WHEN zsr.CREATED_DATE_TIME IS NOT NULL THEN TO_CHAR(TO_NUMBER(zabd.RESOLVE_DATE_TIME - zsr.CREATED_DATE_TIME)*24,'FM9999990.00') CASE WHEN zsr.CREATED_DATE_TIME IS NOT NULL THEN TO_CHAR(TO_NUMBER(zabd.RESOLVE_DATE_TIME - zsr.CREATED_DATE_TIME)*24,'FM9999990.000')
WHEN zabd.RESOLVE_DATE_TIME IS NOT NULL THEN TO_CHAR(TO_NUMBER(zabd.RESOLVE_DATE_TIME - zab.CREATED_DATE_TIME)*24,'FM9999990.00') WHEN zabd.RESOLVE_DATE_TIME IS NOT NULL THEN TO_CHAR(TO_NUMBER(zabd.RESOLVE_DATE_TIME - zab.CREATED_DATE_TIME)*24,'FM9999990.000')
ELSE '' ELSE ''
END RESOLVE_DURATION, END RESOLVE_DURATION,
zabd.DUTY_DEPART DUTY_DEPART zabd.DUTY_DEPART DUTY_DEPART
@ -480,11 +477,11 @@
CASE WHEN zab.HANDLE IS NOT NULL THEN '是' CASE WHEN zab.HANDLE IS NOT NULL THEN '是'
ELSE '否' ELSE '否'
END IS_ANOMALY, END IS_ANOMALY,
CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE - SYSDATE),'FM9999990.00') CASE WHEN zsd.PLANNED_COMP_DATE IS NOT NULL THEN TO_CHAR(TO_NUMBER(zsd.PLANNED_COMP_DATE - SYSDATE),'FM9999990.000')
ELSE '' ELSE ''
END SURPLUS_DAY, 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 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
THEN ROUND(TO_NUMBER(SYSDATE - zsd.ACTUAL_START_DATE)/TO_NUMBER(cf3.VALUE),2)*100 || '%' THEN ROUND(TO_NUMBER(SYSDATE - zsd.ACTUAL_START_DATE)*24/TO_NUMBER(cf3.VALUE),2)*100 || '%'
ELSE '' ELSE ''
END PROCESS_HOURS END PROCESS_HOURS
FROM Z_SFC_DISPATCH zsd FROM Z_SFC_DISPATCH zsd

Loading…
Cancel
Save