shjung преди 10 месеца
родител
ревизия
eee03302a9

+ 0 - 1
conf/ggits-etlp-server.pid

@@ -1 +0,0 @@
-25048

+ 6 - 0
src/main/java/com/ggits/etlp/server/config/ApplicationConfig.java

@@ -17,6 +17,7 @@ public class ApplicationConfig {
     private String ggitsServerIp = "192.168.24.22";
     private int dbmsWorkers = 0;
     private int dbmsQueueSize = 0;
+    private int pageCount = 50000;
 
     @PostConstruct
     private void init() {
@@ -29,6 +30,11 @@ public class ApplicationConfig {
             this.dbmsQueueSize = 1000;
         }
 
+        if (this.pageCount == 0) {
+            this.pageCount = 5000;
+        }
+        this.pageCount = Math.min(100000, this.pageCount);
+
         log.info("[{}] -------------------------", this.getClass().getSimpleName());
         log.info("[{}]   dbmsWorkers: {}", this.getClass().getSimpleName(), this.dbmsWorkers);
         log.info("[{}] dbmsQueueSize: {}", this.getClass().getSimpleName(), this.dbmsQueueSize);

+ 3 - 3
src/main/java/com/ggits/etlp/server/controller/GgitsEtlpServerController.java

@@ -50,9 +50,9 @@ public class GgitsEtlpServerController {
                     center.getRegionCd(),
                     center.getEtlpIntLc().getStartTime(), dF.format(center.getEtlpIntLc().getReadCount()), dF.format(center.getEtlpIntLc().getWriteCount()),
                     center.getEtlpFlow().getStartTime(), dF.format(center.getEtlpFlow().getReadCount()), dF.format(center.getEtlpFlow().getWriteCount()),
-                    center.getEtlpDPlan().getStartTime(), dF.format(center.getEtlpDPlan().getReadCount()), dF.format(center.getEtlpDPlan().getWriteCount()),
-                    center.getEtlpWeek().getStartTime(), dF.format(center.getEtlpWeek().getReadCount()), dF.format(center.getEtlpWeek().getWriteCount()),
-                    center.getEtlpFPlan().getStartTime(), dF.format(center.getEtlpFPlan().getReadCount()), dF.format(center.getEtlpFPlan().getWriteCount()),
+                    center.getEtlpOperPlan().getStartTime(), dF.format(center.getEtlpOperPlan().getReadCount()), dF.format(center.getEtlpOperPlan().getWriteCount()),
+                    center.getEtlpDyPlan().getStartTime(), dF.format(center.getEtlpDyPlan().getReadCount()), dF.format(center.getEtlpDyPlan().getWriteCount()),
+                    center.getEtlpResrvPlan().getStartTime(), dF.format(center.getEtlpResrvPlan().getReadCount()), dF.format(center.getEtlpResrvPlan().getWriteCount()),
                     center.getEtlpSigmap().getStartTime(), dF.format(center.getEtlpSigmap().getReadCount()), dF.format(center.getEtlpSigmap().getWriteCount()),
                     center.getRegionNm()
             )).append(sep);

+ 12 - 11
src/main/java/com/ggits/etlp/server/dao/mapper/ggits/GgitsMapper.java

@@ -10,20 +10,21 @@ import java.util.List;
 @Mapper
 public interface GgitsMapper {
 
-    List<TbScsTConIntLc> selectScsTConIntLc(@Param("obj") RegionCenter obj);
+    Integer selectScsTConIntLcCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntLc> selectScsTConIntLc(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
 
-    Integer selectScsTConIntFlowCount(@Param("obj") RegionCenter obj);
-    List<TbScsTConIntFlow> selectScsTConIntFlow(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq);
+    Integer selectScsTConIntFlowCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntFlow> selectScsTConIntFlow(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq, @Param("updtDt") String updtDt);
 
-    Integer selectScsTConIntDPlanCount(@Param("obj") RegionCenter obj);
-    List<TbScsTConIntDPlan> selectScsTConIntDPlan(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq);
+    Integer selectScsTConIntDPlanCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntDPlan> selectScsTConIntDPlan(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq, @Param("updtDt") String updtDt);
 
-    Integer selectScsTConIntWeekCount(@Param("obj") RegionCenter obj);
-    List<TbScsTConIntWeek> selectScsTConIntWeek(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq);
+    Integer selectScsTConIntWeekCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntWeek> selectScsTConIntWeek(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq, @Param("updtDt") String updtDt);
 
-    Integer selectScsTConIntFPlanCount(@Param("obj") RegionCenter obj);
-    List<TbScsTConIntFPlan> selectScsTConIntFPlan(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq);
+    Integer selectScsTConIntFPlanCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntFPlan> selectScsTConIntFPlan(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq, @Param("updtDt") String updtDt);
 
-    Integer selectScsTConIntSigmapCount(@Param("obj") RegionCenter obj);
-    List<TbScsTConIntSigmap> selectScsTConIntSigmap(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq);
+    Integer selectScsTConIntSigmapCount(@Param("obj") RegionCenter obj, @Param("updtDt") String updtDt);
+    List<TbScsTConIntSigmap> selectScsTConIntSigmap(@Param("obj") RegionCenter obj, @Param("fromSeq") Integer fromSeq, @Param("toSeq") Integer toSeq, @Param("updtDt") String updtDt);
 }

+ 3 - 0
src/main/java/com/ggits/etlp/server/dao/mapper/sig/SigMapper.java

@@ -1,5 +1,6 @@
 package com.ggits.etlp.server.dao.mapper.sig;
 
+import com.ggits.etlp.server.entity.sig.TbGgitsEtlp;
 import com.ggits.etlp.server.entity.sig.TbRegionGgits;
 import com.ggits.etlp.server.entity.sig.TbInt;
 import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,8 @@ import java.util.Map;
 public interface SigMapper {
 
     List<TbRegionGgits> selectRegionGgits();
+    List<TbGgitsEtlp> selectGgitsEtlp(@Param("tblNm") String tblNm);
+    int updateGgitsEtlp(Map<String, Object> obj);
 
     int initTbInt(@Param("regionCd") String regionCd);
     List<TbInt> selectTbInt(@Param("regionCd") String regionCd);

+ 4 - 5
src/main/java/com/ggits/etlp/server/dao/mapper/sig/batch/SigDao.java

@@ -18,14 +18,13 @@ public class SigDao extends BatchDaoService {
     }
 
     public int updateTbInt(List<HashMap<String, Object>> req) {
-//        log.info("{}.updateTbInt: START. {} EA", this.serviceName, req.size());
-//        Elapsed elapsed = new Elapsed();
-//        int total = updateBatch("updateTbInt", req);
-//        log.info("{}.updateTbInt: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
-//        return total;
         return updateBatch("updateTbInt", req);
     }
 
+    public int updateGgitsEtlp(List<HashMap<String, Object>> req) {
+        return updateBatch("updateGgitsEtlp", req);
+    }
+
     public int updateTbIntFlow(List<HashMap<String, Object>> req) {
         return updateBatch("updateTbIntFlow", req);
     }

+ 73 - 0
src/main/java/com/ggits/etlp/server/dto/EtlpInfo.java

@@ -1,8 +1,12 @@
 package com.ggits.etlp.server.dto;
 
+import com.ggits.etlp.server.common.TimeUtils;
+import com.ggits.etlp.server.entity.sig.TbGgitsEtlp;
+import com.ggits.etlp.server.repository.EtlpConst;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.HashMap;
 
 @Data
 public class EtlpInfo implements Serializable {
@@ -14,6 +18,15 @@ public class EtlpInfo implements Serializable {
     private String  endTime;
     private boolean success;
 
+    private String  qryDt;
+    private String  updtDt;
+    private String  resCd;
+    private Integer dataCnt;
+    private Integer etlpCnt;
+    private Integer succCnt;
+    private String  strTm;
+    private String  endTm;
+
     public EtlpInfo() {
         this.readCount = 0;
         this.writeCount = 0;
@@ -21,4 +34,64 @@ public class EtlpInfo implements Serializable {
         this.endTime = "1970-01-01 00:00:00";
         this.success = true;
     }
+
+    public void startEtlp() {
+        this.success = false;
+        this.startTime = TimeUtils.now();
+
+        this.strTm = TimeUtils.getCurrentTimeString();
+    }
+    public void setCount(int dataCnt, int etlpCnt) {
+        this.readCount = etlpCnt;
+        this.dataCnt = dataCnt;
+        this.etlpCnt = etlpCnt;
+    }
+    public void endEtlp(boolean success, int writeCount) {
+        this.success = success;
+        this.endTime = TimeUtils.now();
+        this.writeCount = writeCount;
+
+        this.endTm = TimeUtils.getCurrentTimeString();
+        this.succCnt = writeCount;
+        if (!success) {
+            // etlp 실패시에
+            this.updtDt = this.qryDt;   // 업데이트 정보를 이전 시각으로 다시설정
+        }
+    }
+
+    public void initEtlp() {
+        this.qryDt   = EtlpConst.qryCountAll;
+        this.updtDt  = TimeUtils.getCurrentTimeString();
+        this.resCd   = EtlpConst.etlpFailed;
+        this.dataCnt = 0;
+        this.etlpCnt = 0;
+        this.succCnt = 0;
+        this.strTm   = TimeUtils.getCurrentTimeString();
+        this.endTm   = TimeUtils.getCurrentTimeString();
+    }
+
+    public void updateEtlp(TbGgitsEtlp etlp) {
+        this.qryDt   = etlp.getUpdDt();
+        this.updtDt  = TimeUtils.getCurrentTimeString();
+        this.resCd   = EtlpConst.etlpFailed;
+        this.dataCnt = 0;
+        this.etlpCnt = 0;
+        this.succCnt = 0;
+        this.strTm   = TimeUtils.getCurrentTimeString();
+        this.endTm   = TimeUtils.getCurrentTimeString();
+    }
+    public HashMap<String, Object> toSig(String regionCd, String tblNm) {
+        HashMap<String, Object> param = new HashMap<>();
+        param.put("TBL_NM",    tblNm);
+        param.put("REGION_CD", regionCd);
+        param.put("UPDT_DT",   this.updtDt);
+        param.put("RES_CD",    this.resCd);
+        param.put("DATA_CNT",  this.dataCnt);
+        param.put("ETLP_CNT",  this.etlpCnt);
+        param.put("SUCC_CNT",  this.succCnt);
+        param.put("STR_TM",    this.strTm);
+        param.put("END_TM",    this.endTm);
+        return param;
+    }
+
 }

+ 35 - 3
src/main/java/com/ggits/etlp/server/dto/RegionCenter.java

@@ -1,5 +1,7 @@
 package com.ggits.etlp.server.dto;
 
+import com.ggits.etlp.server.entity.sig.TbGgitsEtlp;
+import com.ggits.etlp.server.repository.EtlpConst;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -31,12 +33,42 @@ public class RegionCenter implements Serializable {
     //교차로시그널맵_연계, SCS_T_CON_INTSIGMAP
     private EtlpInfo etlpIntLc;
     private EtlpInfo etlpFlow;
-    private EtlpInfo etlpDPlan;
-    private EtlpInfo etlpWeek;
-    private EtlpInfo etlpFPlan;
+    private EtlpInfo etlpOperPlan;
+    private EtlpInfo etlpDyPlan;
+    private EtlpInfo etlpResrvPlan;
     private EtlpInfo etlpSigmap;
 
     public String getLogKey() {
         return this.regionCd;
     }
+
+    public void initEtlp() {
+        this.etlpIntLc.initEtlp();
+        this.etlpFlow.initEtlp();
+        this.etlpOperPlan.initEtlp();
+        this.etlpDyPlan.initEtlp();
+        this.etlpResrvPlan.initEtlp();
+        this.etlpSigmap.initEtlp();
+    }
+
+    public void updateEtlp(String tblNm, TbGgitsEtlp etlp) {
+        if (EtlpConst.etlpTableInt.equals(tblNm)) {
+            this.etlpIntLc.updateEtlp(etlp);
+        }
+        else if (EtlpConst.etlpTableFlow.equals(tblNm)) {
+            this.etlpFlow.updateEtlp(etlp);
+        }
+        else if (EtlpConst.etlpTableOperPlan.equals(tblNm)) {
+            this.etlpOperPlan.updateEtlp(etlp);
+        }
+        else if (EtlpConst.etlpTableDyPlan.equals(tblNm)) {
+            this.etlpDyPlan.updateEtlp(etlp);
+        }
+        else if (EtlpConst.etlpTableResrvPlan.equals(tblNm)) {
+            this.etlpResrvPlan.updateEtlp(etlp);
+        }
+        else if (EtlpConst.etlpTableSignalMap.equals(tblNm)) {
+            this.etlpSigmap.updateEtlp(etlp);
+        }
+    }
 }

+ 21 - 0
src/main/java/com/ggits/etlp/server/entity/sig/TbGgitsEtlp.java

@@ -0,0 +1,21 @@
+package com.ggits.etlp.server.entity.sig;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@Data
+@Builder
+@NoArgsConstructor//(access = AccessLevel.PROTECTED)
+@AllArgsConstructor
+public class TbGgitsEtlp implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private String  tblNm;
+    private String  regionCd;
+    private String  updDt;
+
+}

+ 3 - 3
src/main/java/com/ggits/etlp/server/entity/sig/TbRegionGgits.java

@@ -34,9 +34,9 @@ public class TbRegionGgits implements Serializable {
                 .elapsed(0)
                 .etlpIntLc(new EtlpInfo())
                 .etlpFlow(new EtlpInfo())
-                .etlpDPlan(new EtlpInfo())
-                .etlpWeek(new EtlpInfo())
-                .etlpFPlan(new EtlpInfo())
+                .etlpOperPlan(new EtlpInfo())
+                .etlpDyPlan(new EtlpInfo())
+                .etlpResrvPlan(new EtlpInfo())
                 .etlpSigmap(new EtlpInfo())
                 .build();
     }

+ 15 - 0
src/main/java/com/ggits/etlp/server/repository/EtlpConst.java

@@ -0,0 +1,15 @@
+package com.ggits.etlp.server.repository;
+
+public class EtlpConst {
+
+    public static final String qryCountAll = "20000101000000";
+    public static final String etlpFailed = "N";
+    public static final String etlpSuccess = "Y";
+
+    public static final String etlpTableInt = "TB_INT";
+    public static final String etlpTableFlow = "TB_INT_FLOW";
+    public static final String etlpTableOperPlan = "TB_INT_OPER_PLAN";
+    public static final String etlpTableDyPlan = "TB_INT_DY_PLAN";
+    public static final String etlpTableResrvPlan = "TB_INT_RESRV_PLAN";
+    public static final String etlpTableSignalMap = "TB_INT_SIGNALMAP";
+}

+ 177 - 134
src/main/java/com/ggits/etlp/server/service/GgitsEtlpService.java

@@ -2,6 +2,7 @@ package com.ggits.etlp.server.service;
 
 import com.ggits.etlp.server.common.Elapsed;
 import com.ggits.etlp.server.common.TimeUtils;
+import com.ggits.etlp.server.config.ApplicationConfig;
 import com.ggits.etlp.server.dao.mapper.BatchDaoService;
 import com.ggits.etlp.server.dao.mapper.ggits.GgitsMapper;
 import com.ggits.etlp.server.dao.mapper.sig.SigMapper;
@@ -9,8 +10,10 @@ import com.ggits.etlp.server.dao.mapper.sig.batch.SigDao;
 import com.ggits.etlp.server.dto.EtlpInfo;
 import com.ggits.etlp.server.dto.RegionCenter;
 import com.ggits.etlp.server.entity.ggits.*;
+import com.ggits.etlp.server.entity.sig.TbGgitsEtlp;
 import com.ggits.etlp.server.entity.sig.TbInt;
 import com.ggits.etlp.server.repository.ApplicationRepository;
+import com.ggits.etlp.server.repository.EtlpConst;
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -32,11 +35,21 @@ import java.util.List;
 @Transactional(rollbackFor = {Exception.class})
 public class GgitsEtlpService {
 
+    private final ApplicationConfig config;
     private final ApplicationRepository repo;
     private final GgitsMapper gitsMapper;
     private final SigMapper sigMapper;
     private final SigDao dao;
-    private final int MAX_PAGE_COUNT = 50000;
+
+    private final String[] etlpTables = {
+            EtlpConst.etlpTableInt,
+            EtlpConst.etlpTableFlow,
+            EtlpConst.etlpTableOperPlan,
+            EtlpConst.etlpTableDyPlan,
+            EtlpConst.etlpTableResrvPlan,
+            EtlpConst.etlpTableSignalMap
+    };
+
     private List<String> centerList;
 
     @PostConstruct
@@ -61,6 +74,17 @@ public class GgitsEtlpService {
                 continue;
             }
             center.setElapsed(0);
+            center.initEtlp();
+        }
+
+        for (String etlpTblNm : this.etlpTables) {
+            List<TbGgitsEtlp> etlpList = this.sigMapper.selectGgitsEtlp(etlpTblNm);
+            for (TbGgitsEtlp obj : etlpList) {
+                RegionCenter center = this.repo.getCenterMap().get(obj.getRegionCd());
+                if (center != null) {
+                    center.updateEtlp(etlpTblNm, obj);
+                }
+            }
         }
     }
 
@@ -74,30 +98,47 @@ public class GgitsEtlpService {
         //교차로구성_연계, SCS_T_CON_INTLC
         etlpIntLc();
 
-        //교차로이동류_연계, SCS_T_CON_INTFLOW
-        etlpIntFlow();
-
-        //교차로일계획_연계, SCS_T_CON_INTDPLAN
-        etlpIntDPlan();
-
-        //교차로주간계획_연계, SCS_T_CON_INTWEEK
-        etlpIntWeek();
-
-        //교차로예약계획_연계, SCS_T_CON_INTFPLAN
-        etlpIntFPlan();
-
-        //교차로시그널맵_연계, SCS_T_CON_INTSIGMAP
-        etlpIntSigmap();
+//        //교차로이동류_연계, SCS_T_CON_INTFLOW
+//        etlpIntFlow();
+//
+//        //교차로일계획_연계, SCS_T_CON_INTDPLAN
+//        etlpIntDPlan();
+//
+//        //교차로주간계획_연계, SCS_T_CON_INTWEEK
+//        etlpIntWeek();
+//
+//        //교차로예약계획_연계, SCS_T_CON_INTFPLAN
+//        etlpIntFPlan();
+//
+//        //교차로시그널맵_연계, SCS_T_CON_INTSIGMAP
+//        etlpIntSigmap();
 
         log.info("GGITS DBASE ETLP TO SIG ..END: {}", elapsed.elapsedTimeStr());
         log.info("<************************************************************************************************");
     }
 
+    private int getPageCount(int etlpCount) {
+        int pageCount = (etlpCount / this.config.getPageCount()) + 1;
+        if (0 == (etlpCount % this.config.getPageCount())) {
+            pageCount--;
+        }
+        return pageCount;
+    }
+    private void updateEtlpResult(List<HashMap<String, Object>> etlpLists) {
+        try {
+            this.dao.updateGgitsEtlp(etlpLists);
+        }
+        catch (Exception e) {
+            log.error("updateEtlpResult: {}, Exceptions: {}", etlpLists, e.getMessage());
+        }
+    }
+
     //교차로구성_연계, SCS_T_CON_INTLC
     private void etlpIntLc() {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT, SCS_T_CON_INTLC START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -110,59 +151,63 @@ public class GgitsEtlpService {
             int writeCount = 0;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpIntLc();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            etlp.startEtlp();
+            
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("================================================================================================>");
                 log.info("TB_INT, SCS_T_CON_INTLC START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                this.sigMapper.initTbInt(center.getRegionCd());
+//                this.sigMapper.initTbInt(center.getRegionCd());
                 HashMap<Integer, TbInt> intMap = new HashMap<>();
                 List<TbInt> intLists = this.sigMapper.selectTbInt(center.getRegionCd());
                 for (TbInt intInt : intLists) {
                     intMap.put(intInt.getIntNo(), intInt);
                 }
 
-                List<TbScsTConIntLc> jobLists = this.gitsMapper.selectScsTConIntLc(center);
-
-                log.info("TB_INT, SCS_T_CON_INTLC .READ. {}, {}, SIG: {} EA, GGITS: {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), intLists.size(), jobLists.size(), job.elapsedTimeStr());
-                job.reset();
+                Integer dataCount = this.gitsMapper.selectScsTConIntLcCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntLcCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT, SCS_T_CON_INTLC .READ. {}, {}, SIG: {} EA, GGITS: DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), intLists.size(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                center.getEtlpIntLc().setReadCount(jobLists.size());
+                if (etlpCount > 0) {
+                    List<TbScsTConIntLc> jobLists = this.gitsMapper.selectScsTConIntLc(center, etlp.getQryDt());
+                    log.info("TB_INT, SCS_T_CON_INTLC .READ. {}, {}, SIG: {} EA, GGITS: {} EA. {}",
+                            center.getRegionCd(), center.getRegionNm(), intLists.size(), jobLists.size(), job.elapsedTimeStr());
+                    job.reset();
 
-                lists = new ArrayList<>();
-                for(TbScsTConIntLc obj: jobLists) {
-                    if (obj.getIntName() == null || obj.getIntName().isEmpty()) {
-                        TbInt orgInt = intMap.get(obj.getIntNo());
-                        if (orgInt != null) {
-                            obj.setIntName(orgInt.getIntNm());
-                        }
+                    lists = new ArrayList<>();
+                    for (TbScsTConIntLc obj : jobLists) {
                         if (obj.getIntName() == null || obj.getIntName().isEmpty()) {
-                            obj.setIntName("-");
+                            TbInt orgInt = intMap.get(obj.getIntNo());
+                            if (orgInt != null) {
+                                obj.setIntName(orgInt.getIntNm());
+                            }
+                            if (obj.getIntName() == null || obj.getIntName().isEmpty()) {
+                                obj.setIntName("-");
+                            }
                         }
-                    }
 
-                    HashMap<String, Object> param = obj.toSig(center.getRegionCd());
-                    lists.add(param);
-                    if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
+                        HashMap<String, Object> param = obj.toSig(center.getRegionCd());
+                        lists.add(param);
+                        if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
+                            writeCount += this.dao.updateTbInt(lists);
+                            lists = new ArrayList<>();
+                        }
+                    }
+                    if (!lists.isEmpty()) {
                         writeCount += this.dao.updateTbInt(lists);
-                        lists = new ArrayList<>();
                     }
                 }
-                if (!lists.isEmpty()) {
-                    writeCount += this.dao.updateTbInt(lists);
-                }
-                etlp.setWriteCount(writeCount);
-                etlp.setSuccess(true);
+                etlp.endEtlp(true, writeCount);
                 log.info("TB_INT, SCS_T_CON_INTLC WRITE. {}, {}, {} EA. {}",
                         center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
                 log.info("-------------------------------------------------------------------------------------------------");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT, SCS_T_CON_INTLC: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -170,7 +215,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableInt));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT, SCS_T_CON_INTLC ..END: {}", totElapsed.elapsedTimeStr());
     }
 
@@ -179,6 +226,7 @@ public class GgitsEtlpService {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -193,29 +241,26 @@ public class GgitsEtlpService {
             int currWriteCount = 0;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpFlow();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            etlp.startEtlp();
+
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                Integer dataCount = this.gitsMapper.selectScsTConIntFlowCount(center);
-                etlp.setReadCount(dataCount);
-                log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW .READ. {}, {}, {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), dataCount, job.elapsedTimeStr());
+                Integer dataCount = this.gitsMapper.selectScsTConIntFlowCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntFlowCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW .READ. {}, {}, DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                if (dataCount > 0) {
-                    int fromSeq, toSeq;
-                    int pageCount = (dataCount / MAX_PAGE_COUNT) + 1;
-                    if (0 == (dataCount % MAX_PAGE_COUNT)) {
-                        pageCount--;
-                    }
+                if (etlpCount > 0) {
+                    int pageCount = getPageCount(etlpCount);
                     for (int ii = 0; ii < pageCount; ii++) {
-                        fromSeq = (ii * MAX_PAGE_COUNT);
-                        toSeq = fromSeq + MAX_PAGE_COUNT;
+                        int fromSeq = (ii * this.config.getPageCount());
+                        int toSeq = fromSeq + this.config.getPageCount();
                         fromSeq++;
-                        List<TbScsTConIntFlow> result = this.gitsMapper.selectScsTConIntFlow(center, fromSeq, toSeq);
+                        List<TbScsTConIntFlow> result = this.gitsMapper.selectScsTConIntFlow(center, fromSeq, toSeq, etlp.getQryDt());
                         log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW .READ. {}, {}, {}. {}",
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, result.size()), job.elapsedTimeStr());
                         TimeUtils.sleep(500);
@@ -239,14 +284,13 @@ public class GgitsEtlpService {
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, currWriteCount), job.elapsedTimeStr());
                     }
                 }
-                etlp.setWriteCount(writeCount);
-                etlp.setSuccess(true);
+                etlp.endEtlp(true, writeCount);
                 log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW WRITE. {}, {}, {} EA. {}",
                         center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
                 log.info("-------------------------------------------------------------------------------------------------");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT_FLOW, SCS_T_CON_INTFLOW: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -254,7 +298,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableFlow));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW ..END: {}", totElapsed.elapsedTimeStr());
     }
 
@@ -263,6 +309,7 @@ public class GgitsEtlpService {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -276,30 +323,27 @@ public class GgitsEtlpService {
             int writeCount = 0;
             int currWriteCount = 0;
             Elapsed job = new Elapsed();
-            EtlpInfo etlp = center.getEtlpDPlan();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            EtlpInfo etlp = center.getEtlpOperPlan();
+            etlp.startEtlp();
+
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                Integer dataCount = this.gitsMapper.selectScsTConIntDPlanCount(center);
-                etlp.setReadCount(dataCount);
-                log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN .READ. {}, {}, {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), dataCount, job.elapsedTimeStr());
+                Integer dataCount = this.gitsMapper.selectScsTConIntDPlanCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntDPlanCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN .READ. {}, {}, DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                if (dataCount > 0) {
-                    int fromSeq, toSeq;
-                    int pageCount = (dataCount / MAX_PAGE_COUNT) + 1;
-                    if (0 == (dataCount % MAX_PAGE_COUNT)) {
-                        pageCount--;
-                    }
+                if (etlpCount > 0) {
+                    int pageCount = getPageCount(etlpCount);
                     for (int ii = 0; ii < pageCount; ii++) {
-                        fromSeq = (ii * MAX_PAGE_COUNT);
-                        toSeq = fromSeq + MAX_PAGE_COUNT;
+                        int fromSeq = (ii * this.config.getPageCount());
+                        int toSeq = fromSeq + this.config.getPageCount();
                         fromSeq++;
-                        List<TbScsTConIntDPlan> result = this.gitsMapper.selectScsTConIntDPlan(center, fromSeq, toSeq);
+                        List<TbScsTConIntDPlan> result = this.gitsMapper.selectScsTConIntDPlan(center, fromSeq, toSeq, etlp.getQryDt());
                         log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN .READ. {}, {}, {}. {}",
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, result.size()), job.elapsedTimeStr());
                         TimeUtils.sleep(500);
@@ -323,14 +367,13 @@ public class GgitsEtlpService {
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, currWriteCount), job.elapsedTimeStr());
                     }
                 }
