영상관리 - 자동추론제외/해제 로직, 목록 API 수정

This commit is contained in:
2026-01-27 12:29:44 +09:00
parent 6b23a5d739
commit af25143cd5
5 changed files with 28 additions and 28 deletions

View File

@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.scheduler.service;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import com.kamco.cd.kamcoback.common.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.common.utils.FIleChecker;
import com.kamco.cd.kamcoback.common.utils.FIleChecker.Basic;
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngFileJobCoreService;
@@ -79,26 +80,22 @@ public class MapSheetMngFileJobService {
for (MngHstDto item : mapSheetFileNotYetList) {
// 5K도엽 자동추론제외
Long exceptCheckCnt =
this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
// Long exceptCheckCnt =
// this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
// 도엽별 파일 체크 진행중으로 변경
item.setDataState("PROCESSING");
item.setUseInference("USE");
if (exceptCheckCnt == 0) {
item.setUseInference("EXCEPT");
}
// if (exceptCheckCnt == 0) {
// item.setUseInference("EXCEPT");
// }
mngHstDataSyncStateUpdate(item);
// 1. MngHstDto 객체의 필드 값에 접근
// hstUid = item.getHstUid();
// syncState = item.getSyncState();
srchDto.setMaxDepth(10);
srchDto.setDirPath(item.getSyncMngPath());
srchDto.setExtension("tif,tfw");
srchDto.setFileNm(item.getMapSheetNum());
// srchDto.setFileNm("34602047");
System.out.println(
"UID: "
@@ -112,8 +109,6 @@ public class MapSheetMngFileJobService {
+ " .tif,tfw");
// 도엽번호로 파일 찾기
// basicList = this.getFilesDepthAll(srchDto);
basicList =
FIleChecker.getFilesFromAllDepth(
srchDto.getDirPath(),
@@ -137,13 +132,18 @@ public class MapSheetMngFileJobService {
if (tfwCnt == 0 && tifCnt == 0) {
syncState = "NOFILE";
item.setUseInference("EXCEPT"); // hst 테이블 use_inference EXCEPT 하기
// tb_map_inkx_5k 테이블 자동 추론제외 update
mapSheetMngFileJobCoreService.updateException5kMapSheet(
item.getMapSheetNum(), CommonUseStatus.AUTO_EXCEPT);
} else {
// tb_map_inkx_5k 테이블 자동 추론제외 해제 -> 사용으로 처리
mapSheetMngFileJobCoreService.updateException5kMapSheet(
item.getMapSheetNum(), CommonUseStatus.USE);
}
for (Basic item2 : basicList) {
// System.out.println("path: " + item2.getParentPath());
// System.out.println("path: " + item2.getFileNm());
// System.out.println("path: " + item2.getFullPath());
MngFileAddReq addReq = new MngFileAddReq();
addReq.setMngYyyy(item.getMngYyyy());
addReq.setMapSheetNum(item.getMapSheetNum());
@@ -240,9 +240,6 @@ public class MapSheetMngFileJobService {
return 1L;
}
// List<String> mapSheetNums = new ArrayList<>();
// mapSheetNums.add(mapSheetNum);
int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt + 1;
int endYyyy = mngYyyy;
@@ -251,13 +248,10 @@ public class MapSheetMngFileJobService {
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
strtYyyy, endYyyy, mapSheetNum);
// System.out.println("mapSheetAutoExceptionUpdate mapSheetNum == " + mapSheetNum);
// System.out.println("mapSheetAutoExceptionUpdate strtYyyy == " + strtYyyy);
// System.out.println("mapSheetAutoExceptionUpdate endYyyy == " + endYyyy);
// System.out.println("mapSheetAutoExceptionUpdate beforeCnt == " + beforeCnt);
if (beforeCnt == 0) {
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum);
mapSheetMngFileJobCoreService.updateException5kMapSheet(
mapSheetNum, CommonUseStatus.AUTO_EXCEPT);
}
return beforeCnt;