불법조업외국어선 작업중.

master
최강석 2023-05-24 18:18:53 +09:00
parent b2570702ab
commit ff359aaad7
12 changed files with 426 additions and 251 deletions

View File

@ -1,5 +1,6 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing; package com.dbnt.faisp.main.faStatistics.unlawfulFishing;
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.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.*;
@ -26,12 +27,13 @@ public class UnlawfulFishingController {
private final AuthMgtService authMgtService; private final AuthMgtService authMgtService;
private final UnlawfulFishingService unlawfulFishingService; private final UnlawfulFishingService unlawfulFishingService;
@GetMapping("/crackdownStatus") @GetMapping("/crackdownInfo")
public ModelAndView crackdownStatusPage(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){ public ModelAndView crackdownInfoPage(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownStatus/crackdownStatusPage"); ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownInfo/crackdownInfoPage");
//메뉴권한 확인 //메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/crackdownStatus").get(0).getAccessAuth(); AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/crackdownInfo").get(0);
mav.addObject("accessAuth", accessAuth); mav.addObject("menuKey", accessConfig.getMenuKey());
mav.addObject("accessAuth", accessConfig.getAccessAuth());
if(params.getYear()==null){ if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear()); params.setYear(LocalDateTime.now().getYear());
@ -44,26 +46,26 @@ public class UnlawfulFishingController {
CSStatistics statistics = new CSStatistics(); CSStatistics statistics = new CSStatistics();
mav.addObject("statistics", statistics); mav.addObject("statistics", statistics);
mav.addObject("crackdownStatusList", csDTOList); mav.addObject("crackdownInfoList", csDTOList);
mav.addObject("yearList", yearList); mav.addObject("yearList", yearList);
mav.addObject("searchParams", params); mav.addObject("searchParams", params);
return mav; return mav;
} }
@GetMapping("/csEditModal") @GetMapping("/cdiEditModal")
public ModelAndView crackdownStatusEditModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){ public ModelAndView crackdownInfoEditModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownInfo crackdownInfo){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownStatus/csEditModal"); ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownInfo/cdiEditModal");
if(crackdownStatus.getCdsKey()!=null){ if(crackdownInfo.getCdsKey()!=null){
crackdownStatus = unlawfulFishingService.selectCrackdownStatus(crackdownStatus.getCdsKey()); crackdownInfo = unlawfulFishingService.selectCrackdownInfo(crackdownInfo.getCdsKey());
}else{ }else{
crackdownStatus.setWrtOrgan(loginUser.getOgCd()); crackdownInfo.setWrtOrgan(loginUser.getOgCd());
crackdownStatus.setWrtPart(loginUser.getOfcCd()); crackdownInfo.setWrtPart(loginUser.getOfcCd());
crackdownStatus.setWrtUserGrd(loginUser.getGroupCd()); crackdownInfo.setWrtUserSeq(loginUser.getUserSeq());
crackdownStatus.setWrtOrgan(loginUser.getOgCd()); crackdownInfo.setWrtUserGrd(loginUser.getTitleCd());
crackdownStatus.setWrtUserNm(loginUser.getUserNm()); crackdownInfo.setWrtUserNm(loginUser.getUserNm());
crackdownStatus.setWrtDt(LocalDateTime.now()); crackdownInfo.setWrtDt(LocalDateTime.now());
} }
mav.addObject("crackdownStatus", crackdownStatus); mav.addObject("crackdownInfo", crackdownInfo);
return mav; return mav;
} }

View File

