Merge pull request '영상관리 자동추론제외 로직 수정' (#92) from feat/infer_dev_260211 into develop

Reviewed-on: #92
This commit was merged in pull request #92.
This commit is contained in:
2026-02-24 18:21:23 +09:00
4 changed files with 45 additions and 2 deletions

View File

@@ -85,4 +85,12 @@ public class MapSheetMngFileJobCoreService {
public YearMinMax 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);
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))
.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) {
// mng_yyyy 가 완전 최초로 등록되는 것인지 확인
Long mngCnt = mapSheetMngFileJobCoreService.findMngYyyyCnt(item.getMngYyyy());
// 5K도엽 자동추론제외
Long exceptCheckCnt =
this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
Long exceptCheckCnt = 0L;
if (mngCnt == 0) { // 최초 등록이면 도엽의 추론제외여부를 확인
exceptCheckCnt =
mapSheetMngFileJobCoreService.findMapSheetUseExceptCnt(item.getMapSheetNum());
} else { // 등록된 영상 년도가 있으면 자동추론제외 확인
exceptCheckCnt = this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
}
// 도엽별 파일 체크 진행중으로 변경
item.setDataState("PROCESSING");