From 1ebcc15252c07de2be6881e836b3f68172bdf796 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 28 May 2024 10:35:53 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/adds/DocController.java | 2 ++ src/main/resources/sql/mapper/base/file-mapper.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cokr/xit/adds/DocController.java b/src/main/java/cokr/xit/adds/DocController.java index 74a038c..b8bba60 100644 --- a/src/main/java/cokr/xit/adds/DocController.java +++ b/src/main/java/cokr/xit/adds/DocController.java @@ -64,6 +64,7 @@ public class DocController extends AbstractController { File file = new File(resultFilePath); Relation rel = new Relation().setInfoType("200").setSubType("01").setInfoKey(dscMngId); FileInfo fileInfo = new FileInfo.Factory().create(rel, file); + fileInfo.setName(print.getFormatKorName()+".hwp"); int effected= fileService.create(fileInfo); String fileId = fileInfo.getId(); file.delete(); @@ -130,6 +131,7 @@ public class DocController extends AbstractController { File file = new File(resultFilePath); Relation rel = new Relation().setInfoType("200").setSubType("02").setInfoKey(dscMngId); FileInfo fileInfo = new FileInfo.Factory().create(rel, file); + fileInfo.setName(print.getFormatKorName()+".hwp"); int effected= fileService.create(fileInfo); String fileId = fileInfo.getId(); file.delete(); diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml index 655f5f1..1bed8c4 100644 --- a/src/main/resources/sql/mapper/base/file-mapper.xml +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -20,7 +20,7 @@ SELECT INF_TYPE - , CONCAT('files/', DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR + , CONCAT('/applications/adds/files/', DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR FROM ( SELECT '00' INF_TYPE, 'attachment/' DIR FROM DUAL UNION SELECT '01' INF_TYPE, 'document/' DIR FROM DUAL UNION