@ -0,0 +1,224 @@
package 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.Violation;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ProcessResult;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.Sailor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;
import javax.persistence.*;
import java.time.LocalDate;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "crackdown_info")
public class CrackdownInfo extends CrackdownStatusBaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cds_key")
private Integer cdsKey;
@Column(name="status")
private String status;
@Transient
private List<CrackdownStatusVersion> crackdownStatusVersionList;
@Transient
private List<Violation> violationList;
@Transient
private FishingBoat fishingBoat;
@Transient
private ProcessResult processResult;
@Transient
private List<Sailor> sailorList;
@Transient
private List<MultipartFile> sailorFileList;
@Transient
private String crackdownPoliceEtc;
@Transient
private String crackdownBoatEtc;
@Transient
private Integer fbKey;
@Transient
private String boatNameKr;
@Transient
private String fisheryType;
@Transient
private String boatNnySung;
@Transient
private String boatMaterial;
@Transient
private String boatNnySi;
@Transient
private Double tonCnt;
@Transient
private String boat_material;
@Transient
private String violationStr;
@Transient
private String sailorNameKr;
@Transient
private String processStatus;
@Transient
private Integer restrictionCaptin;
@Transient
private Integer notRestrictionCaptin;
@Transient
private Integer restrictionMate;
@Transient
private Integer notRestrictionMate;
@Transient
private Integer restrictionWarden;
@Transient
private Integer notRestrictionWarden;
@Transient
private Integer restrictionSailor;
@Transient
private Integer notRestrictionSailor;
@Transient
private Integer restrictionTotal;
@Transient
private Integer notRestrictionTotal;
@Transient
private Integer unlicensedOperationTotal;
@Transient
private Integer specificImpossibilityTotal;
@Transient
private Integer eezTotal;
@Transient
private Integer invasionTerritorialWatersTotal;
@Transient
private List<Integer> violationDeleteKeyList;
@Transient
private List<Integer> sailorDeleteKeyList;
@Transient
private String year;
@Transient
private String month;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate napoDate;
@Transient
private String violation;
@Transient
private Integer tonStartCnt;
@Transient
private Integer tonEndCnt;
@Transient
private String catchFishSpecies;
@Transient
private String catchCnt;
@Transient
private String offenseFishSpecies;
@Transient
private String offenseCatchCnt;
@Transient
private String offenseIllegalWasteQuantity;
@Transient
private String offenseQuantity;
@Transient
private String offenseAmount;
@Transient
private String damboPayment;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate paymentPaymentDate;
@Transient
private Integer damboUnpaidAmount;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate consignmentStartDate;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate consignmentEndDate;
/*@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate evictionDt;*/
@Transient
private String isEvictionDt;
/*@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate returnDt;*/
@Transient
private String isReturnDt;
/*@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate confiscationDt;*/
@Transient
private String isConfiscationDt;
@Transient
private String isConsignmentStartDt;
@Transient
private String isDamboUnpaidAmount;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate boatDisposalDate;
@Transient
private String boatDisposalType;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate directHandoverDate;
@Transient
private String isDirectHandoverDt;
@Transient
private String handoverSeaPointLat;
@Transient
private String handoverSeaPointLon;
@Transient
private String handoverSeaPointDetail;
@Transient
private String handoverBoat;
@Transient
private String middleTakeoverBoat;
@Transient
private String captin;
@Transient
private String mate;
@Transient
private String warden;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate fieldIvsgtNapoDate;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate fieldIvsgtReleaseDate;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate pressurizedStartDate;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate pressurizedEndDate;
@Transient
private String distance;
@Transient
private String confiscationFrame;
@Transient
private String confiscationWidth;
@Transient
private String confiscationJo;
@Transient
private String confiscationGae;
@Transient
private String confiscationEtc;
}

View File

@ -0,0 +1,36 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "crackdown_info_history")
@IdClass(CrackdownInfoHistory.CrackdownInfoHistoryId.class)
public class CrackdownInfoHistory extends CrackdownStatusBaseEntity {
@Id
@Column(name = "cds_key")
private Integer cdsKey;
@Id
@Column(name = "version_no")
private Integer versionNo;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class CrackdownInfoHistoryId implements Serializable {
private Integer cdsKey;
private Integer versionNo;
}
}

View File

