외국어선 단속현황 수정중.

master
강석 최 2023-02-02 18:25:01 +09:00
parent 30d990af65
commit 7ee3372268
11 changed files with 558 additions and 664 deletions

View File

@ -1,12 +1,15 @@
package com.dbnt.faisp.config; package com.dbnt.faisp.config;
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.FishingBoatRepository; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.FishingBoatRepository;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ProcessResultRepository; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ProcessResultRepository;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.SailorRepository; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.SailorRepository;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ViolationRepository; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ViolationRepository;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.CrackdownStatusService; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.CrackdownStatusService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.FishingBoatService;
import com.dbnt.faisp.main.menuMgt.model.MenuMgt; import com.dbnt.faisp.main.menuMgt.model.MenuMgt;
import com.dbnt.faisp.main.menuMgt.service.MenuMgtService; import com.dbnt.faisp.main.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@ -29,11 +33,7 @@ public class ModalController {
private final MenuMgtService menuMgtService; private final MenuMgtService menuMgtService;
private final UserInfoService userInfoService; private final UserInfoService userInfoService;
private final CodeMgtService codeMgtService; private final CodeMgtService codeMgtService;
private final CrackdownStatusService crackdownStatusService; private final FishingBoatService fishingBoatService;
private final ViolationRepository violationRepository;
private final ProcessResultRepository processResultRepository;
private final FishingBoatRepository fishingBoatRepository;
private final SailorRepository sailorRepository;
@GetMapping("/menuModal") @GetMapping("/menuModal")
public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){ public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){
@ -65,21 +65,18 @@ public class ModalController {
} }
@GetMapping("/crackdownStatusModal") @GetMapping("/crackdownStatusModal")
public ModelAndView crackdownStatusModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){ public ModelAndView crackdownStatusModal(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){
ModelAndView mav = new ModelAndView("common/modal/crackdownStatusModal"); ModelAndView mav = new ModelAndView("common/modal/crackdownStatusModal");
crackdownStatus.setQueryInfo(); if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear());
List<CrackdownStatus> crackdownList = crackdownStatusService.selectCrackdownStatusList(crackdownStatus);
for (CrackdownStatus cds: crackdownList) {
cds.setViolationList(violationRepository.findByFbKey(cds.getFbKey()));
cds.setProcessResult(processResultRepository.findByCdsKey(cds.getCdsKey()).orElse(null));
cds.setFishingBoat(fishingBoatRepository.findByCdsKey(cds.getCdsKey()).orElse(null));
cds.setSailorList(sailorRepository.findByFbKey(cds.getFbKey()));
} }
mav.addObject("crackdownList", crackdownList); List<Integer> yearList = fishingBoatService.selectFishingBoatYearParam(params);
crackdownStatus.setContentCnt(crackdownStatusService.selectCrackdownStatusListCnt(crackdownStatus)); if(!yearList.contains(params.getYear())){
crackdownStatus.setPaginationInfo(); yearList.add(params.getYear());
mav.addObject("searchParams", crackdownStatus); }
mav.addObject("crackdownStatusList", fishingBoatService.selectCrackdownStatusList(params));
mav.addObject("yearList", yearList);
mav.addObject("searchParams", params);
return mav; return mav;
} }
} }

View File

@ -2,6 +2,7 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus;
import com.dbnt.faisp.main.authMgt.service.AuthMgtService; import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult;
@ -31,26 +32,6 @@ public class CrackdownStatusController {
private final FishingBoatRepository fishingBoatRepository; private final FishingBoatRepository fishingBoatRepository;
private final SailorRepository sailorRepository; private final SailorRepository sailorRepository;
@RequestMapping("/crackdownStatus")
public ModelAndView crackdownStatus(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus) {
ModelAndView mav = new ModelAndView("faStatistics/crackdownStatus/crackdownStatus");
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/crackdownStatus").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
crackdownStatus.setYear(((Integer)LocalDateTime.now().getYear()).toString());
List<CrackdownStatus> crackdownStatusList = crackdownStatusService.selectCrackdownStatusList(crackdownStatus);
for (CrackdownStatus cds:crackdownStatusList) {
cds.setViolationList(violationRepository.findByFbKey(cds.getFbKey()));
cds.setProcessResult(processResultRepository.findByCdsKey(cds.getCdsKey()).orElse(new ProcessResult()));
cds.setFishingBoat(fishingBoatRepository.findByCdsKey(cds.getCdsKey()).orElse(new FishingBoat()));
cds.setSailorList(sailorRepository.findByFbKey(cds.getFbKey()));
}
mav.addObject("crackdownStatusList", crackdownStatusList);
mav.addObject("searchParams", crackdownStatus);
return mav;
}
@GetMapping("/crackdownStatus/crackdownStatusViewModal") @GetMapping("/crackdownStatus/crackdownStatusViewModal")
public ModelAndView crackdownStatusViewModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){ public ModelAndView crackdownStatusViewModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){

View File

@ -4,6 +4,7 @@ import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult;
@ -40,11 +41,30 @@ public class FishingBoatController {
mav.addObject("accessAuth", accessAuth); mav.addObject("accessAuth", accessAuth);
params.setQueryInfo(); params.setQueryInfo();
List<CrackdownStatus> crackdownStatusList = fishingBoatService.selectFishingBoatList(params); if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear());
}
List<Integer> yearList = fishingBoatService.selectFishingBoatYearParam(params);
if(!yearList.contains(params.getYear())){
yearList.add(params.getYear());
}
List<CrackdownStatus> crackdownStatusList = fishingBoatService.selectFishingBoatList(params);
mav.addObject("crackdownStatusList", crackdownStatusList); mav.addObject("crackdownStatusList", crackdownStatusList);
params.setContentCnt(fishingBoatService.selectFishingBoatListCnt(params)); params.setContentCnt(fishingBoatService.selectFishingBoatListCnt(params));
params.setPaginationInfo(); params.setPaginationInfo();
mav.addObject("yearList", yearList);
mav.addObject("deadlineState", menuMgtService.selectDeadlineChk("/faStatistics/fishingBoat"));
mav.addObject("searchParams", params);
return mav;
}
@RequestMapping("/crackdownStatus")
public ModelAndView crackdownStatus(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params) {
ModelAndView mav = new ModelAndView("faStatistics/crackdownStatus/crackdownStatus");
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/crackdownStatus").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
if(params.getYear()==null){ if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear()); params.setYear(LocalDateTime.now().getYear());
@ -53,8 +73,8 @@ public class FishingBoatController {
if(!yearList.contains(params.getYear())){ if(!yearList.contains(params.getYear())){
yearList.add(params.getYear()); yearList.add(params.getYear());
} }
mav.addObject("crackdownStatusList", fishingBoatService.selectCrackdownStatusList(params));
mav.addObject("yearList", yearList); mav.addObject("yearList", yearList);
mav.addObject("deadlineState", menuMgtService.selectDeadlineChk("/faStatistics/fishingBoat"));
mav.addObject("searchParams", params); mav.addObject("searchParams", params);
return mav; return mav;
} }

View File

