From 184c87e581da954ff75c147a7e4c3e980adef263 Mon Sep 17 00:00:00 2001 From: "DESKTOP-NQTA8OG\\lcks0" Date: Fri, 30 Sep 2022 10:28:06 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EB=AC=B8=EB=B3=B4=EA=B3=A0=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/dbnt/faisp/config/FileController.java | 7 ++++++- .../dbnt/faisp/fpiMgt/affair/service/AffairService.java | 5 +++++ .../igActivities/fpiMgt/affair/affairViewModal.html | 2 +- .../igActivities/fpiMgt/affairPlan/planViewModal.html | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/config/FileController.java b/src/main/java/com/dbnt/faisp/config/FileController.java index 5269bbb2..de8773c9 100644 --- a/src/main/java/com/dbnt/faisp/config/FileController.java +++ b/src/main/java/com/dbnt/faisp/config/FileController.java @@ -1,5 +1,6 @@ package com.dbnt.faisp.config; +import com.dbnt.faisp.fpiMgt.affair.service.AffairService; import com.dbnt.faisp.fpiMgt.affairPlan.service.PlanService; import com.dbnt.faisp.publicBoard.service.PublicBoardService; import lombok.RequiredArgsConstructor; @@ -18,6 +19,7 @@ public class FileController { private final PlanService planService; private final PublicBoardService publicBoardService; + private final AffairService affairService; @GetMapping("/file/fileDownload") public void fileDownload(HttpServletRequest request, @@ -27,12 +29,15 @@ public class FileController { Integer fileSeq) { FileInfo downloadFile = null; switch (board){ - case "monthPlan": + case "affairPlan": downloadFile = planService.selectPlanFile(parentKey, fileSeq); break; case "publicFile": downloadFile = publicBoardService.selectPublicFile(parentKey, fileSeq); break; + case "affair": + downloadFile = affairService.selectAffairFile(parentKey, fileSeq); + break; } BufferedInputStream in; diff --git a/src/main/java/com/dbnt/faisp/fpiMgt/affair/service/AffairService.java b/src/main/java/com/dbnt/faisp/fpiMgt/affair/service/AffairService.java index ade9a60a..1e592116 100644 --- a/src/main/java/com/dbnt/faisp/fpiMgt/affair/service/AffairService.java +++ b/src/main/java/com/dbnt/faisp/fpiMgt/affair/service/AffairService.java @@ -2,6 +2,7 @@ package com.dbnt.faisp.fpiMgt.affair.service; import com.dbnt.faisp.config.BaseService; +import com.dbnt.faisp.config.FileInfo; import com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper; import com.dbnt.faisp.fpiMgt.affair.model.*; import com.dbnt.faisp.fpiMgt.affair.repository.*; @@ -149,4 +150,8 @@ public class AffairService extends BaseService { // 견문보고 } return rating.getAffairKey(); } + + public FileInfo selectAffairFile(Integer parentKey, Integer fileSeq) { + return affairFileRepository.findById(new AffairFile.AffairFileId(parentKey, fileSeq)).orElse(null); + } } diff --git a/src/main/resources/templates/igActivities/fpiMgt/affair/affairViewModal.html b/src/main/resources/templates/igActivities/fpiMgt/affair/affairViewModal.html index c8587881..7c1e88a0 100644 --- a/src/main/resources/templates/igActivities/fpiMgt/affair/affairViewModal.html +++ b/src/main/resources/templates/igActivities/fpiMgt/affair/affairViewModal.html @@ -127,7 +127,7 @@ - diff --git a/src/main/resources/templates/igActivities/fpiMgt/affairPlan/planViewModal.html b/src/main/resources/templates/igActivities/fpiMgt/affairPlan/planViewModal.html index 86a66c2c..3a60b1be 100644 --- a/src/main/resources/templates/igActivities/fpiMgt/affairPlan/planViewModal.html +++ b/src/main/resources/templates/igActivities/fpiMgt/affairPlan/planViewModal.html @@ -79,7 +79,7 @@ -