-                etlp.setWriteCount(writeCount);
-                etlp.setSuccess(true);
+                etlp.endEtlp(true, writeCount);
                 log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN WRITE. {}, {}, {} EA. {}",
                         center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
                 log.info("-------------------------------------------------------------------------------------------------");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -338,7 +381,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableOperPlan));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN ..END: {}", totElapsed.elapsedTimeStr());
     }
 
@@ -347,6 +392,7 @@ public class GgitsEtlpService {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -360,30 +406,27 @@ public class GgitsEtlpService {
             int writeCount = 0;
             int currWriteCount = 0;
             Elapsed job = new Elapsed();
-            EtlpInfo etlp = center.getEtlpWeek();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            EtlpInfo etlp = center.getEtlpDyPlan();
+            etlp.startEtlp();
+
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                Integer dataCount = this.gitsMapper.selectScsTConIntWeekCount(center);
-                etlp.setReadCount(dataCount);
-                log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK .READ. {}, {}, {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), dataCount, job.elapsedTimeStr());
+                Integer dataCount = this.gitsMapper.selectScsTConIntWeekCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntWeekCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK .READ. {}, {}, DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                if (dataCount > 0) {
-                    int fromSeq, toSeq;
-                    int pageCount = (dataCount / MAX_PAGE_COUNT) + 1;
-                    if (0 == (dataCount % MAX_PAGE_COUNT)) {
-                        pageCount--;
-                    }
+                if (etlpCount > 0) {
+                    int pageCount = getPageCount(etlpCount);
                     for (int ii = 0; ii < pageCount; ii++) {
-                        fromSeq = (ii * MAX_PAGE_COUNT);
-                        toSeq = fromSeq + MAX_PAGE_COUNT;
+                        int fromSeq = (ii * this.config.getPageCount());
+                        int toSeq = fromSeq + this.config.getPageCount();
                         fromSeq++;
-                        List<TbScsTConIntWeek> result = this.gitsMapper.selectScsTConIntWeek(center, fromSeq, toSeq);
+                        List<TbScsTConIntWeek> result = this.gitsMapper.selectScsTConIntWeek(center, fromSeq, toSeq, etlp.getQryDt());
                         log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK .READ. {}, {}, {}. {}",
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, result.size()), job.elapsedTimeStr());
                         TimeUtils.sleep(500);
@@ -407,14 +450,13 @@ public class GgitsEtlpService {
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, currWriteCount), job.elapsedTimeStr());
                     }
                 }