@ -2,6 +2,7 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion;
@ -12,8 +13,8 @@ import java.util.List;
@Mapper @Mapper
public interface CrackdownStatusMapper { public interface CrackdownStatusMapper {
List<CrackdownStatus> selectCrackdownStatusList(CrackdownStatus crackdownStatus); List<CrackdownStatusDTO> selectCrackdownStatusList(UnlawfulFishingParam params);
Integer selectCrackdownStatusListCnt(CrackdownStatus crackdownStatus); Integer selectCrackdownStatusListCnt(UnlawfulFishingParam params);
List<CrackdownStatus> selectFishingBoatList(UnlawfulFishingParam params); List<CrackdownStatus> selectFishingBoatList(UnlawfulFishingParam params);
Integer selectFishingBoatListCnt(UnlawfulFishingParam params); Integer selectFishingBoatListCnt(UnlawfulFishingParam params);

View File

@ -12,7 +12,9 @@ import java.util.List;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
public class UnlawfulFishingParam extends BaseModel { public class UnlawfulFishingParam extends BaseModel {
private Integer year; private Integer year;
private Integer month;
private String caseAgency; private String caseAgency;
private String crackdownPolice; private String crackdownPolice;
private String crackdownBoat; private String crackdownBoat;
@ -26,4 +28,40 @@ public class UnlawfulFishingParam extends BaseModel {
private List<String> violationList; private List<String> violationList;
private String processStatus; private String processStatus;
private String napoSeaPointDetail;
private String nll;
private String mmsi;
private String distance;
private String isDamboUnpaidAmount;
private String isEvictionDt;
private String isReturnDt;
private String isConsignmentStartDt;
private String isConfiscationDt;
private String boatDisposalType;
private String isDirectHandoverDt;
private String handoverSeaPointDetail;
private String handoverBoat;
private String middleTakeoverBoat;
private String sailorNameKr;
private String catchFishSpecies;
private String offenseFishSpecies;
private String confiscationFrame;
private String confiscationWidth;
private String confiscationJo;
private String confiscationGae;
private String confiscationEtc;
private String obstrExspdCnt;
private String personDamageCnt;
private String personDamageAmount;
private String personDamageDetail;
private String materialDamageCnt;
private String materialDamageAmount;
private String materialDamageDetail;
private String captainRestriction;
private String navigaterRestriction;
private String engineerRestriction;
private String ownerRestriction;
private String seniorRestriction;
private String normalRestriction;
} }

View File

@ -0,0 +1,113 @@
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus;
import com.dbnt.faisp.config.BaseModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Getter
@Setter
@NoArgsConstructor
public class CrackdownStatusDTO extends BaseModel {
private Integer cdsKey;
private String status;
private String caseNum;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime napoDt;
private String violationStr;
private String violationCode;
private String napoSeaPointLon;
private String napoSeaPointLat;
private String napoSeaPointDetail;
private String nll;
private Integer obstrExspdCnt;
private Integer personDamageCnt;
private Integer personDamageAmount;
private String personDamageDetail;
private Integer materialDamageCnt;
private Integer materialDamageAmount;
private String materialDamageDetail;
private String caseAgency;
private String crackdownPolice;
private String crackdownBoat;
private String mmsi;
private String boatNameKr;
private Double tonCnt;
private Integer sailorCnt;
private String boatMaterial;
private String boatNnySung;
private String boatNnySi;
private String captainName;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate captainBirthDate;
private String fisheryType;
private String catchFishSpecies;
private Double catchCnt;
private String offenseType;
private Double offenseWeight;
private Double offenseQuantity;
private Double offenseAmount;
private Double offenseIllegalWasteQuantity;
private String processStatus;
private Double damboUnpaidAmount;
private Double damboPayment;
private LocalDate paymentPaymentDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate consignmentStartDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate consignmentEndDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate evictionDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate directHandoverDt;
private String boatDisposalType;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate exileDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate returnDt;
private String handoverSeaPointLon;
private String handoverSeaPointLat;
private String handoverSeaPointDetail;
private String handoverBoat;
private String middleTakeoverBoat;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate confiscationDt;
private Integer captainRestriction;
private Integer navigaterRestriction;
private Integer engineerRestriction;
private Integer ownerRestriction;
private Integer seniorRestriction;
private Integer normalRestriction;
private Integer captainRestrictionNot;
private Integer navigaterRestrictionNot;
private Integer engineerRestrictionNot;
private Integer ownerRestrictionNot;
private Integer seniorRestrictionNot;
private Integer normalRestrictionNot;
private String fieldIvsgt;
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm")
private LocalDateTime releaseDt;
private String fieldIvsgtDayHour;
private String pressurizedTimeTaken;
private String distance;
private String warrantReqTakeTime;
private String confiscationFrame;
private String confiscationWidth;
private String confiscationJo;
private String confiscationGae;
private String confiscationEtc;
private String wrtOrgan;
private String wrtPart;
private Integer wrtUserSeq;
private String wrtUserGrd;
private String wrtUserNm;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt;
}

View File

@ -48,9 +48,9 @@ public class FishingBoatBaseEntity extends BaseModel {
@Column(name = "offense_illegal_waste_quantity") @Column(name = "offense_illegal_waste_quantity")
private Integer offenseIllegalWasteQuantity=0; private Integer offenseIllegalWasteQuantity=0;
@Column(name = "dambo_unpaid_amount") @Column(name = "dambo_unpaid_amount")
private Integer damboUnpaidAmount=0; private Double damboUnpaidAmount=0d;
@Column(name = "dambo_payment") @Column(name = "dambo_payment")
private Integer damboPayment=0; private Double damboPayment=0d;
@Column(name = "payment_payment_dt") @Column(name = "payment_payment_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime paymentPaymentDt; private LocalDateTime paymentPaymentDt;

View File

@ -4,6 +4,7 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.service;
import com.dbnt.faisp.config.BaseService; import com.dbnt.faisp.config.BaseService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResultVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResultVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.Sailor; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.Sailor;
@ -28,13 +29,6 @@ public class CrackdownStatusService extends BaseService {
private final ProcessResultRepository processResultRepository; private final ProcessResultRepository processResultRepository;
private final SailorRepository sailorRepository; private final SailorRepository sailorRepository;
public List<CrackdownStatus> selectCrackdownStatusList(CrackdownStatus crackdownStatus) {
return crackdownStatusMapper.selectCrackdownStatusList(crackdownStatus);
};
public Integer selectCrackdownStatusListCnt(CrackdownStatus crackdownStatus) {
return crackdownStatusMapper.selectCrackdownStatusListCnt(crackdownStatus);
}
public CrackdownStatus selectCrackdownStatus(Integer cdsKey) { public CrackdownStatus selectCrackdownStatus(Integer cdsKey) {
CrackdownStatus savedCrackdownStatus = crackdownStatusRepository.findById(cdsKey).orElse(null); CrackdownStatus savedCrackdownStatus = crackdownStatusRepository.findById(cdsKey).orElse(null);

View File

@ -5,6 +5,7 @@ import com.dbnt.faisp.config.BaseService;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.UnlawfulFishingParam;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusDTO;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation;
@ -40,6 +41,14 @@ public class FishingBoatService extends BaseService {
return crackdownStatusMapper.selectFishingBoatListCnt(params); return crackdownStatusMapper.selectFishingBoatListCnt(params);
} }
public List<CrackdownStatusDTO> selectCrackdownStatusList(UnlawfulFishingParam params) {
return crackdownStatusMapper.selectCrackdownStatusList(params);
};
public Integer selectCrackdownStatusListCnt(UnlawfulFishingParam params) {
return crackdownStatusMapper.selectCrackdownStatusListCnt(params);
}
public List<Integer> selectFishingBoatYearParam(UnlawfulFishingParam params) { public List<Integer> selectFishingBoatYearParam(UnlawfulFishingParam params) {
return crackdownStatusMapper.selectFishingBoatYearParam(params); return crackdownStatusMapper.selectFishingBoatYearParam(params);
} }

View File

@ -4,373 +4,174 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper"> <mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper">
<sql id="selectCrackdownStatusListWhere"> <sql id="selectCrackdownStatusListWhere">
<where> <where>
<if test='year != null and year != ""'> <if test='year != null and year != ""'>
And EXTRACT(YEAR FROM pr.wrt_dt) = #{year}::NUMERIC and extract(year from a.napo_dt) = #{year}::numeric
</if> </if>
<if test='month != null and month != ""'> <if test='month != null and month != ""'>
And EXTRACT(MONTH FROM pr.wrt_dt) = #{month}::NUMERIC and extract(month from a.napo_dt) = #{month}::numeric
</if> </if>
<if test='caseNum != null and caseNum != ""'> </where>
AND case_num = #{caseNum} </sql>
</if>
<if test='nll != null and nll != ""'>
AND nll = #{nll}
</if>
<if test='napoDate != null'>
AND napo_dt::DATE = #{napoDate}::DATE
</if>
<if test='violation != null and violation != ""'>
AND violation = #{violation}
</if>
<if test='invasionType != null and invasionType != ""'>
AND invasion_type = #{invasionType}
</if>
<if test='napoSeaPointDetail != null and napoSeaPointDetail != ""'>
AND (
napo_sea_point_detail LIKE CONCAT('%', #{napoSeaPointDetail}, '%')
OR napo_sea_point_lon LIKE CONCAT('%', #{napoSeaPointDetail}, '%')
OR napo_sea_point_lat LIKE CONCAT('%', #{napoSeaPointDetail}, '%')
)
</if>
<if test='obstrExspdCnt != null and obstrExspdCnt != ""'>
AND obstr_exspd_cnt = #{obstrExspdCnt}
</if>
<if test='personDamageCnt != null and personDamageCnt != ""'>
AND person_damage_cnt = #{personDamageCnt}
</if>
<if test='personDamageAmount != null and personDamageAmount != ""'>
AND person_damage_amount = #{personDamageAmount}
</if>
<if test='personDamageDetail != null and personDamageDetail != ""'>
AND person_damage_detail LIKE CONCAT('%', #{personDamageDetail}, '%')
</if>
<if test='materialDamageCnt != null and materialDamageCnt != ""'>
AND material_damage_cnt = #{materialDamageCnt}
</if>
<if test='materialDamageAmount != null and materialDamageAmount != ""'>
AND material_damage_amount = #{materialDamageAmount}
</if>
<if test='materialDamageDetail != null and materialDamageDetail != ""'>
AND material_damage_detail LIKE CONCAT('%', #{materialDamageDetail}, '%')
</if>
<if test='caseAgency != null and caseAgency != ""'>
AND case_agency = #{caseAgency}
</if>
<if test='crackdownPolice != null and crackdownPolice != ""'>
AND crackdown_police = #{crackdownPolice}
</if>
<if test='crackdownBoat != null and crackdownBoat != ""'>
AND crackdown_boat = #{crackdownBoat}
</if>
<if test='mmsi != null and mmsi != ""'>
AND mmsi LIKE CONCAT('%', #{mmsi}, '%')
</if>
<if test='boatNameKr != null and boatNameKr != ""'>
AND boat_name_kr LIKE CONCAT('%', #{boatNameKr}, '%')
</if>
<if test='tonStartCnt != null and tonStartCnt != ""'>
AND ton_cnt <![CDATA[>=]]> #{tonStartCnt}
</if>
<if test='tonEndCnt != null and tonEndCnt != ""'>
AND ton_cnt <![CDATA[<=]]> #{tonEndCnt}
</if>
<if test='boatMaterial != null and boatMaterial != ""'>
AND boat_material = #{boatMaterial}
</if>
<if test='boatNnySung != null and boatNnySung != ""'>
AND boat_nny_sung LIKE CONCAT('%', #{boatNnySung}, '%')
</if>
<if test='boatNnySi != null and boatNnySi != ""'>
AND boat_nny_si LIKE CONCAT('%', #{boatNnySi}, '%')
</if>
<if test='sailorNameKr != null and sailorNameKr != ""'>
AND sailor_name_kr LIKE CONCAT('%', #{sailorNameKr}, '%')
</if>
<if test='fisheryType != null and fisheryType != ""'>
AND fishery_type = #{fisheryType}
</if>
<if test='catchFishSpecies != null and catchFishSpecies != ""'>
AND catch_fish_species LIKE CONCAT('%', #{catchFishSpecies}, '%')
</if>
<if test='catchCnt != null and catchCnt != ""'>
AND catch_cnt = #{catchCnt}
</if>
<if test='offenseFishSpecies != null and offenseFishSpecies != ""'>
AND offense_fish_species LIKE CONCAT('%', #{offenseFishSpecies}, '%')
</if>
<if test='offenseCatchCnt != null and offenseCatchCnt != ""'>
AND offense_catch_cnt = #{offenseCatchCnt}
</if>
<if test='offenseIllegalWasteQuantity != null and offenseIllegalWasteQuantity != ""'>
AND offense_illegal_waste_quantity = #{offenseIllegalWasteQuantity}
</if>
<if test='offenseQuantity != null and offenseQuantity != ""'>
AND offense_quantity = #{offenseQuantity}
</if>
<if test='offenseAmount != null and offenseAmount != ""'>
AND offense_amount = #{offenseAmount}
</if>
<if test='processStatus != null and processStatus != ""'>
AND process_status = #{processStatus}
</if>
<if test='damboPayment != null and damboPayment != ""'>
AND dambo_payment = #{damboPayment}
</if>
<if test='paymentPaymentDate != null'>
AND payment_payment_dt::DATE = #{paymentPaymentDate}::DATE
</if>
<if test='damboUnpaidAmount != null and damboUnpaidAmount != ""'>
AND dambo_unpaid_amount = #{damboUnpaidAmount}
</if>
<if test='isDamboUnpaidAmount != null and isDamboUnpaidAmount != ""'>
<if test='isDamboUnpaidAmount == "Y"'>
AND (
dambo_unpaid_amount IS NOT NULL
AND dambo_unpaid_amount > 0
)
</if>
<if test='isDamboUnpaidAmount == "N"'>
AND (
direct_handover_dt IS NULL
OR dambo_unpaid_amount = 0
)
</if>
</if>
<if test='isDirectHandoverDt != null and isDirectHandoverDt != ""'>
<if test='isDirectHandoverDt == "Y"'>
AND direct_handover_dt IS NOT NULL
</if>
<if test='isDirectHandoverDt == "N"'>
AND direct_handover_dt IS NULL
</if>
</if>
<!--<if test='evictionDt != null'>
AND eviction_dt = #{evictionDt}::DATE
</if>-->
<if test='isEvictionDt != null and isEvictionDt != ""'>
<if test='isEvictionDt == "Y"'>
AND eviction_dt IS NOT NULL
</if>
<if test='isEvictionDt == "N"'>
AND eviction_dt IS NULL
</if>
</if>
<!--<if test='returnDt != null'>
AND return_dt = #{returnDt}::DATE
</if>-->
<if test='isReturnDt != null and isReturnDt != ""'>
<if test='isReturnDt == "Y"'>
AND return_dt IS NOT NULL
</if>
<if test='isReturnDt == "N"'>
AND return_dt IS NULL
</if>
</if>
<if test='consignmentStartDate != null'>
AND consignment_start_dt = #{consignmentStartDate}::DATE
</if>
<if test='consignmentEndDate != null'>
AND consignment_end_dt = #{consignmentEndDate}::DATE
</if>
<!--<if test='confiscationDt != null'>
AND confiscation_dt = #{confiscationDt}::DATE
</if>-->
<if test='isConfiscationDt != null and isConfiscationDt != ""'>
<if test='isConfiscationDt == "Y"'>
AND confiscation_dt IS NOT NULL
</if>
<if test='isConfiscationDt == "N"'>
AND confiscation_dt IS NULL
</if>
</if>
<if test='isConsignmentStartDt != null and isConsignmentStartDt != ""'>
<if test='isConsignmentStartDt == "Y"'>
AND consignment_start_dt IS NOT NULL
</if>
<if test='isConsignmentStartDt == "N"'>
AND consignment_start_dt IS NULL
</if>
</if>
<!--<if test='isBoatDisposal != null'>
AND boat_disposal_dt = #{boatDisposalDt}::DATE
</if>-->
<if test='boatDisposalType != null and boatDisposalType != ""'>
AND boat_disposal_type = #{boatDisposalType}
</if>
<if test='directHandoverDate != null'>
AND direct_handover_dt::DATE = #{directHandoverDate}::DATE
</if>
<if test='handoverSeaPointDetail != null and handoverSeaPointDetail != ""'>
AND (
handover_sea_point_lat LIKE CONCAT('%', #{handoverSeaPointDetail}, '%')
OR handover_sea_point_lon LIKE CONCAT('%', #{handoverSeaPointDetail}, '%')
OR handover_sea_point_detail LIKE CONCAT('%', #{handoverSeaPointDetail}, '%')
)
</if>
<if test='handoverBoat != null and handoverBoat != ""'>
AND handover_boat LIKE CONCAT('%', #{handoverBoat}, '%')
</if>
<if test='middleTakeoverBoat != null and middleTakeoverBoat != ""'>
AND middle_takeover_boat LIKE CONCAT('%', #{middleTakeoverBoat}, '%')
</if>
<if test='captin != null and captin != ""'>
AND (
position = 'POS001'
AND is_restriction = #{captin}
)
</if>
<if test='mate != null and mate != ""'>
AND (
position = 'POS002'
AND is_restriction = #{mate}
)
</if>
<if test='warden != null and warden != ""'>
AND (
position = 'POS003'
AND is_restriction = #{warden}
)
</if>
<if test='fieldIvsgtNapoDate != null'>
AND field_ivsgt_napo_dt::DATE = #{fieldIvsgtNapoDate}::DATE
</if>
<if test='fieldIvsgtReleaseDate != null'>
AND field_ivsgt_release_dt::DATE = #{fieldIvsgtReleaseDate}::DATE
</if>
<!--<if test='pressurizedStartDt != null'>
AND pressurizedStartDt = #{pressurizedStartDt}::DATE
</if>
<if test='pressurizedEndDt != null'>
AND pressurizedEndDt = #{pressurizedEndDt}::DATE
</if>-->
<if test='distance != null and distance != ""'>
AND distance = #{distance}
</if>
<if test='confiscationFrame != null and confiscationFrame != ""'>
AND confiscation_frame = #{confiscationFrame}
</if>
<if test='confiscationWidth != null and confiscationWidth != ""'>
AND confiscation_width = #{confiscationWidth}
</if>
<if test='confiscationJo != null and confiscationJo != ""'>
AND confiscation_jo = #{confiscationJo}
</if>
<if test='confiscationGae != null and confiscationGae != ""'>
AND confiscation_gae = #{confiscationGae}
</if>
<if test='confiscationEtc != null and confiscationEtc != ""'>
AND confiscation_etc = #{confiscationEtc}
</if>
</where>
</sql>
<select id="selectCrackdownStatusList" resultType="CrackdownStatus" parameterType="CrackdownStatus"> <select id="selectCrackdownStatusList" resultType="CrackdownStatusDTO" parameterType="UnlawfulFishingParam">
SELECT DISTINCT select a.cds_key,
cs.cds_key a.status,
, cs.case_num a.napo_dt,
, cs.napo_dt f.violationStr,
, cs.napo_sea_point_lon a.napo_sea_point_lon,
, cs.napo_sea_point_lat a.napo_sea_point_lat,
, cs.napo_sea_point_detail a.napo_sea_point_detail,
, cs.invasion_type f.violationCode,
, cs.nll a.nll,
, cs.case_agency a.obstr_exspd_cnt ,
, cs.case_police_officer a.person_damage_cnt ,
, cs.crackdown_boat a.person_damage_amount ,
, cs.crackdown_police a.person_damage_detail ,
, cs.mmsi a.material_damage_cnt ,
, cs.field_ivsgt a.material_damage_amount ,
, cs.obstr_exspd_cnt a.material_damage_detail ,
, cs.person_damage_cnt a.case_agency ,
, cs.person_damage_amount a.crackdown_police ,
, cs.person_damage_detail a.crackdown_boat ,
, cs.material_damage_cnt a.mmsi ,
, cs.material_damage_amount c.boat_name_kr ,
, cs.material_damage_detail c.ton_cnt ,
, cs.field_ivsgt_napo_dt c.sailor_cnt,
, cs.field_ivsgt_release_dt c.boat_material ,
, cs.field_ivsgt_time_taken c.boat_nny_sung ,
, cs.pressurized_start_dt c.boat_nny_si ,
, cs.pressurized_end_dt d.sailor_name_kr as captainName,
, cs.distance d.birthdate as captainBirthDate,
, cs.wrt_organ c.fishery_type ,
, cs.wrt_user_seq c.catch_fish_species ,
, cs.wrt_user_nm c.catch_cnt ,
, cs.wrt_dt c.offense_type ,
, fb.fb_key c.offense_weight ,
, fb.boat_name_kr c.offense_quantity ,
, fb.boat_name_cn c.offense_amount ,
, fb.ton_cnt c.offense_illegal_waste_quantity ,
, fb.fishery_type b.process_status ,
, fb.boat_material c.dambo_unpaid_amount ,
, fb.boat_nny_sung c.dambo_payment ,
, fb.boat_nny_si c.payment_payment_dt ,
, fb.offense_quantity b.consignment_start_dt ,
, fb.offense_amount b.consignment_end_dt ,
, fb.offense_illegal_waste_quantity b.eviction_dt ,
, fb.dambo_unpaid_amount b.direct_handover_dt ,
, fb.dambo_payment b.boat_disposal_type ,
, fb.payment_payment_dt b.exile_dt ,
, fb.confiscation_frame b.return_dt ,
, fb.confiscation_width b.handover_sea_point_lon ,
, fb.confiscation_jo b.handover_sea_point_lat ,
, fb.confiscation_gae b.handover_sea_point_detail ,
, fb.confiscation_etc b.handover_boat ,
, fb.catch_fish_species b.middle_takeover_boat ,
, fb.catch_cnt b.confiscation_dt,
, fb.offense_fish_species coalesce(e.captainRestriction, 0) as captainRestriction,
, fb.offense_catch_cnt coalesce(e.navigaterRestriction, 0) as navigaterRestriction,
, fb.status coalesce(e.engineerRestriction, 0) as engineerRestriction,
, pr.pr_key coalesce(e.ownerRestriction, 0) as ownerRestriction,
, pr.process_status coalesce(e.seniorRestriction, 0) as seniorRestriction,
, pr.eviction_dt coalesce(e.normalRestriction, 0) as normalRestriction,
, pr.direct_handover_dt coalesce(e.captainRestrictionNot, 0) as captainRestrictionNot,
, pr.handover_sea_point_lon coalesce(e.navigaterRestrictionNot, 0) as navigaterRestrictionNot,
, pr.handover_sea_point_lat coalesce(e.engineerRestrictionNot, 0) as engineerRestrictionNot,
, pr.handover_sea_point_detail coalesce(e.ownerRestrictionNot, 0) as ownerRestrictionNot,
, pr.handover_boat coalesce(e.seniorRestrictionNot, 0) as seniorRestrictionNot,
, pr.middle_takeover_boat coalesce(e.normalRestrictionNot, 0) as normalRestrictionNot,
, pr.consignment_start_dt a.field_ivsgt,
, pr.consignment_end_dt b.release_dt ,
, pr.confiscation_dt date_part('DAY', b.release_dt-a.napo_dt)||'일'||date_part('HOUR', b.release_dt-a.napo_dt)||'시간' as fieldIvsgtDayHour,
, pr.boat_disposal_dt b.pressurized_time_taken ,
, pr.boat_disposal_type a.distance ,
, pr.return_dt b.warrant_req_take_time ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'Y' AND s.position != 'POS004') AS restrictionTotal c.confiscation_frame ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'N' AND s.position != 'POS004') AS notRestrictionTotal c.confiscation_width ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS001' AND s.is_restriction = 'Y') AS restrictionCaptin c.confiscation_jo ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS001' AND s.is_restriction = 'N') AS notRestrictionCaptin c.confiscation_gae ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS002' AND s.is_restriction = 'Y') AS restrictionMate c.confiscation_etc,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS003' AND s.is_restriction = 'Y') AS restrictionWarden a.wrt_organ,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS002' AND s.is_restriction = 'N') AS notRestrictionMate a.wrt_part,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS003' AND s.is_restriction = 'N') AS notRestrictionWarden a.wrt_user_seq,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'Y' AND (s.position = 'POS005' or s."position" = 'POS006')) AS restrictionSailor a.wrt_user_grd,
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'N' AND (s.position = 'POS005' or s."position" = 'POS006')) AS notRestrictionSailor a.wrt_user_nm,
FROM crackdown_status cs a.wrt_dt
INNER JOIN fishing_boat fb from crackdown_status a
ON cs.cds_key = fb.cds_key inner join process_result b
INNER JOIN process_result pr on a.cds_key = b.cds_key
ON cs.cds_key = pr.cds_key inner join fishing_boat c
LEFT JOIN sailor s on a.cds_key = c.cds_key
ON fb.fb_key = s.fb_key left outer join sailor d
LEFT JOIN violation v on c.fb_key = d.fb_key and d.position = 'POS001'
ON fb.fb_key = v.fb_key left outer join (
select fb_key,
sum(case when ab.item_cd = 'POS001' and is_restriction = 'Y' then 1 end) as captainRestriction,
sum(case when ab.item_cd = 'POS001' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as captainRestrictionNot,
sum(case when ab.item_cd = 'POS002' and is_restriction = 'Y' then 1 end) as navigaterRestriction,
sum(case when ab.item_cd = 'POS002' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as navigaterRestrictionNot,
sum(case when ab.item_cd = 'POS003' and is_restriction = 'Y' then 1 end) as engineerRestriction,
sum(case when ab.item_cd = 'POS003' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as engineerRestrictionNot,
sum(case when ab.item_cd = 'POS004' and is_restriction = 'Y' then 1 end) as ownerRestriction,
sum(case when ab.item_cd = 'POS004' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as ownerRestrictionNot,
sum(case when ab.item_cd = 'POS005' and is_restriction = 'Y' then 1 end) as seniorRestriction,
sum(case when ab.item_cd = 'POS005' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as seniorRestrictionNot,
sum(case when ab.item_cd = 'POS006' and is_restriction = 'Y' then 1 end) as normalRestriction,
sum(case when ab.item_cd = 'POS006' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as normalRestrictionNot
from sailor aa left outer join code_mgt ab on aa.position = ab.item_cd
group by fb_key
) e on c.fb_key = e.fb_key
left outer join (
select aa.fb_key,
array_to_string(array_agg(ab.item_value), ', ') as violationStr,
array_to_string(array_agg(ab.item_cd), ', ') as violationCode
from violation aa
inner join code_mgt ab
on aa.violation = ab.item_cd
group by aa.fb_key
) f on c.fb_key = f.fb_key
<include refid="selectCrackdownStatusListWhere"></include> <include refid="selectCrackdownStatusListWhere"></include>
ORDER BY cs.cds_key DESC order by a.napo_dt desc
LIMIT #{rowCnt} OFFSET #{firstIndex} </select>
</select>
<select id="selectCrackdownStatusListCnt" resultType="int" parameterType="CrackdownStatus"> <select id="selectCrackdownStatusListCnt" resultType="int" parameterType="UnlawfulFishingParam">
SELECT count(*) select count(*)
FROM crackdown_status cs from crackdown_status a
INNER JOIN fishing_boat fb inner join process_result b
ON cs.cds_key = fb.cds_key on a.cds_key = b.cds_key
INNER JOIN process_result pr inner join fishing_boat c
ON cs.cds_key = pr.cds_key on a.cds_key = c.cds_key
left outer join sailor d
on c.fb_key = d.fb_key and d.position = 'POS001'
left outer join (
select fb_key,
sum(case when ab.item_cd = 'POS001' and is_restriction = 'Y' then 1 end) as captainRestriction,
sum(case when ab.item_cd = 'POS001' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as captainRestrictionNot,
sum(case when ab.item_cd = 'POS002' and is_restriction = 'Y' then 1 end) as navigaterRestriction,
sum(case when ab.item_cd = 'POS002' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as navigaterRestrictionNot,
sum(case when ab.item_cd = 'POS003' and is_restriction = 'Y' then 1 end) as engineerRestriction,
sum(case when ab.item_cd = 'POS003' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as engineerRestrictionNot,
sum(case when ab.item_cd = 'POS004' and is_restriction = 'Y' then 1 end) as ownerRestriction,
sum(case when ab.item_cd = 'POS004' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as ownerRestrictionNot,
sum(case when ab.item_cd = 'POS005' and is_restriction = 'Y' then 1 end) as seniorRestriction,
sum(case when ab.item_cd = 'POS005' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as seniorRestrictionNot,
sum(case when ab.item_cd = 'POS006' and is_restriction = 'Y' then 1 end) as normalRestriction,
sum(case when ab.item_cd = 'POS006' and (is_restriction is null or is_restriction &lt;> 'Y') then 1 end) as normalRestrictionNot
from sailor aa left outer join code_mgt ab on aa.position = ab.item_cd
group by fb_key, is_restriction
) e on c.fb_key = e.fb_key
left outer join (
select aa.fb_key,
array_to_string(array_agg(ab.item_value), ', ') as violationStr,
array_to_string(array_agg(ab.item_cd), ', ') as violationCode
from violation aa
inner join code_mgt ab
on aa.violation = ab.item_cd
group by aa.fb_key
) f on c.fb_key = f.fb_key
<include refid="selectCrackdownStatusListWhere"></include> <include refid="selectCrackdownStatusListWhere"></include>
</select> </select>
<sql id="selectFishingBoatListWhere"> <sql id="selectFishingBoatListWhere">
<where> <where>
@ -487,42 +288,42 @@
<select id="selectFishingBoatList" resultType="CrackdownStatus" parameterType="UnlawfulFishingParam"> <select id="selectFishingBoatList" resultType="CrackdownStatus" parameterType="UnlawfulFishingParam">
select a.cds_key, select a.cds_key,
a.napo_dt, a.napo_dt,
a.napo_sea_point_lon, a.napo_sea_point_lon,
a.napo_sea_point_lat, a.napo_sea_point_lat,
a.napo_sea_point_detail, a.napo_sea_point_detail,
a.case_agency, a.case_agency,
a.crackdown_police, a.crackdown_police,
a.crackdown_boat, a.crackdown_boat,
b.boat_name_kr, b.boat_name_kr,
b.fishery_type, b.fishery_type,
b.boat_nny_sung, b.boat_nny_sung,
b.boat_nny_si, b.boat_nny_si,
b.ton_cnt, b.ton_cnt,
b.boat_material, b.boat_material,
b.wrt_organ, b.wrt_organ,
b.wrt_user_grd, b.wrt_user_grd,
b.wrt_user_nm, b.wrt_user_nm,
b.wrt_dt, b.wrt_dt,
c.process_status, c.process_status,
d.sailor_name_kr, d.sailor_name_kr,
e.violationStr e.violationStr
from crackdown_status a from crackdown_status a
inner join fishing_boat b inner join fishing_boat b
on a.cds_key = b.cds_key on a.cds_key = b.cds_key
inner join process_result c inner join process_result c
on a.cds_key = c.cds_key on a.cds_key = c.cds_key
left outer join sailor d left outer join sailor d
on b.fb_key = d.fb_key and d.position = 'POS001' on b.fb_key = d.fb_key and d.position = 'POS001'
left outer join ( left outer join (
select aa.fb_key, select aa.fb_key,
array_to_string(array_agg(ab.item_value), ', ') as violationStr, array_to_string(array_agg(ab.item_value), ', ') as violationStr,
array_to_string(array_agg(ab.item_cd), ', ') as violationCode array_to_string(array_agg(ab.item_cd), ', ') as violationCode
from violation aa from violation aa
inner join code_mgt ab inner join code_mgt ab
on aa.violation = ab.item_cd on aa.violation = ab.item_cd
group by aa.fb_key group by aa.fb_key
) e on b.fb_key = e.fb_key ) e on b.fb_key = e.fb_key
<include refid="selectFishingBoatListWhere"></include> <include refid="selectFishingBoatListWhere"></include>
order by a.cds_key desc order by a.cds_key desc
limit #{rowCnt} offset #{firstIndex} limit #{rowCnt} offset #{firstIndex}
@ -530,21 +331,21 @@
<select id="selectFishingBoatListCnt" resultType="int" parameterType="UnlawfulFishingParam"> <select id="selectFishingBoatListCnt" resultType="int" parameterType="UnlawfulFishingParam">
select count(*) select count(*)
from crackdown_status a from crackdown_status a
inner join fishing_boat b inner join fishing_boat b
on a.cds_key = b.cds_key on a.cds_key = b.cds_key
inner join process_result c inner join process_result c
on a.cds_key = c.cds_key on a.cds_key = c.cds_key
left outer join sailor d left outer join sailor d
on b.fb_key = d.fb_key and d.position = 'POS001' on b.fb_key = d.fb_key and d.position = 'POS001'
left outer join ( left outer join (
select aa.fb_key, select aa.fb_key,
array_to_string(array_agg(ab.item_value), ', ') as violationStr, array_to_string(array_agg(ab.item_value), ', ') as violationStr,
array_to_string(array_agg(ab.item_cd), ', ') as violationCode array_to_string(array_agg(ab.item_cd), ', ') as violationCode
from violation aa from violation aa
inner join code_mgt ab inner join code_mgt ab
on aa.violation = ab.item_cd on aa.violation = ab.item_cd
group by aa.fb_key group by aa.fb_key
) e on b.fb_key = e.fb_key ) e on b.fb_key = e.fb_key
<include refid="selectFishingBoatListWhere"></include> <include refid="selectFishingBoatListWhere"></include>
</select> </select>
<select id="selectFishingBoatYearParam" resultType="int" parameterType="UnlawfulFishingParam"> <select id="selectFishingBoatYearParam" resultType="int" parameterType="UnlawfulFishingParam">

View File

@ -7,7 +7,19 @@
const crackdownStatus = [[${crackdownStatus}]]; const crackdownStatus = [[${crackdownStatus}]];
const commonCode = [[${session.commonCode}]]; const commonCode = [[${session.commonCode}]];
</script> </script>
<script type="text/javascript" th:src="@{/js/faStatistics/crackdownStatus.js}"></script> <!--<script type="text/javascript" th:src="@{/js/faStatistics/crackdownStatus.js}"></script>-->
<script type="text/javascript" th:src="@{/js/faStatistics/fishingBoatMgt.js}"></script>
</th:block>
<th:block layout:fragment="css">
<style>
#violationSelectDiv{
position: absolute;
top: 45px;
left: 555px;
display: none;
z-index: 10;
}
</style>
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
<main> <main>
@ -31,8 +43,8 @@
<div> <div>
<select class="form-select form-select-sm" name="year"> <select class="form-select form-select-sm" name="year">
<option value="">연도</option> <option value="">연도</option>
<th:block th:each="year : ${#numbers.sequence(2020, 2030)}"> <th:block th:each="year : ${yearList}">
<option th:value="${year}" th:text="${year}" th:selected="${searchParams.year eq #strings.toString(year)}"></option> <option th:value="${year}" th:text="${year}" th:selected="${searchParams.year eq year}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
@ -49,27 +61,20 @@
<div class="row"> <div class="row">
<div class="col-11"> <div class="col-11">
<div class="row justify-content-end pb-1"> <div class="row justify-content-end pb-1">
<div class="col-2"> <div class="col-4">
<select class="form-select form-select-sm violation" name="violation"> <input type="text" class="form-control form-control-sm" id="violationInput" placeholder="위반형태" readonly>
<option value="">위반내용</option> <div class="bg-white border p-2 text-start" id="violationSelectDiv">
<th:block th:each="commonCode:${session.commonCode.get('VT')}"> <th:block th:each="code:${session.commonCode.get('VT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" <div>
th:selected="${commonCode.itemCd eq searchParams.violation}"></option>></option> <input type="checkbox" name="violationList" class="violationParams" th:id="|violation${code.itemCd}|" th:value="${code.itemCd}" th:checked="${searchParams.violationList ne null?#lists.contains(searchParams.violationList, code.itemCd):false}">
<label th:for="|violation${code.itemCd}|" class="form-label col-form-label-sm mb-0" th:text="${code.itemValue}"></label>
</div>
</th:block> </th:block>
</select> </div>
</div> </div>
<div class="col-2"> <div class="col-2">
<input class="form-control form-control-sm" name="napoSeaPointDetail" id="napoSeaPointDetail" placeholder="위반장소" th:value="${searchParams.napoSeaPointDetail}"> <input class="form-control form-control-sm" name="napoSeaPointDetail" id="napoSeaPointDetail" placeholder="위반장소" th:value="${searchParams.napoSeaPointDetail}">
</div> </div>
<div class="col-2">
<select class="form-select form-select-sm" name="invasionType">
<option value="">침범유형</option>
<th:block th:each="commonCode:${session.commonCode.get('IST')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.invasionType}"></option>
</th:block>
</select>
</div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="nll"> <select class="form-select form-select-sm" name="nll">
<option value="">NLL</option> <option value="">NLL</option>
@ -213,8 +218,8 @@
</div> </div>
<div class="col-2"> <div class="col-2">
<div class="input-group"> <div class="input-group">
<input type="number" min="0" class="form-control form-control-sm" name="tonStartCnt" id="tonStartCnt" placeholder="톤수" th:value="${searchParams.tonStartCnt}"> <input type="number" min="0" class="form-control form-control-sm" name="tonMin" id="tonStartCnt" placeholder="톤수" th:value="${searchParams.tonMin}">
~<input type="number" min="0" class="form-control form-control-sm" name="tonEndCnt" id="tonEndCnt" placeholder="톤수" th:value="${searchParams.tonEndCnt}"> ~<input type="number" min="0" class="form-control form-control-sm" name="tonMax" id="tonEndCnt" placeholder="톤수" th:value="${searchParams.tonMax}">
</div> </div>
</div> </div>
<div class="col-2"> <div class="col-2">
@ -301,24 +306,24 @@
<hr class="mb-1"> <hr class="mb-1">
<label class="col-2 col-form-label col-form-label-sm">구속여부</label> <label class="col-2 col-form-label col-form-label-sm">구속여부</label>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="captin"> <select class="form-select form-select-sm" name="captainRestriction">
<option value="">선장</option> <option value="">선장</option>
<option value="Y" th:selected="${searchParams.captin eq 'Y'}">구속</option> <option value="Y" th:selected="${searchParams.captainRestriction eq 'Y'}">구속</option>
<option value="N" th:selected="${searchParams.captin eq 'N'}">불구속</option> <option value="N" th:selected="${searchParams.captainRestriction eq 'N'}">불구속</option>
</select> </select>
</div> </div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="mate"> <select class="form-select form-select-sm" name="navigaterRestriction">
<option value="">향해장</option> <option value="">향해장</option>
<option value="Y" th:selected="${searchParams.mate eq 'Y'}">구속</option> <option value="Y" th:selected="${searchParams.navigaterRestriction eq 'Y'}">구속</option>
<option value="N" th:selected="${searchParams.mate eq 'N'}">불구속</option> <option value="N" th:selected="${searchParams.navigaterRestriction eq 'N'}">불구속</option>
</select> </select>
</div> </div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="warden"> <select class="form-select form-select-sm" name="engineerRestriction">
<option value="">기관장</option> <option value="">기관장</option>
<option value="Y" th:selected="${searchParams.warden eq 'Y'}">구속</option> <option value="Y" th:selected="${searchParams.engineerRestriction eq 'Y'}">구속</option>
<option value="N" th:selected="${searchParams.warden eq 'N'}">불구속</option> <option value="N" th:selected="${searchParams.engineerRestriction eq 'N'}">불구속</option>
</select> </select>
</div> </div>
</div> </div>
@ -438,67 +443,6 @@
<th>단순폐선</th> <th>단순폐선</th>
<th>폐선조건부공매</th> <th>폐선조건부공매</th>
</tr> </tr>
<!--<tr class="table-secondary">
<th th:text="${#aggregates.sum(crackdownStatusList.?[invasionType == 'IST001'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[invasionType == 'IST001'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[invasionType == 'IST002'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[invasionType == 'IST002'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[invasionType == 'IST003'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[invasionType == 'IST003'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[invasionType == 'IST004'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[invasionType == 'IST004'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[nll == 'Y'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[nll == 'Y'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[personDamageCnt > 0 || personDamageAmount > 0].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![personDamageCnt])}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![personDamageAmount]), 3, 'COMMA')}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[materialDamageCnt > 0 || materialDamageAmount > 0].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![materialDamageAmount]), 3, 'COMMA')}"></th>
<th>단속경찰서</th>
<th>단속함정</th>
<th></th>
<th></th>
<th>이름</th>
<th>출생년도</th>
<th>어종</th>
<th>수량</th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.offenseCatchCnt]), 3, 'COMMA')}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.offenseIllegalWasteQuantity]), 3, 'COMMA')}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.offenseQuantity]), 3, 'COMMA')}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.offenseAmount]), 3, 'COMMA')}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.processStatus == 'PR001'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.processStatus == 'PR001'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.processStatus == 'PR009'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.processStatus == 'PR009'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.damboPayment > 0].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.damboPayment]), 3, 'COMMA')}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.damboUnpaidAmount > 0].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#numbers.formatInteger(#aggregates.sum(crackdownStatusList.![fishingBoat.damboUnpaidAmount]), 3, 'COMMA')}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.consignmentStartDt != null].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.evictionDt != null].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.directHandoverDt != null].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT001'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT001'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT002'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT002'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT003'].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.boatDisposalDt != null && processResult.boatDisposalType == 'BDT003'].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.confiscationDt != null].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.returnDt != null].![1]) ne null ? 1 : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![restrictionTotal])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![restrictionCaptin])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![restrictionMate])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![restrictionWarden])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![restrictionSailor])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.confiscationDt != null].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[processResult.confiscationDt != null].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![notRestrictionTotal])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![notRestrictionCaptin])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![notRestrictionMate])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![notRestrictionWarden])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.![notRestrictionSailor])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[processResult.confiscationDt != null].![1]) ne null ? 0 : #aggregates.sum(crackdownStatusList.?[processResult.confiscationDt != null].![1])}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fieldIvsgtNapoDt != null].![1]) ne null ? 1 : 0}"></th>
<th>나포일시</th>
<th>석방일시</th>
<th>소요시간</th>
<th>소요시간</th>
<th>거리(해리)</th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationFrame != ''].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationFrame != ''].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationWidth != ''].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationWidth != null && fishingBoat.confiscationWidth != ''].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationJo != ''].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationJo != null && fishingBoat.confiscationJo != ''].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationGae != ''].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationGae != null && fishingBoat.confiscationGae != ''].![1]) : 0}"></th>
<th th:text="${#aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationFrame != null && fishingBoat.confiscationEtc != ''].![1]) ne null ? #aggregates.sum(crackdownStatusList.?[fishingBoat.confiscationEtc != null && fishingBoat.confiscationEtc != ''].![1]) : 0}"></th>
</tr>-->
<tr class="table-secondary"> <tr class="table-secondary">
<th></th> <th></th>
<th></th> <th></th>
@ -562,135 +506,125 @@
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider align-middle"> <tbody class="table-group-divider align-middle">
<th:block th:each="crackdownStatus,cnt:${crackdownStatusList}"> <th:block th:each="dto,cnt:${crackdownStatusList}">
<tr class="tr" th:data-key="${crackdownStatus.cdsKey}"> <tr class="crackdownStatusTr">
<input type="hidden" class="cdsKey" th:value="${dto.cdsKey}">
<!--<td th:text="${crackdownStatus.cdsKey}"></td>--> <!--<td th:text="${crackdownStatus.cdsKey}"></td>-->
<td th:text="${cnt.count}"></td> <td th:text="${cnt.count}"></td>
<td th:text="${#temporals.format(crackdownStatus.napoDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(dto.napoDt, 'yyyy-MM-dd HH:mm')}"></td>
<td class="text-wrap min-width-300"> <td class="text-wrap min-width-300" th:text="${dto.violationStr}"></td>
<th:block th:if="${#lists.size(crackdownStatus.violationList) >= 1}"> <td>
<th:block th:each="violation, i:${crackdownStatus.violationList}"> <div th:if="${!#strings.isEmpty(dto.napoSeaPointLon) and !#strings.isEmpty(dto.napoSeaPointLon)}" th:text="${#strings.concat(dto.napoSeaPointLon, ' ~ ', dto.napoSeaPointLat)}"></div>
<th:block th:each="commonCode:${session.commonCode.get('VT')}"> <div th:if="${!#strings.isEmpty(dto.napoSeaPointLon) or !#strings.isEmpty(dto.napoSeaPointLon)}" th:text="${#strings.concat(dto.napoSeaPointLon, dto.napoSeaPointLat)}"></div>
<th:block th:if="${violation.violation eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block> <div th:text="${dto.napoSeaPointDetail}"></div>
</th:block> </td>
<th:block th:if="${violation.violation ne null && !#strings.contains(violation.violation, 'VT')}" th:text="${violation.violation}"></th:block> <td th:text="${dto.violationCode ne null and #strings.contains(dto.violationCode, 'VT002')?1:0}"></td>
<th:block th:if="${#lists.size(crackdownStatus.violationList) >= 1 && i.index < #lists.size(crackdownStatus.violationList)-1}"> <td th:text="${dto.violationCode ne null and (#strings.contains(dto.violationCode, 'VT003') or #strings.contains(dto.violationCode, 'VT004'))?1:0}"></td>
<th:block>, </th:block> <td th:text="${dto.violationCode ne null and #strings.contains(dto.violationCode, 'VT029')?1:0}"></td>
</th:block> <td th:text="${dto.violationCode ne null and #strings.contains(dto.violationCode, 'VT030')?1:0}"></td>
</th:block> <td th:text="${dto.nll eq 'Y'?1:0}"></td>
<td th:text="${dto.obstrExspdCnt}"></td>
<td th:text="${dto.personDamageCnt}"></td>
<td th:text="${dto.personDamageAmount}"></td>
<td th:text="${dto.personDamageDetail}"></td>
<td th:text="${dto.materialDamageCnt}"></td>
<td th:text="${dto.materialDamageAmount}"></td>
<td th:text="${dto.materialDamageDetail}"></td>
<td>
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq dto.caseAgency}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td> <td>
<span th:text="${crackdownStatus.napoSeaPointLat}"> ~ </span> <th:block th:each="code:${session.commonCode.get('CPO')}">
<span th:text="${crackdownStatus.napoSeaPointLon}"></span> <th:block th:if="${code.itemCd eq dto.crackdownPolice}" th:text="${code.itemValue}"></th:block>
<div th:text="${crackdownStatus.napoSeaPointDetail}"></div>
</td>
<th:block th:each="code:${session.commonCode.get('IST')}">
<td th:if="${crackdownStatus.invasionType ne null && crackdownStatus.invasionType eq code.itemCd}">1</td>
<td th:if="${crackdownStatus.invasionType ne code.itemCd}">0</td>
</th:block>
<td th:text="${crackdownStatus.nll eq 'Y' ? 1 : 0}"></td>
<td th:text="${crackdownStatus.obstrExspdCnt}"></td>
<td th:text="${crackdownStatus.personDamageCnt}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.personDamageAmount, 3, 'COMMA')}"></td>
<td th:text="${crackdownStatus.personDamageDetail}"></td>
<td th:text="${crackdownStatus.materialDamageCnt}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.materialDamageAmount, 3, 'COMMA')}"></td>
<td th:text="${crackdownStatus.materialDamageDetail}"></td>
<td>
<th:block th:each="commonCode:${session.commonCode.get('ATA')}">
<th:block th:if="${crackdownStatus.caseAgency eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td> <td>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}"> <th:block th:each="code:${session.commonCode.get(dto.crackdownPolice)}">
<th:block th:if="${crackdownStatus.crackdownPolice eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block> <th:block th:if="${code.itemCd eq dto.crackdownBoat}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td th:text="${dto.mmsi}"></td>
<td th:text="${dto.boatNameKr}"></td>
<td> <td>
<th:block th:each="code:${session.commonCode.get(crackdownStatus.crackdownPolice)}"> <th:block th:if="${dto.tonCnt>0}" th:text="|${dto.tonCnt}t|"></th:block>
<th:block th:if="${crackdownStatus.crackdownBoat eq code.itemCd}" th:text="${code.itemValue}"></th:block> </td>
<td th:text="${dto.sailorCnt}"></td>
<td>
<th:block th:each="code:${session.commonCode.get('BM')}">
<th:block th:if="${code.itemCd eq dto.boatMaterial}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td th:text="${crackdownStatus.mmsi}"></td> <td th:text="${dto.boatNnySung}"></td>
<td th:text="${crackdownStatus.fishingBoat.boatNameKr}"></td> <td th:text="${dto.boatNnySi}"></td>
<td th:text="${crackdownStatus.fishingBoat.tonCnt}"></td> <td th:text="${dto.captainName}"></td>
<td th:text="${crackdownStatus.restrictionSailor + crackdownStatus.notRestrictionSailor}"></td> <td th:text="${dto.captainBirthDate}"></td>
<td> <td>
<th:block th:each="commonCode:${session.commonCode.get('BM')}"> <th:block th:each="code:${session.commonCode.get('FT')}">
<th:block th:if="${crackdownStatus.fishingBoat.boatMaterial eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block> <th:block th:if="${code.itemCd eq dto.fisheryType}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td th:text="${crackdownStatus.fishingBoat.boatNnySung}"></td> <td th:text="${dto.catchFishSpecies}"></td>
<td th:text="${crackdownStatus.fishingBoat.boatNnySi}"></td> <td><th:block th:if="${dto.catchCnt>0}" th:text="|${dto.catchCnt}kg|"></th:block></td>
<th:block th:each="sailor:${crackdownStatus.sailorList}"> <td th:text="${dto.offenseType}"></td>
<td th:if="${sailor.position eq 'POS001'}" th:text="${sailor.sailorNameKr}"></td> <td><th:block th:if="${dto.offenseWeight>0}" th:text="|${dto.offenseWeight}kg|"></th:block></td>
<td th:if="${sailor.position eq 'POS001'}" th:text="${#temporals.format(sailor.birthdate, 'yyyy-MM-dd')}"></td> <td><th:block th:if="${dto.offenseIllegalWasteQuantity>0}" th:text="|${dto.offenseIllegalWasteQuantity}kg|"></th:block></td>
</th:block> <td><th:block th:if="${dto.offenseQuantity>0}" th:text="|${dto.offenseQuantity}kg|"></th:block></td>
<th:block th:if="${#lists.size(crackdownStatus.sailorList) == 0}"> <td><th:block th:if="${dto.offenseAmount>0}" th:text="|${dto.offenseAmount}원|"></th:block></td>
<td></td> <td th:text="${dto.processStatus eq 'PR001'?1:0}"></td>
<td></td> <td th:text="${dto.processStatus ne 'PR001'?1:0}"></td>
</th:block> <td th:text="${dto.damboPayment > 0?1:0}"></td>
<td> <td>
<th:block th:each="commonCode:${session.commonCode.get('FT')}"> <th:block th:if="${dto.damboPayment ne null and dto.damboPayment>10000}" th:text="|${#numbers.formatInteger(dto.damboPayment/10000, 3, 'COMMA')}만원|"></th:block>
<th:block th:if="${crackdownStatus.fishingBoat.fisheryType eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
</td> </td>
<td th:text="${crackdownStatus.fishingBoat.catchFishSpecies}"></td> <td th:text="${dto.paymentPaymentDt}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.catchCnt, 3, 'COMMA')}"></td> <td th:text="${dto.damboUnpaidAmount > 0?1:0}"></td>
<td th:text="${crackdownStatus.fishingBoat.offenseFishSpecies}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.offenseCatchCnt, 3, 'COMMA')}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.offenseIllegalWasteQuantity, 3, 'COMMA')}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.offenseQuantity, 3, 'COMMA')}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.offenseAmount, 3, 'COMMA')}"></td>
<td th:text="${crackdownStatus.processResult.processStatus eq 'PR001' ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.processStatus eq 'PR009' ? 1 : 0}"></td>
<td th:text="${crackdownStatus.fishingBoat.damboPayment ne 0 ? 1 : 0}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.damboPayment, 3, 'COMMA')}"></td>
<td th:text="${#temporals.format(crackdownStatus.fishingBoat.paymentPaymentDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${crackdownStatus.fishingBoat.damboUnpaidAmount ne 0 ? 1 : 0}"></td>
<td th:text="${#numbers.formatInteger(crackdownStatus.fishingBoat.damboUnpaidAmount, 3, 'COMMA')}"></td>
<td th:text="${crackdownStatus.processResult.consignmentStartDt ne null ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.consignmentStartDt}"></td>
<td th:text="${crackdownStatus.processResult.consignmentEndDt}"></td>
<td th:text="${crackdownStatus.processResult.evictionDt ne null ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.directHandoverDt ne null ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.boatDisposalDt ne null && crackdownStatus.processResult.boatDisposalType eq 'BDT001'? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.boatDisposalDt ne null && crackdownStatus.processResult.boatDisposalType eq 'BDT002'? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.boatDisposalDt ne null && crackdownStatus.processResult.boatDisposalType eq 'BDT003'? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.confiscationDt ne null ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.returnDt ne null ? 1 : 0}"></td>
<td th:text="${crackdownStatus.processResult.directHandoverDt}"></td>
<td> <td>
<span th:text="${crackdownStatus.processResult.handoverSeaPointLat}"> ~ </span> <th:block th:if="${dto.damboUnpaidAmount ne null and dto.damboUnpaidAmount>10000}" th:text="|${#numbers.formatInteger(dto.damboUnpaidAmount/10000, 3, 'COMMA')}만원|"></th:block>
<span th:text="${crackdownStatus.processResult.handoverSeaPointLon}"></span>
</td> </td>
<td th:text="${crackdownStatus.processResult.handoverBoat}"></td> <td th:text="${dto.consignmentStartDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.processResult.middleTakeoverBoat}"></td> <td th:text="${dto.consignmentStartDt}"></td>
<td th:text="${crackdownStatus.restrictionTotal}"></td> <td th:text="${dto.consignmentEndDt}"></td>
<td th:text="${crackdownStatus.restrictionCaptin}"></td> <td th:text="${dto.evictionDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.restrictionMate}"></td> <td th:text="${dto.directHandoverDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.restrictionWarden}"></td> <td th:text="${dto.boatDisposalType eq 'BDT001'?1:0}"></td>
<td th:text="${crackdownStatus.restrictionSailor}"></td> <td th:text="${dto.boatDisposalType eq 'BDT002'?1:0}"></td>
<td th:text="${crackdownStatus.processResult.confiscationDt ne null ? 1 : 0}"></td> <td th:text="${dto.boatDisposalType eq 'BDT003'?1:0}"></td>
<td th:text="${crackdownStatus.notRestrictionTotal}"></td> <td th:text="${dto.exileDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.notRestrictionCaptin}"></td> <td th:text="${dto.returnDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.notRestrictionMate}"></td> <td th:text="${dto.directHandoverDt}"></td>
<td th:text="${crackdownStatus.notRestrictionWarden}"></td> <td>
<td th:text="${crackdownStatus.notRestrictionSailor}"></td> <div th:if="${!#strings.isEmpty(dto.handoverSeaPointLon) and !#strings.isEmpty(dto.handoverSeaPointLat)}" th:text="${#strings.concat(dto.handoverSeaPointLon, ' ~ ', dto.handoverSeaPointLat)}"></div>
<td th:text="${crackdownStatus.processResult.confiscationDt ne null ? 0 : 1}"></td> <div th:if="${!#strings.isEmpty(dto.handoverSeaPointLon) or !#strings.isEmpty(dto.handoverSeaPointLat)}" th:text="${#strings.concat(dto.handoverSeaPointLon, dto.handoverSeaPointLat)}"></div>
<td th:text="${crackdownStatus.fieldIvsgtNapoDt ne null? 1 : 0}"></td> <div th:text="${dto.handoverSeaPointDetail}"></div>
<td th:text="${#temporals.format(crackdownStatus.fieldIvsgtNapoDt, 'yyyy-MM-dd HH:mm')}"></td> </td>
<td th:text="${#temporals.format(crackdownStatus.fieldIvsgtReleaseDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${dto.handoverBoat}"></td>
<td th:text="${crackdownStatus.fieldIvsgtTimeTaken}"></td> <td th:text="${dto.middleTakeoverBoat}"></td>
<td th:text="${crackdownStatus.processResult.pressurizedTimeTaken}"></td> <td th:text="${dto.captainRestriction+dto.navigaterRestriction+dto.engineerRestriction+dto.seniorRestriction+dto.normalRestriction}"></td>
<td th:text="${crackdownStatus.distance}"></td> <td th:text="${dto.captainRestriction}"></td>
<td th:text="${crackdownStatus.processResult.warrantReqTakeTime}"></td> <td th:text="${dto.navigaterRestriction}"></td>
<td th:text="${crackdownStatus.fishingBoat.confiscationFrame}"></td> <td th:text="${dto.engineerRestriction}"></td>
<td th:text="${crackdownStatus.fishingBoat.confiscationWidth}"></td> <td th:text="${dto.seniorRestriction+dto.normalRestriction}"></td>
<td th:text="${crackdownStatus.fishingBoat.confiscationJo}"></td> <td th:text="${dto.confiscationDt ne null?1:0}"></td>
<td th:text="${crackdownStatus.fishingBoat.confiscationGae}"></td> <td th:text="${dto.captainRestrictionNot+dto.navigaterRestrictionNot+dto.engineerRestrictionNot+dto.seniorRestrictionNot+dto.normalRestrictionNot}"></td>
<td th:text="${crackdownStatus.fishingBoat.confiscationEtc}"></td> <td th:text="${dto.captainRestrictionNot}"></td>
<td th:text="${dto.navigaterRestrictionNot}"></td>
<td th:text="${dto.engineerRestrictionNot}"></td>
<td th:text="${dto.seniorRestrictionNot+dto.normalRestrictionNot}"></td>
<td th:text="${dto.confiscationDt eq null?1:0}"></td>
<td th:text="${dto.fieldIvsgt eq 'F'? 1 : 0}"></td>
<td><th:block th:if="${dto.fieldIvsgt eq 'F'}" th:text="${#temporals.format(dto.napoDt, 'yyyy-MM-dd HH:mm')}"></th:block></td>
<td><th:block th:if="${dto.fieldIvsgt eq 'F'}" th:text="${#temporals.format(dto.releaseDt, 'yyyy-MM-dd HH:mm')}"></th:block></td>
<td><th:block th:if="${dto.fieldIvsgt eq 'F'}" th:text="${dto.fieldIvsgtDayHour}"></th:block></td>
<td><th:block th:if="${dto.fieldIvsgt eq 'C'}" th:text="${dto.pressurizedTimeTaken}"></th:block></td>
<td><th:block th:if="${dto.fieldIvsgt eq 'C'}" th:text="${dto.distance}"></th:block></td>
<td th:text="${dto.warrantReqTakeTime}"></td>
<td th:text="${dto.confiscationFrame}"></td>
<td th:text="${dto.confiscationWidth}"></td>
<td th:text="${dto.confiscationJo}"></td>
<td th:text="${dto.confiscationGae}"></td>
<td th:text="${dto.confiscationEtc}"></td>
</tr> </tr>
</th:block> </th:block>
</tbody> </tbody>
@ -710,7 +644,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="fishingBoatViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="fishingBoatViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xxl modal-dialog-scrollable">
<div class="modal-content" id="fishingBoatViewModalContent">
</div>
</div>
</div>
<div class="modal fade" id="crackdownStatusEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="crackdownStatusEditModalLabel" aria-hidden="true"> <div class="modal fade" id="crackdownStatusEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="crackdownStatusEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable"> <div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="crackdownStatusEditModalContent"> <div class="modal-content" id="crackdownStatusEditModalContent">