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

master
강석 최 2023-06-02 18:00:45 +09:00
parent 7758efe7e7
commit 9fba2e5d79
15 changed files with 774 additions and 344 deletions

View File

@ -12,6 +12,7 @@ import com.dbnt.faisp.main.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@ -68,6 +69,11 @@ public class UnlawfulFishingController {
return mav;
}
@PostMapping("/cdiSave")
public void cdiSave(CrackdownInfo crackdownInfo){
System.out.println(crackdownInfo.getCdsKey());
}
@GetMapping("/cdiSelectModal")
public ModelAndView crackdownInfoSelectModal(@AuthenticationPrincipal UserInfo loginUser, CrackdownInfo params){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownInfo/cdiSelectModal");
@ -187,19 +193,15 @@ public class UnlawfulFishingController {
return mav;
}
@GetMapping("/issAddModal")
public ModelAndView illegalShipSailorAddModal(){
return new ModelAndView("faStatistics/unlawfulFishing/illegalShipSailor/issAddModal");
}
@GetMapping("/issEditModal")
public ModelAndView illegalShipSailorEditModal(@AuthenticationPrincipal UserInfo loginUser, IllegalShipSailor illegalShipSailor){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/illegalShipSailor/issEditModal");
if(illegalShipSailor.getSailorKey()!=null){
illegalShipSailor = unlawfulFishingService.selectIllegalShipSailor(illegalShipSailor.getSailorKey());
}else{
illegalShipSailor.setWrtOrgan(loginUser.getOgCd());
illegalShipSailor.setWrtPart(loginUser.getOfcCd());
illegalShipSailor.setWrtUserSeq(loginUser.getUserSeq());
illegalShipSailor.setWrtUserGrd(loginUser.getTitleCd());
illegalShipSailor.setWrtUserNm(loginUser.getUserNm());
illegalShipSailor.setWrtDt(LocalDateTime.now());
}
illegalShipSailor = unlawfulFishingService.selectIllegalShipSailor(illegalShipSailor.getSailorKey());
mav.addObject("illegalShipSailor", illegalShipSailor);
return mav;
}

View File

@ -1,19 +1,12 @@
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
@ -23,7 +16,7 @@ import java.util.List;
@DynamicInsert
@DynamicUpdate
@Table(name = "crackdown_info")
public class CrackdownInfo extends CrackdownStatusBaseEntity {
public class CrackdownInfo extends CrackdownInfoBaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ -34,191 +27,8 @@ public class CrackdownInfo extends CrackdownStatusBaseEntity {
private String status;
@Transient
private List<CrackdownStatusVersion> crackdownStatusVersionList;
private List<CrackdownInfoHistory> crackdownInfoHistoryList;
@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;
private List<ViolationInfo> violationList;
}

View File

@ -0,0 +1,105 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.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.LocalDateTime;
@Getter
@Setter
@NoArgsConstructor
@MappedSuperclass
public class CrackdownInfoBaseEntity extends BaseModel {
/*사건번호*/
@Column(name = "case_num")
private String caseNum;
/*나포일시*/
@Column(name = "napo_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime napoDt;
/*나포장소 위도*/
@Column(name = "napo_sea_point_lon")
private String napoSeaPointLon;
/*나포장소 경도*/
@Column(name = "napo_sea_point_lat")
private String napoSeaPointLat;
/*나포장소 상세*/
@Column(name = "napo_sea_point_detail")
private String napoSeaPointDetail;
/*침범유형*/
@Column(name = "invasion_type")
private String invasionType;
/*nll여부*/
@Column(name = "nll")
private String nll;
/*사건담당경찰서*/
@Column(name = "case_agency")
private String caseAgency;
/*사건담당경찰관*/
@Column(name = "case_police_officer")
private String casePoliceOfficer;
/*단속함정*/
@Column(name = "crackdown_boat")
private String crackdownBoat;
/*단속경찰서*/
@Column(name = "crackdown_police")
private String crackdownPolice;
/*mmsi*/
@Column(name = "mmsi")
private String mmsi;
/*압송/현장조사*/
@Column(name = "field_ivsgt")
private String fieldIvsgt;
/*인적피해 건수*/
@Column(name = "obstr_exspd_cnt")
private Integer obstrExspdCnt;
/*인적피해 인원*/
@Column(name = "person_damage_cnt")
private Integer personDamageCnt;
/*인적피해 금액*/
@Column(name = "person_damage_amount")
private Integer personDamageAmount;
/*인적피해 상세*/
@Column(name = "person_damage_detail")
private String personDamageDetail;
/*물적피해 건수*/
@Column(name = "material_damage_cnt")
private Integer materialDamageCnt;
/*물적피해 금액*/
@Column(name = "material_damage_amount")
private Integer materialDamageAmount;
/*물적피해 상세*/
@Column(name = "material_damage_detail")
private String materialDamageDetail;
/*어획물축소기재 어종*/
@Column(name = "catch_fish_species")
private String catchFishSpecies;
/*어획물축소기재 수량*/
@Column(name = "catch_cnt")
private Integer catchCnt=0;
@Column(name = "wrt_organ")
private String wrtOrgan;
@Column(name = "wrt_part")
private String wrtPart;
@Column(name = "wrt_user_seq")
private Integer wrtUserSeq;
@Column(name = "wrt_user_grd")
private String wrtUserGrd;
@Column(name = "wrt_user_nm")
private String wrtUserNm;
@Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt;
}

View File

@ -15,7 +15,7 @@ import java.io.Serializable;
@DynamicUpdate
@Table(name = "crackdown_info_history")
@IdClass(CrackdownInfoHistory.CrackdownInfoHistoryId.class)
public class CrackdownInfoHistory extends CrackdownStatusBaseEntity {
public class CrackdownInfoHistory extends CrackdownInfoBaseEntity {
@Id
@Column(name = "cds_key")

View File

@ -15,105 +15,106 @@ import java.time.LocalDateTime;
@MappedSuperclass
public class CrackdownStatusBaseEntity extends BaseModel {
@Column(name = "case_num")
private String caseNum;
/*사건번호*/
@Column(name = "case_num")
private String caseNum;
/*나포일시*/
@Column(name = "napo_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime napoDt;
/*나포장소위도*/
@Column(name = "napo_sea_point_lon")
private String napoSeaPointLon;
/*나포장소경도*/
@Column(name = "napo_sea_point_lat")
private String napoSeaPointLat;
/*나포장소상세*/
@Column(name = "napo_sea_point_detail")
private String napoSeaPointDetail;
/*침범유형*/
@Column(name = "invasion_type")
private String invasionType;
/*nll여부*/
@Column(name = "nll")
private String nll;
/*사건담당경찰서*/
@Column(name = "case_agency")
private String caseAgency;
/*사건담당경찰관*/
@Column(name = "case_police_officer")
private String casePoliceOfficer;
/*단속함정*/
@Column(name = "crackdown_boat")
private String crackdownBoat;
/*단속경찰서*/
@Column(name = "crackdown_police")
private String crackdownPolice;
/*mmsi*/
@Column(name = "mmsi")
private String mmsi;
/*압송/현장조사*/
@Column(name = "field_ivsgt")
private String fieldIvsgt;
/*인적피해 건수*/
@Column(name = "obstr_exspd_cnt")
private Integer obstrExspdCnt;
/*인적피해 인원*/
@Column(name = "person_damage_cnt")
private Integer personDamageCnt;
/*인적피해 금액*/
@Column(name = "person_damage_amount")
private Integer personDamageAmount;
/*인적피해 상세*/
@Column(name = "person_damage_detail")
private String personDamageDetail;
/*물적피해 건수*/
@Column(name = "material_damage_cnt")
private Integer materialDamageCnt;
/*물적피해 금액*/
@Column(name = "material_damage_amount")
private Integer materialDamageAmount;
/*물적피해 상세*/
@Column(name = "material_damage_detail")
private String materialDamageDetail;
/*현장조사 나포일시*/
@Column(name = "field_ivsgt_napo_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime fieldIvsgtNapoDt;
/*현장조사 석방일시*/
@Column(name = "field_ivsgt_release_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime fieldIvsgtReleaseDt;
/*현장조사 소요시간*/
@Column(name = "field_ivsgt_time_taken")
private String fieldIvsgtTimeTaken;
/*압송시작일*/
@Column(name = "pressurized_start_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime pressurizedStartDt;
/*압송종료일*/
@Column(name = "pressurized_end_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime pressurizedEndDt;
/*거리*/
@Column(name = "distance")
private String distance;
@Column(name = "napo_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime napoDt;
@Column(name = "wrt_organ")
private String wrtOrgan;
@Column(name = "napo_sea_point_lon")
private String napoSeaPointLon;
@Column(name = "wrt_part")
private String wrtPart;
@Column(name = "napo_sea_point_lat")
private String napoSeaPointLat;
@Column(name = "wrt_user_seq")
private Integer wrtUserSeq;
@Column(name = "napo_sea_point_detail")
private String napoSeaPointDetail;
@Column(name = "wrt_user_grd")
private String wrtUserGrd;
@Column(name = "invasion_type")
private String invasionType;
@Column(name = "wrt_user_nm")
private String wrtUserNm;
@Column(name = "nll")
private String nll;
@Column(name = "case_agency")
private String caseAgency;
@Column(name = "case_police_officer")
private String casePoliceOfficer;
@Column(name = "crackdown_boat")
private String crackdownBoat;
@Column(name = "crackdown_police")
private String crackdownPolice;
@Column(name = "mmsi")
private String mmsi;
@Column(name = "field_ivsgt")
private String fieldIvsgt;
@Column(name = "obstr_exspd_cnt")
private Integer obstrExspdCnt;
@Column(name = "person_damage_cnt")
private Integer personDamageCnt;
@Column(name = "person_damage_amount")
private Integer personDamageAmount;
@Column(name = "person_damage_detail")
private String personDamageDetail;
@Column(name = "material_damage_cnt")
private Integer materialDamageCnt;
@Column(name = "material_damage_amount")
private Integer materialDamageAmount;
@Column(name = "material_damage_detail")
private String materialDamageDetail;
@Column(name = "field_ivsgt_napo_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime fieldIvsgtNapoDt;
@Column(name = "field_ivsgt_release_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime fieldIvsgtReleaseDt;
@Column(name = "field_ivsgt_time_taken")
private String fieldIvsgtTimeTaken;
@Column(name = "pressurized_start_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime pressurizedStartDt;
@Column(name = "pressurized_end_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime pressurizedEndDt;
@Column(name = "distance")
private String distance;
@Column(name = "wrt_organ")
private String wrtOrgan;
@Column(name = "wrt_part")
private String wrtPart;
@Column(name = "wrt_user_seq")
private Integer wrtUserSeq;
@Column(name = "wrt_user_grd")
private String wrtUserGrd;
@Column(name = "wrt_user_nm")
private String wrtUserNm;
@Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt;
@Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt;
}

View File

@ -0,0 +1,40 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus;
import com.dbnt.faisp.config.BaseModel;
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 = "violation_info")
@IdClass(ViolationInfo.ViolationInfoId.class)
public class ViolationInfo extends BaseModel {
@Id
@Column(name = "violation_key")
private Integer violationKey;
@Id
@Column(name = "cds_key")
private Integer cdsKey;
@Column(name = "violation")
private String violation;
@Transient
private String violationEtc;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ViolationInfoId implements Serializable{
private Integer violationKey;
private Integer cdsKey;
}
}

View File

@ -0,0 +1,41 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus;
import com.dbnt.faisp.config.BaseModel;
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 = "violation_info_version")
@IdClass(ViolationInfoVersion.ViolationInfoVersionId.class)
public class ViolationInfoVersion extends BaseModel {
@Id
@Column(name = "violation_key")
private Integer violationKey;
@Id
@Column(name = "cds_key")
private Integer cdsKey;
@Id
@Column(name = "version_no")
private Integer versionNo;
@Column(name = "violation")
private String violation;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ViolationInfoVersionId implements Serializable{
private Integer violationKey;
private Integer cdsKey;
private Integer versionNo;
}
}

View File

@ -250,6 +250,21 @@ function fileCheck(flag, files){
return flag;
}
function getChildOption(parentCd, selectedCd, target){
$.ajax({
url: '/selectBoxOptions',
data: {categoryCd: parentCd, selectedCd: selectedCd},
type: 'GET',
dataType:"html",
success: function(html){
$(target).empty().append(html);
},
error:function(e){
ajaxErrorAction(e);
}
});
}
function dynamicOption(targetTagName, code, defaultOptionName='') {
$(targetTagName).empty();
let option = '';

View File

@ -470,6 +470,7 @@ function valueCheck(status){
}
return true;
}
function calculationReleaseToNapo(form){
let napoDt = form.find("#napoDt").val();
let releaseDt = form.find("#releaseDt").val();

View File

@ -3,6 +3,40 @@ $(document).on('click', '#addCrackdownStatusBtn', function (){
getCsEditModal(null);
})
$(document).on('change', '#violationSelector', function (){
if(this.selectedOptions[0].value !== ""){
if($(".violationCd[value='"+this.selectedOptions[0].value+"']").length===0){
$("#violationDiv").append(
'<div class="col-4 violation">\n' +
' <div class="input-group w-auto">\n' +
' <input type="hidden" class="form-control form-control-sm fishingBoatInfo violationCd" value="'+this.selectedOptions[0].value+'">\n' +
' <input type="text" class="form-control form-control-sm" value="'+this.selectedOptions[0].innerText+'">\n' +
' <button type="button" class="btn btn-sm btn-outline-secondary opacity-75 violationRemoveBtn">\n' +
' <i class="bi bi-dash-square text-danger"></i>\n' +
' </button>\n' +
' </div>\n' +
'</div>'
)
}
}
switch (this.selectedOptions[0].value) {
case "VT011": // 어획량 축소 기재
childInputStateChange(2, $("#catchDiv").find("input"))
break;
case "VT028": // 특수공무집행방해
childInputStateChange(2, $("#damageDiv").find("input, textarea"))
break;
}
})
$(document).on('change', '#crackdownPolice', function (){
getChildOption(this.value, null, "#crackdownBoat");
});
$(document).on('click', '.saveEditInfoBtn', function (){
saveCrackdownInfo($(this).attr("data-status"));
})
function getCsEditModal(cdsKey){
$.ajax({
url: '/unlawfulFishing/cdiEditModal',
@ -23,4 +57,80 @@ function getCsEditModal(cdsKey){
ajaxErrorAction(e);
}
});
}
function childInputStateChange(selectorValue, inputs){
switch (selectorValue){
case 1:
inputs.val('').attr('disabled', 'disabled')
break;
case 2:
inputs.removeAttr('disabled')
break;
}
}
function saveCrackdownInfo(status) {
if (confirm("저장하시겠습니까?")) {
if (valueCheck(status)) {
$(".infoStatus").val(status)
contentFade("in");
const formData = new FormData($("#csEditForm")[0]);
$.each($(".violationCd"), function (idx, input){
formData.append('violationList['+idx+'].violation', $(input).val());
});
$.ajax({
type : 'POST',
data : formData,
url : "/unlawfulFishing/cdiSave",
processData: false,
contentType: false,
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("저장되었습니다.");
contentFade("out");
location.reload();
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.");
contentFade("out");
}
})
}
}
}
function valueCheck(status){
if(status === "DST007"){
if(!$("#caseNum").val()){
alert("사건번호를 입력해주세요")
return false;
}
if($(".violationCd").length<1){
alert("위반사항을 선택해주세요")
return false;
}
if(!$("#caseAgency").val()){
alert("사건담당경찰서를 선택해주세요")
return false;
}
if(!$("#casePoliceOfficer").val()){
alert("사건담당경찰관을 입력해주세요")
return false;
}
if(!$("#crackdownPolice").val()){
alert("단속경찰서를 선택해주세요")
return false;
}
if(!$("#crackdownBoat").val()){
alert("단속함정을 선택해주세요")
return false;
}
}
return true;
}

View File

@ -1,8 +1,57 @@
$(document).on('click', '#addIllegalShipSailorBtn', function (){
getIssEditModal(null);
getIssAddModal();
})
$(document).on('click', '#addSailorTab', function (){
const sailorTab = $("#sailorTab")
const sailorCnt = sailorTab.children().length;
const newTabLiHtml = $("#sailorTabEmptyLi").children().clone();
const liButton = newTabLiHtml.children();
liButton[0].id = "sailor"+sailorCnt+"Tab";
liButton[0].innerText = "선원"+sailorCnt;
$(liButton).attr("data-bs-target", "#sailor"+sailorCnt+"TabPanel");
$(liButton).attr("aria-controls", "sailor"+sailorCnt+"TabPanel");
const newTabContentHtml = $("#sailorTabEmptyDiv").children().clone();
newTabContentHtml[0].id = "sailor"+sailorCnt+"TabPanel";
$(newTabContentHtml).attr("aria-labelledby", "sailor"+sailorCnt+"Tab");
sailorTab.append(newTabLiHtml);
$("#sailorTabContent").append(newTabContentHtml);
sailorTab.append($("#addSailorTab").parents("li"))
$(liButton).click();
})
$(document).on('click', '.deleteTab', function (){
const targetContent = $(this).parents('.tab-pane')
const targetLi = $("#"+targetContent[0].id.replace("Panel", ""));
targetLi.parents("li").remove()
targetContent.remove()
})
function getIssAddModal(){
$.ajax({
url: '/unlawfulFishing/issAddModal',
type: 'GET',
dataType:"html",
success: function(html){
const contentDiv = $("#issAddModalContent");
contentDiv.empty().append(html)
$(".dateSelector").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
$("#issAddModal").modal('show');
},
error:function(e){
ajaxErrorAction(e);
}
});
}
function getIssEditModal(sailorKey){
$.ajax({
url: '/unlawfulFishing/issEditModal',

View File

@ -15,29 +15,33 @@
<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 class="input-group">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownInfo.caseNum}">
<input type="button" class="btn btn-sm btn-outline-primary w-auto" id="caseNumBtn" value="불러오기">
</div>-->
<div class="col-6">
<div class="row">
<label for="caseNum" class="col-sm-2 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-4">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownInfo.caseNum}">
<!--<div class="input-group">
<input type="text" class="form-control form-control-sm " id="caseNum" name="caseNum" th:value="${crackdownInfo.caseNum}">
<input type="button" class="btn btn-sm btn-outline-primary w-auto" id="caseNumBtn" value="불러오기">
</div>-->
</div>
<label for="violationSelector" class="col-sm-2 col-form-label col-form-label-sm text-center">위반사항</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="violationSelector">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('VT')}">
<th:block th:if="${code.useChk eq 'T'}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</th:block>
</select>
</div>
</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:${session.commonCode.get('VT')}">
<th:block th:if="${code.useChk eq 'T'}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-sm-4">
<div class="col-sm-6">
<div class="row" id="violationDiv">
<th:block th:each="violation:${crackdownInfo.violationList}">
<div class="col-6 violation">
<div class="col-4 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')}">
@ -70,7 +74,7 @@
<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}">
<th:block th:each="code:${session.commonCode.get('CPO')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq crackdownInfo.crackdownPolice}"></option>
</th:block>
</select>

View File

@ -27,25 +27,7 @@
<div class="card-body">
<form method="get" th:action="@{/faStatistics/crackdownInfo}" id="cdsSearchForm">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between py-1">
<div class="col-auto">
<div>
<select class="form-select form-select-sm" name="year">
<option value="">연도</option>
<th:block th:each="year : ${yearList}">
<option th:value="${year}" th:text="|${year}년|" th:selected="${searchParams.year eq year}"></option>
</th:block>
</select>
</div>
<div>
<select class="form-select form-select-sm" name="month">
<option value="">월 선택</option>
<th:block th:each="month : ${#numbers.sequence(1, 12)}">
<option th:value="${month}" th:text="|${month}월|" th:selected="${searchParams.month eq month}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end py-1">
<div class="col-8">
<div class="row">
<div class="col-11">

View File

@ -165,16 +165,23 @@
</div>
</div>
</div>
<div class="modal fade" id="issAddModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="issAddModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="issAddModalContent">
</div>
</div>
</div>
<div class="modal fade" id="issEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="issEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xxl modal-dialog-scrollable">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="issEditModalContent">
</div>
</div>
</div>
<div class="modal fade" id="csViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="csViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xxl modal-dialog-scrollable">
<div class="modal-content" id="csViewModalContent">
<div class="modal fade" id="issViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="csViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="issViewModalContent">
</div>
</div>

View File

@ -0,0 +1,263 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="issEditModalLabel">선원 세부 현황 작성</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="issAddForm">
<div class="row px-2 mb-1">
<label for="boatNameKr" class="col-sm-2 col-form-label col-form-label-sm text-center">선명</label>
<div class="col-sm-3">
<div class="input-group">
<input type="hidden" id="fbKey">
<input type="text" class="form-control form-control-sm " id="boatNameKr" readonly>
<input type="button" class="btn btn-sm btn-outline-primary w-auto" id="selectIllegalShipInfoBtn" value="불러오기">
</div>
</div>
</div>
<ul class="nav nav-tabs" id="sailorTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="sailor1Tab" data-bs-toggle="tab" data-bs-target="#sailor1TabPanel" type="button" role="tab"
aria-controls="sailor1TabPanel" aria-selected="true">선원1</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="addSailorTab" data-bs-toggle="tab" type="button">+</button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0" id="sailorTabContent">
<div class="tab-pane fade p-2 show active" id="sailor1TabPanel" role="tabpanel" aria-labelledby="sailor1Tab" tabindex="0">
<div class="row justify-content-end mb-1">
<input type="button" class="btn btn-sm btn-danger col-auto deleteTab" value="삭제">
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선원명(한글)</label>
<div class="col-sm-2">
<input class="form-control form-control-sm sailorNameKr">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선원명(중문)</label>
<div class="col-sm-2">
<input class="form-control form-control-sm sailorNameCn">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">생년월일</label>
<div class="col-sm-2">
<input class="form-control form-control-sm birthdate">
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">거주지</label>
<div class="col-sm-2">
<select class="form-select form-select-sm residence">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('RSC')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">학력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm education">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('SED')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선박 내 직책</label>
<div class="col-sm-2">
<select class="form-select form-select-sm position">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('POS')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">승선경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm career">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('BE')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">동종 범죄경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm similarCriminalHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">이종 범죄경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm heterogeneousCriminalHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">임금</label>
<div class="col-sm-2">
<input class="form-control form-control-sm monthlyWages" placeholder="(0.000위안/월)">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">검거이력(나포이력, 선원 포함)</label>
<div class="col-sm-2">
<select class="form-select form-select-sm arrestHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">범죄경력 세부내용</label>
<div class="col-sm-10">
<input class="form-control form-control-sm criminalHistoryDetail">
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-10">
<input class="form-control form-control-sm note">
</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>
</div>
<div class="d-none" id="sailorTabEmptyLi">
<li class="nav-item" role="presentation">
<button class="nav-link" data-bs-toggle="tab" type="button" role="tab" aria-selected="false"></button>
</li>
</div>
<div class="d-none" id="sailorTabEmptyDiv">
<div class="tab-pane fade p-2" role="tabpanel" tabindex="0">
<div class="row justify-content-end mb-1">
<input type="button" class="btn btn-danger col-1 deleteTab" value="삭제">
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선원명(한글)</label>
<div class="col-sm-2">
<input class="form-control form-control-sm sailorNameKr">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선원명(중문)</label>
<div class="col-sm-2">
<input class="form-control form-control-sm sailorNameCn">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">생년월일</label>
<div class="col-sm-2">
<input class="form-control form-control-sm birthdate">
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">거주지</label>
<div class="col-sm-2">
<select class="form-select form-select-sm residence">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('RSC')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">학력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm education">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('SED')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">선박 내 직책</label>
<div class="col-sm-2">
<select class="form-select form-select-sm position">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('POS')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">승선경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm career">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('BE')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">동종 범죄경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm similarCriminalHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">이종 범죄경력</label>
<div class="col-sm-2">
<select class="form-select form-select-sm heterogeneousCriminalHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">임금</label>
<div class="col-sm-2">
<input class="form-control form-control-sm monthlyWages" placeholder="(0.000위안/월)">
</div>
<label class="col-sm-2 col-form-label col-form-label-sm text-center">검거이력(나포이력, 선원 포함)</label>
<div class="col-sm-2">
<select class="form-select form-select-sm arrestHistory">
<option value="">선택</option>
<option value="1">1건</option>
<option value="2">2건</option>
<option value="3">3건</option>
<option value="4">4이상</option>
<option value="0">없음</option>
</select>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">범죄경력 세부내용</label>
<div class="col-sm-10">
<input class="form-control form-control-sm criminalHistoryDetail">
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-10">
<input class="form-control form-control-sm note">
</div>
</div>
</div>
</div>