불법조업 외국어선 정보 페이지 검색기능 추가.
parent
edfba9ea44
commit
1095c70edb
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus;
|
|||
|
||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||
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.fishingBoat.FishingBoat;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion;
|
||||
|
|
@ -29,23 +30,29 @@ public class FishingBoatController {
|
|||
private final CodeMgtService codeMgtService;
|
||||
|
||||
@RequestMapping("/fishingBoat")
|
||||
public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus) {
|
||||
public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params) {
|
||||
ModelAndView mav = new ModelAndView("faStatistics/fishingBoat/fishingBoatMgt");
|
||||
if(crackdownStatus.getFishingBoat()==null){
|
||||
crackdownStatus.setFishingBoat(new FishingBoat());
|
||||
crackdownStatus.setProcessResult(new ProcessResult());
|
||||
}
|
||||
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/fishingBoat").get(0).getAccessAuth();
|
||||
mav.addObject("accessAuth", accessAuth);
|
||||
|
||||
crackdownStatus.setQueryInfo();
|
||||
List<CrackdownStatus> crackdownStatusList = fishingBoatService.selectFishingBoatList(crackdownStatus);
|
||||
params.setQueryInfo();
|
||||
List<CrackdownStatus> crackdownStatusList = fishingBoatService.selectFishingBoatList(params);
|
||||
|
||||
mav.addObject("crackdownStatusList", crackdownStatusList);
|
||||
crackdownStatus.setContentCnt(fishingBoatService.selectFishingBoatListCnt(crackdownStatus));
|
||||
crackdownStatus.setPaginationInfo();
|
||||
mav.addObject("searchParams", crackdownStatus);
|
||||
params.setContentCnt(fishingBoatService.selectFishingBoatListCnt(params));
|
||||
params.setPaginationInfo();
|
||||
|
||||
if(params.getYear()==null){
|
||||
params.setYear(LocalDateTime.now().getYear());
|
||||
}
|
||||
List<Integer> yearList = fishingBoatService.selectFishingBoatYearParam(params);
|
||||
if(!yearList.contains(params.getYear())){
|
||||
yearList.add(params.getYear());
|
||||
}
|
||||
mav.addObject("yearList", yearList);
|
||||
mav.addObject("searchParams", params);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
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.crackdownStatus.CrackdownStatus;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
|
||||
|
|
@ -14,10 +15,12 @@ public interface CrackdownStatusMapper {
|
|||
List<CrackdownStatus> selectCrackdownStatusList(CrackdownStatus crackdownStatus);
|
||||
Integer selectCrackdownStatusListCnt(CrackdownStatus crackdownStatus);
|
||||
|
||||
List<CrackdownStatus> selectFishingBoatList(CrackdownStatus crackdownStatus);
|
||||
Integer selectFishingBoatListCnt(CrackdownStatus crackdownStatus);
|
||||
List<CrackdownStatus> selectFishingBoatList(UnlawfulFishingParam params);
|
||||
Integer selectFishingBoatListCnt(UnlawfulFishingParam params);
|
||||
List<Integer> selectFishingBoatYearParam(UnlawfulFishingParam params);
|
||||
|
||||
List<CrackdownStatusVersion> selectCrackdownStatusVersionList(Integer cdsKey);
|
||||
List<FishingBoatVersion> selectFishingBoatVersionList(Integer fbKey);
|
||||
List<ProcessResultVersion> selectProcessResultVersionList(Integer prKey);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model;
|
||||
|
||||
|
||||
import com.dbnt.faisp.config.BaseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class UnlawfulFishingParam extends BaseModel {
|
||||
private Integer year;
|
||||
private String caseAgency;
|
||||
private String crackdownPolice;
|
||||
private String crackdownBoat;
|
||||
private String boatNameKr;
|
||||
private String boatNnySung;
|
||||
private String boatNnySi;
|
||||
private Double tonMin;
|
||||
private Double tonMax;
|
||||
private String boatMaterial;
|
||||
private String fisheryType;
|
||||
private List<String> violationList;
|
||||
private String processStatus;
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor;
|
||||
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model;
|
||||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor;
|
||||
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import lombok.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model;
|
||||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor;
|
||||
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import lombok.*;
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor;
|
||||
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFileVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
|
||||
import lombok.*;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository;
|
||||
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorFile;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository;
|
||||
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFileVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorFileVersion;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface SailorFileVersionRepository extends JpaRepository<SailorFileVersion, SailorFileVersion.SailorFileVersionId> {
|
||||
|
|
|
|||
|
|
@ -2,33 +2,22 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.service;
|
|||
|
||||
|
||||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFileVersion;
|
||||
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.CrackdownStatusVersion;
|
||||
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.Violation;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.ViolationVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult;
|
||||
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.SailorVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
|
|
@ -44,12 +33,17 @@ public class FishingBoatService extends BaseService {
|
|||
private final SailorRepository sailorRepository;
|
||||
private final SailorFileRepository sailorFileRepository;
|
||||
|
||||
public List<CrackdownStatus> selectFishingBoatList(CrackdownStatus crackdownStatus){
|
||||
return crackdownStatusMapper.selectFishingBoatList(crackdownStatus);
|
||||
public List<CrackdownStatus> selectFishingBoatList(UnlawfulFishingParam params){
|
||||
return crackdownStatusMapper.selectFishingBoatList(params);
|
||||
}
|
||||
public Integer selectFishingBoatListCnt(CrackdownStatus crackdownStatus){
|
||||
return crackdownStatusMapper.selectFishingBoatListCnt(crackdownStatus);
|
||||
public Integer selectFishingBoatListCnt(UnlawfulFishingParam params){
|
||||
return crackdownStatusMapper.selectFishingBoatListCnt(params);
|
||||
}
|
||||
|
||||
public List<Integer> selectFishingBoatYearParam(UnlawfulFishingParam params) {
|
||||
return crackdownStatusMapper.selectFishingBoatYearParam(params);
|
||||
}
|
||||
|
||||
public CrackdownStatus selectCrackdownStatus(Integer cdsKey) {
|
||||
CrackdownStatus crackdownStatus = crackdownStatusRepository.findById(cdsKey).orElse(null);
|
||||
crackdownStatus.setCrackdownStatusVersionList(crackdownStatusMapper.selectCrackdownStatusVersionList(crackdownStatus.getCdsKey()));
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.service;
|
|||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.SailorMapper;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.SailorFileVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorFile;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorFileVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation;
|
||||
|
|
|
|||
|
|
@ -374,11 +374,118 @@
|
|||
|
||||
<sql id="selectFishingBoatListWhere">
|
||||
<where>
|
||||
|
||||
<if test="year != null and year != 0">
|
||||
and extract(year from a.napo_dt) = ${year}
|
||||
</if>
|
||||
<if test="caseAgency != null and caseAgency != ''">
|
||||
and a.case_agency = #{caseAgency}
|
||||
</if>
|
||||
<if test="crackdownPolice != null and crackdownPolice != ''">
|
||||
and a.crackdown_police = #{crackdownPolice}
|
||||
</if>
|
||||
<if test="crackdownBoat != null and crackdownBoat != ''">
|
||||
and a.crackdown_boat = #{crackdownBoat}
|
||||
</if>
|
||||
<if test="boatNameKr != null and boatNameKr != ''">
|
||||
and b.boat_name_kr like '%'||#{boatNameKr}||'%'
|
||||
</if>
|
||||
<if test="boatNnySung != null and boatNnySung != ''">
|
||||
and b.boat_nny_sung like '%'||#{boatNnySung}||'%'
|
||||
</if>
|
||||
<if test="boatNnySi != null and boatNnySi != ''">
|
||||
and b.boat_nny_si like '%'||#{boatNnySi}||'%'
|
||||
</if>
|
||||
<if test="boatMaterial != null and boatMaterial != ''">
|
||||
and b.boat_material = #{boatMaterial}
|
||||
</if>
|
||||
<if test="fisheryType != null and fisheryType != ''">
|
||||
and b.fishery_type = #{fisheryType}
|
||||
</if>
|
||||
<if test="processStatus != null and processStatus != ''">
|
||||
and c.process_status = #{processStatus}
|
||||
</if>
|
||||
<if test="tonMin != null and tonMin > 0">
|
||||
and b.ton_cnt >= #{tonMin}
|
||||
</if>
|
||||
<if test="tonMax != null and tonMax > 0">
|
||||
and b.ton_cnt <= #{tonMax}
|
||||
</if>
|
||||
<if test='violationList != null'>
|
||||
and
|
||||
<foreach collection="violationList" item="violation" index="index" separator=" or " open="(" close=")">
|
||||
e.violationCode like '%'||#{violation}||'%'
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='dateSelector == "napoDt"'>
|
||||
<if test='startDate != null'>
|
||||
and a.napo_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and a.napo_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "evictionDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.eviction_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.eviction_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "directHandoverDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.direct_handover_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.direct_handover_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "consignmentDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.consignment_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.consignment_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "confiscationDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.confiscation_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.confiscation_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "boatDisposalDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.boat_disposal_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.boat_disposal_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "returnDt"'>
|
||||
<if test='startDate != null'>
|
||||
and c.return_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and c.return_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
<when test='dateSelector == "wrtDt"'>
|
||||
<if test='startDate != null'>
|
||||
and a.wrt_dt >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null'>
|
||||
and a.wrt_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
</when>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectFishingBoatList" resultType="CrackdownStatus" parameterType="CrackdownStatus">
|
||||
<select id="selectFishingBoatList" resultType="CrackdownStatus" parameterType="UnlawfulFishingParam">
|
||||
select a.cds_key,
|
||||
a.napo_dt,
|
||||
a.napo_sea_point_lon,
|
||||
|
|
@ -408,7 +515,9 @@
|
|||
left outer join sailor d
|
||||
on b.fb_key = d.fb_key and d.position = 'POS001'
|
||||
left outer join (
|
||||
select aa.fb_key, array_to_string(array_agg(ab.item_value), ', ') as violationStr
|
||||
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
|
||||
|
|
@ -418,7 +527,7 @@
|
|||
order by a.cds_key desc
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
</select>
|
||||
<select id="selectFishingBoatListCnt" resultType="int" parameterType="CrackdownStatus">
|
||||
<select id="selectFishingBoatListCnt" resultType="int" parameterType="UnlawfulFishingParam">
|
||||
select count(*)
|
||||
from crackdown_status a
|
||||
inner join fishing_boat b
|
||||
|
|
@ -427,8 +536,22 @@
|
|||
on a.cds_key = c.cds_key
|
||||
left outer join sailor d
|
||||
on b.fb_key = d.fb_key and d.position = 'POS001'
|
||||
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
|
||||
) e on b.fb_key = e.fb_key
|
||||
<include refid="selectFishingBoatListWhere"></include>
|
||||
</select>
|
||||
<select id="selectFishingBoatYearParam" resultType="int" parameterType="UnlawfulFishingParam">
|
||||
select distinct extract(year from napo_dt) as year
|
||||
from crackdown_status
|
||||
where napo_dt is not null
|
||||
</select>
|
||||
<select id="selectCrackdownStatusVersionList" resultType="CrackdownStatusVersion" parameterType="int">
|
||||
select cds_key,
|
||||
version_no,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@ let selectedList = [];
|
|||
let fileList = [];
|
||||
$(function (){
|
||||
const searchFormBoat = $("#searchFormBoat")
|
||||
if(searchFormBoat.val()!==""){
|
||||
searchFormBoat.find("."+$("#searchFormPolice").val()).show();
|
||||
const searchFormPolice = $("#searchFormPolice")
|
||||
if(searchFormPolice.val()!==""){
|
||||
searchFormBoat.find("."+searchFormPolice.val()).show();
|
||||
searchFormBoat.removeAttr("disabled");
|
||||
}
|
||||
$("#dateSelectorDiv").datepicker({
|
||||
|
|
@ -11,6 +12,10 @@ $(function (){
|
|||
language: "ko",
|
||||
autoclose: true
|
||||
});
|
||||
setViolationInput();
|
||||
})
|
||||
$(document).on('change', '#year', function (){
|
||||
$("#searchBtn").click();
|
||||
})
|
||||
$(document).on('change', '#searchFormPolice', function (){
|
||||
const searchFormBoat = $("#searchFormBoat")
|
||||
|
|
@ -28,6 +33,9 @@ $(document).on('click', "#violationInput", function (){
|
|||
$(document).on('mouseleave', "#violationSelectDiv", function (){
|
||||
$("#violationSelectDiv").hide();
|
||||
})
|
||||
$(document).on('change', '.violationParams', function (){
|
||||
setViolationInput();
|
||||
})
|
||||
$(document).on('click', '#getFishingBoatEditModalBtn', function (){
|
||||
getFishingBoatEditModal(null);
|
||||
})
|
||||
|
|
@ -323,6 +331,7 @@ function childInputStateChange(selectorValue, inputs){
|
|||
}
|
||||
function saveFishingBoatInfo(status){
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
if(valueCheck(status)){
|
||||
$(".status").val(status)
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#fishingBoatEditForm")[0]);
|
||||
|
|
@ -423,7 +432,18 @@ function saveFishingBoatInfo(status){
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function valueCheck(status){
|
||||
if(!$("#napoDt").val()){
|
||||
alert("나포일시를 입력해주세요")
|
||||
return false;
|
||||
}
|
||||
if(status === "DST007"){
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function calculationReleaseToNapo(form){
|
||||
let napoDt = form.find("#napoDt").val();
|
||||
let releaseDt = form.find("#releaseDt").val();
|
||||
|
|
@ -433,3 +453,16 @@ function calculationReleaseToNapo(form){
|
|||
form.find("#releaseToNapo").val(Math.ceil((releaseDt.getTime()-napoDt.getTime())/(1000*60*60*24))+"일");
|
||||
}
|
||||
}
|
||||
|
||||
function setViolationInput(){
|
||||
let violationInputText = "";
|
||||
$.each($(".violationParams:checked"), function (idx, chkBox){
|
||||
violationInputText += $("[for='"+chkBox.id+"']")[0].innerText+", ";
|
||||
})
|
||||
if(violationInputText.length>30){
|
||||
violationInputText = violationInputText.substr(0, 30)+"...";
|
||||
}else{
|
||||
violationInputText = violationInputText.slice(0, -2)
|
||||
}
|
||||
$("#violationInput").val(violationInputText);
|
||||
}
|
||||
|
|
@ -40,10 +40,10 @@
|
|||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
<select class="form-select form-select-sm" name="year">
|
||||
<option value="">연도</option>
|
||||
<th:block th:each="year : ${#numbers.sequence(2020, 2030)}">
|
||||
<option th:value="${year}" th:text="${year}" th:selected="${searchParams.fishingBoat.year eq year}"></option>
|
||||
<select class="form-select form-select-sm" name="year" id="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>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="caseAgency">
|
||||
<option value="">사건담당경찰서</option>
|
||||
<th:block th:each="code:${session.commonCode.get('ATA')}">
|
||||
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.caseAgency}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
|
|
@ -70,32 +70,35 @@
|
|||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="crackdownBoat" id="searchFormBoat" disabled>
|
||||
<option value="">단속함정</option>
|
||||
<th:block th:each="cpoNum:${#numbers.sequence(1, #lists.size(session.commonCode.get('CPO')))}">
|
||||
<th:block th:each="code:${session.commonCode.get('CPO'+cpoNum)}">
|
||||
<option th:class="${code.categoryCd}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.crackdownBoat}" style="display: none;"></option>
|
||||
<th:block th:each="cpoCode:${session.commonCode.get('CPO')}">
|
||||
<th:block th:each="code:${session.commonCode.get(cpoCode)}">
|
||||
<option th:if="${code.useChk eq 'T'}" th:class="${code.categoryCd}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.crackdownBoat}" style="display: none;"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선명(한글)" name="boatNameKr" th:value="${searchParams.fishingBoat.boatNameKr}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선명(한글)" name="boatNameKr" th:value="${searchParams.boatNameKr}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선적지" name="boatNny" th:value="${searchParams.fishingBoat.boatNny}">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선적지(성)" name="boatNnySung" th:value="${searchParams.boatNnySung}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선적지(시)" name="boatNnySi" th:value="${searchParams.boatNnySi}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="톤수~" name="tonMin" th:value="${searchParams.fishingBoat.tonMin>0?searchParams.fishingBoat.tonMin:''}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="톤수" name="tonMax" th:value="${searchParams.fishingBoat.tonMax>0?searchParams.fishingBoat.tonMax:''}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="톤수~" name="tonMin" th:value="${searchParams.tonMin>0?searchParams.tonMin:''}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="톤수" name="tonMax" th:value="${searchParams.tonMax>0?searchParams.tonMax:''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="boatMaterial">
|
||||
<option value="">선질</option>
|
||||
<th:block th:each="code:${session.commonCode.get('BM')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.fishingBoat.boatMaterial}"></option>
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.boatMaterial}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -103,7 +106,7 @@
|
|||
<select class="form-select form-select-sm" name="fisheryType">
|
||||
<option value="">어업종류</option>
|
||||
<th:block th:each="code:${session.commonCode.get('FT')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.fishingBoat.fisheryType}"></option>
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.fisheryType}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -112,23 +115,19 @@
|
|||
<div class="col-4">
|
||||
<input type="text" class="form-control form-control-sm" id="violationInput" placeholder="위반형태" readonly>
|
||||
<div class="bg-white border p-2 text-start" id="violationSelectDiv">
|
||||
<div th:each="code:${session.commonCode.get('VT')}">
|
||||
<input type="checkbox" name="violation" th:id="|violation${code.itemCd}|" th:value="${code.itemCd}" th:checked="${searchParams.fishingBoat.violation ne null?#strings.contains(searchParams.fishingBoat.violation, code.itemCd):false}">
|
||||
<label th:for="|violation${code.itemCd}|" class="form-label col-form-label-sm" th:text="${code.itemValue}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<!--<select class="form-select form-select-sm" name="violation">
|
||||
<option value="">위반형태</option>
|
||||
<th:block th:each="code:${session.commonCode.get('VT')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.fishingBoat.violation}"></option>
|
||||
<div>
|
||||
<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>
|
||||
</select>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="processStatus">
|
||||
<option value="">처리현황</option>
|
||||
<th:block th:each="code:${session.commonCode.get('PR')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.processResult.processStatus}"></option>
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.processStatus}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -216,7 +215,7 @@
|
|||
</th:block>
|
||||
</td>
|
||||
<td th:text="|${crackdownStatus.boatNnySung} ${crackdownStatus.boatNnySi}|"></td>
|
||||
<td th:text="|${crackdownStatus.tonCnt}t|"></td>
|
||||
<td th:text="|${crackdownStatus.tonCnt ne null?crackdownStatus.tonCnt:'-'}t|"></td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('BM')}">
|
||||
<th:block th:if="${crackdownStatus.boatMaterial eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
|
|
|
|||
Loading…
Reference in New Issue