|
@@ -151,7 +151,7 @@ public class GgitsEtlpService {
|
|
|
log.info("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>");
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
Elapsed totElapsed = new Elapsed();
|
|
|
- log.info("TB_INT, SCS_T_CON_INTLC START.");
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC START. ETLP: {}", this.config.isEtlpInt());
|
|
|
List<HashMap<String, Object>> etlpLists = new ArrayList<>();
|
|
|
List<HashMap<String, Object>> lists;
|
|
|
|
|
@@ -171,8 +171,8 @@ public class GgitsEtlpService {
|
|
|
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());
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC START. {}, {}, {}, {}, ETLP: {}",
|
|
|
+ center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId(), this.config.isEtlpInt());
|
|
|
|
|
|
// this.sigMapper.initTbInt(center.getRegionCd());
|
|
|
HashMap<Integer, TbInt> intMap = new HashMap<>();
|
|
@@ -184,41 +184,43 @@ public class GgitsEtlpService {
|
|
|
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());
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC .READ. {}, {}, SIG: {} EA, GGITS: DATA({}) ETLP({}) EA. {}, ETLP: {}",
|
|
|
+ center.getRegionCd(), center.getRegionNm(), intLists.size(), dataCount, etlpCount, job.elapsedTimeStr(), this.config.isEtlpInt());
|
|
|
|
|
|
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());
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC .READ. {}, {}, SIG: {} EA, GGITS: {} EA. {}, ETLP: {}",
|
|
|
+ center.getRegionCd(), center.getRegionNm(), intLists.size(), jobLists.size(), job.elapsedTimeStr(), this.config.isEtlpInt());
|
|
|
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());
|
|
|
- }
|
|
|
+ if (this.config.isEtlpInt()) {
|
|
|
+ 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.endEtlp(true, writeCount);
|
|
|
- log.info("TB_INT, SCS_T_CON_INTLC WRITE. {}, {}, {} EA. {}",
|
|
|
- center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr());
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC WRITE. {}, {}, {} EA. {}, ETLP: {}",
|
|
|
+ center.getRegionCd(), center.getRegionNm(), writeCount, elapsed.elapsedTimeStr(), this.config.isEtlpInt());
|
|
|
log.info("-------------------------------------------------------------------------------------------------");
|
|
|
}
|
|
|
catch (Exception e) {
|
|
@@ -233,7 +235,7 @@ public class GgitsEtlpService {
|
|
|
etlpLists.add(etlp.toSig(center.getRegionCd(), EtlpConst.etlpTableInt));
|
|
|
}
|
|
|
updateEtlpResult(EtlpConst.etlpTableInt, etlpLists);
|
|
|
- log.info("TB_INT, SCS_T_CON_INTLC ..END. {}", totElapsed.elapsedTimeStr());
|
|
|
+ log.info("TB_INT, SCS_T_CON_INTLC ..END. {}, ETLP: {}", totElapsed.elapsedTimeStr(), this.config.isEtlpInt());
|
|
|
log.info("<^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
|
|
|
}
|
|
|
|