영상관리 상태정의수정 및 작업완료 추가
This commit is contained in:
@@ -2,6 +2,9 @@ package com.kamco.cd.kamcoback.mapsheet.service;
|
||||
|
||||
import static java.lang.String.CASE_INSENSITIVE_ORDER;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.exception.DuplicateFileException;
|
||||
import com.kamco.cd.kamcoback.common.exception.ValidationException;
|
||||
import com.kamco.cd.kamcoback.common.utils.FIleChecker;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDepthDto;
|
||||
@@ -29,6 +32,7 @@ import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -220,11 +224,24 @@ public class MapSheetMngService {
|
||||
return mapSheetMngCoreService.findMapSheetMng(mngYyyy);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn mngComplete(int mngYyyy) {
|
||||
|
||||
mapSheetMngCoreService.MapSheetMngComplete(mngYyyy);
|
||||
|
||||
return new MapSheetMngDto.DmlReturn("success", "작업완료 처리되었습니다.");
|
||||
}
|
||||
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetErrorList(searchReq);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid) {
|
||||
return mapSheetMngCoreService.findMapSheetError(hstUid);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn mngDataSave(MapSheetMngDto.AddReq AddReq) {
|
||||
return mapSheetMngCoreService.mngDataSave(AddReq);
|
||||
@@ -248,4 +265,39 @@ public class MapSheetMngService {
|
||||
public MapSheetMngDto.DmlReturn updateExceptUseInference(@Valid List<Long> hstUidList) {
|
||||
return mapSheetMngCoreService.updateExceptUseInference(hstUidList);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn uploadPair(
|
||||
MultipartFile tfwFile,
|
||||
MultipartFile tifFile,
|
||||
//String targetPath,
|
||||
Long hstUid) {
|
||||
|
||||
// 파일 유효성 검증
|
||||
if (tfwFile == null || tfwFile.isEmpty() || tfwFile.getSize() == 0) {
|
||||
return new MapSheetMngDto.DmlReturn("fail", "TFW 파일이(0Byte) 비어있습니다.");
|
||||
}else if (tifFile == null || tifFile.isEmpty() || tifFile.getSize() == 0) {
|
||||
return new MapSheetMngDto.DmlReturn("fail", "TIF 파일이(0Byte) 비어있습니다.");
|
||||
}
|
||||
|
||||
if( ! tfwFile.getOriginalFilename()
|
||||
.substring(tfwFile.getOriginalFilename().lastIndexOf('.') + 1)
|
||||
.toLowerCase()
|
||||
.equals("tfw") )
|
||||
{
|
||||
return new MapSheetMngDto.DmlReturn("fail", "파일명이 TFW형식이 아닙니다.");
|
||||
}else if( ! tifFile.getOriginalFilename()
|
||||
.substring(tifFile.getOriginalFilename().lastIndexOf('.') + 1)
|
||||
.toLowerCase()
|
||||
.equals("tif") )
|
||||
{
|
||||
return new MapSheetMngDto.DmlReturn("fail", "파일명이 TIF형식이 아닙니다.");
|
||||
}
|
||||
|
||||
|
||||
return new MapSheetMngDto.DmlReturn("success", "파일 업로드 완료되었습니다.");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user