From 9c0a598fb2e6df14d66882e6e8d068943c1d4cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Tue, 1 Nov 2022 18:05:39 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=88=EB=B2=95=EC=A1=B0=EC=97=85=20?= =?UTF-8?q?=EC=99=B8=EA=B5=AD=EC=96=B4=EC=84=A0=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FishingBoatController.java | 100 +++++++++ .../crackdownsStatus/model/FishingBoat.java | 157 +++++++------ .../fishingBoat/fishingBoatMgt.html | 212 ++++++++++++++++++ 3 files changed, 397 insertions(+), 72 deletions(-) create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java create mode 100644 src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java new file mode 100644 index 00000000..75ca508b --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java @@ -0,0 +1,100 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus; + +import com.dbnt.faisp.main.authMgt.service.AuthMgtService; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CrackdownStatus; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.FishingBoat; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.ProcessResult; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.CrackdownStatusRepository; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.FishingBoatRepository; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ViolationRepository; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.ProcessResultService; +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; + +import java.time.LocalDateTime; +import java.util.List; + +@RestController +@RequiredArgsConstructor +@RequestMapping("/faStatistics") +public class FishingBoatController { + + private final AuthMgtService authMgtService; + private final ProcessResultService processResultService; + private final ViolationRepository violationRepository; + private final CrackdownStatusRepository crackdownStatusRepository; + private final FishingBoatRepository fishingBoatRepository; + + @RequestMapping("/fishingBoat") + public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, FishingBoat fishingBoat) { + ModelAndView mav = new ModelAndView("faStatistics/fishingBoat/fishingBoatMgt"); + + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/fishingBoat").get(0).getAccessAuth(); + + mav.addObject("accessAuth", accessAuth); + + fishingBoat.setQueryInfo(); + /*List processResultList = processResultService.selectProcessResultList(fishingBoat); + + for (ProcessResult pr:processResultList) { + pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey())); + pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey())); + pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey())); + } + + mav.addObject("processResultList", processResultList); + fishingBoat.setContentCnt(processResultService.selectProcessResultListCnt(fishingBoat)); + */ + fishingBoat.setPaginationInfo(); + mav.addObject("searchParams", fishingBoat); + return mav; + } + + @GetMapping("/fishingBoatViewModal") + public ModelAndView fishingBoatViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){ + ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultViewModal"); + processResult = processResultService.selectProcessResult(processResult.getPrKey()); + processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey())); + processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getFbKey()); + processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getBoatNameKr()); + processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey())); + + mav.addObject("processResult", processResult); + mav.addObject("userSeq",loginUser.getUserSeq()); + //메뉴권한 확인 + mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth()); + return mav; + } + + @GetMapping("/fishingBoatEditModal") + public ModelAndView crackdownStatusEditModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){ + ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultEditModal"); + if(processResult.getPrKey()!=null){ + processResult = processResultService.selectProcessResult(processResult.getPrKey()); + processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey())); + processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getFbKey()); + processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getBoatNameKr()); + processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey())); + }else{ + processResult.setWrtOrgan(loginUser.getOgCd()); + processResult.setWrtNm(loginUser.getUserNm()); + processResult.setWrtDt(LocalDateTime.now()); + } + mav.addObject("processResult", processResult); + return mav; + } + + @PostMapping("/saveFishingBoat") + public Integer saveFishingBoat(@AuthenticationPrincipal UserInfo loginUser, + FishingBoat fishingBoat){ + return 0; + // return processResultService.saveProcessResult(processResult); + } +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/FishingBoat.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/FishingBoat.java index 9f0fd2e7..1c5cfc6d 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/FishingBoat.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/FishingBoat.java @@ -20,108 +20,121 @@ import java.time.LocalDateTime; @Table(name = "fishing_boat") public class FishingBoat extends BaseModel { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "fb_key") - private Integer fbKey; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "fb_key") + private Integer fbKey; - @Column(name = "cds_key") - private Integer cdsKey; + @Column(name = "cds_key") + private Integer cdsKey; - @Column(name = "boat_name_kr") - private String boatNameKr; + @Column(name = "boat_name_kr") + private String boatNameKr; - @Column(name = "boat_name_cn") - private String boatNameCn; + @Column(name = "boat_name_cn") + private String boatNameCn; - @Column(name = "permit_num") - private String permitNum; + @Column(name = "permit_num") + private String permitNum; - @Column(name = "nationality") - private String nationality; + @Column(name = "nationality") + private String nationality; - @Column(name = "ton_cnt") - private Integer tonCnt; + @Column(name = "ton_cnt") + private Integer tonCnt; - @Column(name = "fishery_type") - private String fisheryType; + @Column(name = "fishery_type") + private String fisheryType; - @Column(name = "boat_material") - private String boatMaterial; + @Column(name = "boat_material") + private String boatMaterial; - @Column(name = "boat_nny_sung") - private String boatNnySung; + @Column(name = "boat_nny_sung") + private String boatNnySung; - @Column(name = "boat_nny_si") - private String boatNnySi; + @Column(name = "boat_nny_si") + private String boatNnySi; - @Column(name = "offense_type") - private String offenseType; + @Column(name = "offense_type") + private String offenseType; - @Column(name = "offense_quantity") - private Integer offenseQuantity; + @Column(name = "offense_quantity") + private Integer offenseQuantity; - @Column(name = "offense_amount") - private Integer offenseAmount; + @Column(name = "offense_amount") + private Integer offenseAmount; - @Column(name = "offense_illegal_waste_quantity") - private Integer offenseIllegalWasteQuantity; + @Column(name = "offense_illegal_waste_quantity") + private Integer offenseIllegalWasteQuantity; - @Column(name = "dambo_unpaid_amount") - private Integer damboUnpaidAmount; + @Column(name = "dambo_unpaid_amount") + private Integer damboUnpaidAmount; - @Column(name = "dambo_payment") - private Integer damboPayment; + @Column(name = "dambo_payment") + private Integer damboPayment; - @Column(name = "payment_payment_dt") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime paymentPaymentDt; + @Column(name = "payment_payment_dt") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime paymentPaymentDt; - @Column(name = "confiscation_frame") - private String confiscationFrame; + @Column(name = "confiscation_frame") + private String confiscationFrame; - @Column(name = "confiscation_width") - private String confiscationWidth; + @Column(name = "confiscation_width") + private String confiscationWidth; - @Column(name = "confiscation_jo") - private String confiscationJo; + @Column(name = "confiscation_jo") + private String confiscationJo; - @Column(name = "confiscation_gae") - private String confiscationGae; + @Column(name = "confiscation_gae") + private String confiscationGae; - @Column(name = "confiscation_etc") - private String confiscationEtc; + @Column(name = "confiscation_etc") + private String confiscationEtc; - @Column(name = "catch_fish_species") - private String catchFishSpecies; + @Column(name = "catch_fish_species") + private String catchFishSpecies; - @Column(name = "catch_cnt") - private Integer catchCnt; + @Column(name = "catch_cnt") + private Integer catchCnt; - @Column(name = "offense_fish_species") - private String offenseFishSpecies; + @Column(name = "offense_fish_species") + private String offenseFishSpecies; - @Column(name = "offense_catch_cnt") - private Integer offenseCatchCnt; + @Column(name = "offense_catch_cnt") + private Integer offenseCatchCnt; - @Column(name = "save_yn") - private String saveYn; + @Column(name = "save_yn") + private String saveYn; - @Column(name = "wrt_organ") - private String wrtOrgan; + @Column(name = "wrt_organ") + private String wrtOrgan; - @Column(name = "wrt_user_seq") - private Integer wrtUserSeq; + @Column(name = "wrt_user_seq") + private Integer wrtUserSeq; - @Column(name = "wrt_nm") - private String wrtNm; + @Column(name = "wrt_nm") + private String wrtNm; - @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; - @Transient - private String boatMaterialEtc; - @Transient - private String fisheryTypeEtc; + @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; } diff --git a/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html new file mode 100644 index 00000000..847e3f71 --- /dev/null +++ b/src/main/resources/templates/faStatistics/fishingBoat/fishingBoatMgt.html @@ -0,0 +1,212 @@ + + + + + + +
+
+
+

불법조업 외국어선 정보

+

외사통계 > 불법조업외국어선 > 불법조업 외국어선 정보

+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
나포일시나포해점사건담당
경찰서
단속경찰서단속함정선명선장명어업종류선적지톤수선질위반형태처리결과
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+ + + +
+ \ No newline at end of file