영상관리 - 자동추론제외/해제 로직, 목록 API 수정
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
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.repository.scheduler.MapSheetMngFileJobRepository;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
|
||||
@@ -69,7 +70,7 @@ public class MapSheetMngFileJobCoreService {
|
||||
strtYyyy, endYyyy, mapSheetNum);
|
||||
}
|
||||
|
||||
public void updateException5kMapSheet(String mapSheetNum) {
|
||||
mapSheetMngFileJobRepository.updateException5kMapSheet(mapSheetNum);
|
||||
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
|
||||
mapSheetMngFileJobRepository.updateException5kMapSheet(mapSheetNum, commonUseStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +169,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.from(mapSheetMngEntity)
|
||||
.leftJoin(mapSheetMngHstEntity)
|
||||
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))
|
||||
.innerJoin(mapInkx5kEntity)
|
||||
.on(
|
||||
mapSheetMngHstEntity.mapSheetNum.eq(mapInkx5kEntity.mapidcdNo),
|
||||
mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))
|
||||
.where(whereBuilder)
|
||||
// .offset(pageable.getOffset())
|
||||
// .limit(pageable.getPageSize())
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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.MngHstDto;
|
||||
import java.util.List;
|
||||
@@ -21,5 +22,5 @@ public interface MapSheetMngFileJobRepositoryCustom {
|
||||
|
||||
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum);
|
||||
|
||||
public void updateException5kMapSheet(String mapSheetNum);
|
||||
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus);
|
||||
}
|
||||
|
||||
@@ -257,11 +257,11 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateException5kMapSheet(String mapSheetNum) {
|
||||
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
|
||||
long updateCount =
|
||||
queryFactory
|
||||
.update(mapInkx5kEntity)
|
||||
.set(mapInkx5kEntity.useInference, CommonUseStatus.AUTO_EXCEPT)
|
||||
.set(mapInkx5kEntity.useInference, commonUseStatus)
|
||||
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
|
||||
.execute();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user