-                etlp.setWriteCount(writeCount);
-                etlp.setSuccess(true);
+                etlp.endEtlp(true, writeCount);
                 log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK WRITE. {}, {}, {} EA. {}",
                         center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
                 log.info("-------------------------------------------------------------------------------------------------");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -422,7 +464,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableDyPlan));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK ..END: {}", totElapsed.elapsedTimeStr());
     }
 
@@ -431,6 +475,7 @@ public class GgitsEtlpService {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -444,30 +489,27 @@ public class GgitsEtlpService {
             int writeCount = 0;
             int currWriteCount = 0;
             Elapsed job = new Elapsed();
-            EtlpInfo etlp = center.getEtlpFPlan();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            EtlpInfo etlp = center.getEtlpResrvPlan();
+            etlp.startEtlp();
+
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                Integer dataCount = this.gitsMapper.selectScsTConIntFPlanCount(center);
-                etlp.setReadCount(dataCount);
-                log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN .READ. {}, {}, {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), dataCount, job.elapsedTimeStr());
+                Integer dataCount = this.gitsMapper.selectScsTConIntFPlanCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntFPlanCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN .READ. {}, {}, DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                if (dataCount > 0) {
-                    int fromSeq, toSeq;
-                    int pageCount = (dataCount / MAX_PAGE_COUNT) + 1;
-                    if (0 == (dataCount % MAX_PAGE_COUNT)) {
-                        pageCount--;
-                    }
+                if (etlpCount > 0) {
+                    int pageCount = getPageCount(etlpCount);
                     for (int ii = 0; ii < pageCount; ii++) {
-                        fromSeq = (ii * MAX_PAGE_COUNT);
-                        toSeq = fromSeq + MAX_PAGE_COUNT;
+                        int fromSeq = (ii * this.config.getPageCount());
+                        int toSeq = fromSeq + this.config.getPageCount();
                         fromSeq++;
-                        List<TbScsTConIntFPlan> result = this.gitsMapper.selectScsTConIntFPlan(center, fromSeq, toSeq);
+                        List<TbScsTConIntFPlan> result = this.gitsMapper.selectScsTConIntFPlan(center, fromSeq, toSeq, etlp.getQryDt());
                         log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN .READ. {}, {}, {}. {}",
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, result.size()), job.elapsedTimeStr());
                         TimeUtils.sleep(500);
@@ -491,14 +533,13 @@ public class GgitsEtlpService {
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, currWriteCount), job.elapsedTimeStr());
                     }
                 }
