불법조업 외국어선 통계 관련 클레스 분리.
parent
87621984e6
commit
267f1c7b93
|
|
@ -3,8 +3,8 @@ package com.dbnt.faisp.main.faStatistics.unlawfulFishing;
|
||||||
import com.dbnt.faisp.main.authMgt.model.AccessConfig;
|
import com.dbnt.faisp.main.authMgt.model.AccessConfig;
|
||||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||||
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.ShipStatisticsEtc;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.ShipStatisticsEtc;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.StatisticsModel;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.StatisticsParam;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.UnlawfulFishingParam;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.UnlawfulFishingParam;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.*;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.*;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
||||||
|
|
@ -25,7 +25,6 @@ import org.springframework.web.servlet.ModelAndView;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -395,7 +394,7 @@ public class UnlawfulFishingController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, HttpSession session, StatisticsModel params){
|
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, HttpSession session, StatisticsParam params){
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/statistics/statistics");
|
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/statistics/statistics");
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/statistics?type=type1").get(0);
|
AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/statistics?type=type1").get(0);
|
||||||
|
|
@ -405,15 +404,15 @@ public class UnlawfulFishingController {
|
||||||
}
|
}
|
||||||
switch (params.getType()){
|
switch (params.getType()){
|
||||||
case "type1":
|
case "type1":
|
||||||
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType1(params));
|
mav.addObject("captureStatList", unlawfulFishingService.selectStatisticsListType1(params));
|
||||||
break;
|
break;
|
||||||
case "type2":
|
case "type2":
|
||||||
List<CodeMgt> cpoCode = ((Map<String, List<CodeMgt>>) session.getAttribute("commonCode")).get("CPO");
|
List<CodeMgt> cpoCode = ((Map<String, List<CodeMgt>>) session.getAttribute("commonCode")).get("CPO");
|
||||||
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType2(params, cpoCode));
|
mav.addObject("organStatList", unlawfulFishingService.selectStatisticsListType2(params, cpoCode));
|
||||||
mav.addObject("monthStatList", unlawfulFishingService.selectMonthStatList(params));
|
mav.addObject("monthStatList", unlawfulFishingService.selectMonthStatList(params));
|
||||||
break;
|
break;
|
||||||
case "type3":
|
case "type3":
|
||||||
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType3(params));
|
mav.addObject("processStatList", unlawfulFishingService.selectStatisticsListType3(params));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.mapper;
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.mapper;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.StatisticsModel;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.OrganStatistics;
|
||||||
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.CaptureStatistics;
|
||||||
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.ProcessStatistics;
|
||||||
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.StatisticsParam;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.UnlawfulFishingParam;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.UnlawfulFishingParam;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownInfo;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownInfo;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
||||||
|
|
@ -31,9 +34,9 @@ public interface UnlawfulFishingMapper {
|
||||||
|
|
||||||
Integer selectIllegalShipSailorListCnt(UnlawfulFishingParam params);
|
Integer selectIllegalShipSailorListCnt(UnlawfulFishingParam params);
|
||||||
|
|
||||||
List<StatisticsModel> selectStatisticsListType1(StatisticsModel params);
|
List<CaptureStatistics> selectStatisticsListType1(StatisticsParam params);
|
||||||
List<StatisticsModel> selectStatisticsListType2(StatisticsModel params);
|
List<OrganStatistics> selectStatisticsListType2(StatisticsParam params);
|
||||||
List<StatisticsModel> selectMonthStatList(StatisticsModel params);
|
List<OrganStatistics> selectMonthStatList(StatisticsParam params);
|
||||||
List<StatisticsModel> selectStatisticsListType3(StatisticsModel params);
|
List<ProcessStatistics> selectStatisticsListType3(StatisticsParam params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model;
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.faisp.config.BaseModel;
|
import com.dbnt.faisp.config.BaseModel;
|
||||||
|
|
@ -13,10 +13,9 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class StatisticsModel{
|
public class CaptureStatistics {
|
||||||
private String type;
|
private String type;
|
||||||
private Integer year;
|
private Integer year;
|
||||||
private Integer month;
|
|
||||||
|
|
||||||
private String yearStr="";
|
private String yearStr="";
|
||||||
private Integer captureCnt=0;
|
private Integer captureCnt=0;
|
||||||
|
|
@ -36,7 +35,4 @@ public class StatisticsModel{
|
||||||
private Integer disposeCnt=0;
|
private Integer disposeCnt=0;
|
||||||
private String etc="";
|
private String etc="";
|
||||||
|
|
||||||
private String fieldIvsgt;
|
|
||||||
private String crackdownPolice;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class OrganStatistics {
|
||||||
|
private String fieldIvsgt;
|
||||||
|
private String crackdownPolice;
|
||||||
|
private Integer month;
|
||||||
|
private Integer captureCnt=0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics;
|
||||||
|
|
||||||
|
public class ProcessStatistics {
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model;
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics;
|
||||||
|
|
||||||
import com.dbnt.faisp.config.BaseModel;
|
import com.dbnt.faisp.config.BaseModel;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StatisticsParam {
|
||||||
|
private String type;
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.ShipStatisticsEtc;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.ShipStatisticsEtc;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.asfCov.AsfCov;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
public interface ShipStatisticsEtcRepository extends JpaRepository<ShipStatisticsEtc, Integer> {
|
public interface ShipStatisticsEtcRepository extends JpaRepository<ShipStatisticsEtc, Integer> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.service;
|
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.service;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.ShipStatisticsEtc;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.*;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.StatisticsModel;
|
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.UnlawfulFishingParam;
|
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.*;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.*;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
|
||||||
|
|
@ -14,6 +12,7 @@ import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShip
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailorHistory;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailorHistory;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.Sailor;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.Sailor;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.mapper.UnlawfulFishingMapper;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.mapper.UnlawfulFishingMapper;
|
||||||
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.statistics.*;
|
||||||
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository.*;
|
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
@ -22,9 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|
@ -301,12 +298,12 @@ public class UnlawfulFishingService {
|
||||||
issRepository.bulkModifyingBySailorKeyToStatus(sailorKey, "DST008");
|
issRepository.bulkModifyingBySailorKeyToStatus(sailorKey, "DST008");
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StatisticsModel> selectStatisticsListType1(StatisticsModel params) {
|
public List<CaptureStatistics> selectStatisticsListType1(StatisticsParam params) {
|
||||||
List<StatisticsModel> statisticsList = new ArrayList<>();
|
List<CaptureStatistics> statisticsList = new ArrayList<>();
|
||||||
List<StatisticsModel> temp = unlawfulFishingMapper.selectStatisticsListType1(params);
|
List<CaptureStatistics> temp = unlawfulFishingMapper.selectStatisticsListType1(params);
|
||||||
StatisticsModel total = new StatisticsModel();
|
CaptureStatistics total = new CaptureStatistics();
|
||||||
total.setYearStr("총계");
|
total.setYearStr("총계");
|
||||||
for(StatisticsModel stat: temp){
|
for(CaptureStatistics stat: temp){
|
||||||
stat.setYearStr(stat.getYear().toString().substring(2)+"년");
|
stat.setYearStr(stat.getYear().toString().substring(2)+"년");
|
||||||
stat.setEezCnt(stat.getViolation1()+stat.getViolation21()+stat.getViolation22()+stat.getViolation3());
|
stat.setEezCnt(stat.getViolation1()+stat.getViolation21()+stat.getViolation22()+stat.getViolation3());
|
||||||
stat.setCaptureCnt(stat.getEezCnt()+stat.getViolation4());
|
stat.setCaptureCnt(stat.getEezCnt()+stat.getViolation4());
|
||||||
|
|
@ -330,18 +327,18 @@ public class UnlawfulFishingService {
|
||||||
statisticsList.addAll(temp);
|
statisticsList.addAll(temp);
|
||||||
return statisticsList;
|
return statisticsList;
|
||||||
}
|
}
|
||||||
public List<StatisticsModel> selectStatisticsListType2(StatisticsModel params, List<CodeMgt> cpoCode) {
|
public List<OrganStatistics> selectStatisticsListType2(StatisticsParam params, List<CodeMgt> cpoCode) {
|
||||||
List<StatisticsModel> statisticsList = unlawfulFishingMapper.selectStatisticsListType2(params);
|
List<OrganStatistics> statisticsList = unlawfulFishingMapper.selectStatisticsListType2(params);
|
||||||
|
|
||||||
StatisticsModel total = new StatisticsModel();
|
OrganStatistics total = new OrganStatistics();
|
||||||
StatisticsModel subTotalC = new StatisticsModel();
|
OrganStatistics subTotalC = new OrganStatistics();
|
||||||
subTotalC.setFieldIvsgt("C");
|
subTotalC.setFieldIvsgt("C");
|
||||||
StatisticsModel subTotalF = new StatisticsModel();
|
OrganStatistics subTotalF = new OrganStatistics();
|
||||||
subTotalF.setFieldIvsgt("F");
|
subTotalF.setFieldIvsgt("F");
|
||||||
|
|
||||||
List<StatisticsModel> organCaptureList = new ArrayList<>();
|
List<OrganStatistics> organCaptureList = new ArrayList<>();
|
||||||
for(CodeMgt cpo: cpoCode){
|
for(CodeMgt cpo: cpoCode){
|
||||||
StatisticsModel policeTotal = new StatisticsModel();
|
OrganStatistics policeTotal = new OrganStatistics();
|
||||||
policeTotal.setCrackdownPolice(cpo.getItemCd());
|
policeTotal.setCrackdownPolice(cpo.getItemCd());
|
||||||
organCaptureList.add(policeTotal);
|
organCaptureList.add(policeTotal);
|
||||||
}
|
}
|
||||||
|
|
@ -349,7 +346,7 @@ public class UnlawfulFishingService {
|
||||||
for(CodeMgt cpo: cpoCode){
|
for(CodeMgt cpo: cpoCode){
|
||||||
boolean cpoFlagC = false;
|
boolean cpoFlagC = false;
|
||||||
boolean cpoFlagF = false;
|
boolean cpoFlagF = false;
|
||||||
for(StatisticsModel stat: statisticsList){
|
for(OrganStatistics stat: statisticsList){
|
||||||
if(stat.getCrackdownPolice().equals(cpo.getItemCd())){
|
if(stat.getCrackdownPolice().equals(cpo.getItemCd())){
|
||||||
if(stat.getFieldIvsgt().equals("C"))
|
if(stat.getFieldIvsgt().equals("C"))
|
||||||
cpoFlagC = true;
|
cpoFlagC = true;
|
||||||
|
|
@ -358,26 +355,26 @@ public class UnlawfulFishingService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!cpoFlagC){
|
if(!cpoFlagC){
|
||||||
StatisticsModel temp = new StatisticsModel();
|
OrganStatistics temp = new OrganStatistics();
|
||||||
temp.setFieldIvsgt("C");
|
temp.setFieldIvsgt("C");
|
||||||
temp.setCrackdownPolice(cpo.getItemCd());
|
temp.setCrackdownPolice(cpo.getItemCd());
|
||||||
statisticsList.add(temp);
|
statisticsList.add(temp);
|
||||||
}
|
}
|
||||||
if(!cpoFlagF){
|
if(!cpoFlagF){
|
||||||
StatisticsModel temp = new StatisticsModel();
|
OrganStatistics temp = new OrganStatistics();
|
||||||
temp.setFieldIvsgt("F");
|
temp.setFieldIvsgt("F");
|
||||||
temp.setCrackdownPolice(cpo.getItemCd());
|
temp.setCrackdownPolice(cpo.getItemCd());
|
||||||
statisticsList.add(temp);
|
statisticsList.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(StatisticsModel stat: statisticsList){
|
for(OrganStatistics stat: statisticsList){
|
||||||
if(stat.getFieldIvsgt().equals("C")){
|
if(stat.getFieldIvsgt().equals("C")){
|
||||||
subTotalC.setCaptureCnt(subTotalC.getCaptureCnt()+stat.getCaptureCnt());
|
subTotalC.setCaptureCnt(subTotalC.getCaptureCnt()+stat.getCaptureCnt());
|
||||||
}else if(stat.getFieldIvsgt().equals("F")){
|
}else if(stat.getFieldIvsgt().equals("F")){
|
||||||
subTotalF.setCaptureCnt(subTotalF.getCaptureCnt()+stat.getCaptureCnt());
|
subTotalF.setCaptureCnt(subTotalF.getCaptureCnt()+stat.getCaptureCnt());
|
||||||
}
|
}
|
||||||
|
|
||||||
for(StatisticsModel organ: organCaptureList){
|
for(OrganStatistics organ: organCaptureList){
|
||||||
if(stat.getCrackdownPolice().equals(organ.getCrackdownPolice())){
|
if(stat.getCrackdownPolice().equals(organ.getCrackdownPolice())){
|
||||||
organ.setCaptureCnt(organ.getCaptureCnt()+stat.getCaptureCnt());
|
organ.setCaptureCnt(organ.getCaptureCnt()+stat.getCaptureCnt());
|
||||||
}
|
}
|
||||||
|
|
@ -393,32 +390,32 @@ public class UnlawfulFishingService {
|
||||||
return statisticsList;
|
return statisticsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StatisticsModel> selectMonthStatList(StatisticsModel params) {
|
public List<OrganStatistics> selectMonthStatList(StatisticsParam params) {
|
||||||
List<StatisticsModel> monthStatList = unlawfulFishingMapper.selectMonthStatList(params);
|
List<OrganStatistics> monthStatList = unlawfulFishingMapper.selectMonthStatList(params);
|
||||||
for(int i=1; i<=12; i++){
|
for(int i=1; i<=12; i++){
|
||||||
boolean monthFlag = false;
|
boolean monthFlag = false;
|
||||||
for(StatisticsModel monthStat: monthStatList){
|
for(OrganStatistics monthStat: monthStatList){
|
||||||
if(monthStat.getMonth().equals(i)){
|
if(monthStat.getMonth().equals(i)){
|
||||||
monthFlag = true;
|
monthFlag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!monthFlag){
|
if(!monthFlag){
|
||||||
StatisticsModel temp = new StatisticsModel();
|
OrganStatistics temp = new OrganStatistics();
|
||||||
temp.setMonth(i);
|
temp.setMonth(i);
|
||||||
monthStatList.add(temp);
|
monthStatList.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int totalCnt = 0;
|
int totalCnt = 0;
|
||||||
for(StatisticsModel monthStat: monthStatList){
|
for(OrganStatistics monthStat: monthStatList){
|
||||||
totalCnt += monthStat.getCaptureCnt();
|
totalCnt += monthStat.getCaptureCnt();
|
||||||
}
|
}
|
||||||
StatisticsModel total = new StatisticsModel();
|
OrganStatistics total = new OrganStatistics();
|
||||||
total.setCaptureCnt(totalCnt);
|
total.setCaptureCnt(totalCnt);
|
||||||
monthStatList.add(total);
|
monthStatList.add(total);
|
||||||
return monthStatList;
|
return monthStatList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StatisticsModel> selectStatisticsListType3(StatisticsModel params) {
|
public List<ProcessStatistics> selectStatisticsListType3(StatisticsParam params) {
|
||||||
return unlawfulFishingMapper.selectStatisticsListType3(params);
|
return unlawfulFishingMapper.selectStatisticsListType3(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,7 @@
|
||||||
</choose>
|
</choose>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectStatisticsListType1" parameterType="StatisticsModel" resultType="StatisticsModel">
|
<select id="selectStatisticsListType1" parameterType="StatisticsParam" resultType="CaptureStatistics">
|
||||||
select vt.year,
|
select vt.year,
|
||||||
violation_1,
|
violation_1,
|
||||||
violation_2_1,
|
violation_2_1,
|
||||||
|
|
@ -451,7 +451,7 @@
|
||||||
where vt.year <= ${year} and vt.year >= ${year}-5
|
where vt.year <= ${year} and vt.year >= ${year}-5
|
||||||
order by year desc
|
order by year desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStatisticsListType2" parameterType="StatisticsModel" resultType="StatisticsModel">
|
<select id="selectStatisticsListType2" parameterType="StatisticsParam" resultType="OrganStatistics">
|
||||||
select
|
select
|
||||||
a.field_ivsgt,
|
a.field_ivsgt,
|
||||||
a.crackdown_police,
|
a.crackdown_police,
|
||||||
|
|
@ -461,7 +461,7 @@
|
||||||
where EXTRACT(YEAR FROM a.napo_dt) = ${year}
|
where EXTRACT(YEAR FROM a.napo_dt) = ${year}
|
||||||
group by a.field_ivsgt, a.crackdown_police
|
group by a.field_ivsgt, a.crackdown_police
|
||||||
</select>
|
</select>
|
||||||
<select id="selectMonthStatList" parameterType="StatisticsModel" resultType="StatisticsModel">
|
<select id="selectMonthStatList" parameterType="StatisticsParam" resultType="OrganStatistics">
|
||||||
select
|
select
|
||||||
EXTRACT(MONTH FROM a.napo_dt) as month,
|
EXTRACT(MONTH FROM a.napo_dt) as month,
|
||||||
count(b.fb_key) as captureCnt
|
count(b.fb_key) as captureCnt
|
||||||
|
|
@ -470,6 +470,6 @@
|
||||||
where EXTRACT(YEAR FROM a.napo_dt) = ${year}
|
where EXTRACT(YEAR FROM a.napo_dt) = ${year}
|
||||||
group by month
|
group by month
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStatisticsListType3" parameterType="StatisticsModel" resultType="StatisticsModel">
|
<select id="selectStatisticsListType3" parameterType="StatisticsParam" resultType="ProcessStatistics">
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="align-middle text-center">
|
<tbody class="align-middle text-center">
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${captureStatList}">
|
||||||
<tr th:class="${stat.year ne null?'type1Row':''}" th:data-year="${stat.year}">
|
<tr th:class="${stat.year ne null?'type1Row':''}" th:data-year="${stat.year}">
|
||||||
<td th:text="${stat.yearStr}"></td>
|
<td th:text="${stat.yearStr}"></td>
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
|
|
@ -124,13 +124,13 @@
|
||||||
<tbody class="text-center">
|
<tbody class="text-center">
|
||||||
<tr>
|
<tr>
|
||||||
<td>나포척수</td>
|
<td>나포척수</td>
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq null}">
|
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq null}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.fieldIvsgt eq null}">
|
<th:block th:if="${stat.fieldIvsgt eq null}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
|
|
@ -141,13 +141,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>현장조사</td>
|
<td>현장조사</td>
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq 'F'}">
|
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq 'F'}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.fieldIvsgt eq 'F'}">
|
<th:block th:if="${stat.fieldIvsgt eq 'F'}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
|
|
@ -158,13 +158,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>압송(위탁)</td>
|
<td>압송(위탁)</td>
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq 'C'}">
|
<th:block th:if="${stat.crackdownPolice eq null and stat.fieldIvsgt eq 'C'}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
<th:block th:each="code:${session.commonCode.get('CPO')}">
|
||||||
<th:block th:each="stat:${statisticsList}">
|
<th:block th:each="stat:${organStatList}">
|
||||||
<th:block th:if="${stat.fieldIvsgt eq 'C'}">
|
<th:block th:if="${stat.fieldIvsgt eq 'C'}">
|
||||||
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
<th:block th:if="${stat.crackdownPolice eq code.itemCd}">
|
||||||
<td th:text="${stat.captureCnt}"></td>
|
<td th:text="${stat.captureCnt}"></td>
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</th:block>
|
</th:block>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue