feat/infer_dev_260107 #1

Merged
teddy merged 43 commits from feat/infer_dev_260107 into develop 2026-01-29 10:31:31 +09:00
5 changed files with 28 additions and 28 deletions
Showing only changes of commit af25143cd5 - Show all commits

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.postgres.core; package com.kamco.cd.kamcoback.postgres.core;
import com.kamco.cd.kamcoback.common.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity; import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity;
import com.kamco.cd.kamcoback.postgres.repository.scheduler.MapSheetMngFileJobRepository; import com.kamco.cd.kamcoback.postgres.repository.scheduler.MapSheetMngFileJobRepository;
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto; import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
@@ -69,7 +70,7 @@ public class MapSheetMngFileJobCoreService {
strtYyyy, endYyyy, mapSheetNum); strtYyyy, endYyyy, mapSheetNum);
} }
public void updateException5kMapSheet(String mapSheetNum) { public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
mapSheetMngFileJobRepository.updateException5kMapSheet(mapSheetNum); mapSheetMngFileJobRepository.updateException5kMapSheet(mapSheetNum, commonUseStatus);
} }
} }

View File

@@ -169,6 +169,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
.from(mapSheetMngEntity) .from(mapSheetMngEntity)
.leftJoin(mapSheetMngHstEntity) .leftJoin(mapSheetMngHstEntity)
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy)) .on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))
.innerJoin(mapInkx5kEntity)
.on(
mapSheetMngHstEntity.mapSheetNum.eq(mapInkx5kEntity.mapidcdNo),
mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))
.where(whereBuilder) .where(whereBuilder)
// .offset(pageable.getOffset()) // .offset(pageable.getOffset())
// .limit(pageable.getPageSize()) // .limit(pageable.getPageSize())

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.postgres.repository.scheduler; package com.kamco.cd.kamcoback.postgres.repository.scheduler;
import com.kamco.cd.kamcoback.common.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto; import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto.MngHstDto; import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto.MngHstDto;
import java.util.List; import java.util.List;
@@ -21,5 +22,5 @@ public interface MapSheetMngFileJobRepositoryCustom {
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum); public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum);
public void updateException5kMapSheet(String mapSheetNum); public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus);
} }

View File

@@ -257,11 +257,11 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
} }
@Override @Override
public void updateException5kMapSheet(String mapSheetNum) { public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
long updateCount = long updateCount =
queryFactory queryFactory
.update(mapInkx5kEntity) .update(mapInkx5kEntity)
.set(mapInkx5kEntity.useInference, CommonUseStatus.AUTO_EXCEPT) .set(mapInkx5kEntity.useInference, commonUseStatus)
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum)) .where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
.execute(); .execute();
} }

View File

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