중간저장.

master
강석 최 2023-05-26 11:55:24 +09:00
parent 0bf8992a05
commit 3c1d46f9e7
14 changed files with 562 additions and 4 deletions

View File

@ -4,8 +4,9 @@ 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.*;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ProcessResult; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ShipProcessInfo;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailor;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.service.UnlawfulFishingService; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.service.UnlawfulFishingService;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -45,7 +46,6 @@ public class UnlawfulFishingController {
List<CrackdownStatusDTO> csDTOList = new ArrayList<>(); List<CrackdownStatusDTO> csDTOList = new ArrayList<>();
CSStatistics statistics = new CSStatistics(); CSStatistics statistics = new CSStatistics();
mav.addObject("statistics", statistics);
mav.addObject("crackdownInfoList", csDTOList); mav.addObject("crackdownInfoList", csDTOList);
mav.addObject("yearList", yearList); mav.addObject("yearList", yearList);
mav.addObject("searchParams", params); mav.addObject("searchParams", params);
@ -69,6 +69,123 @@ public class UnlawfulFishingController {
return mav; return mav;
} }
@GetMapping("/illegalShipInfo")
public ModelAndView illegalShipPage(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/crackdownInfo/illegalShipInfoPage");
//메뉴권한 확인
AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/illegalShipInfo").get(0);
mav.addObject("menuKey", accessConfig.getMenuKey());
mav.addObject("accessAuth", accessConfig.getAccessAuth());
if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear());
}
List<Integer> yearList = unlawfulFishingService.selectFishingBoatYearParam();
if(!yearList.contains(params.getYear())){
yearList.add(params.getYear());
}
List<CrackdownStatusDTO> csDTOList = new ArrayList<>();
CSStatistics statistics = new CSStatistics();
mav.addObject("illegalShipInfoList", csDTOList);
mav.addObject("yearList", yearList);
mav.addObject("searchParams", params);
return mav;
}
@GetMapping("/isiEditModal")
public ModelAndView illegalShipInfoEditModal(@AuthenticationPrincipal UserInfo loginUser, IllegalShipInfo illegalShipInfo){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/illegalShipInfo/isiEditModal");
if(illegalShipInfo.getFbKey()!=null){
illegalShipInfo = unlawfulFishingService.selectIllegalShipInfo(illegalShipInfo.getFbKey());
}else{
illegalShipInfo.setWrtOrgan(loginUser.getOgCd());
illegalShipInfo.setWrtPart(loginUser.getOfcCd());
illegalShipInfo.setWrtUserSeq(loginUser.getUserSeq());
illegalShipInfo.setWrtUserGrd(loginUser.getTitleCd());
illegalShipInfo.setWrtUserNm(loginUser.getUserNm());
illegalShipInfo.setWrtDt(LocalDateTime.now());
}
mav.addObject("illegalShipInfo", illegalShipInfo);
return mav;
}
@GetMapping("/shipProcessInfo")
public ModelAndView shipProcessInfoPage(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/shipProcessInfo/shipProcessInfoPage");
//메뉴권한 확인
AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/shipProcessInfo").get(0);
mav.addObject("menuKey", accessConfig.getMenuKey());
mav.addObject("accessAuth", accessConfig.getAccessAuth());
if(params.getYear()==null){
params.setYear(LocalDateTime.now().getYear());
}
List<Integer> yearList = unlawfulFishingService.selectFishingBoatYearParam();
if(!yearList.contains(params.getYear())){
yearList.add(params.getYear());
}
List<CrackdownStatusDTO> csDTOList = new ArrayList<>();
CSStatistics statistics = new CSStatistics();
mav.addObject("shipProcessInfoList", csDTOList);
mav.addObject("yearList", yearList);
mav.addObject("searchParams", params);
return mav;
}
@GetMapping("/spiEditModal")
public ModelAndView shipProcessInfoEditModal(@AuthenticationPrincipal UserInfo loginUser, ShipProcessInfo shipProcessInfo){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/shipProcessInfo/spiEditModal");
if(shipProcessInfo.getCdsKey()!=null){
shipProcessInfo = unlawfulFishingService.selectShipProcessInfo(shipProcessInfo.getPrKey());
}else{
shipProcessInfo.setWrtOrgan(loginUser.getOgCd());
shipProcessInfo.setWrtPart(loginUser.getOfcCd());
shipProcessInfo.setWrtUserSeq(loginUser.getUserSeq());
shipProcessInfo.setWrtUserGrd(loginUser.getTitleCd());
shipProcessInfo.setWrtUserNm(loginUser.getUserNm());
shipProcessInfo.setWrtDt(LocalDateTime.now());
}
mav.addObject("shipProcessInfo", shipProcessInfo);
return mav;
}
@GetMapping("/illegalShipSailor")
public ModelAndView illegalShipSailorPage(@AuthenticationPrincipal UserInfo loginUser, UnlawfulFishingParam params){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/illegalShipSailor/illegalShipSailorPage");
//메뉴권한 확인
AccessConfig accessConfig = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/unlawfulFishing/illegalShipSailor").get(0);
mav.addObject("menuKey", accessConfig.getMenuKey());
mav.addObject("accessAuth", accessConfig.getAccessAuth());
List<CrackdownStatusDTO> csDTOList = new ArrayList<>();
mav.addObject("sailorList", csDTOList);
mav.addObject("searchParams", params);
return mav;
}
@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());
}
mav.addObject("illegalShipSailor", illegalShipSailor);
return mav;
}
@GetMapping("/crackdownStatusVersionInfo") @GetMapping("/crackdownStatusVersionInfo")
public ModelAndView selectUnlawfulFishingVersionInfo(Integer cdsKey, Integer versionNo){ public ModelAndView selectUnlawfulFishingVersionInfo(Integer cdsKey, Integer versionNo){
ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/versionInfo"); ModelAndView mav = new ModelAndView("faStatistics/unlawfulFishing/versionInfo");

View File

@ -0,0 +1,52 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "illegal_ship_info")
public class IllegalShipInfo extends FishingBoatBaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "fb_key")
private Integer fbKey;
@Column(name="status")
private String status;
@Transient
private String year;
@Transient
private String caseAgency;
@Transient
private String crackdownPolice;
@Transient
private String crackdownBoat;
@Transient
private String boatNny;
@Transient
private String processStatus;
@Transient
private String violation;
@Transient
private String boatMaterialEtc;
@Transient
private String fisheryTypeEtc;
@Transient
private Double tonMin;
@Transient
private Double tonMax;
}