-                etlp.setWriteCount(writeCount);
-                etlp.setSuccess(true);
+                etlp.endEtlp(true, writeCount);
                 log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN WRITE. {}, {}, {} EA. {}",
                         center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
                 log.info("-------------------------------------------------------------------------------------------------");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -506,7 +547,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableResrvPlan));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN ..END: {}", totElapsed.elapsedTimeStr());
     }
 
@@ -515,6 +558,7 @@ public class GgitsEtlpService {
         Elapsed elapsed = new Elapsed();
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP START.");
+        List<HashMap<String, Object>> etlpLists = new ArrayList<>();
         List<HashMap<String, Object>> lists = new ArrayList<>();
 
         for (String key : this.centerList) {
@@ -529,29 +573,26 @@ public class GgitsEtlpService {
             int currWriteCount = 0;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpSigmap();
-            etlp.setSuccess(false);
-            etlp.setStartTime(TimeUtils.now());
+            etlp.startEtlp();
+            
             try {
                 MDC.put("id", center.getLogKey());
                 log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP START. {}, {}, {}, {}",
                         center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
 
-                Integer dataCount = this.gitsMapper.selectScsTConIntSigmapCount(center);
-                etlp.setReadCount(dataCount);
-                log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP .READ. {}, {}, {} EA. {}",
-                        center.getRegionCd(), center.getRegionNm(), dataCount, job.elapsedTimeStr());
+                Integer dataCount = this.gitsMapper.selectScsTConIntSigmapCount(center, EtlpConst.qryCountAll);
+                Integer etlpCount = this.gitsMapper.selectScsTConIntSigmapCount(center, etlp.getQryDt());
+                etlp.setCount(dataCount, etlpCount);
+                log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP .READ. {}, {}, DATA({}) ETLP({}) EA. {}",
+                        center.getRegionCd(), center.getRegionNm(), dataCount, etlpCount, job.elapsedTimeStr());
 
-                if (dataCount > 0) {
-                    int fromSeq, toSeq;
-                    int pageCount = (dataCount / MAX_PAGE_COUNT) + 1;
-                    if (0 == (dataCount % MAX_PAGE_COUNT)) {
-                        pageCount--;
-                    }
+                if (etlpCount > 0) {
+                    int pageCount = getPageCount(etlpCount);
                     for (int ii = 0; ii < pageCount; ii++) {
-                        fromSeq = (ii * MAX_PAGE_COUNT);
-                        toSeq = fromSeq + MAX_PAGE_COUNT;
+                        int fromSeq = (ii * this.config.getPageCount());
+                        int toSeq = fromSeq + this.config.getPageCount();
                         fromSeq++;
-                        List<TbScsTConIntSigmap> result = this.gitsMapper.selectScsTConIntSigmap(center, fromSeq, toSeq);
+                        List<TbScsTConIntSigmap> result = this.gitsMapper.selectScsTConIntSigmap(center, fromSeq, toSeq, etlp.getQryDt());
                         log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP .READ. {}, {}, {}. {}",
                                 center.getRegionCd(), center.getRegionNm(), String.format("%6d ~ %6d, %6d EA", fromSeq, toSeq, result.size()), job.elapsedTimeStr());
                         TimeUtils.sleep(500);
@@ -582,7 +623,7 @@ public class GgitsEtlpService {
                 log.info("<================================================================================================");
             }
             catch (Exception e) {
-                etlp.setSuccess(false);
+                etlp.endEtlp(false, writeCount);
                 log.error("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP: {}, {}, Exceptions: {}", center.getRegionCd(), center.getRegionNm(), e.getMessage());
             }
             finally {
@@ -590,7 +631,9 @@ public class GgitsEtlpService {
                 MDC.remove(center.getLogKey());
                 MDC.clear();
             }
+            etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableSignalMap));
         }
+        updateEtlpResult(etlpLists);
         log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP ..END: {}", totElapsed.elapsedTimeStr());
     }
 }

