영상관리 수정
This commit is contained in:
@@ -73,13 +73,11 @@ public class MapSheetMngService {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public DmlReturn mngDataSave(AddReq AddReq) {
|
||||
return mapSheetMngCoreService.mngDataSave(AddReq);
|
||||
public DmlReturn mngDataSave(AddReq addReq) {
|
||||
int execCnt = mapSheetMngCoreService.mngDataSave(addReq);
|
||||
return new MapSheetMngDto.DmlReturn("success", addReq.getMngYyyy()+"년, "+execCnt+"건 생성");
|
||||
}
|
||||
|
||||
public DmlReturn uploadProcess(@Valid List<Long> hstUidList) {
|
||||
return mapSheetMngCoreService.uploadProcess(hstUidList);
|
||||
}
|
||||
|
||||
public DmlReturn updateExceptUseInference(@Valid List<Long> hstUidList) {
|
||||
return mapSheetMngCoreService.updateExceptUseInference(hstUidList);
|
||||
@@ -129,7 +127,7 @@ public class MapSheetMngService {
|
||||
if (!FIleChecker.checkTfw(tfwTmpPath)) return new DmlReturn("fail", "TFW TYPE ERROR");
|
||||
|
||||
// 싱크파일목록으로 업로드 경로 확인
|
||||
List<MngFilesDto> mngFiles = mapSheetMngCoreService.findIdToMapSheetFileList(hstUid);
|
||||
List<MngFilesDto> mngFiles = mapSheetMngCoreService.findByHstUidMapSheetFileList(hstUid);
|
||||
String uploadPath = "";
|
||||
for (MngFilesDto dto : mngFiles) {
|
||||
uploadPath = dto.getFilePath();
|
||||
@@ -197,24 +195,10 @@ public class MapSheetMngService {
|
||||
return new DmlReturn("success", "파일 업로드 완료되었습니다.");
|
||||
}
|
||||
|
||||
public List<MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) {
|
||||
return mapSheetMngCoreService.findHstUidToMapSheetFileList(hstUid);
|
||||
public List<MngFilesDto> findByHstUidMapSheetFileList(Long hstUid) {
|
||||
return mapSheetMngCoreService.findByHstUidMapSheetFileList(hstUid);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public DmlReturn deleteByFileUidMngFile(List<Long> fileUids) {
|
||||
|
||||
long hstUid = 0;
|
||||
|
||||
for (Long uid : fileUids) {
|
||||
mapSheetMngCoreService.deleteByFileUidMngFile(uid);
|
||||
}
|
||||
|
||||
// 중복제거 확인후 처리상태(DONE)변경
|
||||
//if (hstUid > 0) mapSheetMngCoreService.updateByHstUidSyncCheckState(hstUid);
|
||||
|
||||
return new DmlReturn("success", fileUids.size() + "개 파일이 삭제되었습니다.");
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public DmlReturn setUseByFileUidMngFile(List<Long> fileUids) {
|
||||
@@ -223,21 +207,29 @@ public class MapSheetMngService {
|
||||
|
||||
DmlReturn dmlReturn = new DmlReturn("success", "정상처리되었습니다.");
|
||||
|
||||
MapSheetMngDto.MngFilesDto dto = mapSheetMngCoreService.findByFileUidMapSheetFile(fileUids.get(0));
|
||||
hstUid = dto.getHstUid();
|
||||
|
||||
mapSheetMngCoreService.deleteByNotInFileUidMngFile(hstUid, fileUids);
|
||||
MapSheetMngDto.SyncCheckStateReqUpdateDto reqDto = new MapSheetMngDto.SyncCheckStateReqUpdateDto();
|
||||
|
||||
for (Long uid : fileUids) {
|
||||
MapSheetMngDto.MngFilesDto dto = mapSheetMngCoreService.findByFileUidMapSheetFile(uid);
|
||||
|
||||
reqDto.setHstUid(dto.getHstUid());
|
||||
reqDto.setFilePath(dto.getFilePath());
|
||||
reqDto.setSyncCheckState("DONE");
|
||||
|
||||
if (dto.getFileExt().equals("tif")) reqDto.setSyncCheckTifFileName(dto.getFileName());
|
||||
else if (dto.getFileExt().equals("tfw")) reqDto.setSyncCheckTfwFileName(dto.getFileName());
|
||||
|
||||
mapSheetMngCoreService.updateByFileUidFileState(uid, "DONE");
|
||||
}
|
||||
|
||||
//선택제외 삭제처리
|
||||
mapSheetMngCoreService.deleteByNotInFileUidMngFile(reqDto.getHstUid(), fileUids);
|
||||
//Hst(내역) 테이블 상태 업데이트
|
||||
mapSheetMngCoreService.updateByHstUidSyncCheckState(reqDto);
|
||||
|
||||
return new DmlReturn("success", fileUids.size() + "개 파일이 사용설정되었습니다.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public DmlReturn validationFile(MultipartFile tfwFile, MultipartFile tifFile)
|
||||
{
|
||||
if( !FIleChecker.validationMultipart(tfwFile) )return new DmlReturn("fail", "TFW SIZE 오류");
|
||||
@@ -253,9 +245,6 @@ public class MapSheetMngService {
|
||||
int tfwCnt = mapSheetMngCoreService.findByYearFileNameFileCount(mngYyyy, tfwFileName);
|
||||
int tifCnt = mapSheetMngCoreService.findByYearFileNameFileCount(mngYyyy, tifFileName);
|
||||
|
||||
System.out.println("tfwCnt ==" + tfwCnt);
|
||||
System.out.println("tifCnt ==" + tifCnt);
|
||||
|
||||
if (tfwCnt > 0 || tifCnt > 0) {
|
||||
String resMsg = "";
|
||||
if (tfwCnt > 0)
|
||||
|
||||
Reference in New Issue
Block a user