diff --git a/src/main/java/com/dbnt/faisp/main/ivsgtMgt/boardInvestigation/IvsgtController.java b/src/main/java/com/dbnt/faisp/main/ivsgtMgt/boardInvestigation/IvsgtController.java index 5ec9756d..558a07a1 100644 --- a/src/main/java/com/dbnt/faisp/main/ivsgtMgt/boardInvestigation/IvsgtController.java +++ b/src/main/java/com/dbnt/faisp/main/ivsgtMgt/boardInvestigation/IvsgtController.java @@ -24,7 +24,7 @@ public class IvsgtController { private final BoardInvestigationService boardInvestigationService; @GetMapping("/{ivsgtType}") - public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType,BoardInvestigation boardInvestigation) { + public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType, BoardInvestigation boardInvestigation) { ModelAndView mav = new ModelAndView("ivsgt/ivsgt"); boardInvestigation.setIvsgtType(ivsgtType); @@ -64,7 +64,7 @@ public class IvsgtController { mav.addObject("boardInvestigation", boardInvestigation); mav.addObject("userSeq",loginUser.getUserSeq()); //메뉴권한 확인 - mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/"+boardInvestigation.getIvsgtType()).get(0).getAccessAuth()); + mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth()); return mav; } diff --git a/src/main/resources/mybatisMapper/BoardInvestigationMapper.xml b/src/main/resources/mybatisMapper/BoardInvestigationMapper.xml index d31fa126..e529c9ab 100644 --- a/src/main/resources/mybatisMapper/BoardInvestigationMapper.xml +++ b/src/main/resources/mybatisMapper/BoardInvestigationMapper.xml @@ -59,20 +59,19 @@ cm.item_value AS arrestCdName, cm2.item_value AS arrestCd2Name FROM board_investigation a - LEFT OUTER JOIN ( - SELECT - ivsgt_key, - count(file_seq) AS fileCnt - FROM ivsgt_file - GROUP BY ivsgt_key - ) b - ON a.ivsgt_key = b.ivsgt_key - INNER JOIN arrest_type t - ON a.ivsgt_key = t.ivsgt_key - INNER JOIN code_mgt cm - ON t.arrest_cd = cm.item_cd - INNER JOIN code_mgt cm2 - ON t.arrest_cd2 = cm2.item_cd + LEFT OUTER JOIN ( + SELECT + ivsgt_key, + count(file_seq) AS fileCnt + FROM ivsgt_file + GROUP BY ivsgt_key + ) b ON a.ivsgt_key = b.ivsgt_key + INNER JOIN arrest_type t + ON a.ivsgt_key = t.ivsgt_key + INNER JOIN code_mgt cm + ON t.arrest_cd = cm.item_cd + INNER JOIN code_mgt cm2 + ON t.arrest_cd2 = cm2.item_cd ORDER BY ivsgt_key DESC LIMIT #{rowCnt} OFFSET #{firstIndex} diff --git a/src/main/resources/static/js/ivsgt/ivsgt.js b/src/main/resources/static/js/ivsgt/ivsgt.js index 12cd09e1..56eaa20c 100644 --- a/src/main/resources/static/js/ivsgt/ivsgt.js +++ b/src/main/resources/static/js/ivsgt/ivsgt.js @@ -10,7 +10,10 @@ $(document).on('click', '#ivsgtEditBtn', function () { $(document).on('click', '#saveIvsgtBtn', function (){ saveBoardInvestigation('N') }); - +$(document).on('change', '#arrestCd', function (){ + $(".arrestCd2").hide(); + $("."+this.value).show(); +}) $(document).on('click', '#saveTempBtn', function (){ saveBoardInvestigation('Y') }); @@ -101,6 +104,10 @@ function getIvsgtEditModal(ivsgtKey, ivsgtType){ $("#ivsgtViewBody").empty(); $("#ivsgtEditModalContent").empty().append(html) $("#ivsgtEditModal").modal('show'); + const selectedArrestCd = $("#ivsgtEditForm").find("#arrestCd").val() + if(selectedArrestCd){ + $("."+selectedArrestCd).show(); + } setEditor('editor', '400') setUploadDiv(); }, diff --git a/src/main/resources/templates/ivsgt/ivsgtEditModal.html b/src/main/resources/templates/ivsgt/ivsgtEditModal.html index c023ba38..11d2e0fe 100644 --- a/src/main/resources/templates/ivsgt/ivsgtEditModal.html +++ b/src/main/resources/templates/ivsgt/ivsgtEditModal.html @@ -57,9 +57,9 @@
@@ -67,9 +67,10 @@
diff --git a/src/main/resources/templates/ivsgt/ivsgtViewModal.html b/src/main/resources/templates/ivsgt/ivsgtViewModal.html index 22f319e9..1dcd0376 100644 --- a/src/main/resources/templates/ivsgt/ivsgtViewModal.html +++ b/src/main/resources/templates/ivsgt/ivsgtViewModal.html @@ -29,7 +29,7 @@