+ 3 - 0
src/main/resources/application.yml

@@ -36,6 +36,7 @@ management:
 
 application:
   process-id: 81010
+  page-count: 0
   scheduling:
     pool-size: 0
     process-ggits-etlp: 0 9 * * * *
@@ -51,6 +52,8 @@ spring:
       sig:
         driver-class-name: oracle.jdbc.OracleDriver
         jdbc-url: jdbc:oracle:thin:@192.168.10.68:1521:CVIBDB
+#        driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+#        jdbc-url: jdbc:log4jdbc:oracle:thin:@192.168.10.68:1521:CVIBDB
         username: sigtest
         password: sigtest
       ggits:

+ 20 - 31
src/main/resources/mybatis/mapper/ggits/ggtisMapper.xml

@@ -3,6 +3,15 @@
 
 <mapper namespace="com.ggits.etlp.server.dao.mapper.ggits.GgitsMapper">
 
+    <select id="selectScsTConIntLcCount" parameterType="com.ggits.etlp.server.dto.RegionCenter" resultType="java.lang.Integer" fetchSize="1024">
+        <![CDATA[
+        SELECT count(1) as dataCount
+        FROM SCS_T_CON_INTLC A
+        WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
+        ]]>
+    </select>
+
     <select id="selectScsTConIntLc" parameterType="com.ggits.etlp.server.dto.RegionCenter" resultType="com.ggits.etlp.server.entity.ggits.TbScsTConIntLc" fetchSize="1024">
         <![CDATA[
         SELECT A.int_lcno               as intLcNo,
@@ -20,6 +29,7 @@
                A.ppc_type               as ppcType
         FROM SCS_T_CON_INTLC A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -28,6 +38,7 @@
         SELECT count(1) as dataCount
         FROM SCS_T_CON_INTFLOW A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -50,6 +61,7 @@
                    A.flow_e_lat           as flowELat
             FROM SCS_T_CON_INTFLOW A
             WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+              AND A.UPDATE_DATE > #{updtDt}
             ORDER BY A.int_lcno, A.int_planclss, A.int_ring, A.int_phaseno
         )
         WHERE rowSeq between #{fromSeq} AND #{toSeq}
@@ -61,6 +73,7 @@
         SELECT count(1) as dataCount
         FROM SCS_T_CON_INTDPLAN A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -95,6 +108,7 @@
                    A.int_bsplit8          as intBSplit8
             FROM SCS_T_CON_INTDPLAN A
             WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+              AND A.UPDATE_DATE > #{updtDt}
             ORDER BY A.int_lcno, A.int_dplan, A.int_dplanindex
         )
         WHERE rowSeq between #{fromSeq} AND #{toSeq}
