From 5ea64b14ac48d7549ac8b5eb49c7a407e5492d57 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 13:31:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=B8=EC=82=AC=EB=B0=A9=EC=B2=A9=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EA=B6=8C=ED=95=9C=20=EC=A0=90=EA=B2=80=20=EB=B0=8F?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CounterIntelligenceController.java | 24 +- .../activityCase/ActivityCaseController.java | 3 +- .../model/CiWorkStatistics.java | 4 + .../mybatisMapper/ActivityCaseMapper.xml | 17 +- .../CounterIntelligenceMapper.xml | 654 +++++++++--------- .../js/counterIntelligence/ciaForeigner.js | 2 + .../counterIntelligence/ciaEduEditModal.html | 83 +-- .../counterIntelligence/ciaEduViewModal.html | 48 +- .../ciaForeignerEditModal.html | 105 +-- .../ciaForeignerViewModal.html | 22 +- .../ciaManageCompanyEditModal.html | 33 +- .../ciaManageCompanyViewModal.html | 40 +- .../ciaSaftyDemandEditModal.html | 22 +- .../ciaSaftyDemandviewModal.html | 36 +- 14 files changed, 502 insertions(+), 591 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java index deef5045..7ac40d87 100644 --- a/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java @@ -2,10 +2,7 @@ package com.dbnt.faisp.main.counterIntelligence; import com.dbnt.faisp.main.authMgt.service.AuthMgtService; import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; -import com.dbnt.faisp.main.counterIntelligence.model.CiWorkStatistics; -import com.dbnt.faisp.main.counterIntelligence.model.CiaFile; -import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity; -import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; +import com.dbnt.faisp.main.counterIntelligence.model.*; import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceService; import com.dbnt.faisp.main.equip.model.Equip; import com.dbnt.faisp.main.equip.model.EquipFile; @@ -106,12 +103,20 @@ public class CounterIntelligenceController { } } @GetMapping("/CiWorkStatistics") - public ModelAndView ciWorkStatistics(CiWorkStatistics ciWorkStatistics){ + public ModelAndView ciWorkStatistics(@AuthenticationPrincipal UserInfo loginUser, CiWorkStatistics ciWorkStatistics){ if(ciWorkStatistics.getYear()==null){ ciWorkStatistics.setYear(LocalDateTime.now().getYear()); } ModelAndView mav = new ModelAndView("counterIntelligence/ciWork/ciWorkStatistics"); mav.addObject("yearList", ciService.selectCiWorkYearList()); + + String accessAuth = authMgtService.selectAccessConfigList + (loginUser.getUserSeq(), "/counterIntelligence/ciWorkList").get(0).getAccessAuth(); + if(accessAuth.equals("ACC003")) { + ciWorkStatistics.setDownOrganCdList(loginUser.getDownOrganCdList()); + }else{ + ciWorkStatistics.setOgCd(loginUser.getOgCd()); + } mav.addObject("ciWorkStatisticsList", ciService.selectCiWorkStatisticsList(ciWorkStatistics)); mav.addObject("searchParams", ciWorkStatistics); return mav; @@ -141,8 +146,9 @@ public class CounterIntelligenceController { ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandEditModal"); if(cia.getCiKey() != null) { cia = ciService.selectSaftyDemandInfo(cia); + }else{ + cia.setSaftyDemandInfo(new SaftyDemandInfo()); } - mav.addObject("cia", cia); return mav; } @@ -215,6 +221,8 @@ public class CounterIntelligenceController { ModelAndView mav = new ModelAndView("counterIntelligence/ciaManageCompanyEditModal"); if(cia.getCiKey() != null) { cia = ciService.selectManageCompanyInfo(cia); + }else{ + cia.setManageCompanyInfo(new ManageCompanyInfo()); } mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); @@ -258,6 +266,8 @@ public class CounterIntelligenceController { ModelAndView mav = new ModelAndView("counterIntelligence/ciaForeignerEditModal"); if(cia.getCiKey() != null) { cia = ciService.selectForeignerInfo(cia); + }else{ + cia.setForeignerInfo(new ForeignerInfo()); } mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); @@ -301,6 +311,8 @@ public class CounterIntelligenceController { ModelAndView mav = new ModelAndView("counterIntelligence/ciaEduEditModal"); if(cia.getCiKey() != null) { cia = ciService.selectEduInfo(cia); + }else{ + cia.setEduInfo(new EduInfo()); } mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); 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 d6c40eab..0be0e52f 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 @@ -31,8 +31,9 @@ public class ActivityCaseController { mav.addObject("ogCd", loginUser.getOgCd()); if(accessAuth.equals("ACC003")){ - activityCase.setWrtOrgan(loginUser.getOgCd()); activityCase.setDownOrganCdList(loginUser.getDownOrganCdList()); + }else{ + activityCase.setWrtOrgan(loginUser.getOgCd()); } activityCase.setWrtUserSeq(loginUser.getUserSeq()); activityCase.setQueryInfo(); diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiWorkStatistics.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiWorkStatistics.java index ebae4efb..7e75cf82 100644 --- a/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiWorkStatistics.java +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiWorkStatistics.java @@ -4,6 +4,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import java.util.List; + @Getter @Setter @NoArgsConstructor @@ -17,4 +19,6 @@ public class CiWorkStatistics { private Integer thisYearWorkEndCnt=0; private Integer year; + private String ogCd; + private List downOrganCdList; } diff --git a/src/main/resources/mybatisMapper/ActivityCaseMapper.xml b/src/main/resources/mybatisMapper/ActivityCaseMapper.xml index 6fd46929..673fddab 100644 --- a/src/main/resources/mybatisMapper/ActivityCaseMapper.xml +++ b/src/main/resources/mybatisMapper/ActivityCaseMapper.xml @@ -6,14 +6,6 @@ - - and (a.wrt_user_seq = #{wrtUserSeq} - or a.receipt_key in (select a.receipt_key - from activity_case_info a - inner join activity_case_apprv b - on a.case_key = b.case_key - where b.user_seq = #{wrtUserSeq})) - and a.receipt_key = #{receiptKey} @@ -63,6 +55,15 @@ and a.wrt_organ = #{wrtOrgan} + + + and (a.wrt_user_seq = #{wrtUserSeq} + or a.receipt_key in (select a.receipt_key + from activity_case_info a + inner join activity_case_apprv b + on a.case_key = b.case_key + where b.user_seq = #{wrtUserSeq})) + and a.wrt_organ in diff --git a/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml index dd1dcda6..b6e0adf1 100644 --- a/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml +++ b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml @@ -24,10 +24,10 @@ and a.ciw_key in ( - select aa.ciw_key - from hash_tag_link_ciw aa - inner join hash_tag ab on aa.tag_key = ab.tag_key - where ab.tag_nm like '%'||#{hashTags}||'%' + select aa.ciw_key + from hash_tag_link_ciw aa + inner join hash_tag ab on aa.tag_key = ab.tag_key + where ab.tag_nm like '%'||#{hashTags}||'%' ) @@ -80,20 +80,20 @@ - + - + - - select cia.ci_key, - (select item_value from code_mgt where item_cd = cia.content_status) as content_status, - cia.ci_type, - (select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ, - mci.company_nm, - mci.company_location, - mci.related_field, - mci.description, - mci.cell_phone, - mci.department, - mci."name", - (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, - cia.wrt_user_seq, - cia.wrt_user_nm, - cia.wrt_dt - from counter_intelligence_activity cia, - manage_company_info mci - where cia.ci_key = mci.ci_key - and cia.content_status != 'DST008' - and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007') - + (select item_value from code_mgt where item_cd = cia.content_status) as content_status, + cia.ci_type, + (select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ, + mci.company_nm, + mci.company_location, + mci.related_field, + mci.description, + mci.cell_phone, + mci.department, + mci."name", + (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, + cia.wrt_user_seq, + cia.wrt_user_nm, + cia.wrt_dt + from counter_intelligence_activity cia, + manage_company_info mci + where cia.ci_key = mci.ci_key + and cia.content_status != 'DST008' + and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007') + and cia.wrt_organ = #{wrtOrgan} - - + + and mci.company_nm like '%'||#{companyNm}||'%' - - + + and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%' - - + + and cia.wrt_dt >= #{startDate}::date - - - and cia.wrt_dt <= #{endDate}::date+1 - - and mci.mgt_organ in - - #{item} - + + + and cia.wrt_dt <= #{endDate}::date+1 + + and mci.mgt_organ in + + #{item} + ORDER BY cia.ci_key DESC LIMIT #{rowCnt} OFFSET #{firstIndex} - + - + - + - + - + \ No newline at end of file diff --git a/src/main/resources/static/js/counterIntelligence/ciaForeigner.js b/src/main/resources/static/js/counterIntelligence/ciaForeigner.js index aa27894e..1d9f4bbe 100644 --- a/src/main/resources/static/js/counterIntelligence/ciaForeigner.js +++ b/src/main/resources/static/js/counterIntelligence/ciaForeigner.js @@ -24,6 +24,7 @@ function getCiaForeignerEditModal(ciKey){ autoclose: true }); setUploadDiv(); + setEditor("editor", 450); $("#ciaForeignerEditModal").modal('show'); }, error:function(e){ @@ -54,6 +55,7 @@ function save(contentStatus){ formData.append('fileSeq', $(el).attr("data-fileseq")); }) formData.append('contentStatus', contentStatus); + formData.append("monitoringInfo", CrossEditor.GetBodyValue()); $.ajax({ type : 'POST', data : formData, diff --git a/src/main/resources/templates/counterIntelligence/ciaEduEditModal.html b/src/main/resources/templates/counterIntelligence/ciaEduEditModal.html index 84fe7c68..cde97cb8 100644 --- a/src/main/resources/templates/counterIntelligence/ciaEduEditModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaEduEditModal.html @@ -16,73 +16,33 @@ -
- +
-
- -
- -
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
- + +
- +
- +
- +
-
- +
+
- +
@@ -90,10 +50,9 @@
- +
-
@@ -114,14 +73,14 @@
\ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciaEduViewModal.html b/src/main/resources/templates/counterIntelligence/ciaEduViewModal.html index cad4fa8d..31ee27c4 100644 --- a/src/main/resources/templates/counterIntelligence/ciaEduViewModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaEduViewModal.html @@ -15,22 +15,22 @@
-
- +
+ -
+
- + @@ -69,8 +69,8 @@ + th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" + th:text="|${file.origNm}.${file.fileExtn}|"> @@ -83,18 +83,14 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciaForeignerEditModal.html b/src/main/resources/templates/counterIntelligence/ciaForeignerEditModal.html index 03aef159..bd8cfd75 100644 --- a/src/main/resources/templates/counterIntelligence/ciaForeignerEditModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaForeignerEditModal.html @@ -16,95 +16,41 @@ -
- +
-
- -
- -
- -
- -
- -
- -
-
-
- -
- -
- -
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- + +
- +
- +
- +
- +
-
- +
+
- +
- +
@@ -112,17 +58,16 @@
- +
- +
- +
-
@@ -143,14 +88,14 @@
\ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciaForeignerViewModal.html b/src/main/resources/templates/counterIntelligence/ciaForeignerViewModal.html index 7a0dd0b8..82f584cf 100644 --- a/src/main/resources/templates/counterIntelligence/ciaForeignerViewModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaForeignerViewModal.html @@ -100,16 +100,14 @@
- +
\ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciaManageCompanyEditModal.html b/src/main/resources/templates/counterIntelligence/ciaManageCompanyEditModal.html index 60372b35..aa56bdaa 100644 --- a/src/main/resources/templates/counterIntelligence/ciaManageCompanyEditModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaManageCompanyEditModal.html @@ -17,44 +17,43 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -74,38 +73,38 @@
- +
- +
- +
- +
- +
-
+
-
+
diff --git a/src/main/resources/templates/counterIntelligence/ciaManageCompanyViewModal.html b/src/main/resources/templates/counterIntelligence/ciaManageCompanyViewModal.html index f1a4ea8f..6df7096a 100644 --- a/src/main/resources/templates/counterIntelligence/ciaManageCompanyViewModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaManageCompanyViewModal.html @@ -16,17 +16,17 @@
- + @@ -78,8 +78,8 @@ + th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" + th:text="|${file.origNm}.${file.fileExtn}|"> @@ -92,18 +92,14 @@
+ \ No newline at end of file + \ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciaSaftyDemandEditModal.html b/src/main/resources/templates/counterIntelligence/ciaSaftyDemandEditModal.html index 0ceb24d4..019488db 100644 --- a/src/main/resources/templates/counterIntelligence/ciaSaftyDemandEditModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaSaftyDemandEditModal.html @@ -17,27 +17,25 @@
- +
- +
- +
- +
- -
- - + +
+
- -
- - + +
+
diff --git a/src/main/resources/templates/counterIntelligence/ciaSaftyDemandviewModal.html b/src/main/resources/templates/counterIntelligence/ciaSaftyDemandviewModal.html index 35df1c50..873bbd49 100644 --- a/src/main/resources/templates/counterIntelligence/ciaSaftyDemandviewModal.html +++ b/src/main/resources/templates/counterIntelligence/ciaSaftyDemandviewModal.html @@ -22,9 +22,9 @@

@@ -59,8 +59,8 @@ + th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" + th:text="|${file.origNm}.${file.fileExtn}|"> @@ -73,18 +73,14 @@
- \ No newline at end of file + + + \ No newline at end of file