영상관리 수정

This commit is contained in:
Moon
2026-01-19 16:18:19 +09:00
parent 161e774860
commit d1809a6969
8 changed files with 181 additions and 48 deletions

View File

@@ -45,6 +45,12 @@ public class MapSheetMngFileJobService {
@Value("${file.sync-file-extention}")
private String syncFileExtention;
public Integer checkMngFileSync()
{
return mapSheetMngFileJobCoreService.findNotYetMapSheetMng();
}
@Transactional
public void checkMapSheetFileProcess(long targetNum, int mngSyncPageSize) {
@@ -55,10 +61,15 @@ public class MapSheetMngFileJobService {
String syncCheckState = "";
String fileState = "";
String dataState = "";
int mngYyyy = 0;
SrchFilesDepthDto srchDto = new SrchFilesDepthDto();
List<FIleChecker.Basic> basicList = new ArrayList<>();
if( mapSheetFileNotYetList.size() >= 1 ){
mngYyyy = mapSheetFileNotYetList.get(0).getMngYyyy();
}
for (MngHstDto item : mapSheetFileNotYetList) {
// 도엽별 파일 체크 진행중으로 변경
@@ -113,9 +124,9 @@ public class MapSheetMngFileJobService {
if (tfwCnt == 0 && tifCnt == 0) syncState = "NOFILE";
for (FIleChecker.Basic item2 : basicList) {
System.out.println("path: " + item2.getParentPath());
System.out.println("path: " + item2.getFileNm());
System.out.println("path: " + item2.getFullPath());
//System.out.println("path: " + item2.getParentPath());
//System.out.println("path: " + item2.getFileNm());
//System.out.println("path: " + item2.getFullPath());
MapSheetMngDto.MngFileAddReq addReq = new MapSheetMngDto.MngFileAddReq();
addReq.setMngYyyy(item.getMngYyyy());
@@ -136,7 +147,7 @@ public class MapSheetMngFileJobService {
fileState = "DUPLICATE";
syncState = fileState;
} else if (item2.getFileSize() == 0) {
fileState = "SIZEERROR";
fileState = "TYPEERROR";
syncState = fileState;
} else if (!FIleChecker.checkTfw(item2.getFullPath())) {
fileState = "TYPEERROR";
@@ -150,7 +161,7 @@ public class MapSheetMngFileJobService {
fileState = "DUPLICATE";
syncState = fileState;
} else if (item2.getFileSize() == 0) {
fileState = "SIZEERROR";
fileState = "TYPEERROR";
syncState = fileState;
} else if (!FIleChecker.cmmndGdalInfo(item2.getFullPath())) {
fileState = "TYPEERROR";
@@ -168,15 +179,10 @@ public class MapSheetMngFileJobService {
item.setSyncState(syncState);
mngHstDataSyncStateUpdate(item);
// srchDto.
// 2. 출력
// System.out.println("UID: " + hstUid + ", 상태: " + syncState + ", 관리경로: " +
// item.getSyncMngPath());
// 3. (필요하다면) 다른 로직 수행
// ...
}
Long notyetCnt = this.mngDataStateDoneUpdate(mngYyyy);
}
public int checkIsNoFile(List<FileDto.Basic> basicList) {
@@ -187,10 +193,34 @@ public class MapSheetMngFileJobService {
return basicList.size();
}
public Long mngDataStateDoneUpdate(int mngYyyy) {
Long notyetCnt = 0L;
if( mngYyyy > 0 )
{
notyetCnt = findByMngYyyyTargetMapSheetNotYetCount(mngYyyy);
if( notyetCnt == 0 )
{
mapSheetMngFileJobCoreService.mngDataState(mngYyyy,"DONE");
}
else
{
mapSheetMngFileJobCoreService.mngDataState(mngYyyy,"PROCESSING");
}
}
return notyetCnt;
}
public List<MngHstDto> findTargetMapSheetFileList(long targetNum, int pageSize) {
return mapSheetMngFileJobCoreService.findTargetMapSheetFileList(targetNum, pageSize);
}
public Long findByMngYyyyTargetMapSheetNotYetCount(int mngYyyy) {
return mapSheetMngFileJobCoreService.findByMngYyyyTargetMapSheetNotYetCount(mngYyyy);
}
public MapSheetMngDto.DmlReturn mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto UpdateReq) {
return mapSheetMngFileJobCoreService.mngHstDataSyncStateUpdate(UpdateReq);
}