From 7758efe7e7ba2e5c6692ebcaaf3104ff18415b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 1 Jun 2023 15:50:14 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EC=A0=9C=EB=B2=94=EC=A3=84=20?= =?UTF-8?q?=EA=B2=80=EA=B1=B0=ED=98=84=ED=99=A9=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InternationalCrimeArrestController.java | 71 ++-- .../InternationalCrimeArrestMapper.xml | 14 +- .../faStatistics/internationalCrimeArrest.js | 31 +- ...ArrestEditModal.html => icaEditModal.html} | 0 .../internationalCrimeArrest/icaList.html | 317 ++++++++++++++++++ .../icaStatistics.html | 138 ++++++++ .../icaStatisticsModal.html | 103 ------ ...ArrestViewModal.html => icaViewModal.html} | 0 .../internationalCrimeArrest.html | 312 ----------------- 9 files changed, 507 insertions(+), 479 deletions(-) rename src/main/resources/templates/faStatistics/internationalCrimeArrest/{internationalCrimeArrestEditModal.html => icaEditModal.html} (100%) create mode 100644 src/main/resources/templates/faStatistics/internationalCrimeArrest/icaList.html create mode 100644 src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatistics.html delete mode 100644 src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatisticsModal.html rename src/main/resources/templates/faStatistics/internationalCrimeArrest/{internationalCrimeArrestViewModal.html => icaViewModal.html} (100%) delete mode 100644 src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/internationalCrimeArrest/InternationalCrimeArrestController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/internationalCrimeArrest/InternationalCrimeArrestController.java index 64903ab6..ee5ea953 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/internationalCrimeArrest/InternationalCrimeArrestController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/internationalCrimeArrest/InternationalCrimeArrestController.java @@ -34,12 +34,40 @@ public class InternationalCrimeArrestController { private final OrganConfigService organConfigService; private final MenuMgtService menuMgtService; - @GetMapping("/internationalCrimeArrest") - public ModelAndView internationalCrimeArrest(@AuthenticationPrincipal UserInfo loginUser,InternationalCrimeArrest internationalCrimeArrest) { - ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/internationalCrimeArrest"); + + @GetMapping("/icaStatistics") + public ModelAndView icaStatistics(@AuthenticationPrincipal UserInfo loginUser, IcaStatistics icaStatistics){ + ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/icaStatistics"); + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/icaStatistics").get(0).getAccessAuth(); + + if(accessAuth.equals("ACC003")){ + mav.addObject("downOrganCdList", loginUser.getDownOrganCdList()); + }else{ + icaStatistics.setOrgan(loginUser.getOgCd()); + } + if(Utils.isEmpty(icaStatistics.getYear())){ + icaStatistics.setYear(LocalDate.now().getYear()); + } + List icaStatisticsList = internationalCrimeArrestService.selectIcaStatistics(icaStatistics); + mav.addObject("total", internationalCrimeArrestService.getIcaStatisticsTotal(icaStatisticsList)); + mav.addObject("icaStatisticsList", icaStatisticsList); + List yearList = internationalCrimeArrestService.selectYearOptionList(icaStatistics.getOrgan()); + if(yearList.size()==0){ + yearList.add(icaStatistics.getYear()); + } + mav.addObject("accessAuth", accessAuth); + mav.addObject("yearOptionList", yearList); + mav.addObject("searchParams", icaStatistics); + return mav; + } + + @GetMapping("/icaList") + public ModelAndView icaList(@AuthenticationPrincipal UserInfo loginUser,InternationalCrimeArrest internationalCrimeArrest) { + ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/icaList"); //메뉴권한 확인 - String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/internationalCrimeArrest").get(0).getAccessAuth(); + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/icaStatistics").get(0).getAccessAuth(); mav.addObject("accessAuth", accessAuth); mav.addObject("userOrgan", loginUser.getOgCd()); @@ -55,9 +83,9 @@ public class InternationalCrimeArrestController { return mav; } - @GetMapping("/internationalCrimeArrestEditModal") + @GetMapping("/icaEditModal") public ModelAndView internationalCrimeArrestEditModal(@AuthenticationPrincipal UserInfo loginUser, InternationalCrimeArrest internationalCrimeArrest){ - ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal"); + ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/icaEditModal"); if(internationalCrimeArrest.getIcaKey()!=null){ internationalCrimeArrest = internationalCrimeArrestService.selectInternationalCrimeArrest(internationalCrimeArrest.getIcaKey()); }else{ @@ -74,44 +102,19 @@ public class InternationalCrimeArrestController { return mav; } - @GetMapping("/internationalCrimeArrestViewModal") + @GetMapping("/icaViewModal") public ModelAndView internationalCrimeArrestViewModal(@AuthenticationPrincipal UserInfo loginUser, InternationalCrimeArrest internationalCrimeArrest){ - ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal"); + ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/icaViewModal"); mav.addObject("ica", internationalCrimeArrestService.selectInternationalCrimeArrest(internationalCrimeArrest.getIcaKey())); mav.addObject("userSeq",loginUser.getUserSeq()); //메뉴권한 확인 - mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/internationalCrimeArrest").get(0).getAccessAuth()); + mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/icaStatistics").get(0).getAccessAuth()); mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); //마감여부 mav.addObject("deadlineState", menuMgtService.selectDeadlineChk("/faStatistics/internationalCrimeArrest")); return mav; } - @GetMapping("/icaStatisticsModal") - public ModelAndView icaStatisticsModal(@AuthenticationPrincipal UserInfo loginUser, IcaStatistics icaStatistics){ - ModelAndView mav = new ModelAndView("faStatistics/internationalCrimeArrest/icaStatisticsModal"); - if(Utils.isEmpty(icaStatistics.getOrgan())){ - icaStatistics.setOrgan(loginUser.getOgCd()); - } - if(Utils.isEmpty(icaStatistics.getYear())){ - icaStatistics.setYear(LocalDate.now().getYear()); - } - if(Utils.isEmpty(icaStatistics.getMonth())){ - icaStatistics.setMonth(LocalDate.now().getMonthValue()); - } - List icaStatisticsList = internationalCrimeArrestService.selectIcaStatistics(icaStatistics); - mav.addObject("total", internationalCrimeArrestService.getIcaStatisticsTotal(icaStatisticsList)); - mav.addObject("icaStatisticsList", icaStatisticsList); - List yearList = internationalCrimeArrestService.selectYearOptionList(icaStatistics.getOrgan()); - if(yearList.size()==0){ - yearList.add(icaStatistics.getYear()); - } - mav.addObject("yearOptionList", yearList); - mav.addObject("searchParams", icaStatistics); - mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); - return mav; - } - @PostMapping("/saveInternationalCrimeArrest") public Integer saveInternationalCrimeArrest(@AuthenticationPrincipal UserInfo loginUser, InternationalCrimeArrest internationalCrimeArrest){ diff --git a/src/main/resources/mybatisMapper/InternationalCrimeArrestMapper.xml b/src/main/resources/mybatisMapper/InternationalCrimeArrestMapper.xml index 74cb4590..34c1c204 100644 --- a/src/main/resources/mybatisMapper/InternationalCrimeArrestMapper.xml +++ b/src/main/resources/mybatisMapper/InternationalCrimeArrestMapper.xml @@ -147,9 +147,17 @@ sum(case when ab.process_result = 'PCR006' then 1 else 0 end) as pcr006Cnt from international_crime_arrest aa inner join ica_suspect_info ab on aa.ica_key = ab.ica_key - where department = #{organ} - and EXTRACT(YEAR FROM wrt_dt) = ${year} - and EXTRACT(MONTH FROM wrt_dt) = ${month} + + + and department = #{organ} + + + and EXTRACT(YEAR FROM wrt_dt) = ${year} + + + and EXTRACT(MONTH FROM wrt_dt) = ${month} + + group by crime_type, violation_type ) c on a.item_cd = c.crime_type and b.item_cd = c.violation_type order by a.item_cd, b.item_cd diff --git a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js index 7429edfd..5d364bdc 100644 --- a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js +++ b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js @@ -9,15 +9,13 @@ $(function(){ language: "ko", autoclose: true }); - - //getStatisticsModal(); }); -$(document).on('click', '#statisticsModalBtn', function (){ - getStatisticsModal(); +$(document).on('click', '#statisticsTab', function (){ + location.href = '/faStatistics/icaStatistics'; }) -$(document).on('click', '#statisticsSearchBtn', function (){ - getStatisticsModal($('#organ').val(), $('#year').val(), $('#month').val()) +$(document).on('click', '#listTab', function (){ + location.href = '/faStatistics/icaList'; }) $(document).on('click', '#icaAddBtn', function () { @@ -226,27 +224,6 @@ function contentCheck(status){ return flag; } -function getStatisticsModal(organ, year, month){ - $.ajax({ - url: '/faStatistics/icaStatisticsModal', - data: { - organ: organ, - year: year, - month: month, - }, - type: 'GET', - dataType:"html", - success: function(html){ - $("#icaStatisticsBody").empty().append(html) - $("#icaStatisticsModal").modal('show'); - }, - error:function(e){ - ajaxErrorAction(e); - } - }); -} - $(document).on('click', '#icaExcelDownBtn', function (){ - debugger exportExcel('국제범죄검거현황', 'icaTable') }); diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaEditModal.html similarity index 100% rename from src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html rename to src/main/resources/templates/faStatistics/internationalCrimeArrest/icaEditModal.html diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaList.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaList.html new file mode 100644 index 00000000..c3148425 --- /dev/null +++ b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaList.html @@ -0,0 +1,317 @@ + + + + + + + +
+
+ + + +
+
+
+
국제범죄 검거현황
+
+

