파일 저장 경로 변경

dev
이범준 6 months ago
parent 632a38fd6f
commit 1ebcc15252

@ -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();

@ -20,7 +20,7 @@
</resultMap>
<sql id="fileDirs">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

Loading…
Cancel
Save