From 7972cf12f78e9d67ca5c6bbff7d5f4d691693add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Fri, 12 May 2023 16:19:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=88=EB=B2=95=EC=A1=B0=EC=97=85=EC=99=B8?= =?UTF-8?q?=EA=B5=AD=EC=96=B4=EC=84=A0=20>=20=EC=B2=98=EB=A6=AC=ED=98=84?= =?UTF-8?q?=ED=99=A9=20=EC=A1=B0=ED=9A=8C=EB=AA=A8=EB=8B=AC=20=EB=8F=99?= =?UTF-8?q?=EC=9E=91=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FishingBoatController.java | 24 ++++ .../ProcessResultController.java | 31 ----- .../model/UnlawfulFishingParam.java | 3 + .../crackdownStatus/CrackdownStatusDTO.java | 8 ++ .../mybatisMapper/CrackdownStatusMapper.xml | 3 + .../static/js/faStatistics/fishingBoatMgt.js | 16 ++- .../crackdownStatus/crackdownStatus.html | 18 +-- .../fishingBoat/fishingBoatMgt.html | 112 ++++++++-------- .../fishingBoat/fishingBoatViewModal.html | 22 ++-- .../processResult/processResult.html | 121 ++++++++---------- 10 files changed, 172 insertions(+), 186 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java index 93ef79ff..e0396e86 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java @@ -83,9 +83,33 @@ public class FishingBoatController { return mav; } + @RequestMapping("/processResult") + public ModelAndView processResult(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params) { + ModelAndView mav = new ModelAndView("faStatistics/processResult/processResult"); + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + + if(params.getYear()==null){ + params.setYear(LocalDateTime.now().getYear()); + } + List yearList = fishingBoatService.selectFishingBoatYearParam(params); + if(!yearList.contains(params.getYear())){ + yearList.add(params.getYear()); + } + List csDTOList = fishingBoatService.selectCrackdownStatusList(params); + CSStatistics statistics = fishingBoatService.calculationCSStatistics(csDTOList); + mav.addObject("statistics", statistics); + mav.addObject("crackdownStatusList", csDTOList); + mav.addObject("yearList", yearList); + mav.addObject("searchParams", params); + return mav; + } + @GetMapping("/fishingBoatViewModal") public ModelAndView fishingBoatViewModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){ ModelAndView mav = new ModelAndView("faStatistics/fishingBoat/fishingBoatViewModal"); + mav.addObject("modalType", crackdownStatus.getModalType()); crackdownStatus = fishingBoatService.selectCrackdownStatus(crackdownStatus.getCdsKey()); mav.addObject("crackdownStatus", crackdownStatus); diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/ProcessResultController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/ProcessResultController.java index 582afa47..3f99c900 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/ProcessResultController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/ProcessResultController.java @@ -28,37 +28,6 @@ public class ProcessResultController { private final FishingBoatRepository fishingBoatRepository; private final ProcessResultRepository processResultRepository; - @RequestMapping("/processResult") - public ModelAndView processResult(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult) { - ModelAndView mav = new ModelAndView("faStatistics/processResult/processResult"); - - //메뉴권한 확인 - String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth(); - - mav.addObject("accessAuth", accessAuth); - - processResult.setQueryInfo(); - if(processResult.getYear()==null){ - processResult.setYear(LocalDateTime.now().getYear()); - } - List yearList = processResultService.selectProcessResultYearParam(processResult); - if(!yearList.contains(processResult.getYear())){ - yearList.add(processResult.getYear()); - } - - List processResultList = processResultService.selectProcessResultList(processResult); - - for (ProcessResult pr:processResultList) { - pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey()).orElse(null)); - pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey()).orElse(null)); - pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey())); - } - - mav.addObject("processResultList", processResultList); - mav.addObject("searchParams", processResult); - return mav; - } - @GetMapping("/processResult/processResultViewModal") public ModelAndView processResultViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){ ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultViewModal"); diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/UnlawfulFishingParam.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/UnlawfulFishingParam.java index 169e96fc..78e7ff43 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/UnlawfulFishingParam.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/UnlawfulFishingParam.java @@ -84,4 +84,7 @@ public class UnlawfulFishingParam extends BaseModel { private String seniorRestriction; private String normalRestriction; + private String sentencingCourt; + private String sentencingDetail; + private String executionDetail; } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/crackdownStatus/CrackdownStatusDTO.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/crackdownStatus/CrackdownStatusDTO.java index bccd2e9a..859ae77c 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/crackdownStatus/CrackdownStatusDTO.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/crackdownStatus/CrackdownStatusDTO.java @@ -79,6 +79,8 @@ public class CrackdownStatusDTO extends BaseModel { private String middleTakeoverBoat; @DateTimeFormat(pattern = "yyyy-MM-dd") private LocalDate confiscationDt; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate boatDisposalDt; private Integer captainRestriction; private Integer navigaterRestriction; private Integer engineerRestriction; @@ -104,6 +106,12 @@ public class CrackdownStatusDTO extends BaseModel { private String confiscationGae; private String confiscationEtc; + private String sentencingCourt; + private String sentencingDetail; + private String executionDetail; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime updDt; + private String wrtOrgan; private String wrtPart; private Integer wrtUserSeq; diff --git a/src/main/resources/mybatisMapper/CrackdownStatusMapper.xml b/src/main/resources/mybatisMapper/CrackdownStatusMapper.xml index 32a8515c..bed5d913 100644 --- a/src/main/resources/mybatisMapper/CrackdownStatusMapper.xml +++ b/src/main/resources/mybatisMapper/CrackdownStatusMapper.xml @@ -334,6 +334,9 @@ b.handover_boat , b.middle_takeover_boat , b.confiscation_dt, + b.sentencing_court, + b.sentencing_detail, + b.execution_detail, coalesce(e.captainRestriction, 0) as captainRestriction, coalesce(e.navigaterRestriction, 0) as navigaterRestriction, coalesce(e.engineerRestriction, 0) as engineerRestriction, diff --git a/src/main/resources/static/js/faStatistics/fishingBoatMgt.js b/src/main/resources/static/js/faStatistics/fishingBoatMgt.js index b393a3a1..414c7161 100644 --- a/src/main/resources/static/js/faStatistics/fishingBoatMgt.js +++ b/src/main/resources/static/js/faStatistics/fishingBoatMgt.js @@ -52,7 +52,7 @@ $(document).on('click', '#getFishingBoatEditModalBtn', function (){ getFishingBoatEditModal(null); }) $(document).on('click', '.crackdownStatusTr', function (){ - getFishingBoatViewModal($(this).find(".cdsKey").val()) + getFishingBoatViewModal($(this).attr("data-cdskey"), $(this).attr("data-modaltype")) }) $(document).on('click', '#editFishingBoatBtn', function (){ getFishingBoatEditModal($("#fishingBoatViewModalContent").find(".cdsKey").val()); @@ -306,10 +306,10 @@ function getFishingBoatEditModal(cdsKey){ } }); } -function getFishingBoatViewModal(cdsKey){ +function getFishingBoatViewModal(cdsKey, modalType){ $.ajax({ url: '/faStatistics/fishingBoatViewModal', - data: {cdsKey: cdsKey}, + data: {cdsKey: cdsKey, modalType: modalType}, type: 'GET', dataType:"html", success: function(html){ @@ -473,10 +473,12 @@ function valueCheck(status){ function calculationReleaseToNapo(form){ let napoDt = form.find("#napoDt").val(); let releaseDt = form.find("#releaseDt").val(); - if(napoDt.length>15&&releaseDt.length>15){ - releaseDt = new Date(releaseDt); - napoDt = new Date(napoDt); - form.find("#releaseToNapo").val(Math.ceil((releaseDt.getTime()-napoDt.getTime())/(1000*60*60*24))+"일"); + if(napoDt !== undefined && releaseDt !== undefined){ + if(napoDt.length>15&&releaseDt.length>15){ + releaseDt = new Date(releaseDt); + napoDt = new Date(napoDt); + form.find("#releaseToNapo").val(Math.ceil((releaseDt.getTime()-napoDt.getTime())/(1000*60*60*24))+"일"); + } } } diff --git a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatus.html b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatus.html index f4e88917..1fbb0173 100644 --- a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatus.html +++ b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatus.html @@ -543,9 +543,7 @@ - - - + @@ -684,20 +682,6 @@ - - - diff --git a/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html index eb77fc3f..5ecd2a99 100644 --- a/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html +++ b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html @@ -185,61 +185,63 @@ - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatViewModal.html b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatViewModal.html index 2af51d60..f8ac5370 100644 --- a/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatViewModal.html +++ b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatViewModal.html @@ -590,15 +590,17 @@ - - - - - -