외사통계 > 국제범죄검거현황

+
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
순번지방청경찰서담당경찰관 +
범죄테마
+
(대분류)
+
+
위반유형
+
(중분류)
+
+
죄명
+
(소분류)
+
발생원표검거원표피의자원표피의자 인적사항범죄인지사건송치작성자작성일시
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + + +
+
+
+
+
+
+
+
+ + + + +
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatistics.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatistics.html new file mode 100644 index 00000000..d2e06631 --- /dev/null +++ b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatistics.html @@ -0,0 +1,138 @@ + + + + + +
+
+ + + +
+
+
+
국제범죄 검거현황
+
+

외사통계 > 국제범죄검거현황

+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
분야위반유형발생검거피의자 신병 처리 결과
+
+
+
+
+
+
+
+
+ + diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatisticsModal.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatisticsModal.html deleted file mode 100644 index aa492491..00000000 --- a/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaStatisticsModal.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/icaViewModal.html similarity index 100% rename from src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html rename to src/main/resources/templates/faStatistics/internationalCrimeArrest/icaViewModal.html diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html deleted file mode 100644 index 051f707b..00000000 --- a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - -
-
- - - -
-
-
-
국제범죄 검거현황
-
-

외사통계 > 국제범죄검거현황

-
-
-
-
-
- - -
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
- -
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
순번지방청경찰서담당경찰관 -
범죄테마
-
(대분류)
-
-
위반유형
-
(중분류)
-
-
죄명
-
(소분류)
-
발생원표검거원표피의자원표피의자 인적사항범죄인지사건송치작성자작성일시
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - - -
-
-
-
-
-
-
- - - - -
-
- \ No newline at end of file