@ -0,0 +1,12 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownInfoHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
public interface CrackdownInfoHistoryRepository extends JpaRepository<CrackdownInfoHistory, CrackdownInfoHistory.CrackdownInfoHistoryId> {
Optional<CrackdownInfoHistory> findTopByCdsKeyOrderByVersionNoDesc(Integer cdsKey);
List<CrackdownInfoHistory> findByCdsKey(Integer cdsKey);
}

View File

@ -0,0 +1,11 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;
public interface CrackdownInfoRepository extends JpaRepository<CrackdownInfo, Integer> {
Optional<CrackdownInfo> findByCdsKey(Integer cdsKey);
Optional<CrackdownInfo> findTop1ByCaseNum(String caseNum);
}

View File

@ -1,11 +1,12 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.service; package com.dbnt.faisp.main.faStatistics.unlawfulFishing.service;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownInfo;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.UnlawfulFishingVersion; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.UnlawfulFishingVersion;
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.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.repository.CrackdownStatusRepository; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository.CrackdownInfoRepository;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -21,7 +22,7 @@ public class UnlawfulFishingService {
private final ProcessResultService processResultService; private final ProcessResultService processResultService;
private final SailorService sailorService; private final SailorService sailorService;
private final CrackdownStatusRepository csRepository; private final CrackdownInfoRepository cdiRepository;
private final UnlawfulFishingMapper unlawfulFishingMapper; private final UnlawfulFishingMapper unlawfulFishingMapper;
@Transactional @Transactional
@ -86,7 +87,7 @@ public class UnlawfulFishingService {
return unlawfulFishingMapper.selectFishingBoatYearParam(); return unlawfulFishingMapper.selectFishingBoatYearParam();
} }
public CrackdownStatus selectCrackdownStatus(Integer cdsKey) { public CrackdownInfo selectCrackdownInfo(Integer cdsKey) {
return csRepository.findById(cdsKey).orElse(new CrackdownStatus()); return cdiRepository.findByCdsKey(cdsKey).orElse(new CrackdownInfo());
} }
} }

View File

