From 7a990fbccd99777efe78f47c2d5f89eeb7b634c4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-QGC5RJO\\DBNT" Date: Mon, 9 Jan 2023 18:01:36 +0900 Subject: [PATCH] =?UTF-8?q?ASF=20=EB=B0=8F=20=EC=BD=94=EB=A1=9C=EB=82=9819?= =?UTF-8?q?=20=EA=B4=80=EB=A0=A8=EC=A1=B0=EC=B9=98=EC=82=AC=ED=95=AD=201?= =?UTF-8?q?=EC=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crackdownsStatus/AsfCovController.java | 64 +++ .../crackdownsStatus/mapper/AsfCovMapper.java | 16 + .../crackdownsStatus/model/asfCov/AsfCov.java | 78 +++ .../repository/AsfCovRepository.java | 14 + .../service/AsfCovService.java | 33 ++ .../resources/mybatisMapper/AsfCovMapper.xml | 104 ++++ .../templates/faStatistics/asfCov/asfCov.html | 444 ++++++++++++++++++ .../faStatistics/asfCov/asfCovEditModal.html | 331 +++++++++++++ .../faStatistics/asfCov/asfCovViewModal.html | 10 + 9 files changed, 1094 insertions(+) create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/AsfCovController.java create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/mapper/AsfCovMapper.java create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/asfCov/AsfCov.java create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/AsfCovRepository.java create mode 100644 src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/AsfCovService.java create mode 100644 src/main/resources/mybatisMapper/AsfCovMapper.xml create mode 100644 src/main/resources/templates/faStatistics/asfCov/asfCov.html create mode 100644 src/main/resources/templates/faStatistics/asfCov/asfCovEditModal.html create mode 100644 src/main/resources/templates/faStatistics/asfCov/asfCovViewModal.html diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/AsfCovController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/AsfCovController.java new file mode 100644 index 00000000..a7396062 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/AsfCovController.java @@ -0,0 +1,64 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus; + + + +import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov.AsfCov; +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.processResult.ProcessResult; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.AsfCovService; +import com.dbnt.faisp.main.userInfo.model.UserInfo; +import lombok.RequiredArgsConstructor; +import org.springframework.security.core.annotation.AuthenticationPrincipal; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + + + +@RestController +@RequiredArgsConstructor +@RequestMapping("/faStatistics") +public class AsfCovController { + + private final AsfCovService asfCovService; + private final CodeMgtService codeMgtService; + + @GetMapping("/asfCov") + public ModelAndView asfCove(@AuthenticationPrincipal UserInfo loginUser, AsfCov asfCov) { + ModelAndView mav = new ModelAndView("faStatistics/asfCov/asfCov"); + + mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); + mav.addObject("searchParams", asfCov); + + asfCov.setQueryInfo(); + mav.addObject("asfCovList", asfCovService.selectAsfCovList(asfCov)); + asfCov.setPaginationInfo(); + return mav; + } + + @GetMapping("/asfCovEditModal") + public ModelAndView asfCovEditModal(@AuthenticationPrincipal UserInfo loginUser, AsfCov asfCov) { + ModelAndView mav = new ModelAndView("faStatistics/asfCov/asfCovEditModal"); + if (asfCov.getAsfcovKey() != null) { + asfCov = asfCovService.selectAsfCov(asfCov.getAsfcovKey()); + } else { + asfCov.setWrtOrgan(loginUser.getOgCd()); + asfCov.setWrtPart(loginUser.getOfcCd()); + asfCov.setWrtUserSeq(loginUser.getUserSeq()); + asfCov.setWrtUserGrd(loginUser.getTitleCd()); + asfCov.setWrtUserNm(loginUser.getUserNm()); + asfCov.setWrtDt(loginUser.getWrtDt()); + asfCov.setWrtDt(loginUser.getWrtDt()); + } + mav.addObject("asfCov", asfCov); + mav.addObject("userSeq", loginUser.getUserSeq()); + + return mav; + } +} + + diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/mapper/AsfCovMapper.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/mapper/AsfCovMapper.java new file mode 100644 index 00000000..d859bb70 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/mapper/AsfCovMapper.java @@ -0,0 +1,16 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper; + +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov.AsfCov; +import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface AsfCovMapper { + List selectAsfCovList(AsfCov asfCov); + Integer selectAsfCovListCnt(AsfCov asfCov); + + List selectAsfCovListWhere(AsfCov asfCov); + +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/asfCov/AsfCov.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/asfCov/AsfCov.java new file mode 100644 index 00000000..9d5bbf4b --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/asfCov/AsfCov.java @@ -0,0 +1,78 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov; + +import com.dbnt.faisp.config.BaseModel; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusBaseEntity; +import io.micrometer.core.annotation.Counted; +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; + +@Getter +@Setter +@Entity +@NoArgsConstructor +@DynamicInsert +@DynamicUpdate +@Table(name="asfcov_status") +public class AsfCov extends BaseModel { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "asfcov_key") + private Integer asfcovKey; + + @Column(name="version_no") + private Integer versionNo; + + @Column(name = "cds_key") + private Integer cdsKey; + + @Column(name ="person_cnt") + private Integer personCnt; + + @Column(name ="pressurized_yn") + private String pressurizedYn; + + @Column(name ="pressurized_n") + private String pressurizedN; + + @Column(name ="person_negative_cnt") + private Integer personNegativeCnt; + + @Column(name ="person_positive_cnt") + private Integer personPositiveCnt; + + @Column(name ="asfcov_action_detail") + private String asfcovActionDetail; + + @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_organ") + private String wrtOrgan; + + @Column(name="wrt_user_seq") + private Integer wrtUserSeq; + + @Column(name = "wrt_part") + private String wrtPart; + + @Transient + private CrackdownStatus crackdownStatus; + + @Transient + private Integer caseNum; +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/AsfCovRepository.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/AsfCovRepository.java new file mode 100644 index 00000000..5bf25b8f --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/AsfCovRepository.java @@ -0,0 +1,14 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository; + +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov.AsfCov; + +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +import java.util.Optional; + +public interface AsfCovRepository extends JpaRepository { + + // void deleteByAsfCov(Integer asfcovKey); + +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/AsfCovService.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/AsfCovService.java new file mode 100644 index 00000000..a7f21316 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/AsfCovService.java @@ -0,0 +1,33 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.service; + +import com.dbnt.faisp.config.BaseService; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.AsfCovMapper; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov.AsfCov; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.AsfCovRepository; +import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor +public class AsfCovService extends BaseService { + + private final AsfCovMapper asfCovMapper; + private final AsfCovRepository asfCovRepository; + + public List selectAsfCovList(AsfCov asfCov){ + return asfCovMapper.selectAsfCovList(asfCov); + } + + public Integer selectAsfCovListCnt(AsfCov asfCov) { + return asfCovMapper.selectAsfCovListCnt(asfCov); + } + + public AsfCov selectAsfCov(Integer asfcovKey) { + AsfCov asfCov= asfCovRepository.findById(asfcovKey).orElse(null); + + return asfCov; + } +} diff --git a/src/main/resources/mybatisMapper/AsfCovMapper.xml b/src/main/resources/mybatisMapper/AsfCovMapper.xml new file mode 100644 index 00000000..95b63702 --- /dev/null +++ b/src/main/resources/mybatisMapper/AsfCovMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + a.content_status <> 'DST008' + + and a.major_type = #{majorType} + + + and a.wrt_organ = #{wrtOrgan} + + + AND a.content_title LIKE CONCAT('%', #{contentTitle}, '%') + + + AND a.wrt_user_nm LIKE CONCAT('%', #{wrtUserNm}, '%') + + + and a.wrt_dt >= #{startDate}::date + + + and a.wrt_dt <= #{endDate}::date+1 + + + and a.wrt_organ in + + #{organCd} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/faStatistics/asfCov/asfCov.html b/src/main/resources/templates/faStatistics/asfCov/asfCov.html new file mode 100644 index 00000000..37825f23 --- /dev/null +++ b/src/main/resources/templates/faStatistics/asfCov/asfCov.html @@ -0,0 +1,444 @@ + + + + + +
+
+ + +
+

ASF 및 코로나19 관련 조치현황

+

외사통계 > 불법조업외국어선 > ASF및코로나19관련조치현황

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
사건번호나포일시선명관서전용부두 압송여부코로나19 검사결과검·방역조치 내용최종수정일
사건담당경찰서단속경찰서단속함정압송미압송
현장조사기타검사인원양성음성
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ + + + +
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/faStatistics/asfCov/asfCovEditModal.html b/src/main/resources/templates/faStatistics/asfCov/asfCovEditModal.html new file mode 100644 index 00000000..ee4df89e --- /dev/null +++ b/src/main/resources/templates/faStatistics/asfCov/asfCovEditModal.html @@ -0,0 +1,331 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/faStatistics/asfCov/asfCovViewModal.html b/src/main/resources/templates/faStatistics/asfCov/asfCovViewModal.html new file mode 100644 index 00000000..566549bd --- /dev/null +++ b/src/main/resources/templates/faStatistics/asfCov/asfCovViewModal.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file