|
@@ -69,11 +69,11 @@ public class GgitsEtlpService {
|
|
|
|
|
|
initEtlp();
|
|
|
|
|
|
- //교차로구성_연계, SCS_T_CON_INTLC
|
|
|
- etlpIntLc();
|
|
|
+// //교차로구성_연계, SCS_T_CON_INTLC
|
|
|
+// etlpIntLc();
|
|
|
//교차로이동류_연계, SCS_T_CON_INTFLOW
|
|
|
-// etlpIntFlow();
|
|
|
-// //교차로일계획_연계, SCS_T_CON_INTDPLAN
|
|
|
+ etlpIntFlow();
|
|
|
+ //교차로일계획_연계, SCS_T_CON_INTDPLAN
|
|
|
// etlpIntDPlan();
|
|
|
// //교차로주간계획_연계, SCS_T_CON_INTWEEK
|
|
|
// etlpIntWeek();
|
|
@@ -118,6 +118,7 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), intLists.size(), jobLists.size());
|
|
|
|
|
|
center.getEtlpIntLc().setReadCount(jobLists.size());
|
|
|
+
|
|
|
lists = new ArrayList<>();
|
|
|
for(TbScsTConIntLc obj: jobLists) {
|
|
|
if (obj.getIntName() == null || obj.getIntName().isEmpty()) {
|
|
@@ -162,11 +163,14 @@ public class GgitsEtlpService {
|
|
|
private void etlpIntFlow() {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
log.info("교차로이동류_연계, SCS_T_CON_INTFLOW START.");
|
|
|
+ List<HashMap<String, Object>> lists = new ArrayList<>();
|
|
|
+
|
|
|
for (String key : this.centerList) {
|
|
|
RegionCenter center = this.repo.getCenterMap().get(key);
|
|
|
if (center == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ int writeCount = 0;
|
|
|
Elapsed job = new Elapsed();
|
|
|
EtlpInfo etlp = center.getEtlpFlow();
|
|
|
etlp.setSuccess(false);
|
|
@@ -177,9 +181,21 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
|
|
|
List<TbScsTConIntFlow> result = this.gitsMapper.selectScsTConIntFlow(center);
|
|
|
etlp.setReadCount(result.size());
|
|
|
- for(TbScsTConIntFlow obj: result) {
|
|
|
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ for(TbScsTConIntFlow obj: result) {
|
|
|
+ HashMap<String, Object> param = obj.toSig(center.getRegionCd());
|
|
|
+ lists.add(param);
|
|
|
+ log.info("{}", param);
|
|
|
+ if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
|
|
|
+ writeCount += this.dao.updateTbIntFlow(lists);
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!lists.isEmpty()) {
|
|
|
+ writeCount += this.dao.updateTbIntFlow(lists);
|
|
|
}
|
|
|
+ etlp.setWriteCount(writeCount);
|
|
|
etlp.setSuccess(true);
|
|
|
log.info("교차로이동류_연계, SCS_T_CON_INTFLOW ..END. {}, {}, {} EA. {} ms.",
|
|
|
center.getRegionCd(), center.getRegionNm(), result.size(), job.milliSeconds());
|
|
@@ -200,11 +216,14 @@ public class GgitsEtlpService {
|
|
|
private void etlpIntDPlan() {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
log.info("교차로일계획_연계, SCS_T_CON_INTDPLAN START.");
|
|
|
+ List<HashMap<String, Object>> lists = new ArrayList<>();
|
|
|
+
|
|
|
for (String key : this.centerList) {
|
|
|
RegionCenter center = this.repo.getCenterMap().get(key);
|
|
|
if (center == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ int writeCount = 0;
|
|
|
Elapsed job = new Elapsed();
|
|
|
EtlpInfo etlp = center.getEtlpDPlan();
|
|
|
etlp.setSuccess(false);
|
|
@@ -215,9 +234,20 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
|
|
|
List<TbScsTConIntDPlan> result = this.gitsMapper.selectScsTConIntDPlan(center);
|
|
|
etlp.setReadCount(result.size());
|
|
|
- for(TbScsTConIntDPlan obj: result) {
|
|
|
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ for(TbScsTConIntDPlan obj: result) {
|
|
|
+ HashMap<String, Object> param = obj.toSig(center.getRegionCd());
|
|
|
+ lists.add(param);
|
|
|
+ if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
|
|
|
+ writeCount += this.dao.updateTbIntOperPlan(lists);
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!lists.isEmpty()) {
|
|
|
+ writeCount += this.dao.updateTbIntOperPlan(lists);
|
|
|
}
|
|
|
+ etlp.setWriteCount(writeCount);
|
|
|
etlp.setSuccess(true);
|
|
|
log.info("교차로일계획_연계, SCS_T_CON_INTDPLAN ..END. {}, {}, {} EA. {} ms.",
|
|
|
center.getRegionCd(), center.getRegionNm(), result.size(), job.milliSeconds());
|
|
@@ -238,11 +268,14 @@ public class GgitsEtlpService {
|
|
|
private void etlpIntWeek() {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
log.info("교차로주간계획_연계, SCS_T_CON_INTWEEK START.");
|
|
|
+ List<HashMap<String, Object>> lists = new ArrayList<>();
|
|
|
+
|
|
|
for (String key : this.centerList) {
|
|
|
RegionCenter center = this.repo.getCenterMap().get(key);
|
|
|
if (center == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ int writeCount = 0;
|
|
|
Elapsed job = new Elapsed();
|
|
|
EtlpInfo etlp = center.getEtlpWeek();
|
|
|
etlp.setSuccess(false);
|
|
@@ -253,9 +286,20 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
|
|
|
List<TbScsTConIntWeek> result = this.gitsMapper.selectScsTConIntWeek(center);
|
|
|
etlp.setReadCount(result.size());
|
|
|
- for(TbScsTConIntWeek obj: result) {
|
|
|
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ for(TbScsTConIntWeek obj: result) {
|
|
|
+ HashMap<String, Object> param = obj.toSig(center.getRegionCd());
|
|
|
+ lists.add(param);
|
|
|
+ if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
|
|
|
+ writeCount += this.dao.updateTbIntDyPlan(lists);
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ }
|
|
|
}
|
|
|
+ if (!lists.isEmpty()) {
|
|
|
+ writeCount += this.dao.updateTbIntDyPlan(lists);
|
|
|
+ }
|
|
|
+ etlp.setWriteCount(writeCount);
|
|
|
etlp.setSuccess(true);
|
|
|
log.info("교차로주간계획_연계, SCS_T_CON_INTWEEK ..END. {}, {}, {} EA. {} ms.",
|
|
|
center.getRegionCd(), center.getRegionNm(), result.size(), job.milliSeconds());
|
|
@@ -276,11 +320,14 @@ public class GgitsEtlpService {
|
|
|
private void etlpIntFPlan() {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
log.info("교차로예약계획_연계, SCS_T_CON_INTFPLAN START.");
|
|
|
+ List<HashMap<String, Object>> lists = new ArrayList<>();
|
|
|
+
|
|
|
for (String key : this.centerList) {
|
|
|
RegionCenter center = this.repo.getCenterMap().get(key);
|
|
|
if (center == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ int writeCount = 0;
|
|
|
Elapsed job = new Elapsed();
|
|
|
EtlpInfo etlp = center.getEtlpFPlan();
|
|
|
etlp.setSuccess(false);
|
|
@@ -291,9 +338,20 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
|
|
|
List<TbScsTConIntFPlan> result = this.gitsMapper.selectScsTConIntFPlan(center);
|
|
|
etlp.setReadCount(result.size());
|
|
|
- for(TbScsTConIntFPlan obj: result) {
|
|
|
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ for(TbScsTConIntFPlan obj: result) {
|
|
|
+ HashMap<String, Object> param = obj.toSig(center.getRegionCd());
|
|
|
+ lists.add(param);
|
|
|
+ if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
|
|
|
+ writeCount += this.dao.updateTbIntResrvPlan(lists);
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ }
|
|
|
}
|
|
|
+ if (!lists.isEmpty()) {
|
|
|
+ writeCount += this.dao.updateTbIntResrvPlan(lists);
|
|
|
+ }
|
|
|
+ etlp.setWriteCount(writeCount);
|
|
|
etlp.setSuccess(true);
|
|
|
log.info("교차로예약계획_연계, SCS_T_CON_INTFPLAN ..END. {}, {}, {} EA. {} ms.",
|
|
|
center.getRegionCd(), center.getRegionNm(), result.size(), job.milliSeconds());
|
|
@@ -314,11 +372,14 @@ public class GgitsEtlpService {
|
|
|
private void etlpIntSigmap() {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
log.info("교차로시그널맵_연계, SCS_T_CON_INTSIGMAP START.");
|
|
|
+ List<HashMap<String, Object>> lists = new ArrayList<>();
|
|
|
+
|
|
|
for (String key : this.centerList) {
|
|
|
RegionCenter center = this.repo.getCenterMap().get(key);
|
|
|
if (center == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ int writeCount = 0;
|
|
|
Elapsed job = new Elapsed();
|
|
|
EtlpInfo etlp = center.getEtlpSigmap();
|
|
|
etlp.setSuccess(false);
|
|
@@ -329,9 +390,20 @@ public class GgitsEtlpService {
|
|
|
center.getRegionCd(), center.getRegionNm(), center.getMinNodeId(), center.getMaxNodeId());
|
|
|
List<TbScsTConIntSigmap> result = this.gitsMapper.selectScsTConIntSigmap(center);
|
|
|
etlp.setReadCount(result.size());
|
|
|
- for(TbScsTConIntSigmap obj: result) {
|
|
|
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ for(TbScsTConIntSigmap obj: result) {
|
|
|
+ HashMap<String, Object> param = obj.toSig(center.getRegionCd());
|
|
|
+ lists.add(param);
|
|
|
+ if (lists.size() >= BatchDaoService.MAX_BATCH_SIZE) {
|
|
|
+ writeCount += this.dao.updateTbIntSignalMap(lists);
|
|
|
+ lists = new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!lists.isEmpty()) {
|
|
|
+ writeCount += this.dao.updateTbIntSignalMap(lists);
|
|
|
}
|
|
|
+ etlp.setWriteCount(writeCount);
|
|
|
etlp.setSuccess(true);
|
|
|
log.info("교차로시그널맵_연계, SCS_T_CON_INTSIGMAP ..END. {}, {}, {} EA. {} ms.",
|
|
|
center.getRegionCd(), center.getRegionNm(), result.size(), job.milliSeconds());
|