영상관리 자동추론제외 로직 수정 #92

Merged
gina merged 1 commits from feat/infer_dev_260211 into develop 2026-02-24 18:21:24 +09:00
4 changed files with 45 additions and 2 deletions

View File

@@ -85,4 +85,12 @@ public class MapSheetMngFileJobCoreService {
public YearMinMax findYearMinMaxInfo() { public YearMinMax findYearMinMaxInfo() {
return mapSheetMngYearRepository.findYearMinMaxInfo(); return mapSheetMngYearRepository.findYearMinMaxInfo();
} }
public Long findMngYyyyCnt(Integer mngYyyy) {
return mapSheetMngFileJobRepository.findMngYyyyCnt(mngYyyy);
}
public Long findMapSheetUseExceptCnt(String mapSheetNum) {
return mapSheetMngFileJobRepository.findMapSheetUseExceptCnt(mapSheetNum);
}
} }

View File

@@ -24,4 +24,8 @@ public interface MapSheetMngFileJobRepositoryCustom {
int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum); int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum);
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus); public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus);
Long findMngYyyyCnt(Integer mngYyyy);
Long findMapSheetUseExceptCnt(String mapSheetNum);
} }

View File

@@ -267,4 +267,26 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum)) .where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
.execute(); .execute();
} }
@Override
public Long findMngYyyyCnt(Integer mngYyyy) {
return queryFactory
.select(mapSheetMngEntity.mngYyyy.count())
.from(mapSheetMngEntity)
.where(mapSheetMngEntity.mngYyyy.ne(mngYyyy))
.fetchOne();
}
@Override
public Long findMapSheetUseExceptCnt(String mapSheetNum) {
return queryFactory
.select(
new CaseBuilder()
.when(mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))
.then(1L)
.otherwise(0L))
.from(mapInkx5kEntity)
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
.fetchOne();
}
} }

View File

@@ -64,9 +64,18 @@ public class MapSheetMngFileJobService {
for (MngHstDto item : mapSheetFileNotYetList) { for (MngHstDto item : mapSheetFileNotYetList) {
// mng_yyyy 가 완전 최초로 등록되는 것인지 확인
Long mngCnt = mapSheetMngFileJobCoreService.findMngYyyyCnt(item.getMngYyyy());
// 5K도엽 자동추론제외 // 5K도엽 자동추론제외
Long exceptCheckCnt = Long exceptCheckCnt = 0L;
this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
if (mngCnt == 0) { // 최초 등록이면 도엽의 추론제외여부를 확인
exceptCheckCnt =
mapSheetMngFileJobCoreService.findMapSheetUseExceptCnt(item.getMapSheetNum());
} else { // 등록된 영상 년도가 있으면 자동추론제외 확인
exceptCheckCnt = this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
}
// 도엽별 파일 체크 진행중으로 변경 // 도엽별 파일 체크 진행중으로 변경
item.setDataState("PROCESSING"); item.setDataState("PROCESSING");