영상관리파일삭제, 년도목록 조회 수정

This commit is contained in:
Moon
2025-12-18 10:59:09 +09:00
parent 9d1d9aff69
commit 21f1e9fc3c
8 changed files with 199 additions and 193 deletions

View File

@@ -28,7 +28,7 @@ public class MapSheetMngApiController {
private final CommonCodeService commonCodeService; private final CommonCodeService commonCodeService;
private final MapSheetMngService mapSheetMngService; private final MapSheetMngService mapSheetMngService;
@Operation(summary = "영상데이터관리목록 조회", description = "영상데이터관리목록 조회") @Operation(summary = "영상 데이터 관리 목록 조회", description = "영상 데이터 관리 목록 조회")
@ApiResponses( @ApiResponses(
value = { value = {
@ApiResponse( @ApiResponse(
@@ -47,7 +47,7 @@ public class MapSheetMngApiController {
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList()); return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList());
} }
@Operation(summary = "영상데이터관리 상세", description = "영상데이터관리 상세") @Operation(summary = "영상 데이터 관리 상세", description = "영상 데이터 관리 상세")
@ApiResponses( @ApiResponses(
value = { value = {
@ApiResponse( @ApiResponse(
@@ -105,12 +105,26 @@ public class MapSheetMngApiController {
return ApiResponseDto.ok(mapSheetMngService.mngComplete(mngYyyy)); return ApiResponseDto.ok(mapSheetMngService.mngComplete(mngYyyy));
} }
/** @Operation(summary = "영상 데이터 관리 년도 목록", description = "영상 데이터 관리 년도 목록")
* 오류데이터 목록 조회 @ApiResponses(
* value = {
* @param searchReq @ApiResponse(
* @return responseCode = "200",
*/ description = "조회 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@PostMapping("/mng-year-list")
public ApiResponseDto<List<Integer>> findMapSheetMngYyyyList() {
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngYyyyList());
}
@PostMapping("/error-list") @PostMapping("/error-list")
public ApiResponseDto<Page<MapSheetMngDto.ErrorDataDto>> findMapSheetErrorList( public ApiResponseDto<Page<MapSheetMngDto.ErrorDataDto>> findMapSheetErrorList(
@RequestBody @Valid MapSheetMngDto.ErrorSearchReq searchReq) { @RequestBody @Valid MapSheetMngDto.ErrorSearchReq searchReq) {
@@ -137,7 +151,6 @@ public class MapSheetMngApiController {
return ApiResponseDto.ok(mapSheetMngService.uploadProcess(hstUidList)); return ApiResponseDto.ok(mapSheetMngService.uploadProcess(hstUidList));
} }
@Operation(summary = "오류데이터 팝업 > 추론 제외", description = "오류데이터 팝업 > 추론 제외") @Operation(summary = "오류데이터 팝업 > 추론 제외", description = "오류데이터 팝업 > 추론 제외")
@PutMapping("/except-inference") @PutMapping("/except-inference")
public ApiResponseDto<MapSheetMngDto.DmlReturn> updateExceptUseInference( public ApiResponseDto<MapSheetMngDto.DmlReturn> updateExceptUseInference(
@@ -154,7 +167,6 @@ public class MapSheetMngApiController {
return ApiResponseDto.createOK(mapSheetMngService.uploadPair(tfwFile, tifFile, hstUid)); return ApiResponseDto.createOK(mapSheetMngService.uploadPair(tfwFile, tifFile, hstUid));
} }
@GetMapping("/mng-file-list") @GetMapping("/mng-file-list")
public ApiResponseDto<List<MapSheetMngDto.MngFilesDto>> findHstUidToMapSheetFileList( public ApiResponseDto<List<MapSheetMngDto.MngFilesDto>> findHstUidToMapSheetFileList(
@RequestParam @Valid Long hstUid) { @RequestParam @Valid Long hstUid) {
@@ -176,11 +188,8 @@ public class MapSheetMngApiController {
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
}) })
@PutMapping("/del-mng-files") @PutMapping("/del-mng-files")
public ApiResponseDto<MapSheetMngDto.DmlReturn> deleteByFileUidMngFile(@RequestParam @Valid List<Long> fileUids) { public ApiResponseDto<MapSheetMngDto.DmlReturn> deleteByFileUidMngFile(
@RequestParam @Valid List<Long> fileUids) {
return ApiResponseDto.ok(mapSheetMngService.deleteByFileUidMngFile(fileUids)); return ApiResponseDto.ok(mapSheetMngService.deleteByFileUidMngFile(fileUids));
} }
} }

View File

@@ -15,14 +15,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@Tag(name = "영상 관리", description = "영상 관리 API") @Tag(name = "영상 관리", description = "영상 관리 API")
@RestController @RestController

View File

@@ -4,7 +4,6 @@ import com.kamco.cd.kamcoback.common.enums.MngStateType;
import com.kamco.cd.kamcoback.common.enums.SyncStateType; import com.kamco.cd.kamcoback.common.enums.SyncStateType;
import com.kamco.cd.kamcoback.common.utils.Enums; import com.kamco.cd.kamcoback.common.utils.Enums;
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm; import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
import com.kamco.cd.kamcoback.config.enums.EnumType;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -107,10 +106,9 @@ public class MapSheetMngDto {
return this.syncNotPaireExecCnt + this.syncDuplicateExecCnt + this.syncFaultExecCnt; return this.syncNotPaireExecCnt + this.syncDuplicateExecCnt + this.syncFaultExecCnt;
} }
public String getMngStateName() { public String getMngStateName() {
String enumId = this.mngState; 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); MngStateType type = Enums.fromId(MngStateType.class, enumId);
return type.getText(); return type.getText();
@@ -181,8 +179,7 @@ public class MapSheetMngDto {
private String errorCheckTfwFileName; private String errorCheckTfwFileName;
private String errorCheckTifFileName; private String errorCheckTifFileName;
//private List<MngFIleDto> fileArray; // private List<MngFIleDto> fileArray;
public ErrorDataDto( public ErrorDataDto(
Long hstUid, Long hstUid,
@@ -214,7 +211,7 @@ public class MapSheetMngDto {
} }
private String getSyncStateName(String enumId) { 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); SyncStateType type = Enums.fromId(SyncStateType.class, enumId);
return type.getText(); return type.getText();
@@ -259,5 +256,4 @@ public class MapSheetMngDto {
private Long hstUid; private Long hstUid;
private Long fileSize; private Long fileSize;
} }
} }

View File

@@ -2,17 +2,12 @@ package com.kamco.cd.kamcoback.mapsheet.service;
import static java.lang.String.CASE_INSENSITIVE_ORDER; 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.config.FileConfig;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto; 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.FilesDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDepthDto; import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDepthDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto; import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto; import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.DmlReturn; import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.DmlReturn;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.ErrorDataDto;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngFilesDto; import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngFilesDto;
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService; import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService;
import jakarta.validation.Valid; import jakarta.validation.Valid;
@@ -224,11 +219,16 @@ public class MapSheetMngService {
return mapSheetMngCoreService.findMapSheetMngList(); return mapSheetMngCoreService.findMapSheetMngList();
} }
public List<Integer> findMapSheetMngYyyyList() {
return mapSheetMngCoreService.findMapSheetMngYyyyList();
}
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) { public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
return mapSheetMngCoreService.findMapSheetMng(mngYyyy); return mapSheetMngCoreService.findMapSheetMng(mngYyyy);
} }
@Transactional @Transactional
public MapSheetMngDto.DmlReturn mngComplete(int mngYyyy) { public MapSheetMngDto.DmlReturn mngComplete(int mngYyyy) {
@@ -274,31 +274,31 @@ public class MapSheetMngService {
public DmlReturn uploadPair( public DmlReturn uploadPair(
MultipartFile tfwFile, MultipartFile tfwFile,
MultipartFile tifFile, MultipartFile tifFile,
//String targetPath, // String targetPath,
Long hstUid) { Long hstUid) {
// 파일 유효성 검증 // 파일 유효성 검증
if (tfwFile == null || tfwFile.isEmpty() || tfwFile.getSize() == 0) { if (tfwFile == null || tfwFile.isEmpty() || tfwFile.getSize() == 0) {
return new DmlReturn("fail", "TFW SIZE 오류"); return new DmlReturn("fail", "TFW SIZE 오류");
}else if (tifFile == null || tifFile.isEmpty() || tifFile.getSize() == 0) { } else if (tifFile == null || tifFile.isEmpty() || tifFile.getSize() == 0) {
return new DmlReturn("fail", "TIF SIZE 오류"); return new DmlReturn("fail", "TIF SIZE 오류");
} }
if( ! tfwFile.getOriginalFilename() if (!tfwFile
.getOriginalFilename()
.substring(tfwFile.getOriginalFilename().lastIndexOf('.') + 1) .substring(tfwFile.getOriginalFilename().lastIndexOf('.') + 1)
.toLowerCase() .toLowerCase()
.equals("tfw") ) .equals("tfw")) {
{
return new DmlReturn("fail", "TFW TYPE ERROR"); return new DmlReturn("fail", "TFW TYPE ERROR");
}else if( ! tifFile.getOriginalFilename() } else if (!tifFile
.getOriginalFilename()
.substring(tifFile.getOriginalFilename().lastIndexOf('.') + 1) .substring(tifFile.getOriginalFilename().lastIndexOf('.') + 1)
.toLowerCase() .toLowerCase()
.equals("tif") ) .equals("tif")) {
{
return new DmlReturn("fail", "TIF TYPE ERROR"); return new DmlReturn("fail", "TIF TYPE ERROR");
} }
//싱크파일목록 가저오기 // 싱크파일목록 가저오기
List<MngFilesDto> mngFiles = mapSheetMngCoreService.findIdToMapSheetFileList(hstUid); List<MngFilesDto> mngFiles = mapSheetMngCoreService.findIdToMapSheetFileList(hstUid);
String uploadPath = ""; String uploadPath = "";
for (MngFilesDto dto : mngFiles) { for (MngFilesDto dto : mngFiles) {
@@ -306,25 +306,21 @@ public class MapSheetMngService {
break; break;
} }
if( uploadPath.isEmpty() ) { if (uploadPath.isEmpty()) {
//ErrorDataDto errDto = mapSheetMngCoreService.findMapSheetError(hstUid); // ErrorDataDto errDto = mapSheetMngCoreService.findMapSheetError(hstUid);
//uploadPath = FileConfig.rootSyncDir+"\\"+errDto.getMapSheetNum(); // uploadPath = FileConfig.rootSyncDir+"\\"+errDto.getMapSheetNum();
} }
//tfw가 있는 경우 // tfw가 있는 경우
//tif가 있는 경우 // tif가 있는 경우
return new DmlReturn("success", "파일 업로드 완료되었습니다."); return new DmlReturn("success", "파일 업로드 완료되었습니다.");
} }
public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) { public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) {
return mapSheetMngCoreService.findHstUidToMapSheetFileList(hstUid); return mapSheetMngCoreService.findHstUidToMapSheetFileList(hstUid);
} }
@Transactional @Transactional
public MapSheetMngDto.DmlReturn deleteByFileUidMngFile(List<Long> fileUids) { public MapSheetMngDto.DmlReturn deleteByFileUidMngFile(List<Long> fileUids) {
@@ -334,5 +330,4 @@ public class MapSheetMngService {
return new MapSheetMngDto.DmlReturn("success", fileUids.size() + "개 파일이 삭제되었습니다."); return new MapSheetMngDto.DmlReturn("success", fileUids.size() + "개 파일이 삭제되었습니다.");
} }
} }

View File

@@ -36,6 +36,11 @@ public class MapSheetMngCoreService {
return mapSheetMngRepository.findMapSheetMngList(); return mapSheetMngRepository.findMapSheetMngList();
} }
public List<Integer> findMapSheetMngYyyyList() {
return mapSheetMngRepository.findMapSheetMngYyyyList();
}
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) { public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
return mapSheetMngRepository.findMapSheetMng(mngYyyy); return mapSheetMngRepository.findMapSheetMng(mngYyyy);
} }
@@ -44,13 +49,12 @@ public class MapSheetMngCoreService {
mapSheetMngRepository.MapSheetMngComplete(mngYyyy); mapSheetMngRepository.MapSheetMngComplete(mngYyyy);
} }
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList( public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
MapSheetMngDto.@Valid ErrorSearchReq searchReq) { MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
return mapSheetMngRepository.findMapSheetErrorList(searchReq); return mapSheetMngRepository.findMapSheetErrorList(searchReq);
} }
public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid){ public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid) {
return mapSheetMngRepository.findMapSheetError(hstUid); return mapSheetMngRepository.findMapSheetError(hstUid);
} }
@@ -58,7 +62,6 @@ public class MapSheetMngCoreService {
return mapSheetMngRepository.findIdToMapSheetFileList(hstUid); return mapSheetMngRepository.findIdToMapSheetFileList(hstUid);
} }
public MapSheetMngDto.DmlReturn uploadProcess(@Valid List<Long> hstUidList) { public MapSheetMngDto.DmlReturn uploadProcess(@Valid List<Long> hstUidList) {
int count = 0; int count = 0;
if (!Objects.isNull(hstUidList) && !hstUidList.isEmpty()) { if (!Objects.isNull(hstUidList) && !hstUidList.isEmpty()) {
@@ -207,8 +210,7 @@ public class MapSheetMngCoreService {
return new MapSheetMngDto.DmlReturn("success", saved.getMngYyyy().toString()); return new MapSheetMngDto.DmlReturn("success", saved.getMngYyyy().toString());
} }
public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) {
public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid){
return mapSheetMngRepository.findHstUidToMapSheetFileList(hstUid); return mapSheetMngRepository.findHstUidToMapSheetFileList(hstUid);
} }
@@ -217,5 +219,4 @@ public class MapSheetMngCoreService {
return new MapSheetMngDto.DmlReturn("success", fileUid + " : 삭제되었습니다."); return new MapSheetMngDto.DmlReturn("success", fileUid + " : 삭제되었습니다.");
} }
} }

