diff --git a/src/main/java/com/dbnt/faisp/config/ModalController.java b/src/main/java/com/dbnt/faisp/config/ModalController.java index c436c673..ae2357c1 100644 --- a/src/main/java/com/dbnt/faisp/config/ModalController.java +++ b/src/main/java/com/dbnt/faisp/config/ModalController.java @@ -48,12 +48,13 @@ public class ModalController { } @GetMapping("/userModal") - public ModelAndView userMoadlPage(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo){ + public ModelAndView userMoadlPage(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, String pageName){ ModelAndView mav = new ModelAndView("common/modal/userModal"); userInfo.setQueryInfo(); if(userInfo.getUserStatus() == null || userInfo.getUserStatus().equals("")) { userInfo.setUserStatus("USC003"); } + mav.addObject("pageName", pageName); mav.addObject("OgList", codeMgtService.selectCodeMgtList("OG")); mav.addObject("OfcList", codeMgtService.selectCodeMgtList("OFC")); mav.addObject("userInfoList", userInfoService.selectUserInfoList(userInfo)); diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/activityCase/ActivityCaseController.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/activityCase/ActivityCaseController.java index 7d174765..68deacaf 100644 --- a/src/main/java/com/dbnt/faisp/main/counterIntelligence/activityCase/ActivityCaseController.java +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/activityCase/ActivityCaseController.java @@ -24,7 +24,6 @@ public class ActivityCaseController { private final ActivityCaseService activityCaseService; private final AuthMgtService authMgtService; private final CodeMgtService codeMgtService; - private final UserInfoService userInfoService; @GetMapping("/activityCaseList") public ModelAndView activityCaseListPage(@AuthenticationPrincipal UserInfo loginUser, ActivityCase activityCase){ @@ -33,12 +32,9 @@ public class ActivityCaseController { String accessAuth = authMgtService.selectAccessConfigList (loginUser.getUserSeq(), "/counterIntelligence/activityCaseList").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); - if(accessAuth.equals("ACC003")){ - mav.addObject("downOrganCdList", loginUser.getDownOrganCdList()); - }else{ - activityCase.setWrtUserSeq(loginUser.getUserSeq()); - } + mav.addObject("ogCd", loginUser.getOgCd()); + activityCase.setWrtOrgan(loginUser.getOgCd()); activityCase.setQueryInfo(); mav.addObject("activityCaseList", activityCaseService.selectActivityCaseList(activityCase)); activityCase.setContentCnt(activityCaseService.selectActivityCaseCnt(activityCase)); @@ -71,13 +67,15 @@ public class ActivityCaseController { @GetMapping("/getSuspectDiv") public ModelAndView suspectDiv(){ ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/suspectDiv"); - + mav.addObject("acsList", codeMgtService.selectCodeMgtList("ACS")); return mav; } - @GetMapping("/getOfficerDiv") - public ModelAndView officerDiv(Integer userSeq){ + + @ResponseBody + @PostMapping("/getOfficerDiv") + public ModelAndView officerDiv(@RequestBody List userList){ ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/officerDiv"); - mav.addObject("officer", userInfoService.selectUserInfo(userSeq)); + mav.addObject("officerList", userList); mav.addObject("acoList", codeMgtService.selectCodeMgtList("ACO")); return mav; } diff --git a/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml index 62c97fa7..fd5c9ba0 100644 --- a/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml +++ b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml @@ -8,7 +8,7 @@ a.status <> 'DST008' - and ((a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST002') or a.status = 'DST007') + and ((a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST001') or a.status = 'DST007') and a.work_rating = #{workRating} diff --git a/src/main/resources/static/js/counterIntelligence/activityCase.js b/src/main/resources/static/js/counterIntelligence/activityCase.js index 5a341217..b3d2bfa9 100644 --- a/src/main/resources/static/js/counterIntelligence/activityCase.js +++ b/src/main/resources/static/js/counterIntelligence/activityCase.js @@ -1,4 +1,4 @@ - +let selectedList= []; $(document).on('click', '#addActivityCaseBtn', function (){ getActivityCaseEditModal(null); }) @@ -7,8 +7,15 @@ $(document).on('click', '#suspectAddBtn', function (){ getSuspectDiv() }) $(document).on('click', '#officerAddBtn', function (){ - getUserModal - getOfficerDiv() + searchModalSubmit(1); + $("#userModal").modal('show'); +}) +$(document).on('click', '#getUserBtn', function (){ + getOfficerDiv(); +}) +$(document).on('click', '.rowDeleteBtn', function (){ + $(this).parents(".suspectDiv").remove(); + $(this).parents(".officerRow").remove(); }) $(document).on('click', '#saveTempBtn,#saveActivityCaseBtn', function(){ @@ -65,11 +72,17 @@ function getSuspectDiv(){ } function getOfficerDiv(){ $.ajax({ + type: 'POST', url: '/counterIntelligence/getOfficerDiv', - type: 'GET', + data: JSON.stringify(selectedList), + contentType: 'application/json', dataType:"html", + beforeSend: function (xhr){ + xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val()); + }, success: function(html){ $("#officerHome").append(html) + $("#userModal").modal("hide"); }, error:function(){ @@ -111,7 +124,25 @@ function saveActivityCase(status){ $(".text-decoration-line-through").each(function (idx, el){ formData.append('fileSeq', $(el).attr("data-fileseq")); }) - formData.append('content', CrossEditor.GetBodyValue()); + $(".suspectDiv").each(function (idx, el){ + formData.append('suspectList['+idx+'].type', $(el).find(".suspectType").val()); + formData.append('suspectList['+idx+'].name', $(el).find(".suspectName").val()); + formData.append('suspectList['+idx+'].sex', $(el).find(".suspectSex").val()); + formData.append('suspectList['+idx+'].birthDate', $(el).find(".suspectBirthDate").val()); + formData.append('suspectList['+idx+'].phone', $(el).find(".suspectPhone").val()); + formData.append('suspectList['+idx+'].addr', $(el).find(".suspectAddr").val()); + formData.append('suspectList['+idx+'].job', $(el).find(".suspectJob").val()); + formData.append('suspectList['+idx+'].area', $(el).find(".suspectArea").val()); + formData.append('suspectList['+idx+'].etc', $(el).find(".suspectEtc").val()); + }) + $(".officerRow").each(function (idx, el){ + formData.append('officerList['+idx+'].type', $(el).find(".officerType").val()); + formData.append('officerList['+idx+'].userSeq', $(el).find(".userSeq").val()); + formData.append('officerList['+idx+'].ogCd', $(el).find(".ogCd").val()); + formData.append('officerList['+idx+'].ofcCd', $(el).find(".ofcCd").val()); + formData.append('officerList['+idx+'].titleCd', $(el).find(".titleCd").val()); + formData.append('officerList['+idx+'].userNm', $(el).find(".userNm").val()); + }) $.ajax({ type : 'POST', data : formData, @@ -161,32 +192,20 @@ function deleteActivityCase(caseKey){ } function contentCheck(){ - if(!$("#workStartDate").val()){ - alert("착수일을 입력해주세요.") + if(!$("#receiptNum").val()){ + alert("접수번호을 입력해주세요.") return false; } - if(!$("#workEndDate").val()){ - alert("종결일을 입력해주세요.") + if(!$("#receiptDt").val()){ + alert("접수일을 입력해주세요.") return false; } - if(!$("#reRatingDate1").val()){ - alert("1차재평가를 입력해주세요.") + if(!$("#receiptClue").val()){ + alert("접수단서를 입력해주세요.") return false; } - if(!$("#reRatingDate2").val()){ - alert("2차재평가를 입력해주세요.") - return false; - } - if(!$("#workRating").val()){ - alert("등급을 선택해주세요.") - return false; - } - if(!$("#title").val()){ - alert("공작명을 입력해주세요.") - return false; - } - if(!$("#summaryInfo").val()){ - alert("사건개요를 입력해주세요.") + if(!$("#caseInfo").val()){ + alert("첩보개요를 입력해주세요.") return false; } return true; diff --git a/src/main/resources/templates/common/modal/userModal.html b/src/main/resources/templates/common/modal/userModal.html index 16c91e36..e41370ee 100644 --- a/src/main/resources/templates/common/modal/userModal.html +++ b/src/main/resources/templates/common/modal/userModal.html @@ -5,11 +5,12 @@
+
-
+
+ +
diff --git a/src/main/resources/templates/counterIntelligence/activityCase/activityCaseEditModal.html b/src/main/resources/templates/counterIntelligence/activityCase/activityCaseEditModal.html index 06c2ee05..3cc3a291 100644 --- a/src/main/resources/templates/counterIntelligence/activityCase/activityCaseEditModal.html +++ b/src/main/resources/templates/counterIntelligence/activityCase/activityCaseEditModal.html @@ -43,23 +43,26 @@
- -
- -
+
-
- +
+
- + +
+
+
+ +
+
-
-
diff --git a/src/main/resources/templates/counterIntelligence/activityCase/officerDiv.html b/src/main/resources/templates/counterIntelligence/activityCase/officerDiv.html index 22cf237b..1aba6b7b 100644 --- a/src/main/resources/templates/counterIntelligence/activityCase/officerDiv.html +++ b/src/main/resources/templates/counterIntelligence/activityCase/officerDiv.html @@ -1,20 +1,20 @@ -
+
-
-
-
+
@@ -22,11 +22,11 @@ - +
-
+
diff --git a/src/main/resources/templates/counterIntelligence/activityCase/suspectDiv.html b/src/main/resources/templates/counterIntelligence/activityCase/suspectDiv.html index b625d24a..e5683038 100644 --- a/src/main/resources/templates/counterIntelligence/activityCase/suspectDiv.html +++ b/src/main/resources/templates/counterIntelligence/activityCase/suspectDiv.html @@ -4,49 +4,54 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkBoard.html b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkBoard.html index 61f1cc92..5ef2c361 100644 --- a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkBoard.html +++ b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkBoard.html @@ -119,7 +119,7 @@ - [임시] + [임시] diff --git a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkEditModal.html b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkEditModal.html index 3800c837..8dba3978 100644 --- a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkEditModal.html +++ b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkEditModal.html @@ -116,7 +116,7 @@ - +
\ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkViewModal.html b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkViewModal.html index 6b099eb4..7613ef86 100644 --- a/src/main/resources/templates/counterIntelligence/ciWork/ciWorkViewModal.html +++ b/src/main/resources/templates/counterIntelligence/ciWork/ciWorkViewModal.html @@ -21,7 +21,7 @@ - +