|
@@ -6,6 +6,7 @@ import com.utic.common.utils.StringUtils;
|
|
|
import com.utic.common.utils.TimeUtils;
|
|
|
import com.utic.dwdb.server.dao.mapper.DwdbJobMapper;
|
|
|
import com.utic.dwdb.server.dao.mapper.DwdbJobPrcs05MMapper;
|
|
|
+import com.utic.dwdb.server.dao.mapper.DwdbJobPrcsPatternMapper;
|
|
|
import com.utic.dwdb.server.dto.CodeValueDto;
|
|
|
import com.utic.dwdb.server.dto.HolidayDto;
|
|
|
import com.utic.dwdb.server.dto.StatTimeDto;
|
|
@@ -26,6 +27,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
|
|
|
private final DwdbJobMapper dwdbJobMapper;
|
|
|
private final DwdbJobPrcs05MMapper prcs05MMapper;
|
|
|
+ private final DwdbJobPrcsPatternMapper prcsPatternMapper;
|
|
|
+
|
|
|
private ConcurrentHashMap<String, CodeValueDto> mapData = new ConcurrentHashMap<>();
|
|
|
private StatTimeDto initialize() {
|
|
|
|
|
@@ -63,31 +66,32 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
Elapsed tmpelapsed = new Elapsed();
|
|
|
|
|
|
// statFitTRFEXE
|
|
|
+ int result;
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int truncateStatLocal = this.prcs05MMapper.truncateStatLocal();
|
|
|
- log.info("[05MIN...] (DEL) {}", LogUtils.elapsedLog("STAT_LOCAL(TRUNCATE)", truncateStatLocal, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.truncateStatLocal();
|
|
|
+ log.info("[05MIN...] (DEL) {}", LogUtils.elapsedLog("STAT_LOCAL(TRUNCATE)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (DEL) {}, Exception: {}", LogUtils.elapsedLog("STAT_LOCAL(TRUNCATE)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int local12Loc = this.prcs05MMapper.insertStatLocal12Loc(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(12개지자체)", local12Loc, tmpelapsed.milliSeconds()));
|
|
|
+// result = this.prcs05MMapper.insertStatLocal12Loc(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
+// log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(12개지자체)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_LOCAL(12개지자체)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int localCapital = this.prcs05MMapper.insertStatLocalCapital(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(수도권 지역센터)", localCapital, tmpelapsed.milliSeconds()));
|
|
|
+// result = this.prcs05MMapper.insertStatLocalCapital(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
+// log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(수도권 지역센터)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_LOCAL(수도권 지역센터)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int localTotal = this.prcs05MMapper.insertStatLocal12Loc(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(통합배포시스템)", localTotal, tmpelapsed.milliSeconds()));
|
|
|
+// result = this.prcs05MMapper.insertStatLocal12Loc(statTime.getPast25Min(), statTime.getPast30Min());
|
|
|
+// log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL(통합배포시스템)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_LOCAL(통합배포시스템)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -107,8 +111,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
try {
|
|
|
// LINK_FILTER 초기화
|
|
|
tmpelapsed.reset();
|
|
|
- int truncateLinkFilter = this.prcs05MMapper.truncateLinkFilter();
|
|
|
- log.info("[05MIN...] (DEL) {}", LogUtils.elapsedLog("LINK_FILTER(TRUNCATE)", truncateLinkFilter, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.truncateLinkFilter();
|
|
|
+ log.info("[05MIN...] (DEL) {}", LogUtils.elapsedLog("LINK_FILTER(TRUNCATE)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (DEL) {}, Exception: {}", LogUtils.elapsedLog("LINK_FILTER(TRUNCATE)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -116,8 +120,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
try {
|
|
|
// LINK_FILTER 표준편차 입력
|
|
|
tmpelapsed.reset();
|
|
|
- int linkFilter = this.prcs05MMapper.insertLinkFilter(statTime.getPast25Min(), codeValue0.getCodeValue(), codeValue5.getCodeValue());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("LINK_FILTER(표준편차값)", linkFilter, tmpelapsed.milliSeconds()));
|
|
|
+// result = this.prcs05MMapper.insertLinkFilter(statTime.getPast25Min(), codeValue0.getCodeValue(), codeValue5.getCodeValue());
|
|
|
+// log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("LINK_FILTER(표준편차값)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("LINK_FILTER(표준편차값)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -128,10 +132,10 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
log.info("[05MIN...] (UPD) {}: LINK_FILTER 통계 최대최소 필터링 사용", LogUtils.elapsedLog("LINK_FILTER(패턴 필터링)"));
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- HolidayDto holiday = this.prcs05MMapper.findHoliday(statTime.getPast25Min());
|
|
|
- log.info("[05MIN...] (SEL) {}", LogUtils.elapsedLog("HOLIDAY", 1, tmpelapsed.milliSeconds()));
|
|
|
+// HolidayDto holiday = this.prcs05MMapper.findHoliday(statTime.getPast25Min());
|
|
|
+// log.info("[05MIN...] (SEL) {}", LogUtils.elapsedLog("HOLIDAY", 1, tmpelapsed.milliSeconds()));
|
|
|
|
|
|
- runLinkFilterPaternUpdate(statTime, holiday, codeValue2);
|
|
|
+// runLinkFilterPatternUpdate(statTime, holiday, codeValue2);
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (SEL) {}, Exception: {}", LogUtils.elapsedLog("HOLIDAY", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -145,7 +149,7 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// 도로등급별 최대최소값 UPDATE
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int result = this.prcs05MMapper.updateLinkFilterRoadRank();
|
|
|
+ result = this.prcs05MMapper.updateLinkFilterRoadRank();
|
|
|
log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("LINK_FILTER(도로등급 변경)", result, tmpelapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
@@ -157,7 +161,7 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
log.info("[05MIN...] (UPD) {}: LINK_FILTER 도로등급 최대최소 필터링 사용", LogUtils.elapsedLog("LINK_FILTER(도로등급 필터링)"));
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int result = this.prcs05MMapper.updateLinkFilterMinMax(
|
|
|
+ result = this.prcs05MMapper.updateLinkFilterMinMax(
|
|
|
codeValue6.getMinValue(), codeValue6.getMaxValue(),
|
|
|
codeValue7.getMinValue(), codeValue7.getMaxValue(),
|
|
|
codeValue8.getMinValue(), codeValue8.getMaxValue(),
|
|
@@ -175,8 +179,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// 전국 이력저장
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int statLocalLog = this.prcs05MMapper.insertStatLocalLog();
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL_LOG", statLocalLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStatLocalLog();
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_LOCAL_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_LOCAL_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -191,61 +195,61 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
log.info("[05MIN...] (SEL) {}, Exception: {}", LogUtils.elapsedLog("LINK_FILTER(생성일자)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
if (StringUtils.isEmpty(regDate)) {
|
|
|
- regDate = statTime.getPast25Min(); // LINK_FILTER 생성일자(MAK_DATE) 없을 경우
|
|
|
+// regDate = statTime.getPast25Min(); // LINK_FILTER 생성일자(MAK_DATE) 없을 경우
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int centerLog = this.prcs05MMapper.insertCenterLog(regDate);
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("CENTER_LOG", centerLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertCenterLog(regDate);
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("CENTER_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("CENTER_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int utisLog = this.prcs05MMapper.insertUtisLog(regDate);
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("UTIS_LOG", utisLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertUtisLog(regDate);
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("UTIS_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("UTIS_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int trafficLog = this.prcs05MMapper.insertStatTrafficLog(regDate);
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_TRAFFIC_LOG", trafficLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStatTrafficLog(regDate);
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_TRAFFIC_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_TRAFFIC_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int trafficLog = this.prcs05MMapper.insertFilterLog(regDate, codeValue0.getCodeValue(), codeValue1.getCodeValue(), codeValue2.getCodeValue(), codeValue3.getCodeValue(), codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("FILTER_LOG", trafficLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertFilterLog(regDate, codeValue0.getCodeValue(), codeValue1.getCodeValue(), codeValue2.getCodeValue(), codeValue3.getCodeValue(), codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("FILTER_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("FILTER_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int linkFilterLog = this.prcs05MMapper.insertLinkFilterLog(codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("LINK_FILTER_LOG", linkFilterLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertLinkFilterLog(codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("LINK_FILTER_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("LINK_FILTER_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int stat5MinCenter = this.prcs05MMapper.insertStat5MinCenter(regDate, codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", stat5MinCenter, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinCenter(regDate, codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int statFilterLog = this.prcs05MMapper.insertStatFilterLog(regDate);
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_FILTER_LOG", statFilterLog, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStatFilterLog(regDate);
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_FILTER_LOG", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_FILTER_LOG", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -253,8 +257,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
for (int level = 2; level <= 4; level++) {
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int stat5MinCenter = this.prcs05MMapper.insertStat5MinCenterLevel(String.valueOf(level), regDate);
|
|
|
- log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER(레벨" + level + ")", stat5MinCenter, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinCenterLevel(String.valueOf(level), regDate);
|
|
|
+ log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER(레벨" + level + ")", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_CENTER(레벨" + level + ")", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -262,8 +266,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int updateStat5MinCenter = this.prcs05MMapper.updateStat5MinCenter(regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", updateStat5MinCenter, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.updateStat5MinCenter(regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_CENTER", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -273,24 +277,24 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// STAT_5MIN_12LOC 통계정보
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5Min12Loc(regDate, codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5Min12Loc(regDate, codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_12LOC", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
for (int level = 2; level <= 4; level++) {
|
|
|
try {
|
|
|
- tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5Min12LocLevel(String.valueOf(level), regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(레벨" + level + ")", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ tmpelapsed.reset();
|
|
|
+ result = this.prcs05MMapper.insertStat5Min12LocLevel(String.valueOf(level), regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(레벨" + level + ")", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(레벨" + level + ")", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.updateStat5Min12LocTravelTime(regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(TRAVEL_TIME)", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.updateStat5Min12LocTravelTime(regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(TRAVEL_TIME)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_12LOC(TRAVEL_TIME)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -298,24 +302,24 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// STAT_5MIN_EXW 통계정보
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5MinExw(regDate, codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinExw(regDate, codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_EXW", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
for (int level = 2; level <= 4; level++) {
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5MinExwLevel(String.valueOf(level), regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW(레벨" + level + ")", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinExwLevel(String.valueOf(level), regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW(레벨" + level + ")", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_EXW(레벨" + level + ")", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.updateStat5MinExwTravelTime(regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW(TRAVEL_TIME)", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.updateStat5MinExwTravelTime(regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_EXW(TRAVEL_TIME)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_EXW(TRAVEL_TIME)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -323,24 +327,24 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// STAT_5MIN_LOC 통계정보
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5MinLoc(regDate, codeValue4.getCodeValue());
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinLoc(regDate, codeValue4.getCodeValue());
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_LOC", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
for (int level = 2; level <= 4; level++) {
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5MinLocLevel(String.valueOf(level), regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC(레벨" + level + ")", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinLocLevel(String.valueOf(level), regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC(레벨" + level + ")", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_LOC(레벨" + level + ")", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.updateStat5MinLocTravelTime(regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC(TRAVEL_TIME)", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.updateStat5MinLocTravelTime(regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_LOC(TRAVEL_TIME)", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_LOC(TRAVEL_TIME)", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -348,8 +352,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// STAT_5MIN_OBELOC 통계정보
|
|
|
try {
|
|
|
tmpelapsed.reset();
|
|
|
- int inserted = this.prcs05MMapper.insertStat5MinObeLoc(regDate);
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_OBELOC", inserted, tmpelapsed.milliSeconds()));
|
|
|
+ result = this.prcs05MMapper.insertStat5MinObeLoc(regDate);
|
|
|
+ log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("STAT_5MIN_OBELOC", result, tmpelapsed.milliSeconds()));
|
|
|
} catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog("STAT_5MIN_OBELOC", tmpelapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
@@ -358,7 +362,7 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- private void patternUpdate(String regDate) {
|
|
|
+ private void patternUpdate(String patternTime) {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
Elapsed tmpElapsed = new Elapsed();
|
|
|
String logTable, fromTable;
|
|
@@ -376,11 +380,11 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
boolean isWeek = false;
|
|
|
HolidayDto holiday = null;
|
|
|
try {
|
|
|
- holiday = this.prcs05MMapper.findHoliday(regDate);
|
|
|
+ holiday = this.prcsPatternMapper.findHoliday(patternTime);
|
|
|
log.info("[05MIN...] (SEL) {}", LogUtils.elapsedLog("HOLIDAY", 1, tmpElapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
- log.info("[05MIN...] (SEL) {}, patternUpdate[{}], Exception: {}", LogUtils.elapsedLog("HOLIDAY", tmpElapsed.milliSeconds()), regDate, e.getMessage());
|
|
|
+ log.info("[05MIN...] (SEL) {}, patternUpdate[{}], Exception: {}", LogUtils.elapsedLog("HOLIDAY", tmpElapsed.milliSeconds()), patternTime, e.getMessage());
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -433,17 +437,18 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ int result;
|
|
|
if (isWeek) {
|
|
|
// 평일(3,4,5)
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.mergePatternWeekJob(columnName, regDate);
|
|
|
+ result = this.prcsPatternMapper.mergePatternWeekJob("PATN_WEEK_JOB", "STAT_5MIN_CENTER", columnName, patternTime);
|
|
|
log.info("[05MIN...] (MRG) {}", LogUtils.elapsedLog("PATN_WEEK_JOB(MERGE)", result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
log.info("[05MIN...] (MRG) {}, Exception: {}", LogUtils.elapsedLog("PATN_WEEK_JOB(MERGE)", elapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.updatePatternWeekJob(columnName, regDate);
|
|
|
+ result = this.prcsPatternMapper.updateIncidentPatternWeekJob("PATN_WEEK_JOB", columnName, patternTime);
|
|
|
log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog("PATN_WEEK_JOB(UPDATE)", result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
@@ -452,14 +457,14 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
}
|
|
|
else {
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.insertPatternHist(fromTable + "_HIST", fromTable, regDate);
|
|
|
+ result = this.prcsPatternMapper.insertPatternHist(fromTable + "_HIST", fromTable, patternTime);
|
|
|
log.info("[05MIN...] (INS) {}", LogUtils.elapsedLog(logTable + "_HIST", result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
log.info("[05MIN...] (INS) {}, Exception: {}", LogUtils.elapsedLog(logTable + "_HIST", elapsed.milliSeconds()), e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.updatePattern(fromTable, minValue, maxValue);
|
|
|
+ result = this.prcsPatternMapper.updatePattern(fromTable, "STAT_5MIN_CENTER", patternTime, minValue, maxValue);
|
|
|
log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog(logTable, result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
@@ -471,7 +476,9 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
// 금요일 이면 금요일 패턴을 업데이트 하고(위에서 처리) 평일패턴을 업데이트 한다.
|
|
|
// 평일패턴작업 테이블을 이용하여 작업을 수행한다.
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.mergePatternWeek(regDate, minValue, maxValue);
|
|
|
+ minValue = String.valueOf(code13.getMinValue());
|
|
|
+ maxValue = String.valueOf(code13.getMaxValue());
|
|
|
+ result = this.prcsPatternMapper.mergePatternWeek("PATN_WEEK", "PATN_WEEK_JOB", patternTime, minValue, maxValue);
|
|
|
log.info("[05MIN...] (MRG) {}", LogUtils.elapsedLog("PATN_WEEK", result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
@@ -480,7 +487,7 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void runLinkFilterPaternUpdate(StatTimeDto statTime, HolidayDto holiday, CodeValueDto codeValue2) {
|
|
|
+ private void runLinkFilterPatternUpdate(StatTimeDto statTime, HolidayDto holiday, CodeValueDto codeValue2) {
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
String logTable, fromTable;
|
|
|
if (holiday.getHCnt() > 0) {
|
|
@@ -513,8 +520,8 @@ public class DwdbJobPrcs05MService implements AbstractProcessService {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- int result = this.prcs05MMapper.updateLinkFilterPattern(fromTable, statTime.getPast25Min(), codeValue2.getMinValue(), codeValue2.getMaxValue());
|
|
|
- log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog(logTable+"(패턴 최대최소값 변경)", result, elapsed.milliSeconds()));
|
|
|
+// int result = this.prcs05MMapper.updateLinkFilterPattern(fromTable, statTime.getPast25Min(), codeValue2.getMinValue(), codeValue2.getMaxValue());
|
|
|
+// log.info("[05MIN...] (UPD) {}", LogUtils.elapsedLog(logTable+"(패턴 최대최소값 변경)", result, elapsed.milliSeconds()));
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
log.info("[05MIN...] (UPD) {}, Exception: {}", LogUtils.elapsedLog(logTable+"(패턴 최대최소값 변경)", elapsed.milliSeconds()), e.getMessage());
|