View File

@@ -11,6 +11,8 @@ public interface MapSheetMngRepositoryCustom {
List<MapSheetMngDto.MngDto> findMapSheetMngList(); List<MapSheetMngDto.MngDto> findMapSheetMngList();
List<Integer> findMapSheetMngYyyyList();
MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy); MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy);
void MapSheetMngComplete(int mngYyyy); void MapSheetMngComplete(int mngYyyy);

View File

@@ -167,6 +167,18 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
return foundContent; return foundContent;
} }
public List<Integer> findMapSheetMngYyyyList(){
List<Integer> foundContent =
queryFactory
.select(mapSheetMngEntity.mngYyyy)
.from(mapSheetMngEntity)
.where(mapSheetMngEntity.mngState.ne("COMPLETE"))
.orderBy(mapSheetMngEntity.mngYyyy.desc())
.fetch();
return foundContent;
}
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) { public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
BooleanBuilder whereBuilder = new BooleanBuilder(); BooleanBuilder whereBuilder = new BooleanBuilder();
@@ -367,12 +379,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
return new PageImpl<>(foundContent, pageable, countQuery); return new PageImpl<>(foundContent, pageable, countQuery);
} }
@Override @Override
public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid){ public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid) {
BooleanBuilder whereBuilder = new BooleanBuilder(); BooleanBuilder whereBuilder = new BooleanBuilder();
whereBuilder.and( mapSheetMngHstEntity.hstUid.eq(hstUid)); whereBuilder.and(mapSheetMngHstEntity.hstUid.eq(hstUid));
MapSheetMngDto.ErrorDataDto foundContent = MapSheetMngDto.ErrorDataDto foundContent =
queryFactory queryFactory
@@ -383,13 +394,16 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngHstEntity.mapSheetNum, mapSheetMngHstEntity.mapSheetNum,
Expressions.stringTemplate( Expressions.stringTemplate(
"concat({0},substring({1}, 0, 6))", "concat({0},substring({1}, 0, 6))",
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum).as("map50kName"), mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map50kName"),
Expressions.stringTemplate( Expressions.stringTemplate(
"concat({0},substring({1}, 6, 8))", "concat({0},substring({1}, 6, 8))",
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum).as("map5kName"), mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map5kName"),
Expressions.stringTemplate( Expressions.stringTemplate(
"concat({0},substring({1}, 6, 8))", "concat({0},substring({1}, 6, 8))",
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum).as("mapSrcName"), mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("mapSrcName"),
mapInkx5kEntity.fid, mapInkx5kEntity.fid,
mapSheetMngHstEntity.createdDate, mapSheetMngHstEntity.createdDate,
mapSheetMngHstEntity.syncState, mapSheetMngHstEntity.syncState,
@@ -397,11 +411,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngHstEntity.syncTifFileName, mapSheetMngHstEntity.syncTifFileName,
mapSheetMngHstEntity.syncCheckState, mapSheetMngHstEntity.syncCheckState,
mapSheetMngHstEntity.syncCheckTfwFileName, mapSheetMngHstEntity.syncCheckTfwFileName,
mapSheetMngHstEntity.syncCheckTifFileName mapSheetMngHstEntity.syncCheckTifFileName))
)
)
.from(mapSheetMngHstEntity) .from(mapSheetMngHstEntity)
.innerJoin(mapInkx5kEntity).on(mapSheetMngHstEntity.mapSheetNum.eq(mapInkx5kEntity.mapidcdNo)) .innerJoin(mapInkx5kEntity)
.on(mapSheetMngHstEntity.mapSheetNum.eq(mapInkx5kEntity.mapidcdNo))
.where(whereBuilder) .where(whereBuilder)
.fetchOne(); .fetchOne();
@@ -409,10 +422,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
} }
@Override @Override
public List<MapSheetMngDto.MngFilesDto> findIdToMapSheetFileList(Long hstUid){ public List<MapSheetMngDto.MngFilesDto> findIdToMapSheetFileList(Long hstUid) {
BooleanBuilder whereBuilder = new BooleanBuilder(); BooleanBuilder whereBuilder = new BooleanBuilder();
whereBuilder.and( mapSheetMngFileEntity.hstUid.eq(hstUid) ); whereBuilder.and(mapSheetMngFileEntity.hstUid.eq(hstUid));
List<MapSheetMngDto.MngFilesDto> foundContent = List<MapSheetMngDto.MngFilesDto> foundContent =
queryFactory queryFactory
@@ -427,9 +440,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngFileEntity.fileName, mapSheetMngFileEntity.fileName,
mapSheetMngFileEntity.fileExt, mapSheetMngFileEntity.fileExt,
mapSheetMngFileEntity.hstUid, mapSheetMngFileEntity.hstUid,
mapSheetMngFileEntity.fileSize mapSheetMngFileEntity.fileSize))
)
)
.from(mapSheetMngFileEntity) .from(mapSheetMngFileEntity)
.where(whereBuilder) .where(whereBuilder)
.fetch(); .fetch();
@@ -440,7 +451,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
@Override @Override
public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) { public List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid) {
BooleanBuilder whereBuilder = new BooleanBuilder(); BooleanBuilder whereBuilder = new BooleanBuilder();
whereBuilder.and( mapSheetMngFileEntity.hstUid.eq(hstUid) ); whereBuilder.and(mapSheetMngFileEntity.hstUid.eq(hstUid));
List<MapSheetMngDto.MngFilesDto> foundContent = List<MapSheetMngDto.MngFilesDto> foundContent =
queryFactory queryFactory
@@ -455,9 +466,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngFileEntity.fileName, mapSheetMngFileEntity.fileName,
mapSheetMngFileEntity.fileExt, mapSheetMngFileEntity.fileExt,
mapSheetMngFileEntity.hstUid, mapSheetMngFileEntity.hstUid,
mapSheetMngFileEntity.fileSize mapSheetMngFileEntity.fileSize))
)
)
.from(mapSheetMngFileEntity) .from(mapSheetMngFileEntity)
.where(whereBuilder) .where(whereBuilder)
.orderBy(mapSheetMngFileEntity.fileExt.desc()) .orderBy(mapSheetMngFileEntity.fileExt.desc())
@@ -467,10 +476,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
} }
@Override @Override
public MapSheetMngDto.MngFilesDto findYyyyToMapSheetFilePath(int mngYyyy){ public MapSheetMngDto.MngFilesDto findYyyyToMapSheetFilePath(int mngYyyy) {
BooleanBuilder whereBuilder = new BooleanBuilder(); BooleanBuilder whereBuilder = new BooleanBuilder();
whereBuilder.and( mapSheetMngFileEntity.mngYyyy.eq(mngYyyy) ); whereBuilder.and(mapSheetMngFileEntity.mngYyyy.eq(mngYyyy));
MapSheetMngDto.MngFilesDto foundContent = MapSheetMngDto.MngFilesDto foundContent =
queryFactory queryFactory
@@ -485,9 +494,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngFileEntity.fileName, mapSheetMngFileEntity.fileName,
mapSheetMngFileEntity.fileExt, mapSheetMngFileEntity.fileExt,
mapSheetMngFileEntity.hstUid, mapSheetMngFileEntity.hstUid,
mapSheetMngFileEntity.fileSize mapSheetMngFileEntity.fileSize))
)
)
.from(mapSheetMngFileEntity) .from(mapSheetMngFileEntity)
.where(whereBuilder) .where(whereBuilder)
.fetchOne(); .fetchOne();
@@ -557,7 +564,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
} }
@Override @Override
public void deleteByFileUidMngFile(Long fileUid){ public void deleteByFileUidMngFile(Long fileUid) {
long deletedFileCount = long deletedFileCount =
queryFactory queryFactory
.delete(mapSheetMngFileEntity) .delete(mapSheetMngFileEntity)