@@ -106,6 +120,7 @@
         SELECT count(1) as dataCount
         FROM SCS_T_CON_INTWEEK A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -120,6 +135,7 @@
                    A.int_wplan            as intWPlan
             FROM SCS_T_CON_INTWEEK A
             WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+              AND A.UPDATE_DATE > #{updtDt}
             ORDER BY A.int_lcno, A.week_no
         )
         WHERE rowSeq between #{fromSeq} AND #{toSeq}
@@ -131,6 +147,7 @@
         SELECT count(1) as dataCount
         FROM SCS_T_CON_INTFPLAN A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -153,6 +170,7 @@
                    A.int_cntlspcno        as intCntlSpcNo
             FROM SCS_T_CON_INTFPLAN A
             WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+              AND A.UPDATE_DATE > #{updtDt}
             ORDER BY A.int_lcno, A.int_fplanindex
         )
         WHERE rowSeq between #{fromSeq} AND #{toSeq}
@@ -164,6 +182,7 @@
         SELECT count(1) as dataCount
         FROM SCS_T_CON_INTSIGMAP A
         WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+          AND A.UPDATE_DATE > #{updtDt}
         ]]>
     </select>
 
@@ -198,41 +217,11 @@
                    A.int_eop              as intEop
             FROM SCS_T_CON_INTSIGMAP A
             WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
