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:
@@ -3,7 +3,12 @@ package com.kamco.cd.kamcoback.mapsheet.service;
|
|||||||
import com.kamco.cd.kamcoback.common.utils.FIleChecker;
|
import com.kamco.cd.kamcoback.common.utils.FIleChecker;
|
||||||
import com.kamco.cd.kamcoback.config.FileConfig;
|
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.*;
|
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 com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -174,12 +179,8 @@ public class MapSheetMngService {
|
|||||||
if (uploadPath.isEmpty()) {
|
if (uploadPath.isEmpty()) {
|
||||||
MngFilesDto filesDto =
|
MngFilesDto filesDto =
|
||||||
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
||||||
if (filesDto != null) {
|
|
||||||
String referPath = filesDto.getFilePath();
|
String referPath = filesDto.getFilePath();
|
||||||
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
|
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
|
||||||
tfwTargetPath = Paths.get(uploadPath).resolve(tfwFile.getOriginalFilename());
|
|
||||||
tifTargetPath = Paths.get(uploadPath).resolve(tifFile.getOriginalFilename());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 업로드 경로 확인(없으면 생성)
|
// 업로드 경로 확인(없으면 생성)
|
||||||
@@ -187,6 +188,9 @@ public class MapSheetMngService {
|
|||||||
return new DmlReturn("fail", "CREATE FOLDER ERROR");
|
return new DmlReturn("fail", "CREATE FOLDER ERROR");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tfwTargetPath = Paths.get(uploadPath).resolve(tfwFile.getOriginalFilename());
|
||||||
|
tifTargetPath = Paths.get(uploadPath).resolve(tifFile.getOriginalFilename());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Files.move(tfwTmpSavePath, tfwTargetPath, StandardCopyOption.REPLACE_EXISTING);
|
Files.move(tfwTmpSavePath, tfwTargetPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
Files.move(tifTmpSavePath, tifTargetPath, StandardCopyOption.REPLACE_EXISTING);
|
Files.move(tifTmpSavePath, tifTargetPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
||||||
.as("map50kName"),
|
.as("map50kName"),
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
"concat({0},substring({1}, 6, 8))",
|
"concat({0},{1})",
|
||||||
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
||||||
.as("map5kName"),
|
.as("map5kName"),
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
@@ -422,8 +422,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
||||||
.as("map50kName"),
|
.as("map50kName"),
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
"concat({0},substring({1}, 6, 8))",
|
"({0},{1})", mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
||||||
mapInkx5kEntity.mapidNm, mapSheetMngHstEntity.mapSheetNum)
|
|
||||||
.as("map5kName"),
|
.as("map5kName"),
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
"concat({0},substring({1}, 6, 8))",
|
"concat({0},substring({1}, 6, 8))",
|
||||||
|
|||||||
Reference in New Issue
Block a user