/* 유지관리 작업대상_DCU 수신 */ MERGE INTO TM_FAC_ERR_CUR_DCU USING DUAL ON (ERR_ID = #{ERR_ID}) WHEN NOT MATCHED THEN INSERT ( ERR_ID, WORK_STEP, WORK_DIV, FCTY_CD, DCU_ID, COMM_CD, EVENT_START_DT, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, BUSI_DIV, M_COMPANY, ERR_TYPE1, ERR_TYPE2, DCU_IP, GUM_DAY, DURAT_TIME, ORDER_DT, ORDERER_ID, METER_DT, MEMO, PRE_ERR_ID, WORK_GP_NO, NDIS_WORK_NO, NDIS_STAT , ADDRESS, ROAD_ADDRESS, TR_FEED_NM , MOD_ID, MOD_DATE, REG_ID, REG_DATE ) VALUES ( #{ERR_ID}, #{WORK_STEP}, #{WORK_DIV}, #{FCTY_CD}, #{DCU_ID}, #{COMM_CD}, TO_TIMESTAMP(#{EVENT_START_DT}, 'YYYYMMDDHH24MISS'), #{DEPT1}, #{DEPT2}, #{KDN_DEPT1}, #{KDN_DEPT2}, #{BUSI_DIV}, #{M_COMPANY}, #{ERR_TYPE1}, #{ERR_TYPE2}, #{DCU_IP}, #{GUM_DAY}, #{DURAT_TIME}, TO_TIMESTAMP(#{ORDER_DT}, 'YYYYMMDDHH24MISS'), #{ORDERER_ID}, TO_TIMESTAMP(#{METER_DT}, 'YYYYMMDDHH24MISS'), #{MEMO}, #{PRE_ERR_ID}, #{WORK_GP_NO}, #{NDIS_WORK_NO}, #{NDIS_STAT} , #{ADDRESS}, #{ROAD_ADDRESS}, #{TR_FEED_NM} , NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') ) WHEN MATCHED THEN UPDATE SET WORK_STEP = #{WORK_STEP} , WORK_DIV = #{WORK_DIV} , FCTY_CD = #{FCTY_CD} , COMM_CD = #{COMM_CD} , EVENT_START_DT = #{EVENT_START_DT} , DEPT1 = #{DEPT1} , DEPT2 = #{DEPT2} , KDN_DEPT1 = #{KDN_DEPT1} , KDN_DEPT2 = #{KDN_DEPT2} , BUSI_DIV = #{BUSI_DIV} , M_COMPANY = #{M_COMPANY} , ERR_TYPE1 = #{ERR_TYPE1} , ERR_TYPE2 = #{ERR_TYPE2} , GUM_DAY = #{GUM_DAY} , ORDER_DT = #{ORDER_DT} , ORDERER_ID = #{ORDERER_ID} , METER_DT = #{METER_DT} , MEMO = #{MEMO} , PRE_ERR_ID = #{PRE_ERR_ID} , WORK_GP_NO = #{WORK_GP_NO} , DCU_ID = #{DCU_ID} , DCU_IP = #{DCU_IP} , DURAT_TIME = #{DURAT_TIME} , NDIS_WORK_NO = #{NDIS_WORK_NO} , NDIS_STAT = #{NDIS_STAT} , ADDRESS = #{ADDRESS} , ROAD_ADDRESS = #{ROAD_ADDRESS} , TR_FEED_NM = #{TR_FEED_NM} , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS')) WHERE WORK_STEP IN ('10','20')
/* 유지관리 작업대상_모뎀 수신 */ MERGE INTO TM_FAC_ERR_CUR_MODEM USING DUAL ON (ERR_ID = #{ERR_ID}) WHEN NOT MATCHED THEN INSERT ( ERR_ID, WORK_STEP, WORK_DIV, FCTY_CD, MODEM_MAC, COMM_CD, EVENT_START_DT, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, BUSI_DIV, M_COMPANY, ERR_TYPE1, ERR_TYPE2, GUM_DAY, ORDER_DT, ORDERER_ID, DCU_DT, METER_DT, SEVER_DT, MEMO, PRE_ERR_ID, WORK_GP_NO, METER_ID, MGMT_CD, DESN_ST_YMD, LAY_YMD , TRADE, COMBLD_NM, TR_FEED_NM, SV_FEED_NM, ADDRESS, ROAD_ADDRESS, INST_S, INST_M , MOD_ID, MOD_DATE, REG_ID, REG_DATE, LOW_RANK_METER_ID ) VALUES ( #{ERR_ID}, #{WORK_STEP}, #{WORK_DIV}, #{FCTY_CD}, #{MODEM_MAC}, #{COMM_CD}, TO_TIMESTAMP(#{EVENT_START_DT}, 'YYYYMMDDHH24MISS'), #{DEPT1}, #{DEPT2}, #{KDN_DEPT1}, #{KDN_DEPT2}, #{BUSI_DIV}, #{M_COMPANY}, #{ERR_TYPE1}, #{ERR_TYPE2}, #{GUM_DAY}, TO_TIMESTAMP(#{ORDER_DT}, 'YYYYMMDDHH24MISS'), #{ORDERER_ID}, TO_TIMESTAMP(#{DCU_DT}, 'YYYYMMDDHH24MISS'), TO_TIMESTAMP(#{METER_DT}, 'YYYYMMDDHH24MISS'), TO_TIMESTAMP(#{SEVER_DT}, 'YYYYMMDDHH24MISS'), #{MEMO}, #{PRE_ERR_ID}, #{WORK_GP_NO}, #{METER_ID}, #{MGMT_CD}, #{DESN_ST_YMD}, #{LAY_YMD} , #{TRADE}, #{COMBLD_NM}, #{TR_FEED_NM}, #{SV_FEED_NM}, #{ADDRESS}, #{ROAD_ADDRESS}, #{INST_S}, #{INST_M} , NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') , NVL ((SELECT TFMI.M_METER_ID FROM TM_FCTY_CS_METER_INFO TFMI WHERE TFMI.DEPT1 = #{DEPT1} AND TFMI.M_USE_YN = 'Y' AND TFMI.M_MODEM_MAC = #{MODEM_MAC} AND ROWNUM = 1) , (SELECT TFMI.M_METER_ID FROM TM_FCTY_CS_METER_INFO TFMI WHERE TFMI.DEPT1 = #{DEPT1} AND TFMI.M_USE_YN = 'Y' and TFMI.M_MODEM_MAC = '012' || SUBSTRING(REPLACE(#{MODEM_MAC}, '-0', ''), 2) AND ROWNUM = 1)) ) WHEN MATCHED THEN UPDATE SET WORK_STEP = #{WORK_STEP} , WORK_DIV = #{WORK_DIV} , FCTY_CD = #{FCTY_CD} , COMM_CD = #{COMM_CD} , EVENT_START_DT = TO_TIMESTAMP(#{EVENT_START_DT}, 'YYYYMMDDHH24MISS') , DEPT1 = #{DEPT1} , DEPT2 = #{DEPT2} , KDN_DEPT1 = #{KDN_DEPT1} , KDN_DEPT2 = #{KDN_DEPT2} , BUSI_DIV = #{BUSI_DIV} , M_COMPANY = #{M_COMPANY} , ERR_TYPE1 = #{ERR_TYPE1} , ERR_TYPE2 = #{ERR_TYPE2} , GUM_DAY = #{GUM_DAY} , ORDER_DT = TO_TIMESTAMP(#{ORDER_DT}, 'YYYYMMDDHH24MISS') , ORDERER_ID = #{ORDERER_ID} , METER_DT = TO_TIMESTAMP(#{METER_DT}, 'YYYYMMDDHH24MISS') , MEMO = #{MEMO} , PRE_ERR_ID = #{PRE_ERR_ID} , WORK_GP_NO = #{WORK_GP_NO} , DCU_ID = #{DCU_ID} , DCU_IP = #{DCU_IP} , MODEM_MAC = #{MODEM_MAC} , METER_ID = #{METER_ID} , MGMT_CD = #{MGMT_CD} , DESN_ST_YMD = #{DESN_ST_YMD} , LAY_YMD = #{LAY_YMD} , DCU_DT = TO_TIMESTAMP(#{DCU_DT}, 'YYYYMMDDHH24MISS') , SEVER_DT = TO_TIMESTAMP(#{SEVER_DT}, 'YYYYMMDDHH24MISS') , TRADE = #{TRADE} , COMBLD_NM = #{COMBLD_NM} , TR_FEED_NM = #{TR_FEED_NM} , SV_FEED_NM = #{SV_FEED_NM} , ADDRESS = #{ADDRESS} , ROAD_ADDRESS = #{ROAD_ADDRESS} , INST_S = #{INST_S} , INST_M = #{INST_M} , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS')) , LOW_RANK_METER_ID = NVL ((SELECT TFMI.M_METER_ID FROM TM_FCTY_CS_METER_INFO TFMI WHERE TFMI.DEPT1 = #{DEPT1} AND TFMI.M_USE_YN = 'Y' AND TFMI.M_MODEM_MAC = #{MODEM_MAC} AND ROWNUM = 1) , (SELECT TFMI.M_METER_ID FROM TM_FCTY_CS_METER_INFO TFMI WHERE TFMI.DEPT1 = #{DEPT1} AND TFMI.M_USE_YN = 'Y' and TFMI.M_MODEM_MAC = '012' || SUBSTRING(REPLACE(#{MODEM_MAC}, '-0', ''), 2) AND ROWNUM = 1)) WHERE WORK_STEP IN ('10','20')
/* 유지관리 조치내용_DCU 송신 */ SELECT ERR_ID, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, DCU_ID, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_DCU_ID, CHBD_DCU_YN, CHBD_TDU_YN, CHBD_PLC_YN, CHBD_FRU_YN, CHBD_EXT_YN, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, REPAIR_DETAIL, REWORK_YN, ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, NEW_DCU_IP, WORKER1_DIV, WORKER2_DIV, WORKER3_DIV, MEMO, EXT_DCU_MAC, NEW_DCU_MAC, MOD_ID, MOD_DATE, REG_ID, REG_DATE FROM ( SELECT A.ERR_ID, A.DEPT1, A.DEPT2, A.KDN_DEPT1, A.KDN_DEPT2, A.ACT_FCTY_CD, A.DCU_ID, A.ERR_CAUSE1, A.ERR_CAUSE2, A.ERR_CAUSE3, A.ERR_ACTION, A.NEW_DCU_ID, A.CHBD_DCU_YN, A.CHBD_TDU_YN, A.CHBD_PLC_YN, A.CHBD_FRU_YN, A.CHBD_EXT_YN, A.MAT1_CD, A.MAT1_PRICE, A.MAT1_CNT, A.MAT2_CD, A.MAT2_PRICE, A.MAT2_CNT, A.MAT3_CD, A.MAT3_PRICE, A.MAT3_CNT, A.MAT4_CD, A.MAT4_PRICE, A.MAT4_CNT, A.MAT5_CD, A.MAT5_PRICE, A.MAT5_CNT , B.USER_SEQ AS SV_SEQ, C.USER_SEQ AS WORKER1_SEQ, D.USER_SEQ AS WORKER2_SEQ, E.USER_SEQ AS WORKER3_SEQ , A.REPAIR_DETAIL, A.REWORK_YN, TO_CHAR(A.ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, A.ATCH_FILE_ID1, A.ATCH_FILE_ID2, A.ATCH_FILE_ID3, A.ATCH_FILE_ID4, A.NEW_DCU_IP , C.EMP_CL_CD AS WORKER1_DIV, D.EMP_CL_CD AS WORKER2_DIV, E.EMP_CL_CD AS WORKER3_DIV , A.MEMO, A.EXT_DCU_MAC, A.NEW_DCU_MAC , A.MOD_ID, TO_CHAR(A.MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, A.REG_ID, TO_CHAR(A.REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY A.ERR_ID) AS R_NUM FROM TM_WORK_ACT_DCU A LEFT JOIN SMN_USER B ON (A.SV_SEQ = B.USER_ID) LEFT JOIN SMN_USER C ON (A.WORKER1_SEQ = C.USER_ID) LEFT JOIN SMN_USER D ON (A.WORKER2_SEQ = D.USER_ID) LEFT JOIN SMN_USER E ON (A.WORKER3_SEQ = E.USER_ID) WHERE 1 = 1 AND A.MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000
/* 유지관리 조치내용_DCU 송신 상태 변경 */ UPDATE TM_WORK_ACT_DCU SET MKAMI_SEND_YN = 'Y' , MKAMI_SEND_DATE = SYSTIMESTAMP WHERE 1 = 1 AND ERR_ID IN ( SELECT ERR_ID FROM ( SELECT A.ERR_ID, A.DEPT1, A.DEPT2, A.KDN_DEPT1, A.KDN_DEPT2, A.ACT_FCTY_CD, A.DCU_ID, A.ERR_CAUSE1, A.ERR_CAUSE2, A.ERR_CAUSE3, A.ERR_ACTION, A.NEW_DCU_ID, A.CHBD_DCU_YN, A.CHBD_TDU_YN, A.CHBD_PLC_YN, A.CHBD_FRU_YN, A.CHBD_EXT_YN, A.MAT1_CD, A.MAT1_PRICE, A.MAT1_CNT, A.MAT2_CD, A.MAT2_PRICE, A.MAT2_CNT, A.MAT3_CD, A.MAT3_PRICE, A.MAT3_CNT, A.MAT4_CD, A.MAT4_PRICE, A.MAT4_CNT, A.MAT5_CD, A.MAT5_PRICE, A.MAT5_CNT , B.USER_SEQ AS SV_SEQ, C.USER_SEQ AS WORKER1_SEQ, D.USER_SEQ AS WORKER2_SEQ, E.USER_SEQ AS WORKER3_SEQ , A.REPAIR_DETAIL, A.REWORK_YN, TO_CHAR(A.ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, A.ATCH_FILE_ID1, A.ATCH_FILE_ID2, A.ATCH_FILE_ID3, A.ATCH_FILE_ID4, A.NEW_DCU_IP , C.EMP_CL_CD AS WORKER1_DIV, D.EMP_CL_CD AS WORKER2_DIV, E.EMP_CL_CD AS WORKER3_DIV , A.MEMO, A.EXT_DCU_MAC, A.NEW_DCU_MAC , A.MOD_ID, TO_CHAR(A.MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, A.REG_ID, TO_CHAR(A.REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY A.ERR_ID) AS R_NUM FROM TM_WORK_ACT_DCU A LEFT JOIN SMN_USER B ON (A.SV_SEQ = B.USER_ID) LEFT JOIN SMN_USER C ON (A.WORKER1_SEQ = C.USER_ID) LEFT JOIN SMN_USER D ON (A.WORKER2_SEQ = D.USER_ID) LEFT JOIN SMN_USER E ON (A.WORKER3_SEQ = E.USER_ID) WHERE 1 = 1 AND A.MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000 )
/* 유지관리 조치내용_모뎀 송신 */ SELECT ERR_ID, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, MODEM_MAC, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_MODEM_MAC, NEW_DCU_ID, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, WORKER1_DIV, WORKER2_DIV, WORKER3_DIV, REPAIR_DETAIL, REWORK_YN, ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, METER_SEAL1, METER_SEAL2, BOX_SEAL1, BOX_SEAL2, METER_ID, MEMO, MOD_ID, MOD_DATE, REG_ID, REG_DATE FROM ( SELECT A.ERR_ID, A.DEPT1, A.DEPT2, A.KDN_DEPT1, A.KDN_DEPT2, A.ACT_FCTY_CD, A.MODEM_MAC, A.ERR_CAUSE1, A.ERR_CAUSE2, A.ERR_CAUSE3, A.ERR_ACTION, A.NEW_MODEM_MAC, A.NEW_DCU_ID, A.MAT1_CD, A.MAT1_PRICE, A.MAT1_CNT, A.MAT2_CD, A.MAT2_PRICE, A.MAT2_CNT, A.MAT3_CD, A.MAT3_PRICE, A.MAT3_CNT, A.MAT4_CD, A.MAT4_PRICE, A.MAT4_CNT, A.MAT5_CD, A.MAT5_PRICE, A.MAT5_CNT , B.USER_SEQ AS SV_SEQ, C.USER_SEQ AS WORKER1_SEQ, D.USER_SEQ AS WORKER2_SEQ, E.USER_SEQ AS WORKER3_SEQ , C.EMP_CL_CD AS WORKER1_DIV, D.EMP_CL_CD AS WORKER2_DIV, E.EMP_CL_CD AS WORKER3_DIV , A.REPAIR_DETAIL, A.REWORK_YN, TO_CHAR(A.ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, A.ATCH_FILE_ID1, A.ATCH_FILE_ID2, A.ATCH_FILE_ID3, A.ATCH_FILE_ID4, A.METER_SEAL1, A.METER_SEAL2, A.BOX_SEAL1, A.BOX_SEAL2, A.METER_ID, A.MEMO , A.MOD_ID, TO_CHAR(A.MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, A.REG_ID, TO_CHAR(A.REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY A.ERR_ID) AS R_NUM FROM TM_WORK_ACT_MODEM A LEFT JOIN SMN_USER B ON (A.SV_SEQ = B.USER_ID) LEFT JOIN SMN_USER C ON (A.WORKER1_SEQ = C.USER_ID) LEFT JOIN SMN_USER D ON (A.WORKER2_SEQ = D.USER_ID) LEFT JOIN SMN_USER E ON (A.WORKER3_SEQ = E.USER_ID) WHERE 1 = 1 AND A.MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000
/* 유지관리 조치내용_모뎀 송신 상태 변경 */ UPDATE TM_WORK_ACT_MODEM SET MKAMI_SEND_YN = 'Y' , MKAMI_SEND_DATE = SYSTIMESTAMP WHERE 1 = 1 AND ERR_ID IN ( SELECT ERR_ID FROM ( SELECT A.ERR_ID, A.DEPT1, A.DEPT2, A.KDN_DEPT1, A.KDN_DEPT2, A.ACT_FCTY_CD, A.MODEM_MAC, A.ERR_CAUSE1, A.ERR_CAUSE2, A.ERR_CAUSE3, A.ERR_ACTION, A.NEW_MODEM_MAC, A.NEW_DCU_ID, A.MAT1_CD, A.MAT1_PRICE, A.MAT1_CNT, A.MAT2_CD, A.MAT2_PRICE, A.MAT2_CNT, A.MAT3_CD, A.MAT3_PRICE, A.MAT3_CNT, A.MAT4_CD, A.MAT4_PRICE, A.MAT4_CNT, A.MAT5_CD, A.MAT5_PRICE, A.MAT5_CNT , B.USER_SEQ AS SV_SEQ, C.USER_SEQ AS WORKER1_SEQ, D.USER_SEQ AS WORKER2_SEQ, E.USER_SEQ AS WORKER3_SEQ , C.EMP_CL_CD AS WORKER1_DIV, D.EMP_CL_CD AS WORKER2_DIV, E.EMP_CL_CD AS WORKER3_DIV , A.REPAIR_DETAIL, A.REWORK_YN, TO_CHAR(A.ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, A.ATCH_FILE_ID1, A.ATCH_FILE_ID2, A.ATCH_FILE_ID3, A.ATCH_FILE_ID4, A.METER_SEAL1, A.METER_SEAL2, A.BOX_SEAL1, A.BOX_SEAL2, A.METER_ID, A.MEMO , A.MOD_ID, TO_CHAR(A.MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, A.REG_ID, TO_CHAR(A.REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY A.ERR_ID) AS R_NUM FROM TM_WORK_ACT_MODEM A LEFT JOIN SMN_USER B ON (A.SV_SEQ = B.USER_ID) LEFT JOIN SMN_USER C ON (A.WORKER1_SEQ = C.USER_ID) LEFT JOIN SMN_USER D ON (A.WORKER2_SEQ = D.USER_ID) LEFT JOIN SMN_USER E ON (A.WORKER3_SEQ = E.USER_ID) WHERE 1 = 1 AND A.MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000 )
/* 유지관리 기타 조치_DCU 송신 */ SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, DATA_NUM, DCU_ID, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_DCU_ID, CHBD_DCU_YN, CHBD_TDU_YN, CHBD_PLC_YN, CHBD_FRU_YN, CHBD_EXT_YN, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, REPAIR_DETAIL, ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, NEW_DCU_IP, WORKER1_DIV, WORKER2_DIV, WORKER3_DIV, ACT_DETAIL, ADDRESS, ROAD_ADDRESS, EXT_DCU_MAC, NEW_DCU_MAC , MOD_ID, MOD_DATE, REG_ID, REG_DATE FROM ( SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, DATA_NUM, DCU_ID, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_DCU_ID, CHBD_DCU_YN, CHBD_TDU_YN, CHBD_PLC_YN, CHBD_FRU_YN, CHBD_EXT_YN, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, REPAIR_DETAIL, TO_CHAR(ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, NEW_DCU_IP, WORKER1_DIV, WORKER2_DIV, WORKER3_DIV, ACT_DETAIL, ADDRESS, ROAD_ADDRESS, EXT_DCU_MAC, NEW_DCU_MAC , MOD_ID, TO_CHAR(MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, REG_ID, TO_CHAR(REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY SEQ) AS R_NUM FROM TM_ETC_ACT_DCU WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000
/* 유지관리 기타 조치_DCU 송신 상태 변경 */ UPDATE TM_ETC_ACT_DCU SET MKAMI_SEND_YN = 'Y' , MKAMI_SEND_DATE = SYSTIMESTAMP WHERE 1 = 1 AND SEQ IN ( SELECT SEQ FROM ( SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, DATA_NUM, DCU_ID, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_DCU_ID, CHBD_DCU_YN, CHBD_TDU_YN, CHBD_PLC_YN, CHBD_FRU_YN, CHBD_EXT_YN, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, REPAIR_DETAIL, TO_CHAR(ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, NEW_DCU_IP, WORKER1_DIV, WORKER2_DIV, WORKER3_DIV, ACT_DETAIL, ADDRESS, ROAD_ADDRESS , MOD_ID, TO_CHAR(MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, REG_ID, TO_CHAR(REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY SEQ) AS R_NUM FROM TM_ETC_ACT_DCU WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000 )
/* 유지관리 기타 조치_모뎀계기 송신 */ SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, MODEM_MAC, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_MODEM_MAC, NEW_DCU_ID, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, METER_SEAL1, METER_SEAL2, BOX_SEAL1, BOX_SEAL2, METER_ID, M_METER_ID, MEMO, ACT_DETAIL, REPAIR_DETAIL, ADDRESS, ROAD_ADDRESS , MOD_ID, MOD_DATE, REG_ID, REG_DATE FROM ( SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, MODEM_MAC, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_MODEM_MAC, NEW_DCU_ID, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, TO_CHAR(ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, METER_SEAL1, METER_SEAL2, BOX_SEAL1, BOX_SEAL2, METER_ID, M_METER_ID, MEMO, ACT_DETAIL, REPAIR_DETAIL, ADDRESS, ROAD_ADDRESS , MOD_ID, TO_CHAR(MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, REG_ID, TO_CHAR(REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY SEQ) AS R_NUM FROM TM_ETC_ACT_MODEM WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000
/* 유지관리 기타 조치_모뎀계기 송신 상태 변경 */ UPDATE TM_ETC_ACT_MODEM SET MKAMI_SEND_YN = 'Y' , MKAMI_SEND_DATE = SYSTIMESTAMP WHERE 1 = 1 AND SEQ IN ( SELECT SEQ FROM ( SELECT SEQ, WORK_STEP, DEPT1, DEPT2, KDN_DEPT1, KDN_DEPT2, ACT_FCTY_CD, MODEM_MAC, ERR_CAUSE1, ERR_CAUSE2, ERR_CAUSE3, ERR_ACTION, NEW_MODEM_MAC, NEW_DCU_ID, MAT1_CD, MAT1_PRICE, MAT1_CNT, MAT2_CD, MAT2_PRICE, MAT2_CNT, MAT3_CD, MAT3_PRICE, MAT3_CNT, MAT4_CD, MAT4_PRICE, MAT4_CNT, MAT5_CD, MAT5_PRICE, MAT5_CNT, SV_SEQ, WORKER1_SEQ, WORKER2_SEQ, WORKER3_SEQ, TO_CHAR(ACT_DATE, 'YYYYMMDDHH24MISS') AS ACT_DATE, ATCH_FILE_ID1, ATCH_FILE_ID2, ATCH_FILE_ID3, ATCH_FILE_ID4, METER_SEAL1, METER_SEAL2, BOX_SEAL1, BOX_SEAL2, METER_ID, M_METER_ID, MEMO, ACT_DETAIL, REPAIR_DETAIL, ADDRESS, ROAD_ADDRESS , MOD_ID, TO_CHAR(MOD_DATE, 'YYYYMMDDHH24MISS') AS MOD_DATE, REG_ID, TO_CHAR(REG_DATE, 'YYYYMMDDHH24MISS') AS REG_DATE , ROW_NUMBER() OVER (ORDER BY SEQ) AS R_NUM FROM TM_ETC_ACT_MODEM WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000 )
/* 유지관리 조치내용_노임품목 송신 */ SELECT ERR_ID, SVC_CD, SVC_CNT FROM ( SELECT ERR_ID, SVC_CD, SVC_CNT , ROW_NUMBER() OVER (ORDER BY ERR_ID, SVC_CD) AS R_NUM FROM TM_WORK_ACT_SVC_CD WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000
/* 유지관리 조치내용_노임품목 송신 상태 변경 */ UPDATE TM_WORK_ACT_SVC_CD SET MKAMI_SEND_YN = 'Y' , MKAMI_SEND_DATE = SYSTIMESTAMP WHERE 1 = 1 AND (ERR_ID, SVC_CD) IN ( SELECT ERR_ID, SVC_CD FROM ( SELECT ERR_ID, SVC_CD, SVC_CNT , ROW_NUMBER() OVER (ORDER BY ERR_ID, SVC_CD) AS R_NUM FROM TM_WORK_ACT_SVC_CD WHERE 1 = 1 AND MKAMI_SEND_YN = 'N' ) WHERE 1 = 1 AND R_NUM BETWEEN 1 AND 1000 )
/* 유지관리 위험불가개소 수신 */ MERGE INTO TM_FCTY_DANGER_INFO USING DUAL ON (DEPT1 = #{DEPT1} AND FCTY_ID = #{FCTY_ID}) WHEN NOT MATCHED THEN INSERT ( DEPT1, DEPT2, FCTY_ID, FCTY_TYPE, PHASE3, MORE10, ETC, MEMO, GOSO_LOCA, CORPS, NEAR_ROAD, LONG_DIS, TOUGH_ROAD, MOD_ID, MOD_DATE, REG_ID, REG_DATE ) VALUES ( #{DEPT1}, #{DEPT2}, #{FCTY_ID}, #{FCTY_TYPE}, #{PHASE3}, #{MORE10}, #{ETC}, #{MEMO}, #{GOSO_LOCA}, #{CORPS}, #{NEAR_ROAD}, #{LONG_DIS}, #{TOUGH_ROAD}, NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') ) WHEN MATCHED THEN UPDATE SET DEPT2 = #{DEPT2} , FCTY_TYPE = #{FCTY_TYPE} , PHASE3 = #{PHASE3} , MORE10 = #{MORE10} , ETC = #{ETC} , MEMO = #{MEMO} , GOSO_LOCA = #{GOSO_LOCA} , CORPS = #{CORPS} , NEAR_ROAD = #{NEAR_ROAD} , LONG_DIS = #{LONG_DIS} , TOUGH_ROAD = #{TOUGH_ROAD} , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS'))
/* 유지관리 계기장애처리완료 수신 */ MERGE INTO TM_FAC_ERR_CLR USING DUAL ON (ERR_ID = #{ERR_ID}) WHEN NOT MATCHED THEN INSERT ( ERR_ID, DEPT1, DEPT2, NEW_FCTY_YN, EVENT_END_DT, MOD_ID, MOD_DATE, REG_ID, REG_DATE ) VALUES ( #{ERR_ID}, #{DEPT1}, #{DEPT2}, #{NEW_FCTY_YN}, TO_TIMESTAMP(EVENT_END_DT, 'YYYYMMDDHH24MISS'), NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') ) WHEN MATCHED THEN UPDATE SET DEPT1 = #{DEPT1} , DEPT2 = #{DEPT2} , NEW_FCTY_YN = #{NEW_FCTY_YN} , EVENT_END_DT = TO_TIMESTAMP(EVENT_END_DT, 'YYYYMMDDHH24MISS') , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS'))
/* 유지관리 설비계기정보 수신 */ MERGE INTO TM_FCTY_CS_METER_INFO USING DUAL ON (DEPT1 = #{DEPT1} AND M_METER_ID = #{M_METER_ID}) WHEN NOT MATCHED THEN INSERT ( M_METER_ID, M_CREATE_DATE, M_REMOVE_DATE, M_USE_YN, M_DCU_ID, M_MODEM_MAC, M_MRD, M_UPDATE_DATE, METER_TYPE, CUST_NO, CUST_CATEG, CTNR_STAT, CTNR_PWR, COMBLD_NM, DEPT1, DEPT2, DCU_IP, BUSI_DIV, KDN_DEPT1, KDN_DEPT2, INST_DIV, INST_L, INST_M, INST_S, CONSIGN_YN, DEFECT_YN, MANF_YM, DLVP_YM, CONSIGN_DATE, ROAD_ADDRESS, ADDRESS, ATCH_FILE_ID, ATCH_FILE_ID2, ETC, STATE_CHANGE, MATCH_YN, EXCPT, M_COMPANY, FAC_DIV, CODN_LAT, CODN_LNG, REVERSE_YN, EXCEPT_DIV, IU_DIV, DESN_ST, SV_FEED, TRADE, GUM_DAY, MASTER_YN, TR_FEED_NM, SV_FEED_NM, TR_FEED_NO, SV_FEED_NO, BUILD_CD, MGMT_CD, COMM_CD, ATNT_FCTY_YN, ACT_BUSI_DIV_NM, FCTY_CMNT , MOD_ID, MOD_DATE, REG_ID, REG_DATE ) VALUES ( #{M_METER_ID}, TO_TIMESTAMP(#{M_CREATE_DATE}, 'YYYYMMDDHH24MISS'), TO_TIMESTAMP(#{M_REMOVE_DATE}, 'YYYYMMDDHH24MISS'), #{M_USE_YN}, #{M_DCU_ID}, #{M_MODEM_MAC}, #{M_MRD}, TO_TIMESTAMP(#{M_UPDATE_DATE}, 'YYYYMMDDHH24MISS'), #{METER_TYPE}, #{CUST_NO}, #{CUST_CATEG}, #{CTNR_STAT}, #{CTNR_PWR}, #{COMBLD_NM}, #{DEPT1}, #{DEPT2}, #{DCU_IP}, #{BUSI_DIV}, #{KDN_DEPT1}, #{KDN_DEPT2}, #{INST_DIV}, #{INST_L}, #{INST_M}, #{INST_S}, #{CONSIGN_YN}, #{DEFECT_YN}, #{MANF_YM}, #{DLVP_YM}, TO_TIMESTAMP(#{CONSIGN_DATE}, 'YYYYMMDDHH24MISS'), #{ROAD_ADDRESS}, #{ADDRESS}, #{ATCH_FILE_ID}, #{ATCH_FILE_ID2}, #{ETC}, #{STATE_CHANGE}, #{MATCH_YN}, #{EXCPT}, #{M_COMPANY}, #{FAC_DIV}, #{CODN_LAT}, #{CODN_LNG}, #{REVERSE_YN}, #{EXCEPT_DIV}, #{IU_DIV}, TO_TIMESTAMP(#{DESN_ST}, 'YYYYMMDDHH24MISS'), #{SV_FEED}, #{TRADE}, #{GUM_DAY}, #{MASTER_YN}, #{TR_FEED_NM}, #{SV_FEED_NM}, #{TR_FEED_NO}, #{SV_FEED_NO}, #{BUILD_CD}, #{MGMT_CD}, #{COMM_CD}, #{ATNT_FCTY_YN}, #{ACT_BUSI_DIV_NM}, #{FCTY_CMNT} , NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') ) WHEN MATCHED THEN UPDATE SET M_CREATE_DATE = TO_TIMESTAMP(#{M_CREATE_DATE}, 'YYYYMMDDHH24MISS') , M_REMOVE_DATE = TO_TIMESTAMP(#{M_REMOVE_DATE}, 'YYYYMMDDHH24MISS') , M_USE_YN = #{M_USE_YN} , M_DCU_ID = #{M_DCU_ID} , M_MODEM_MAC = #{M_MODEM_MAC} , M_MRD = #{M_MRD} , M_UPDATE_DATE = TO_TIMESTAMP(#{M_UPDATE_DATE}, 'YYYYMMDDHH24MISS') , METER_TYPE = #{METER_TYPE} , CUST_NO = #{CUST_NO} , CUST_CATEG = #{CUST_CATEG} , CTNR_STAT = #{CTNR_STAT} , CTNR_PWR = #{CTNR_PWR} , COMBLD_NM = #{COMBLD_NM} , DEPT2 = #{DEPT2} , DCU_IP = #{DCU_IP} , BUSI_DIV = #{BUSI_DIV} , KDN_DEPT1 = #{KDN_DEPT1} , KDN_DEPT2 = #{KDN_DEPT2} , INST_DIV = #{INST_DIV} , INST_L = #{INST_L} , INST_M = #{INST_M} , INST_S = #{INST_S} , CONSIGN_YN = #{CONSIGN_YN} , DEFECT_YN = #{DEFECT_YN} , MANF_YM = #{MANF_YM} , DLVP_YM = #{DLVP_YM} , CONSIGN_DATE = TO_TIMESTAMP(#{CONSIGN_DATE}, 'YYYYMMDDHH24MISS') , ROAD_ADDRESS = #{ROAD_ADDRESS} , ADDRESS = #{ADDRESS} , ATCH_FILE_ID = #{ATCH_FILE_ID} , ATCH_FILE_ID2 = #{ATCH_FILE_ID2} , ETC = #{ETC} , STATE_CHANGE = #{STATE_CHANGE} , MATCH_YN = #{MATCH_YN} , EXCPT = #{EXCPT} , M_COMPANY = #{M_COMPANY} , FAC_DIV = #{FAC_DIV} , CODN_LAT = #{CODN_LAT} , CODN_LNG = #{CODN_LNG} , REVERSE_YN = #{REVERSE_YN} , EXCEPT_DIV = #{EXCEPT_DIV} , IU_DIV = #{IU_DIV} , DESN_ST = TO_TIMESTAMP(#{DESN_ST}, 'YYYYMMDDHH24MISS') , SV_FEED = #{SV_FEED} , TRADE = #{TRADE} , GUM_DAY = #{GUM_DAY} , MASTER_YN = #{MASTER_YN} , TR_FEED_NM = #{TR_FEED_NM} , SV_FEED_NM = #{SV_FEED_NM} , TR_FEED_NO = #{TR_FEED_NO} , SV_FEED_NO = #{SV_FEED_NO} , BUILD_CD = #{BUILD_CD} , MGMT_CD = #{MGMT_CD} , COMM_CD = #{COMM_CD} , ATNT_FCTY_YN = #{ATNT_FCTY_YN} , ACT_BUSI_DIV_NM = #{ACT_BUSI_DIV_NM} , FCTY_CMNT = #{FCTY_CMNT} , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS'))
/* 유지관리 설비DCU정보 수신 */ MERGE INTO TM_FCTY_DCU_INFO USING DUAL ON (DEPT1 = #{DEPT1} AND DCU_ID = #{DCU_ID}) WHEN NOT MATCHED THEN INSERT ( DCU_ID, DCU_PUBLIC_IP, DCU_USE_YN, DCU_CREATE_DATE, DCU_UPDATE_DATE, BUSI_DIV, DCU_REMOVE_DATE, TRS_FEED_NO, TRS_POLE_NO, TRS_LATITUDE, TRS_LONGITUDE, M_COMPANY, MANF_YM, DLVP_YM, NEW_MAT_NO, DEPT1, DEPT2, FAC_DIV, MODEM_CNT, METER_CNT, KDN_DEPT1, KDN_DEPT2, INST_DIV, INST_L, INST_M, INST_S, CONSIGN_YN, DEFECT_YN, CONSIGN_DATE, ROAD_ADDRESS, ADDRESS, STATE_CHANGE, B_USER, U_DCU_IP, D_MODEM_MAC, IU_DIV, GN_NAME, DCU_SERIAL, FW_BUILD_VER, BUILD_CD, N_MGMT_CD, N_MGMT_DT, BOARD_MAC, MASTER_YN, TDU_YN, TDU_PHASE, TRS_DIV, NET_MAC, NET_GW, NET_COM, NET_MASK, NET_CD, NET_CNTR_ID, COMM_CD, FCTY_CMNT , MOD_ID, MOD_DATE, REG_ID, REG_DATE ) VALUES ( #{DCU_ID}, #{DCU_PUBLIC_IP}, #{DCU_USE_YN}, TO_TIMESTAMP(#{DCU_CREATE_DATE}, 'YYYYMMDDHH24MISS'), TO_TIMESTAMP(#{DCU_UPDATE_DATE}, 'YYYYMMDDHH24MISS'), #{BUSI_DIV}, TO_TIMESTAMP(#{DCU_REMOVE_DATE}, 'YYYYMMDDHH24MISS'), #{TRS_FEED_NO}, #{TRS_POLE_NO}, #{TRS_LATITUDE}, #{TRS_LONGITUDE}, #{M_COMPANY}, #{MANF_YM}, #{DLVP_YM}, #{NEW_MAT_NO}, #{DEPT1}, #{DEPT2}, #{FAC_DIV}, #{MODEM_CNT}, #{METER_CNT}, #{KDN_DEPT1}, #{KDN_DEPT2}, #{INST_DIV}, #{INST_L}, #{INST_M}, #{INST_S}, #{CONSIGN_YN}, #{DEFECT_YN}, TO_TIMESTAMP(#{CONSIGN_DATE}, 'YYYYMMDDHH24MISS'), #{ROAD_ADDRESS}, #{ADDRESS}, #{STATE_CHANGE}, #{B_USER}, #{U_DCU_IP}, #{D_MODEM_MAC}, #{IU_DIV}, #{GN_NAME}, #{DCU_SERIAL}, #{FW_BUILD_VER}, #{BUILD_CD}, #{N_MGMT_CD}, TO_TIMESTAMP(#{N_MGMT_DT}, 'YYYYMMDDHH24MISS'), #{BOARD_MAC}, #{MASTER_YN}, #{TDU_YN}, #{TDU_PHASE}, #{TRS_DIV}, #{NET_MAC}, #{NET_GW}, #{NET_COM}, #{NET_MASK}, #{NET_CD}, #{NET_CNTR_ID}, #{COMM_CD}, #{FCTY_CMNT} , NVL(#{MOD_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{MOD_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS'), NVL(#{REG_ID}, 'DFXAGENT_USER'), TO_TIMESTAMP(NVL(#{REG_DATE}, TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS')), 'YYYYMMDDHH24MISS') ) WHEN MATCHED THEN UPDATE SET DCU_PUBLIC_IP = #{DCU_PUBLIC_IP} , DCU_USE_YN = #{DCU_USE_YN} , DCU_CREATE_DATE = TO_TIMESTAMP(#{DCU_CREATE_DATE}, 'YYYYMMDDHH24MISS') , DCU_UPDATE_DATE = TO_TIMESTAMP(#{DCU_UPDATE_DATE}, 'YYYYMMDDHH24MISS') , BUSI_DIV = #{BUSI_DIV} , DCU_REMOVE_DATE = TO_TIMESTAMP(#{DCU_REMOVE_DATE}, 'YYYYYMMDDHH24MISS') , TRS_FEED_NO = #{TRS_FEED_NO} , TRS_POLE_NO = #{TRS_POLE_NO} , TRS_LATITUDE = #{TRS_LATITUDE} , TRS_LONGITUDE = #{TRS_LONGITUDE} , M_COMPANY = #{M_COMPANY} , MANF_YM = #{MANF_YM} , DLVP_YM = #{DLVP_YM} , NEW_MAT_NO = #{NEW_MAT_NO} , DEPT2 = #{DEPT2} , FAC_DIV = #{FAC_DIV} , MODEM_CNT = #{MODEM_CNT} , METER_CNT = #{METER_CNT} , KDN_DEPT1 = #{KDN_DEPT1} , KDN_DEPT2 = #{KDN_DEPT2} , INST_DIV = #{INST_DIV} , INST_L = #{INST_L} , INST_M = #{INST_M} , INST_S = #{INST_S} , CONSIGN_YN = #{CONSIGN_YN} , DEFECT_YN = #{DEFECT_YN} , CONSIGN_DATE = TO_TIMESTAMP(#{CONSIGN_DATE}, 'YYYYMMDDHH24MISS') , ROAD_ADDRESS = #{ROAD_ADDRESS} , ADDRESS = #{ADDRESS} , STATE_CHANGE = #{STATE_CHANGE} , B_USER = #{B_USER} , U_DCU_IP = #{U_DCU_IP} , D_MODEM_MAC = #{D_MODEM_MAC} , IU_DIV = #{IU_DIV} , GN_NAME = #{GN_NAME} , DCU_SERIAL = #{DCU_SERIAL} , FW_BUILD_VER = #{FW_BUILD_VER} , BUILD_CD = #{BUILD_CD} , N_MGMT_CD = #{N_MGMT_CD} , N_MGMT_DT = TO_TIMESTAMP(#{N_MGMT_DT}, 'YYYYMMDDHH24MISS') , BOARD_MAC = #{BOARD_MAC} , MASTER_YN = #{MASTER_YN} , TDU_YN = #{TDU_YN} , TDU_PHASE = #{TDU_PHASE} , TRS_DIV = #{TRS_DIV} , NET_MAC = #{NET_MAC} , NET_GW = #{NET_GW} , NET_COM = #{NET_COM} , NET_MASK = #{NET_MASK} , NET_CD = #{NET_CD} , NET_CNTR_ID = #{NET_CNTR_ID} , COMM_CD = #{COMM_CD} , FCTY_CMNT = #{FCTY_CMNT} , MOD_ID = NVL(#{MOD_ID}, 'DFXAGENT_USER') , MOD_DATE = DECODE(#{MOD_DATE}, NULL, SYSTIMESTAMP, TO_TIMESTAMP(#{MOD_DATE}, 'YYYYMMDDHH24MISS'))