|
|
@@ -127,6 +127,10 @@ public class UticPtisServerService implements AbstractProcessService {
|
|
|
ApplicationRepository.indigoStats.reset(); // 일작업 후 통계정보 초기화
|
|
|
}
|
|
|
|
|
|
+ private void printResult(String message, int result) {
|
|
|
+ log.info("[05MIN...] {}: {} EA.", LogUtils.elapsedLog(message), result);
|
|
|
+ }
|
|
|
+
|
|
|
@ProcessingElapsed(type="05MIN", name="TRAF Processing")
|
|
|
public void jobEtlpTraf() {
|
|
|
int result = 0;
|
|
|
@@ -143,31 +147,20 @@ public class UticPtisServerService implements AbstractProcessService {
|
|
|
}
|
|
|
if (regDate.equals(fromDate)) {
|
|
|
log.warn("[05MIN...] {}: No new traf data to process.", LogUtils.elapsedLog(trafTable));
|
|
|
+ result = 0; // 새로운 교통정보가 없음
|
|
|
}
|
|
|
-
|
|
|
- // 교통정보 이관
|
|
|
- result = this.repo.insertCurlinkstPoliceLog();
|
|
|
- if (result < 0) {
|
|
|
- log.error("[05MIN...] {}: Failed to insert traffic data.", LogUtils.elapsedLog("CURLINKST_POLICE_LOG"));
|
|
|
- return; // 교통정보 이관 실패
|
|
|
+ else {
|
|
|
+ // 교통정보 이관
|
|
|
+ result = this.repo.insertCurlinkstPoliceLog();
|
|
|
+ if (result < 0) {
|
|
|
+ log.error("[05MIN...] {}: Failed to insert traffic data.", LogUtils.elapsedLog("CURLINKST_POLICE_LOG"));
|
|
|
+ result = 0; // 교통정보 이관 실패
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ApplicationRepository.lastRegDate.setTrafDt(regDate); // 교통정보 최종시각 갱신
|
|
|
ApplicationRepository.indigoStats.setTrafCnt(result + ApplicationRepository.indigoStats.getTrafCnt());
|
|
|
- log.info("[05MIN...] {}: {} EA.", LogUtils.elapsedLog("Total Traffic"), ApplicationRepository.indigoStats.getTrafCnt());
|
|
|
-
|
|
|
-// // 임시 교통정보테이블 삭제(사용안함)
|
|
|
-// result = this.repo.deleteRcvLinkTrafficTmp();
|
|
|
-// if (result < 0) {
|
|
|
-// log.error("[05MIN...] {}: Failed to delete temporary traffic data.", LogUtils.elapsedLog("RCV_LINK_TRAFFIC_TMP"));
|
|
|
-// return; // 임시 교통정보테이블 삭제 실패
|
|
|
-// }
|
|
|
-
|
|
|
-// // 임시 교통정보테이블에 데이터 이관(사용안함)
|
|
|
-// result = this.repo.insertRcvLinkTrafficTmp();
|
|
|
-// if (result < 0) {
|
|
|
-// log.error("[05MIN...] {}: Failed to insert temporary traffic data.", LogUtils.elapsedLog("RCV_LINK_TRAFFIC_TMP"));
|
|
|
-// }
|
|
|
+ printResult("Total Traffic", ApplicationRepository.indigoStats.getTrafCnt());
|
|
|
}
|
|
|
|
|
|
@ProcessingElapsed(type="05MIN", name="EVENT Processing")
|
|
|
@@ -186,25 +179,26 @@ public class UticPtisServerService implements AbstractProcessService {
|
|
|
}
|
|
|
if (regDate.equals(fromDate)) {
|
|
|
log.info("[05MIN...] {}: No new evnt data to process.", LogUtils.elapsedLog(imsDataTable));
|
|
|
- return; // 새로운 통제정보가 없음
|
|
|
+ result = 0; // 새로운 통제정보가 없음
|
|
|
}
|
|
|
+ else {
|
|
|
+ // 통제정보 이관
|
|
|
+ result = this.repo.insertEventidPoliceLog(fromDate, regDate);
|
|
|
+ if (result < 0) {
|
|
|
+ log.error("[05MIN...] {}: Failed to insert event data.", LogUtils.elapsedLog("EVENTID_POLICE_LOG"));
|
|
|
+ result = 0; // 통제정보 이관 실패
|
|
|
+ }
|
|
|
|
|
|
- // 통제정보 이관
|
|
|
- result = this.repo.insertEventidPoliceLog(fromDate, regDate);
|
|
|
- if (result < 0) {
|
|
|
- log.error("[05MIN...] {}: Failed to insert event data.", LogUtils.elapsedLog("EVENTID_POLICE_LOG"));
|
|
|
- return; // 통제정보 이관 실패
|
|
|
+ // 임시 통제정보테이블에 데이터 이관
|
|
|
+ int tmpResult = this.repo.insertEventidPoliceLogTmp(fromDate, regDate);
|
|
|
+ if (tmpResult < 0) {
|
|
|
+ log.error("[05MIN...] {}: Failed to insert temporary event data.", LogUtils.elapsedLog("EVENTID_POLICE_LOG_TMP"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ApplicationRepository.lastRegDate.setEvntDt(regDate); // 통제정보 최종시각 갱신
|
|
|
ApplicationRepository.indigoStats.setEvntCnt(result + ApplicationRepository.indigoStats.getEvntCnt());
|
|
|
- log.info("[05MIN...] {}: {} EA.", LogUtils.elapsedLog("Total Event"), ApplicationRepository.indigoStats.getEvntCnt());
|
|
|
-
|
|
|
- // 임시 통제정보테이블에 데이터 이관
|
|
|
- result = this.repo.insertEventidPoliceLogTmp(fromDate, regDate);
|
|
|
- if (result < 0) {
|
|
|
- log.error("[05MIN...] {}: Failed to insert temporary event data.", LogUtils.elapsedLog("EVENTID_POLICE_LOG_TMP"));
|
|
|
- }
|
|
|
+ printResult("Total Event", ApplicationRepository.indigoStats.getEvntCnt());
|
|
|
}
|
|
|
|
|
|
@ProcessingElapsed(type="05MIN", name="INCIDENT Processing")
|
|
|
@@ -223,31 +217,32 @@ public class UticPtisServerService implements AbstractProcessService {
|
|
|
}
|
|
|
if (regDate.equals(fromDate)) {
|
|
|
log.info("[05MIN...] {}: No new incd data to process.", LogUtils.elapsedLog(imsDataTable));
|
|
|
- return; // 새로운 돌발정보가 없음
|
|
|
+ result = 0; // 새로운 돌발정보가 없음
|
|
|
}
|
|
|
-
|
|
|
- // 돌발정보 이관
|
|
|
- result = this.repo.insertOccuridPoliceLog(fromDate, regDate);
|
|
|
- if (result < 0) {
|
|
|
- log.error("[05MIN...] {}: Failed to insert incident data.", LogUtils.elapsedLog("OCCURID_POLICE_LOG"));
|
|
|
- return; // 돌발정보 이관 실패
|
|
|
+ else {
|
|
|
+ // 돌발정보 이관
|
|
|
+ result = this.repo.insertOccuridPoliceLog(fromDate, regDate);
|
|
|
+ if (result < 0) {
|
|
|
+ log.error("[05MIN...] {}: Failed to insert incident data.", LogUtils.elapsedLog("OCCURID_POLICE_LOG"));
|
|
|
+ result = 0; // 돌발정보 이관 실패
|
|
|
+ }
|
|
|
+ // 임시 돌발정보테이블에 데이터 이관
|
|
|
+ int tmpResult = this.repo.insertOccuridPoliceLogTmp(fromDate, regDate);
|
|
|
+ if (tmpResult < 0) {
|
|
|
+ log.error("[05MIN...] {}: Failed to insert temporary incident data.", LogUtils.elapsedLog("OCCURID_POLICE_LOG_TMP"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ApplicationRepository.lastRegDate.setIncdDt(regDate); // 돌발정보 최종시각 갱신
|
|
|
ApplicationRepository.indigoStats.setIncdCnt(result + ApplicationRepository.indigoStats.getIncdCnt());
|
|
|
- log.info("[05MIN...] {}: {} EA.", LogUtils.elapsedLog("Total Incident"), ApplicationRepository.indigoStats.getIncdCnt());
|
|
|
-
|
|
|
- // 임시 돌발정보테이블에 데이터 이관
|
|
|
- result = this.repo.insertOccuridPoliceLogTmp(fromDate, regDate);
|
|
|
- if (result < 0) {
|
|
|
- log.error("[05MIN...] {}: Failed to insert temporary incident data.", LogUtils.elapsedLog("OCCURID_POLICE_LOG_TMP"));
|
|
|
- }
|
|
|
+ printResult("Total Incident", ApplicationRepository.indigoStats.getIncdCnt());
|
|
|
}
|
|
|
|
|
|
@ProcessingElapsed(type="05MIN", name="DELETE Processing")
|
|
|
public void jobDeleteTable() {
|
|
|
int result = 0;
|
|
|
|
|
|
+ // 수신 교통정보 삭제
|
|
|
result = this.repo.deleteRcvLinkTraffic();
|
|
|
if (result < 0) {
|
|
|
log.error("[05MIN...] {}: Failed to delete rcv traffic data.", LogUtils.elapsedLog("RCV_LINK_TRAFFIC"));
|