@ -5,7 +5,7 @@ $(document).on('click', '#addCrackdownStatusBtn', function (){
function getCsEditModal(cdsKey){ function getCsEditModal(cdsKey){
$.ajax({ $.ajax({
url: '/unlawfulFishing/csEditModal', url: '/unlawfulFishing/cdiEditModal',
data: {cdsKey: cdsKey}, data: {cdsKey: cdsKey},
type: 'GET', type: 'GET',
dataType:"html", dataType:"html",

View File

@ -7,7 +7,7 @@
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/crackdownInfo.js}"></script>-->
<script type="text/javascript" th:src="@{/js/faStatistics/fishingBoatMgt.js}"></script> <script type="text/javascript" th:src="@{/js/faStatistics/fishingBoatMgt.js}"></script>
</th:block> </th:block>
<th:block layout:fragment="css"> <th:block layout:fragment="css">

View File

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="csEditModalLabel" th:text="${crackdownInfo.cdsKey eq null?'단속현황 작성':'단속현황 수정'}"></h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="#" method="post" id="csEditForm">
<input type="hidden" name="cdsKey" id="cdsKey" th:value="${crackdownInfo.cdsKey}">
<input type="hidden" class="status" name="status" id="infoStatus" th:value="${crackdownInfo.status}">
<input type="hidden" name="wrtOrgan" th:value="${crackdownInfo.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${crackdownInfo.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${crackdownInfo.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${crackdownInfo.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${crackdownInfo.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(crackdownInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}">
<div class="row mb-1">
<label for="caseNum" class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownInfo.caseNum}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">MMSI.NO</label>
<div class="col-sm-2">
<input class="form-control form-control-sm" name="mmsi" th:value="${crackdownInfo.mmsi}">
</div>
</div>
<div class="row mb-1">
<label for="caseAgency" class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm " id="caseAgency" name="caseAgency">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownInfo.caseAgency}"></option>
</th:block>
</select>
</div>
<label for="casePoliceOfficer" class="col-sm-1 col-form-label col-form-label-sm text-center fs-13">사건담당경찰관</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm " id="casePoliceOfficer" name="casePoliceOfficer" th:value="${crackdownInfo.casePoliceOfficer}">
</div>
<label for="crackdownPolice" class="col-sm-1 col-form-label col-form-label-sm text-center">단속경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownPolice" name="crackdownPolice" id="crackdownPolice">
<option value="">선택</option>
<th:block th:each="code:${cpoList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownInfo.crackdownPolice}"></option>
</th:block>
</select>
</div>
<label for="crackdownBoat" class="col-sm-1 col-form-label col-form-label-sm text-center">단속함정</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownBoat" name="crackdownBoat" id="crackdownBoat" th:data-boatcode="${crackdownInfo.crackdownBoat}">
<option value="">단속경찰서를 선택해주세요.</option>
<th:block th:each="code:${session.commonCode.get(crackdownInfo.crackdownPolice)}">
<th:block th:if="${code.useChk eq 'T'}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownInfo.crackdownBoat}"></option>
</th:block>
</th:block>
</select>
</div>
</div>
<div class="row mb-1">
<label for="invasionType" class="col-sm-1 col-form-label col-form-label-sm text-center">침범유형</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="invasionType" id="invasionType">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('IST')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"
th:selected="${code.itemCd eq crackdownInfo.invasionType}"></option>
</th:block>
</select>
</div>
<label for="nll" class="col-sm-1 col-form-label col-form-label-sm text-center">NLL</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="nll" id="nll">
<option value="">선택</option>
<option value="Y" th:selected="${crackdownInfo.nll == 'Y'}">O</option>
<option value="N" th:selected="${crackdownInfo.nll == 'N'}">X</option>
</select>
</div>
<label for="fieldIvsgt" class="col-sm-1 col-form-label col-form-label-sm text-center">압송/현장조사</label>
<div class="col-sm-2">
<select class="form-select form-select-sm " name="fieldIvsgt" id="fieldIvsgt">
<option value="">선택</option>
<option value="C" th:selected="${crackdownInfo.fieldIvsgt eq 'C'}">압송</option>
<option value="F" th:selected="${crackdownInfo.fieldIvsgt eq 'F'}">현장조사</option>
</select>
</div>
</div>
<div class="row mb-1">
<label for="napoDate" class="col-sm-1 col-form-label col-form-label-sm text-center">나포일시</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" class="form-control form-control-sm dateSelector" id="napoDate" placeholder="yyyy-mm-dd" th:value="${#temporals.format(crackdownInfo.napoDt, 'yyyy-MM-dd')}" autocomplete="off">
<input type="text" class="form-control form-control-sm timeInputer" id="napoTime" placeholder="hh:mm" th:value="${#temporals.format(crackdownInfo.napoDt, 'HH:mm')}" autocomplete="off">
</div>
</div>
<label for="napoSeaPointLon" class="col-sm-1 col-form-label col-form-label-sm text-center">나포장소</label>
<div class="col-sm-5">
<div class="input-group w-auto">
<input type="text" class="form-control form-control-sm w-25 " id="napoSeaPointLon" name="napoSeaPointLon" placeholder="00 . 00 . 00N" th:value="${crackdownInfo.napoSeaPointLon}">
<input type="text" class="form-control form-control-sm w-25 " id="napoSeaPointLat" name="napoSeaPointLat" placeholder="000-00.00E" th:value="${crackdownInfo.napoSeaPointLat}">
<input type="text" class="form-control form-control-sm w-50 " id="napoSeaPointDetail" name="napoSeaPointDetail" placeholder="00도 00방 00해리, 어업협정선 내측 00해리" th:value="${crackdownInfo.napoSeaPointDetail}">
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-warning saveEditInfoBtn" data-status="DST001">임시저장</button>
<button type="button" class="btn btn-primary saveEditInfoBtn" data-status="DST007">저장</button>
</div>

View File

@ -3,7 +3,7 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}"> layout:decorate="~{layout/layout}">
<th:block layout:fragment="script"> <th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/faStatistics/unlawfulFishing/crackdownStatus.js}"></script> <script type="text/javascript" th:src="@{/js/faStatistics/unlawfulFishing/crackdownInfo.js}"></script>
</th:block> </th:block>
<th:block layout:fragment="css"> <th:block layout:fragment="css">
<style> <style>
@ -18,7 +18,7 @@
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
<main> <main>
<input type="hidden" id="menuKey" value="42"> <input type="hidden" id="menuKey" th:value="${menuKey}">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row justify-content-between"> <div class="row justify-content-between">
@ -31,7 +31,7 @@
<div class="row mx-0"> <div class="row mx-0">
<div class="col-12 card bg-light text-center"> <div class="col-12 card bg-light text-center">
<div class="card-body"> <div class="card-body">
<form method="get" th:action="@{/faStatistics/crackdownStatus}" id="cdsSearchForm"> <form method="get" th:action="@{/faStatistics/crackdownInfo}" id="cdsSearchForm">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}"> <input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between py-1"> <div class="row justify-content-between py-1">
<div class="col-auto"> <div class="col-auto">
@ -537,7 +537,7 @@
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider align-middle"> <tbody class="table-group-divider align-middle">
<th:block th:each="dto,cnt:${crackdownStatusList}"> <th:block th:each="dto,cnt:${crackdownInfoList}">
<tr class="crackdownStatusTr" th:data-cdskey="${dto.cdsKey}" data-modaltype="viewOnly"> <tr class="crackdownStatusTr" th:data-cdskey="${dto.cdsKey}" data-modaltype="viewOnly">
<td th:text="${cnt.count}"></td> <td th:text="${cnt.count}"></td>
<td th:text="${#temporals.format(dto.napoDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(dto.napoDt, 'yyyy-MM-dd HH:mm')}"></td>

View File

@ -1,223 +0,0 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="csEditModalLabel" th:text="${crackdownStatus.cdsKey eq null?'단속현황 작성':'단속현황 수정'}"></h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="#" method="post" id="csEditForm">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="cdsKey" id="cdsKey" th:value="${crackdownStatus.cdsKey}">
<input type="hidden" class="status" name="status" id="crackdownStatus" th:value="${crackdownStatus.status}">
<input type="hidden" name="wrtOrgan" th:value="${crackdownStatus.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${crackdownStatus.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${crackdownStatus.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${crackdownStatus.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${crackdownStatus.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(crackdownStatus.wrtDt, 'yyyy-MM-dd HH:mm:ss')}">
<div class="row mb-1">
<!--<label for="boatNameKr" class="col-sm-1 col-form-label col-form-label-sm text-center">선명</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm boatNameKr" id="boatNameKr" name="fishingBoat.boatNameKr" placeholder="한글" th:value="${crackdownStatus.fishingBoat.boatNameKr}">
</div>-->
<label for="caseNum" class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownStatus.caseNum}">
<!--<div class="input-group">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownStatus.caseNum}">
<input type="button" class="btn btn-sm btn-outline-primary w-auto" id="caseNumBtn" value="불러오기">
</div>-->
</div>
<label for="violationSelector" class="col-sm-1 col-form-label col-form-label-sm text-center">위반사항</label>
<div class="col-sm-1">
<select class="form-select form-select-sm" id="violationSelector">
<option value="">선택</option>
<th:block th:each="code:${vtList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<div class="col-sm-4">
<div class="row" id="violationDiv">
<th:block th:each="violation:${crackdownStatus.violationList}">
<div class="col-6 violation">
<input type="hidden" class="form-control form-control-sm violationCd" th:value="${violation.violation}">
<div class="input-group w-auto">
<th:block th:each="code:${session.commonCode.get('VT')}">
<input type="text" class="form-control form-control-sm" th:if="${code.itemCd eq violation.violation}" th:value="${code.itemValue}">
</th:block>
<button type="button" class="btn btn-sm btn-outline-secondary opacity-75 violationRemoveBtn">
<i class="bi bi-dash-square text-danger"></i>
</button>
</div>
</div>
</th:block>
</div>
</div>
</div>
<div class="row mb-1">
<label for="caseAgency" class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm " id="caseAgency" name="caseAgency">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownStatus.caseAgency}"></option>
</th:block>
</select>
</div>
<label for="casePoliceOfficer" class="col-sm-1 col-form-label col-form-label-sm text-center fs-13">사건담당경찰관</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm " id="casePoliceOfficer" name="casePoliceOfficer" th:value="${crackdownStatus.casePoliceOfficer}">
</div>
<label for="crackdownPolice" class="col-sm-1 col-form-label col-form-label-sm text-center">단속경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownPolice" name="crackdownPolice" id="crackdownPolice">
<option value="">선택</option>
<th:block th:each="code:${cpoList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownStatus.crackdownPolice}"></option>
</th:block>
</select>
</div>
<label for="crackdownBoat" class="col-sm-1 col-form-label col-form-label-sm text-center">단속함정</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownBoat" name="crackdownBoat" id="crackdownBoat" th:data-boatcode="${crackdownStatus.crackdownBoat}">
<option value="">단속경찰서를 선택해주세요.</option>
<th:block th:each="code:${session.commonCode.get(crackdownStatus.crackdownPolice)}">
<th:block th:if="${code.useChk eq 'T'}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownStatus.crackdownBoat}"></option>
</th:block>
</th:block>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">MMSI.NO</label>
<div class="col-sm-2">
<input class="form-control form-control-sm" name="mmsi" th:value="${crackdownStatus.mmsi}">
</div>
<label for="invasionType" class="col-sm-1 col-form-label col-form-label-sm text-center">침범유형</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="invasionType" id="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 crackdownStatus.invasionType}"></option>
</th:block>
</select>
</div>
<label for="nll" class="col-sm-1 col-form-label col-form-label-sm text-center">NLL</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="nll" id="nll">
<option value="">선택</option>
<option value="Y" th:selected="${crackdownStatus.nll == 'Y'}">O</option>
<option value="N" th:selected="${crackdownStatus.nll == 'N'}">X</option>
</select>
</div>
<label for="fieldIvsgt" class="col-sm-1 col-form-label col-form-label-sm text-center">압송/현장조사</label>
<div class="col-sm-2">
<select class="form-select form-select-sm " name="fieldIvsgt" id="fieldIvsgt">
<option value="">선택</option>
<option value="C" th:selected="${crackdownStatus.fieldIvsgt eq 'C'}">압송</option>
<option value="F" th:selected="${crackdownStatus.fieldIvsgt eq 'F'}">현장조사</option>
</select>
</div>
</div>
<div class="row mb-1">
<label for="napoDate" class="col-sm-1 col-form-label col-form-label-sm text-center">나포일시</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" class="form-control form-control-sm dateSelector" id="napoDate" placeholder="yyyy-mm-dd" th:value="${#temporals.format(crackdownStatus.napoDt, 'yyyy-MM-dd')}" autocomplete="off">
<input type="text" class="form-control form-control-sm timeInputer" id="napoTime" placeholder="hh:mm" th:value="${#temporals.format(crackdownStatus.napoDt, 'HH:mm')}" autocomplete="off">
</div>
</div>
<label for="napoSeaPointLon" class="col-sm-1 col-form-label col-form-label-sm text-center">나포장소</label>
<div class="col-sm-5">
<div class="input-group w-auto">
<input type="text" class="form-control form-control-sm w-25 " id="napoSeaPointLon" name="napoSeaPointLon" placeholder="00 . 00 . 00N" th:value="${crackdownStatus.napoSeaPointLon}">
<input type="text" class="form-control form-control-sm w-25 " id="napoSeaPointLat" name="napoSeaPointLat" placeholder="000-00.00E" th:value="${crackdownStatus.napoSeaPointLat}">
<input type="text" class="form-control form-control-sm w-50 " id="napoSeaPointDetail" name="napoSeaPointDetail" placeholder="00도 00방 00해리, 어업협정선 내측 00해리" th:value="${crackdownStatus.napoSeaPointDetail}">
</div>
</div>
</div>
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB2">특수공무집행방해</label>
<div class="col-sm-11 border" id="damageDiv"
th:with="damageFlag=${crackdownStatus.obstrExspdCnt > 0 ||
crackdownStatus.personDamageCnt > 0 ||
crackdownStatus.personDamageAmount > 0 ||
crackdownStatus.personDamageDetail ne null ||
crackdownStatus.materialDamageCnt > 0 ||
crackdownStatus.materialDamageAmount > 0 ||
crackdownStatus.materialDamageDetail ne null}">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB1">인적피해</label>
<div class="col-sm-11 border">
<div class="row m-0">
<label class="col-sm-1 mb-1 col-form-label col-form-label-sm text-center">발생건수</label>
<div class="col-sm-2">
<input type="number" min="0" class="form-control form-control-sm" name="obstrExspdCnt" th:value="${crackdownStatus.obstrExspdCnt}" th:disabled="${!damageFlag}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">피해인원</label>
<div class="col-sm-2">
<input type="number" min="0" class="form-control form-control-sm" name="personDamageCnt" th:value="${crackdownStatus.personDamageCnt}" th:disabled="${!damageFlag}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">피해액</label>
<div class="col-sm-2">
<input type="number" min="0" class="form-control form-control-sm" name="personDamageAmount" placeholder="단위: 만원" th:value="${crackdownStatus.personDamageAmount}" th:disabled="${!damageFlag}">
</div>
<div class="col-sm-3"></div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">상세내용</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" name="personDamageDetail" rows="3" th:utext="${crackdownStatus.personDamageDetail}" th:disabled="${!damageFlag}"></textarea>
</div>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB1">물적피해</label>
<div class="col-sm-11 border">
<div class="row m-0">
<label class="col-sm-1 mb-1 col-form-label col-form-label-sm text-center">발생건수</label>
<div class="col-sm-2">
<input type="number" min="0" class="form-control form-control-sm" name="materialDamageCnt" th:value="${crackdownStatus.materialDamageCnt}" th:disabled="${!damageFlag}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">피해액</label>
<div class="col-sm-2">
<input type="number" min="0" class="form-control form-control-sm" name="materialDamageAmount" placeholder="단위: 만원" th:value="${crackdownStatus.materialDamageAmount}" th:disabled="${!damageFlag}">
</div>
<div class="col-sm-6"></div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">상세내용</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" name="materialDamageDetail" rows="3" th:utext="${crackdownStatus.materialDamageDetail}" th:disabled="${!damageFlag}"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB1">어획물 축소기재</label>
<div class="col-sm-11 border" id="catchDiv"
th:with="catchFlag=${crackdownStatus.catchFishSpecies ne null ||
crackdownStatus.fishingBoat.catchCnt > 0}">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">어종</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" name="fishingBoat.catchFishSpecies" th:value="${crackdownStatus.fishingBoat.catchFishSpecies}" th:disabled="${!catchFlag}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">수량</label>
<div class="col-sm-2">
<input type="number" class="form-control form-control-sm" name="fishingBoat.catchCnt" placeholder="단위: kg" th:value="${crackdownStatus.fishingBoat.catchCnt>0?crackdownStatus.fishingBoat.catchCnt:''}" th:disabled="${!catchFlag}">
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-warning saveEditInfoBtn" data-status="DST001">임시저장</button>
<button type="button" class="btn btn-primary saveEditInfoBtn" data-status="DST007">저장</button>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div>