spotlessApply

This commit is contained in:
2025-12-17 15:35:14 +09:00
parent d6b6e77a88
commit 3213b1e9a7
10 changed files with 82 additions and 111 deletions

View File

@@ -88,21 +88,20 @@ public class MapSheetMngApiController {
@Operation(summary = "영상관리 > 작업완료", description = "영상관리 > 작업완료")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "201",
description = "작업완료 처리 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = Long.class))),
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
value = {
@ApiResponse(
responseCode = "201",
description = "작업완료 처리 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = Long.class))),
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@PutMapping("/mng-complete")
public ApiResponseDto<MapSheetMngDto.DmlReturn> mngComplete(
@RequestParam @Valid int mngYyyy) {
public ApiResponseDto<MapSheetMngDto.DmlReturn> mngComplete(@RequestParam @Valid int mngYyyy) {
return ApiResponseDto.ok(mapSheetMngService.mngComplete(mngYyyy));
}
@@ -118,7 +117,6 @@ public class MapSheetMngApiController {
return ApiResponseDto.ok(mapSheetMngService.findMapSheetErrorList(searchReq));
}
@Operation(summary = "오류데이터 팝업 > 업로드 처리", description = "오류데이터 팝업 > 업로드 처리")
@ApiResponses(
value = {
@@ -150,16 +148,12 @@ public class MapSheetMngApiController {
return ApiResponseDto.ok(mapSheetMngService.updateExceptUseInference(hstUidList));
}
@Operation(summary = "페어 파일 업로드", description = "TFW/TIF 두 파일을 쌍으로 업로드 및 검증")
@PostMapping(value = "/upload-pair", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ApiResponseDto<MapSheetMngDto.DmlReturn> uploadPair(
@RequestPart("tfw") MultipartFile tfwFile,
@RequestPart("tif") MultipartFile tifFile,
@RequestParam(value = "hstUid", required = false) Long hstUid) {
return ApiResponseDto.createOK(
mapSheetMngService.uploadPair(tfwFile, tifFile, hstUid));
@RequestPart("tfw") MultipartFile tfwFile,
@RequestPart("tif") MultipartFile tifFile,
@RequestParam(value = "hstUid", required = false) Long hstUid) {
return ApiResponseDto.createOK(mapSheetMngService.uploadPair(tfwFile, tifFile, hstUid));
}
}

View File

@@ -83,8 +83,6 @@ public class MapSheetMngFileCheckerApiController {
mapSheetMngFileCheckerService.uploadFile(file, targetPath, overwrite, hstUid));
}
@Operation(summary = "파일 삭제", description = "중복 파일 등 파일 삭제")
@PostMapping("/delete")
public ApiResponseDto<Boolean> deleteFile(@RequestBody SrchFoldersDto dto) {

View File

@@ -107,10 +107,9 @@ public class MapSheetMngDto {
return this.syncNotPaireExecCnt + this.syncDuplicateExecCnt + this.syncFaultExecCnt;
}
public String getMngStateName() {
String enumId = this.mngState;
if( enumId == null || enumId.isEmpty())enumId = "NOTYET";
if (enumId == null || enumId.isEmpty()) enumId = "NOTYET";
MngStateType type = Enums.fromId(MngStateType.class, enumId);
return type.getText();
@@ -180,8 +179,7 @@ public class MapSheetMngDto {
private String errorCheckTfwFileName;
private String errorCheckTifFileName;
//private List<MngFIleDto> fileArray;
// private List<MngFIleDto> fileArray;
public ErrorDataDto(
Long hstUid,
@@ -213,7 +211,7 @@ public class MapSheetMngDto {
}
private String getSyncStateName(String enumId) {
if( enumId == null || enumId.isEmpty())enumId = "NOTYET";
if (enumId == null || enumId.isEmpty()) enumId = "NOTYET";
SyncStateType type = Enums.fromId(SyncStateType.class, enumId);
return type.getText();
@@ -242,8 +240,6 @@ public class MapSheetMngDto {
private String message;
}
@Getter
@AllArgsConstructor
public enum DataState implements EnumType {

View File

@@ -2,9 +2,6 @@ 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;
@@ -224,7 +221,6 @@ public class MapSheetMngService {
return mapSheetMngCoreService.findMapSheetMng(mngYyyy);
}
@Transactional
public MapSheetMngDto.DmlReturn mngComplete(int mngYyyy) {
@@ -268,36 +264,32 @@ public class MapSheetMngService {
@Transactional
public MapSheetMngDto.DmlReturn uploadPair(
MultipartFile tfwFile,
MultipartFile tifFile,
//String targetPath,
Long hstUid) {
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 == 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()
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형식이 아닙니다.");
}
.equals("tif")) {
return new MapSheetMngDto.DmlReturn("fail", "파일명이 TIF형식이 아닙니다.");
}
return new MapSheetMngDto.DmlReturn("success", "파일 업로드 완료되었습니다.");
}
}