View File

@ -0,0 +1,39 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "illegal_ship_info_history")
@IdClass(IllegalShipInfoHistory.IllegalShipInfoHistoryId.class)
public class IllegalShipInfoHistory extends FishingBoatBaseEntity {
@Id
@Column(name = "fb_key")
private Integer fbKey;
@Id
@Column(name = "version_no")
private Integer versionNo;
@Transient
private List<ViolationVersion> violationList;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class IllegalShipInfoHistoryId implements Serializable {
private Integer fbKey;
private Integer versionNo;
}
}

View File

@ -0,0 +1,68 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.Violation;
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 javax.persistence.*;
import java.time.LocalDateTime;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "ship_process_info")
public class ShipProcessInfo extends ProcessResultBaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "pr_key")
private Integer prKey;
@Column(name = "cds_key")
private Integer cdsKey;
@Column(name="status")
private String status;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDateTime updDt;
@Transient
private CrackdownStatus crackdownStatus;
@Transient
private List<Violation> violationList;
@Transient
private FishingBoat fishingBoat;
@Transient
private String boatNameKr;
@Transient
private Integer fbKey;
@Transient
private String processStatusEtc;
@Transient
private String executionDetailEtc;
@Transient
private List<CrackdownStatus> crackdownStatusList;
@Transient
private List<FishingBoat> fishingBoatList;
@Transient
private String caseNum;
@Transient
private String crackdownPolice;
@Transient
private Integer year;
@Transient
private String violation;
}

