Browse Source

add cluster and process-state

HANTE 1 month ago
parent
commit
f470b1d06a

+ 6 - 0
utic-ptis-server/src/main/java/com/utic/center/utic/ptis/server/service/UticPtisServerService.java

@@ -212,6 +212,9 @@ public class UticPtisServerService implements AbstractProcessService {
         }
 
         this.evnt = result; // 통제정보 처리 건수 저장
+
+        ApplicationRepository.processState.setRcvCnt(this.evnt);
+
         ApplicationRepository.lastRegDate.setEvntDt(regDate); // 통제정보 최종시각 갱신
         ApplicationRepository.indigoStats.setEvntCnt(result + ApplicationRepository.indigoStats.getEvntCnt());
 //        printResult("Total Event", ApplicationRepository.indigoStats.getEvntCnt());
@@ -252,6 +255,9 @@ public class UticPtisServerService implements AbstractProcessService {
         }
 
         this.incd = result; // 돌발정보 처리 건수 저장
+
+        ApplicationRepository.processState.setSndCnt(this.evnt);
+
         ApplicationRepository.lastRegDate.setIncdDt(regDate); // 돌발정보 최종시각 갱신
         ApplicationRepository.indigoStats.setIncdCnt(result + ApplicationRepository.indigoStats.getIncdCnt());
 //        printResult("Total Incident", ApplicationRepository.indigoStats.getIncdCnt());

+ 3 - 0
utic-stat-server/src/main/java/com/utic/center/utic/stat/server/service/UticStat04MinEtlpService.java

@@ -48,6 +48,9 @@ public class UticStat04MinEtlpService implements AbstractProcessService {
         if (result < 0) {
             ApplicationRepository.processState.setError("insertRcvLinkTraffic failed.");
         }
+
+        ApplicationRepository.processState.setSndCnt(result);
+
         return true;
     }
 

+ 8 - 4
utic-stat-server/src/main/java/com/utic/center/utic/stat/server/service/UticStat05MinFltrService.java

@@ -61,7 +61,8 @@ public class UticStat05MinFltrService implements AbstractProcessService {
 
         // LINK_FILTER 표준편차 입력
 //        log.info("[INF] {}: {}, {}", LogUtils.elapsedLog("LINK_FILTER(표준편차 필터링)"), code0, code5);
-        if (this.fltrRepo.insertLinkFilterStdDev(past25Min, code0.getCodeValue(), code5.getCodeValue()) < 0) {
+        int result = this.fltrRepo.insertLinkFilterStdDev(past25Min, code0.getCodeValue(), code5.getCodeValue());
+        if (result < 0) {
             ApplicationRepository.processState.setError("insertLinkFilterStdDev failed.");
         }
         SleepUtils.safeSleep(200);  // FOR Database
@@ -92,7 +93,7 @@ public class UticStat05MinFltrService implements AbstractProcessService {
         // LINK_FILTER 도로등급별 최대최소 속도 입력
         if ("Y".equals(code2.getCodeValue())) {
             log.info("[INF] {}: LINK_FILTER 도로등급 최대최소 필터링 사용", LogUtils.elapsedLog("LINK_FILTER(도로등급 필터링)"));
-            int result = this.fltrRepo.updateLinkFilterMinMax(
+            result = this.fltrRepo.updateLinkFilterMinMax(
                     code6.getMinValue(), code6.getMaxValue(),
                     code7.getMinValue(), code7.getMaxValue(),
                     code8.getMinValue(), code8.getMaxValue(),
@@ -107,10 +108,13 @@ public class UticStat05MinFltrService implements AbstractProcessService {
         }
 
         // 전국 이력저장
-        if (this.fltrRepo.insertStatLocalLog(yyMm) < 0) {
+        result = this.fltrRepo.insertStatLocalLog(yyMm);
+        if (result < 0) {
             ApplicationRepository.processState.setError("insertStatLocalLog failed.");
         }
-        SleepUtils.safeSleep(200);  // FOR Database
+
+        ApplicationRepository.processState.setRcvCnt(result);
+        SleepUtils.safeSleep(100);  // FOR Database
 
         return true;
     }

+ 4 - 1
utic-traf-server/src/main/java/com/utic/center/utic/traf/server/service/LinkTrafAsnService.java

@@ -60,9 +60,12 @@ public class LinkTrafAsnService implements AbstractProcessService {
 //        this.uticRepo.truncateTrafficLoc();
 
         // 3. 교통정보 입력
-        if (this.asnDbRepo.insertTrafficLoc(ApplicationRepository.trafPrcsTime) < 0) {
+        int result = this.asnDbRepo.insertTrafficLoc(ApplicationRepository.trafPrcsTime);
+        if (result < 0) {
             ApplicationRepository.processState.setError("insertTrafficLoc failed.");
         }
+        ApplicationRepository.processState.setRcvCnt(result);   // RCV_LINK_TRAFFIC ==> TRAFFIC_LCO
+
         SleepUtils.safeSleep(200);  // FOR Database
 
         // 4. 돌발정보 입력

+ 2 - 0
utic-traf-server/src/main/java/com/utic/center/utic/traf/server/service/LinkTrafCollectService.java

@@ -161,6 +161,8 @@ public class LinkTrafCollectService implements AbstractProcessService {
 //            log.info("[INF] {}: {} EA.", LogUtils.elapsedLog(clctSystCode + systStup.getClctSystNm()), systStup.getClctNum());
         }
 
+        ApplicationRepository.processState.setSndCnt(moct); // CURLINKST_MOCT_PRIVATE_LOG
+
         if (this.trace.isDebug()) {
             log.info("[INF] {}: OPER({}), PRIO({}), PRIOETC({}), MOCT({})",
                     LogUtils.elapsedLog("수집원별 교통정보"), oper, pri, priEtc, moct);