Merge pull request '영상관리 수정' (#98) from feat/dev_251201 into develop

Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/98
This commit is contained in:
2025-12-23 13:25:42 +09:00
2 changed files with 13 additions and 10 deletions

View File

@@ -3,7 +3,12 @@ package com.kamco.cd.kamcoback.mapsheet.service;
import com.kamco.cd.kamcoback.common.utils.FIleChecker;
import com.kamco.cd.kamcoback.config.FileConfig;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.*;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.AddReq;
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.ErrorSearchReq;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngDto;
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngFilesDto;
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService;
import jakarta.validation.Valid;
import java.io.File;
@@ -174,12 +179,8 @@ public class MapSheetMngService {
if (uploadPath.isEmpty()) {
MngFilesDto filesDto =
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
if (filesDto != null) {
String referPath = filesDto.getFilePath();
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
tfwTargetPath = Paths.get(uploadPath).resolve(tfwFile.getOriginalFilename());
tifTargetPath = Paths.get(uploadPath).resolve(tifFile.getOriginalFilename());
}
String referPath = filesDto.getFilePath();
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
}
// 업로드 경로 확인(없으면 생성)
@@ -187,6 +188,9 @@ public class MapSheetMngService {
return new DmlReturn("fail", "CREATE FOLDER ERROR");
}
tfwTargetPath = Paths.get(uploadPath).resolve(tfwFile.getOriginalFilename());
tifTargetPath = Paths.get(uploadPath).resolve(tifFile.getOriginalFilename());
try {
Files.move(tfwTmpSavePath, tfwTargetPath, StandardCopyOption.REPLACE_EXISTING);
Files.move(tifTmpSavePath, tifTargetPath, StandardCopyOption.REPLACE_EXISTING);

View File

@@ -364,7 +364,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map50kName"),
Expressions.stringTemplate(
"concat({0},substring({1}, 6, 8))",
"concat({0},{1})",
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map5kName"),
Expressions.stringTemplate(
@@ -422,8 +422,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map50kName"),
Expressions.stringTemplate(
"concat({0},substring({1}, 6, 8))",
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
"({0},{1})", mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
.as("map5kName"),
Expressions.stringTemplate(
"concat({0},substring({1}, 6, 8))",