View File

@ -0,0 +1,52 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.Violation;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "ship_process_info_history")
@IdClass(ShipProcessInfoHistory.ShipProcessInfoHistoryId.class)
public class ShipProcessInfoHistory extends ProcessResultBaseEntity {
@Id
@Column(name = "pr_key")
private Integer prKey;
@Id
@Column(name = "version_no")
private Integer versionNo;
@Transient
private Integer cdsKey;
@Transient
private Integer fbKey;
@Transient
private CrackdownStatus crackdownStatus;
@Transient
private FishingBoat fishingBoat;
@Transient
private List<Violation> violationList;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ShipProcessInfoHistoryId implements Serializable {
private Integer prKey;
private Integer versionNo;
}
}

View File

@ -0,0 +1,64 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.Violation;
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 javax.persistence.*;
import java.time.LocalDateTime;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "illegal_ship_sailor")
public class IllegalShipSailor extends SailorBaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "sailor_key")
private Integer sailorKey;
@Column(name = "fb_key")
private Integer fbKey;
@Column(name = "status")
private String status;
@Transient
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDateTime updDt;
@Transient
private Integer cdsKey;
@Transient
private CrackdownStatus crackdownStatus;
@Transient
private FishingBoat fishingBoat;
@Transient
private List<FishingBoat> fishingBoatList;
@Transient
private List<Violation> violationList;
@Transient
private String year;
@Transient
private String crackdownPolice;
@Transient
private String crackdownBoat;
@Transient
private String boatNameKr;
@Transient
private LocalDateTime napoDt;
@Transient
private List<SailorFile> fileList;
}

View File

@ -0,0 +1,56 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.FishingBoat;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "illegal_ship_sailor_history")
@IdClass(IllegalShipSailorHistory.IllegalShipSailorHistoryId.class)
public class IllegalShipSailorHistory extends SailorBaseEntity {
@Id
@Column(name = "version_no")
private Integer versionNo;
@Id
@Column(name = "sailor_key")
private Integer sailorKey;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class IllegalShipSailorHistoryId implements Serializable {
private Integer versionNo;
private Integer sailorKey;
}
/*@Transient
private CrackdownStatusVersion crackdownStatusVersion;
@Transient
private FishingBoatVersion fishingBoatVersion;*/
@Transient
private Integer cdsKey;
@Transient
private Integer fbKey;
@Transient
private CrackdownStatus crackdownStatus;
@Transient
private FishingBoat fishingBoat;
@Transient
private List<SailorFileVersion> fileList;
}

View File

@ -0,0 +1,10 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfoHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;
public interface IllegalShipInfoHistoryRepository extends JpaRepository<IllegalShipInfoHistory, IllegalShipInfoHistory.IllegalShipInfoHistoryId> {
Optional<IllegalShipInfoHistory> findTop1ByFbKeyOrderByVersionNoDesc(Integer fbKey);
}

View File

@ -0,0 +1,18 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.fishingBoat.IllegalShipInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import java.util.Optional;
public interface IllegalShipInfoRepository extends JpaRepository<IllegalShipInfo, Integer> {
Optional<IllegalShipInfo> findByCdsKey(Integer cdsKey);
Optional<IllegalShipInfo> findByFbKey(Integer fbKey);
@Modifying(clearAutomatically = true)
@Query("update IllegalShipInfo set status = :status where fbKey = :fbKey")
void bulkModifyingByFbKeyToStatus(Integer fbKey, String status);
}

View File