+              AND A.UPDATE_DATE > #{updtDt}
             ORDER BY A.int_lcno, A.int_planclss, A.int_ring, A.int_stepno
         )
         WHERE rowSeq between #{fromSeq} AND #{toSeq}
         ]]>
     </select>
 
-    <select id="selectScsTConIntSigmapOLD" parameterType="com.ggits.etlp.server.dto.RegionCenter" resultType="com.ggits.etlp.server.entity.ggits.TbScsTConIntSigmap" fetchSize="1024">
-        <![CDATA[
-        SELECT A.int_lcno             as intLcNo,
-               MOD(A.int_lcno, 10000) as intNo,
-               A.int_planclss         as intPlanClss,
-               A.int_ring             as intRing,
-               A.int_stepno           as intStepNo,
-               A.update_date          as updateDate,
-               A.int_veh1             as intVeh1,
-               A.int_ped1             as intPed1,
-               A.int_veh2             as intVeh2,
-               A.int_ped2             as intPed2,
-               A.int_veh3             as intVeh3,
-               A.int_ped3             as intPed3,
-               A.int_veh4             as intVeh4,
-               A.int_ped4             as intPed4,
-               A.int_veh5             as intVeh5,
-               A.int_ped5             as intPed5,
-               A.int_veh6             as intVeh6,
-               A.int_ped6             as intPed6,
-               A.int_veh7             as intVeh7,
-               A.int_ped7             as intPed7,
-               A.int_veh8             as intVeh8,
-               A.int_ped8             as intPed8,
-               A.int_minsplit         as intMinSplit,
-               A.int_maxsplit         as intMaxSplit,
-               A.int_eop              as intEop
-        FROM SCS_T_CON_INTSIGMAP A
-        WHERE A.int_lcno BETWEEN #{obj.minNodeId} AND #{obj.maxNodeId}
-        ]]>
-    </select>
 </mapper>

