diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/UnlawfulFishingController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/UnlawfulFishingController.java index 49e2407c..3535077e 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/UnlawfulFishingController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/UnlawfulFishingController.java @@ -214,6 +214,7 @@ public class UnlawfulFishingController { params.setViewOrgan(loginUser.getOgCd()); } params.setQueryInfo(); + params.setType("selectModal"); mav.addObject("illegalShipInfoList", unlawfulFishingService.selectIllegalShipInfoList(params)); params.setContentCnt(unlawfulFishingService.selectIllegalShipInfoListCnt(params)); params.setPaginationInfo(); @@ -399,8 +400,13 @@ public class UnlawfulFishingController { //메뉴권한 확인 AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/statistics?type=type1").get(0); mav.addObject("menuKey", accessConfig.getMenuKey()); + List yearList = unlawfulFishingService.selectFishingBoatYearParam(); + if(yearList.size()==0){ + yearList.add(LocalDate.now().getYear()); + } + mav.addObject("yearList", yearList); if(Utils.isEmpty(params.getYear())){ - params.setYear(LocalDate.now().getYear()); + params.setYear(yearList.get(0)); } switch (params.getType()){ case "type1": diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/model/statistics/ProcessStatistics.java b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/model/statistics/ProcessStatistics.java index e59b0c40..587e0b84 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/model/statistics/ProcessStatistics.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/model/statistics/ProcessStatistics.java @@ -1,4 +1,23 @@ package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter +@Setter +@NoArgsConstructor public class ProcessStatistics { + private Integer year; + private Integer yearTotal=0; + private Integer depositPaidTotal=0; + private Integer evictionCnt=0; + private Integer handoverCnt=0; + private Integer depositPaidCnt=0; + private Integer depositUnpaidTotal=0; + private Integer purchaseCnt=0; + private Integer consignmentCnt=0; + private Integer disposalCnt=0; + private Integer depositUnpaidCnt=0; + private Integer processingCnt=0; } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/service/UnlawfulFishingService.java b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/service/UnlawfulFishingService.java index 268443dc..9bac3829 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/service/UnlawfulFishingService.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/unlawfulFishing/service/UnlawfulFishingService.java @@ -416,7 +416,33 @@ public class UnlawfulFishingService { } public List selectStatisticsListType3(StatisticsParam params) { - return unlawfulFishingMapper.selectStatisticsListType3(params); + List tempList = unlawfulFishingMapper.selectStatisticsListType3(params); + List statList = new ArrayList<>(); + ProcessStatistics total = new ProcessStatistics(); + for(ProcessStatistics stat : tempList){ + stat.setYearTotal(stat.getEvictionCnt()+stat.getHandoverCnt()+stat.getDepositPaidCnt() + +stat.getPurchaseCnt()+stat.getConsignmentCnt()+stat.getDisposalCnt()+stat.getDepositUnpaidCnt() + +stat.getProcessingCnt()); + stat.setDepositPaidTotal(stat.getEvictionCnt()+stat.getHandoverCnt()+stat.getDepositPaidCnt()); + stat.setDepositUnpaidTotal(stat.getPurchaseCnt()+stat.getConsignmentCnt()+stat.getDisposalCnt()+stat.getDepositUnpaidCnt()); + + total.setEvictionCnt(total.getEvictionCnt()+stat.getEvictionCnt()); + total.setHandoverCnt(total.getHandoverCnt()+stat.getHandoverCnt()); + total.setDepositPaidCnt(total.getDepositPaidCnt()+stat.getDepositPaidCnt()); + total.setPurchaseCnt(total.getPurchaseCnt()+stat.getPurchaseCnt()); + total.setConsignmentCnt(total.getConsignmentCnt()+stat.getConsignmentCnt()); + total.setDisposalCnt(total.getDisposalCnt()+stat.getDisposalCnt()); + total.setDepositUnpaidCnt(total.getDepositUnpaidCnt()+stat.getDepositUnpaidCnt()); + total.setProcessingCnt(total.getProcessingCnt()+stat.getProcessingCnt()); + } + total.setYearTotal(total.getEvictionCnt()+total.getHandoverCnt()+total.getDepositPaidCnt() + +total.getPurchaseCnt()+total.getConsignmentCnt()+total.getDisposalCnt()+total.getDepositUnpaidCnt() + +total.getProcessingCnt()); + total.setDepositPaidTotal(total.getEvictionCnt()+total.getHandoverCnt()+total.getDepositPaidCnt()); + total.setDepositUnpaidTotal(total.getPurchaseCnt()+total.getConsignmentCnt()+total.getDisposalCnt()+total.getDepositUnpaidCnt()); + statList.add(total); + statList.addAll(tempList); + return statList; } @Transactional diff --git a/src/main/resources/mybatisMapper/UnlawfulFishingMapper.xml b/src/main/resources/mybatisMapper/UnlawfulFishingMapper.xml index 4ea18e12..366b4ed9 100644 --- a/src/main/resources/mybatisMapper/UnlawfulFishingMapper.xml +++ b/src/main/resources/mybatisMapper/UnlawfulFishingMapper.xml @@ -9,6 +9,7 @@ select distinct extract(year from napo_dt) as year from crackdown_status where napo_dt is not null + order by year desc where a.status <> 'DST008' + + and fb_key not in (select fb_key + from ship_process_info + where status <> 'DST008') + and (a.boat_name_kr like '%'||#{boatName}||'%' or a.boat_name_cn like '%'||#{boatName}||'%') @@ -203,7 +209,7 @@ inner join illegal_ship_info b on a.fb_key = b.fb_key inner join crackdown_info c on b.cds_key = c.cds_key - order by a.wrt_dt desc + order by c.napo_dt desc, a.wrt_dt desc limit #{rowCnt} offset #{firstIndex} \ No newline at end of file diff --git a/src/main/resources/static/js/faStatistics/unlawfulFishing/statistics.js b/src/main/resources/static/js/faStatistics/unlawfulFishing/statistics.js index 27d1097b..191bccc1 100644 --- a/src/main/resources/static/js/faStatistics/unlawfulFishing/statistics.js +++ b/src/main/resources/static/js/faStatistics/unlawfulFishing/statistics.js @@ -1,7 +1,15 @@ $(document).on('click', '.statTab', function (event){ - location.href = "/unlawfulFishing/statistics?type="+event.target.id.replace("Tab", ""); + getStatistics(event.target.id.replace("Tab", ""), null); }) +$(document).on('change', '#yearSelector', function (){ + getStatistics($(".nav-link.active")[0].id.replace("Tab", ""), this.value); +}) + +function getStatistics(tab, year){ + location.href = "/unlawfulFishing/statistics?type="+tab+(year!==null?"&year="+year:""); +} + $(document).on('click', '.type1Row', function (){ $('#statYear').val($(this).attr('data-year')); $('#statEtc').val($(this).find('.etc').text()) diff --git a/src/main/resources/templates/faStatistics/unlawfulFishing/statistics/statistics.html b/src/main/resources/templates/faStatistics/unlawfulFishing/statistics/statistics.html index f5ab2700..59bdee12 100644 --- a/src/main/resources/templates/faStatistics/unlawfulFishing/statistics/statistics.html +++ b/src/main/resources/templates/faStatistics/unlawfulFishing/statistics/statistics.html @@ -40,6 +40,17 @@
+
+
+
+ +
+
+
@@ -177,13 +188,50 @@ - + + + - - + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + +
구분나포(척)처리결과
담보금 납부담보금 미납 · 영해침범진행
소계퇴거집접인계기타소계인수위탁폐기기타