@ -0,0 +1,14 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailorHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
public interface IllegalShipSailorHistoryRepository extends JpaRepository<IllegalShipSailorHistory, IllegalShipSailorHistory.IllegalShipSailorHistoryId> {
Optional<IllegalShipSailorHistory> findTopBySailorKeyOrderByVersionNoDesc(Integer sailorKey);
List<IllegalShipSailorHistory> findBySailorKey(Integer sailorKey);
IllegalShipSailorHistory findByVersionNoAndSailorKey(Integer versionNo, Integer sailorKey);
}

View File

@ -0,0 +1,22 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
public interface IllegalShipSailorRepository extends JpaRepository<IllegalShipSailor, Integer> {
List<IllegalShipSailor> findByFbKey(Integer fbKey);
@Transactional
@Modifying
@Query("delete from IllegalShipSailor s where s.sailorKey in :idList")
void deleteAllByIdInQuery(@Param("idList") List<Integer> sailorDeleteKeyList);
Optional<IllegalShipSailor> findBySailorKey(Integer sailorKey);
}

View File

@ -0,0 +1,13 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ShipProcessInfoHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
public interface ShipProcessInfoHistoryRepository extends JpaRepository<ShipProcessInfoHistory, ShipProcessInfoHistory.ShipProcessInfoHistoryId> {
Optional<ShipProcessInfoHistory> findTopByPrKeyOrderByVersionNoDesc(Integer prKey);
List<ShipProcessInfoHistory> findByPrKey(Integer prKey);
}

View File

@ -0,0 +1,11 @@
package com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ShipProcessInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;
public interface ShipProcessInfoRepository extends JpaRepository<ShipProcessInfo, Integer> {
Optional<ShipProcessInfo> findByCdsKey(Integer cdsKey);
Optional<ShipProcessInfo> findByPrKey(Integer prKey);
}

View File

@ -4,9 +4,12 @@ import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.crackdownStatus.Cr
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.fishingBoat.IllegalShipInfo;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.processResult.ShipProcessInfo;
import com.dbnt.faisp.main.faStatistics.unlawfulFishing.model.sailor.IllegalShipSailor;
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.CrackdownInfoRepository; import com.dbnt.faisp.main.faStatistics.unlawfulFishing.repository.*;
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;
@ -23,6 +26,13 @@ public class UnlawfulFishingService {
private final SailorService sailorService; private final SailorService sailorService;
private final CrackdownInfoRepository cdiRepository; private final CrackdownInfoRepository cdiRepository;
private final CrackdownInfoHistoryRepository cdihRepository;
private final IllegalShipInfoRepository isiRepository;
private final IllegalShipInfoHistoryRepository isihRepository;
private final ShipProcessInfoRepository spiRepository;
private final ShipProcessInfoHistoryRepository spihRepository;
private final IllegalShipSailorRepository issRepository;
private final IllegalShipSailorHistoryRepository isshRepository;
private final UnlawfulFishingMapper unlawfulFishingMapper; private final UnlawfulFishingMapper unlawfulFishingMapper;
@Transactional @Transactional
@ -90,4 +100,16 @@ public class UnlawfulFishingService {
public CrackdownInfo selectCrackdownInfo(Integer cdsKey) { public CrackdownInfo selectCrackdownInfo(Integer cdsKey) {
return cdiRepository.findByCdsKey(cdsKey).orElse(new CrackdownInfo()); return cdiRepository.findByCdsKey(cdsKey).orElse(new CrackdownInfo());
} }
public IllegalShipInfo selectIllegalShipInfo(Integer fbKey) {
return isiRepository.findByFbKey(fbKey).orElse(new IllegalShipInfo());
}
public ShipProcessInfo selectShipProcessInfo(Integer prKey) {
return spiRepository.findByPrKey(prKey).orElse(new ShipProcessInfo());
}
public IllegalShipSailor selectIllegalShipSailor(Integer sailorKey) {
return issRepository.findBySailorKey(sailorKey).orElse(new IllegalShipSailor());
}
} }