From b231f439a01aa34a8201d7d2bb18b2fab26a9166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Wed, 15 Mar 2023 17:24:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=B8=EC=82=AC=EB=8C=80=EC=83=81=EB=AA=A9?= =?UTF-8?q?=ED=91=9C=20=EA=B6=8C=ED=95=9C=20=EC=A0=90=EA=B2=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/fipTarget/FipTargetController.java | 22 +- .../faisp/main/fipTarget/model/PartWork.java | 2 + .../resources/mybatisMapper/FipTarget.xml | 209 ++++++++++-------- .../resources/static/js/fipTarget/partInfo.js | 13 +- .../resources/static/js/fipTarget/partWork.js | 10 +- .../templates/fipTarget/ipShipList.html | 14 +- .../templates/fipTarget/partInfoList.html | 64 ++---- .../fipTarget/partInfoModifyModal.html | 18 +- .../fipTarget/partWorkEditModal.html | 8 +- .../templates/fipTarget/partWorkList.html | 4 +- .../fipTarget/partWorkModifyModal.html | 8 +- 11 files changed, 182 insertions(+), 190 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/fipTarget/FipTargetController.java b/src/main/java/com/dbnt/faisp/main/fipTarget/FipTargetController.java index b3180317..f567042b 100644 --- a/src/main/java/com/dbnt/faisp/main/fipTarget/FipTargetController.java +++ b/src/main/java/com/dbnt/faisp/main/fipTarget/FipTargetController.java @@ -54,7 +54,6 @@ public class FipTargetController { @GetMapping("/partInfoList") public ModelAndView partInfoList(@AuthenticationPrincipal UserInfo loginUser,PartInfo partInfo, HttpServletResponse response) { ModelAndView mav = new ModelAndView("fipTarget/partInfoList"); - partInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); //엑셀다운 if(partInfo.getExcel() != null && partInfo.getExcel().equals("Y")){ ParamMap header = fipTargetService.selectWorkTypeTotal(partInfo); @@ -89,6 +88,11 @@ public class FipTargetController { //메뉴권한 확인 String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partInfoList").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); + if(accessAuth.equals("ACC003")){ + partInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); + }else{ + partInfo.setMgtOrgan(loginUser.getOgCd()); + } partInfo.setQueryInfo(); mav.addObject("total", fipTargetService.selectWorkTypeTotal(partInfo)); mav.addObject("partInfoList", fipTargetService.selectPartInfoList(partInfo)); @@ -279,7 +283,6 @@ public class FipTargetController { public ModelAndView partWorkList(@AuthenticationPrincipal UserInfo loginUser,PartWork partWork, HttpServletResponse response) { ModelAndView mav = new ModelAndView("fipTarget/partWorkList"); List pwtList = codeMgtService.selectCodeMgtList("PWT"); - partWork.setDownOrganCdList(loginUser.getDownOrganCdList()); //엑셀다운 if(partWork.getExcel() != null && partWork.getExcel().equals("Y")){ Set headerSet = new LinkedHashSet(); @@ -306,8 +309,12 @@ public class FipTargetController { //메뉴권한 확인 String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); - mav.addObject("pwtList", pwtList); partWork.setQueryInfo(); + if(accessAuth.equals("ACC003")){ + partWork.setDownOrganCdList(loginUser.getDownOrganCdList()); + }else{ + partWork.setWrtOrgan(loginUser.getOgCd()); + } mav.addObject("partWorkList", fipTargetService.selectPartWorkList(partWork)); partWork.setContentCnt(fipTargetService.selectPartWorkListCnt(partWork)); partWork.setPaginationInfo(); @@ -324,7 +331,6 @@ public class FipTargetController { String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); mav.addObject("tnList", fipTargetService.selectTerminalName(partWork)); - mav.addObject("pwtList", codeMgtService.selectCodeMgtList("PWT")); return mav; } @@ -351,7 +357,6 @@ public class FipTargetController { //메뉴권한 확인 String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partInfoList").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); - mav.addObject("pwtList", codeMgtService.selectCodeMgtList("PWT")); mav.addObject("tnList", fipTargetService.selectTerminalName(partWork)); mav.addObject("userId", loginUser.getUserId()); return mav; @@ -406,7 +411,7 @@ public class FipTargetController { @GetMapping("/vulnerableList") public ModelAndView vulnerableList(@AuthenticationPrincipal UserInfo loginUser,Vulnerable vulnerable, HttpServletResponse response) { ModelAndView mav = new ModelAndView("fipTarget/vulnerableList"); - + vulnerable.setDownOrganCdList(loginUser.getDownOrganCdList()); mav.addObject("vulnerableList", fipTargetService.selectVulnerableList(vulnerable)); //메뉴권한 확인 String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/vulnerableList").get(0).getAccessAuth(); @@ -538,6 +543,11 @@ public class FipTargetController { String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/ipShipList?siType="+shipInfo.getSiType()).get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); shipInfo.setQueryInfo(); + if(accessAuth.equals("ACC003")){ + shipInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); + }else{ + shipInfo.setWrtOrgan(loginUser.getOgCd()); + } mav.addObject("shipInfoList", fipTargetService.selectShipInfoList(shipInfo)); shipInfo.setContentCnt(fipTargetService.selectShipInfoListCnt(shipInfo)); shipInfo.setPaginationInfo(); diff --git a/src/main/java/com/dbnt/faisp/main/fipTarget/model/PartWork.java b/src/main/java/com/dbnt/faisp/main/fipTarget/model/PartWork.java index b30f7a0a..e6dd15ef 100644 --- a/src/main/java/com/dbnt/faisp/main/fipTarget/model/PartWork.java +++ b/src/main/java/com/dbnt/faisp/main/fipTarget/model/PartWork.java @@ -68,6 +68,8 @@ public class PartWork extends BaseModel implements Serializable{ @Transient private String terminalNm; @Transient + private String terminalStatus; + @Transient private Integer fileCnt; @Transient diff --git a/src/main/resources/mybatisMapper/FipTarget.xml b/src/main/resources/mybatisMapper/FipTarget.xml index b2242f80..427e6cdf 100644 --- a/src/main/resources/mybatisMapper/FipTarget.xml +++ b/src/main/resources/mybatisMapper/FipTarget.xml @@ -4,7 +4,36 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + and pi_state in ('DST001', 'DST007') + + and pi_state = #{piState} + + + and mgt_organ in + + #{item} + + + + and mgt_organ = #{mgtOrgan} + + + and land_police LIKE CONCAT('%', #{landPolice}, '%') + + + and mp_work_type = #{mpWorkType} + + + and pl_work_type = #{plWorkType} + + + and terminal_nm LIKE CONCAT('%', #{terminalNm}, '%') + + + and to_char(wrt_dt, 'YYYY-MM-DD') = #{startDate} + + @@ -85,30 +90,9 @@ (select pi_seq,max(version_no) as lastVer from part_info group by pi_seq) b where pi.pi_seq = b.pi_seq - and pi.version_no = b.lastVer - and mgt_organ in - - #{item} - - - and mgt_organ = #{mgtOrgan} - - - and land_police LIKE CONCAT('%', #{landPolice}, '%') - - - and mp_work_type = #{mpWorkType} - - - and pl_work_type = #{plWorkType} - - - and terminal_nm LIKE CONCAT('%', #{terminalNm}, '%') - - - and to_char(wrt_dt, 'YYYY-MM-DD') = #{startDate} - - order by wrt_dt desc + and pi.version_no = b.lastVer + + order by wrt_dt desc ) a @@ -178,30 +162,9 @@ (select pi_seq,max(version_no) as lastVer from part_info group by pi_seq) b where pi.pi_state = 'DST007' - and pi.pi_seq = b.pi_seq - and pi.version_no = b.lastVer - and mgt_organ in - - #{item} - - - and mgt_organ = #{mgtOrgan} - - - and land_police LIKE CONCAT('%', #{landPolice}, '%') - - - and mp_work_type = #{mpWorkType} - - - and pl_work_type = #{plWorkType} - - - and terminal_nm LIKE CONCAT('%', #{terminalNm}, '%') - - - and to_char(wrt_dt, 'YYYY-MM-DD') = #{startDate} - + and pi.pi_seq = b.pi_seq + and pi.version_no = b.lastVer + group by pi.pi_seq, version_no ) a @@ -285,11 +248,24 @@ order by terminal_nm asc - + + + + and pi.mgt_organ in + + #{item} + + + + and pi.mgt_organ = #{wrtOrgan} + + + @@ -402,7 +372,7 @@ @@ -479,7 +457,44 @@ from board_vuln where vuln_key = #{vulnKey} - + + + and si.si_type = #{siType} + + and start_point like '%'||#{startPoint}||'%' + + + and end_point like '%'||#{endPoint}||'%' + + + and distance_nm like '%'||#{distanceNm}||'%' + + + and owner_nm like '%'||#{ownerNm}||'%' + + + and ship_nm like '%'||#{shipNm}||'%' + + + and operation_cnt like '%'||#{operationCnt}||'%' + + + and wrt_dt >= #{startDate}::date + + + and wrt_dt <= #{endDate}::date + + + and wrt_organ = #{wrtOrgan} + + + and wrt_organ in + + #{organCd} + + + + @@ -530,7 +545,7 @@ from ship_info group by si_seq) b where si.si_seq = b.si_seq and si.version_no = b.lastVer - and si.si_type = #{siType} + order by si.si_seq desc ) a diff --git a/src/main/resources/static/js/fipTarget/partInfo.js b/src/main/resources/static/js/fipTarget/partInfo.js index 0660dfa0..8b5b8119 100644 --- a/src/main/resources/static/js/fipTarget/partInfo.js +++ b/src/main/resources/static/js/fipTarget/partInfo.js @@ -69,12 +69,10 @@ $(document).on('change', '#mgtOrgan', function (){ }); $(document).on('click', '#viewTab', function (){ - $(this).parents(".modal-dialog")[0].className = "modal-dialog modal-lg modal-dialog-scrollable"; showModal($("#piSeq").val()); }) $(document).on('click', '#historyTab', function (){ - $(this).parents(".modal-dialog")[0].className = "modal-dialog modal-xl modal-dialog-scrollable"; showHistory($("#piSeq").val()); }) @@ -344,8 +342,7 @@ function updatePartInfo(piState){ contentType: false, success : function(result) { alert("수정되었습니다."); - contentFade("out"); - showModal(result); + location.reload(); }, error : function(xhr, status) { alert("수정에 실패하였습니다.") @@ -428,13 +425,5 @@ $(document).on('click', '.fileDownPartInfo', function (){ window.open(encodeURI(url)); }) -$(document).on('click', '.btn-close', function (){ - location.reload(); -}) - -$(document).on('click', '#btn-close', function (){ - location.reload(); -}) - diff --git a/src/main/resources/static/js/fipTarget/partWork.js b/src/main/resources/static/js/fipTarget/partWork.js index c7cb5b66..a254a825 100644 --- a/src/main/resources/static/js/fipTarget/partWork.js +++ b/src/main/resources/static/js/fipTarget/partWork.js @@ -134,7 +134,7 @@ $(document).on('click', '#updateBtn', function (){ success : function(data) { alert("수정되었습니다."); contentFade("out"); - showModal(data.pwSeq,data.piSeq); + location.reload(); }, error : function(xhr, status) { alert("수정에 실패하였습니다.") @@ -186,12 +186,4 @@ $(document).on('click', '#goExcel', function (){ }else{ false; } -}) - -$(document).on('click', '.btn-close', function (){ - location.reload(); -}) - -$(document).on('click', '#btn-close', function (){ - location.reload(); }) \ No newline at end of file diff --git a/src/main/resources/templates/fipTarget/ipShipList.html b/src/main/resources/templates/fipTarget/ipShipList.html index 56a1f28a..2a04d2cc 100644 --- a/src/main/resources/templates/fipTarget/ipShipList.html +++ b/src/main/resources/templates/fipTarget/ipShipList.html @@ -48,27 +48,27 @@
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/main/resources/templates/fipTarget/partInfoList.html b/src/main/resources/templates/fipTarget/partInfoList.html index 6ca5b626..a85c603c 100644 --- a/src/main/resources/templates/fipTarget/partInfoList.html +++ b/src/main/resources/templates/fipTarget/partInfoList.html @@ -129,50 +129,29 @@ - - - - - - - - - - - - - - - - - - 무상 - - 무상 - + + + + + + + - - - - - - - - - - - - - - - - - 무상 - - 무상 - + + + + + + + + + + 무상 + + 무상 + @@ -180,6 +159,7 @@ + @@ -188,7 +168,6 @@ - 상주 0개소 0명 @@ -198,7 +177,6 @@ 상주 0개소 0명 비상주 0개소 폐쇄 0개소 - diff --git a/src/main/resources/templates/fipTarget/partInfoModifyModal.html b/src/main/resources/templates/fipTarget/partInfoModifyModal.html index 390b6382..e18cbc5c 100644 --- a/src/main/resources/templates/fipTarget/partInfoModifyModal.html +++ b/src/main/resources/templates/fipTarget/partInfoModifyModal.html @@ -39,7 +39,7 @@
- +
@@ -50,7 +50,7 @@
- +
@@ -70,9 +70,9 @@
- +
- @@ -154,14 +154,16 @@
+ + \ No newline at end of file diff --git a/src/main/resources/templates/fipTarget/partWorkEditModal.html b/src/main/resources/templates/fipTarget/partWorkEditModal.html index a531e669..d90107f9 100644 --- a/src/main/resources/templates/fipTarget/partWorkEditModal.html +++ b/src/main/resources/templates/fipTarget/partWorkEditModal.html @@ -37,9 +37,11 @@
- - - + + + + +
diff --git a/src/main/resources/templates/fipTarget/partWorkList.html b/src/main/resources/templates/fipTarget/partWorkList.html index 45c8acdc..f6a4b45a 100644 --- a/src/main/resources/templates/fipTarget/partWorkList.html +++ b/src/main/resources/templates/fipTarget/partWorkList.html @@ -86,11 +86,11 @@ - + - + diff --git a/src/main/resources/templates/fipTarget/partWorkModifyModal.html b/src/main/resources/templates/fipTarget/partWorkModifyModal.html index 7d6a0dc4..68d7eab8 100644 --- a/src/main/resources/templates/fipTarget/partWorkModifyModal.html +++ b/src/main/resources/templates/fipTarget/partWorkModifyModal.html @@ -39,9 +39,11 @@
- - - + + + + +