+ 63 - 0
src/main/resources/mybatis/mapper/sig/SigMapper.xml

@@ -16,6 +16,69 @@
         ]]>
     </select>
 
+    <select id="selectGgitsEtlp" parameterType="java.lang.String" resultType="com.ggits.etlp.server.entity.sig.TbGgitsEtlp" fetchSize="50">
+        <![CDATA[
+        SELECT #{tblNm}                        AS tblNm,
+               X.REGION_CD                     AS regionCd,
+               NVL(Y.UPD_DT, '20000101000000') AS updDt
+        FROM (SELECT B.REGION_CD
+              FROM TB_REGION_GGITS A, TB_REGION_CENTER B
+              WHERE A.REGION_CD = B.REGION_CD) X,
+             (SELECT A.REGION_CD, A.UPD_DT
+              FROM TB_GGITS_ETLP A
+              WHERE A.TBL_NM = #{tblNm}) Y
+        WHERE X.REGION_CD = Y.REGION_CD(+)
+        ]]>
+    </select>
+
+    <update id="updateGgitsEtlp" parameterType="java.util.Map">
+    <![CDATA[
+        MERGE INTO TB_GGITS_ETLP L
+            USING (SELECT
+                       #{TBL_NM}    AS TBL_NM,
+                       #{REGION_CD} AS REGION_CD,
+                       #{UPDT_DT}   AS UPDT_DT,
+                       #{RES_CD}    AS RES_CD,
+                       #{DATA_CNT}  AS DATA_CNT,
+                       #{ETLP_CNT}  AS ETLP_CNT,
+                       #{SUCC_CNT}  AS SUCC_CNT,
+                       #{STR_TM}    AS STR_TM,
+                       #{END_TM}    AS END_TM
+                   FROM DUAL) M
+            ON (L.TBL_NM = M.TBL_NM AND L.REGION_CD = M.REGION_CD)
+            WHEN MATCHED THEN
+                UPDATE SET
+                    L.UPDT_DT  = M.UPDT_DT,
+                    L.RES_CD   = M.RES_CD,
+                    L.DATA_CNT = M.DATA_CNT,
+                    L.ETLP_CNT = M.ETLP_CNT,
+                    L.SUCC_CNT = M.SUCC_CNT,
+                    L.STR_TM   = M.STR_TM,
+                    L.END_TM   = M.END_TM
+            WHEN NOT MATCHED THEN
+                INSERT (
+                        TBL_NM,
+                        REGION_CD,
+                        UPDT_DT,
+                        RES_CD,
+                        DATA_CNT,
+                        ETLP_CNT,
+                        SUCC_CNT,
+                        STR_TM,
+                        END_TM )
+                    VALUES (
+                       M.TBL_NM,
+                       M.REGION_CD,
+                       M.UPDT_DT,
+                       M.RES_CD,
+                       M.DATA_CNT,
+                       M.ETLP_CNT,
+                       M.SUCC_CNT,
+                       M.STR_TM,
+                       M.END_TM )
+        ]]>
+    </update>
+
     <update id="initTbInt" parameterType="java.lang.String">
     <![CDATA[
         UPDATE TB_INT