From b81bff3b71f392aadc9ef828193923ac3d06910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 29 Dec 2022 18:16:45 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=A9=EC=B2=A9=EA=B3=B5=EC=9E=91=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 --- .../com/dbnt/faisp/config/BaseController.java | 6 +- .../com/dbnt/faisp/config/SecurityConfig.java | 1 + .../faisp/kwms/model/VHordYundongStat.java | 54 ------ .../VHordYundongStatRepository.java | 13 -- .../repository/CodeCatgRepository.java | 4 +- .../codeMgt/repository/CodeMgtRepository.java | 2 +- .../main/codeMgt/service/CodeMgtService.java | 10 +- .../CounterIntelligenceController.java | 66 +++++++ .../mapper/CounterIntelligenceMapper.java | 14 ++ .../counterIntelligence/model/CiwFile.java | 46 +++++ .../model/CounterIntelligenceWork.java | 71 ++++++++ .../model/HashTagLinkCiw.java | 36 ++++ .../repository/CiwFileRepository.java | 14 ++ .../CounterIntelligenceWorkRepository.java | 9 + .../repository/HashTagLinkCiwRepository.java | 9 + .../service/CounterIntelligenceService.java | 27 +++ .../main/faRpt/model/HashTagLinkFaRpt.java | 3 +- .../resources/application-prod.properties | 8 +- .../CounterIntelligenceMapper.xml | 14 ++ src/main/resources/static/css/common.css | 5 + .../static/js/counterIntelligence/ciWork.js | 46 +++++ .../resources/static/js/menuMgt/menuMgt.js | 2 +- .../adminPage/authMgt/authEditModal.html | 16 +- .../templates/adminPage/codeMgt/codeMgt2.html | 96 +++++----- .../counterIntelligence/ciWorkBoard.html | 164 ++++++++++++++++++ .../counterIntelligence/ciWorkEditModal.html | 133 ++++++++++++++ .../counterIntelligence/ciWorkViewModal.html | 123 +++++++++++++ 27 files changed, 854 insertions(+), 138 deletions(-) delete mode 100644 src/main/java/com/dbnt/faisp/kwms/model/VHordYundongStat.java delete mode 100644 src/main/java/com/dbnt/faisp/kwms/repository/VHordYundongStatRepository.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/mapper/CounterIntelligenceMapper.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiwFile.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CounterIntelligenceWork.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/model/HashTagLinkCiw.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CiwFileRepository.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CounterIntelligenceWorkRepository.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/HashTagLinkCiwRepository.java create mode 100644 src/main/java/com/dbnt/faisp/main/counterIntelligence/service/CounterIntelligenceService.java create mode 100644 src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml create mode 100644 src/main/resources/static/js/counterIntelligence/ciWork.js create mode 100644 src/main/resources/templates/counterIntelligence/ciWorkBoard.html create mode 100644 src/main/resources/templates/counterIntelligence/ciWorkEditModal.html create mode 100644 src/main/resources/templates/counterIntelligence/ciWorkViewModal.html diff --git a/src/main/java/com/dbnt/faisp/config/BaseController.java b/src/main/java/com/dbnt/faisp/config/BaseController.java index d21362ab..38b73582 100644 --- a/src/main/java/com/dbnt/faisp/config/BaseController.java +++ b/src/main/java/com/dbnt/faisp/config/BaseController.java @@ -70,20 +70,20 @@ public class BaseController { ModelAndView mav = new ModelAndView("login/dashboard"); PublicBoard noticeParams = new PublicBoard(); noticeParams.setPublicType("PLB001"); - noticeParams.setRowCnt(5); + noticeParams.setRowCnt(8); noticeParams.setDownOrganCdList(loginUser.getDownOrganCdList()); noticeParams.setUpOrganCdList(loginUser.getUpOrganCdList()); mav.addObject("noticeList", publicBoardService.selectContentList(noticeParams)); FaRptBoard faRpt = new FaRptBoard(); faRpt.setActiveTab("receive"); - faRpt.setRowCnt(5); + faRpt.setRowCnt(8); faRpt.setStatus("DST007"); faRpt.setReceiveUserSeq(loginUser.getUserSeq()); mav.addObject("faRptList", faRptService.selectFaRptList(faRpt)); AffairBoard affair = new AffairBoard(); affair.setAffairCategory("CAT215"); affair.setRatingOrgan(loginUser.getOgCd()); - affair.setRowCnt(5); + affair.setRowCnt(8); mav.addObject("affair1List", affairService.selectAffairBoardList(affair)); affair.setAffairCategory("CAT216"); mav.addObject("affair2List", affairService.selectAffairBoardList(affair)); diff --git a/src/main/java/com/dbnt/faisp/config/SecurityConfig.java b/src/main/java/com/dbnt/faisp/config/SecurityConfig.java index f342114b..ee19e71a 100644 --- a/src/main/java/com/dbnt/faisp/config/SecurityConfig.java +++ b/src/main/java/com/dbnt/faisp/config/SecurityConfig.java @@ -128,6 +128,7 @@ public class SecurityConfig{ "/translator/**", "/police/**", "/sri/**", + "/counterIntelligence/**", "/resetSession" ).hasRole(Role.USER.name()) // USER 접근 허용 .antMatchers( diff --git a/src/main/java/com/dbnt/faisp/kwms/model/VHordYundongStat.java b/src/main/java/com/dbnt/faisp/kwms/model/VHordYundongStat.java deleted file mode 100644 index e75b38fb..00000000 --- a/src/main/java/com/dbnt/faisp/kwms/model/VHordYundongStat.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.dbnt.faisp.kwms.model; - -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import org.hibernate.annotations.DynamicInsert; -import org.hibernate.annotations.DynamicUpdate; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import java.time.LocalDate; -import java.time.LocalDateTime; - -@Getter -@Setter -@Entity -@NoArgsConstructor -//@DynamicInsert -//@DynamicUpdate -//@Table(name = "V_HORD_YUNDONG_STAT") -public class VHordYundongStat { -// @Id -// @Column(name = "HORD_YUNDONG_CD") -// private String hordYundongCd; -// @Column(name = "DIC_CODE") -// private String dicCode; -// @Column(name = "IMYONG_GUBUN_CD") -// private String imyongGubunCd; -// @Column(name = "IMYONG_GUBUN_NM") -// private String imyongGubunNm; -// @Column(name = "BUSEO_CD") -// private String buseoCd; -// @Column(name = "JIKGEUP_CD") -// private String jikgeupCd; -// @Column(name = "START_DATE") -// private LocalDate startDate; -// @Column(name = "END_DATE") -// private LocalDate endDate; -// @Column(name = "WORK_DAY") -// private Integer workDay; -// @Column(name = "WORK_MONTH") -// private Integer workMonth; -// @Column(name = "WORK_MONTH_DESC") -// private String workMonthDesc; -// @Column(name = "IMYONGBUSEO_CHONGCHING") -// private String imyongbuseoChongching; -// @Column(name = "IMYONG_JIKGEUP_NM") -// private String imyongJikgeupNm; -// @Column(name = "SYS_DATE") -// private LocalDateTime sysDate; - -} diff --git a/src/main/java/com/dbnt/faisp/kwms/repository/VHordYundongStatRepository.java b/src/main/java/com/dbnt/faisp/kwms/repository/VHordYundongStatRepository.java deleted file mode 100644 index efd39c5f..00000000 --- a/src/main/java/com/dbnt/faisp/kwms/repository/VHordYundongStatRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.dbnt.faisp.kwms.repository; - -import com.dbnt.faisp.kwms.model.VHordYundongStat; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - - -//public interface VHordYundongStatRepository extends JpaRepository { -public interface VHordYundongStatRepository { - -// List findByDicCodeOrderByStartDateDesc(String dicCode); -} diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeCatgRepository.java b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeCatgRepository.java index 258c9db1..e60e4ce8 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeCatgRepository.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeCatgRepository.java @@ -3,7 +3,9 @@ package com.dbnt.faisp.main.codeMgt.repository; import com.dbnt.faisp.main.codeMgt.model.CodeCatg; import org.springframework.data.jpa.repository.JpaRepository; +import java.util.List; + public interface CodeCatgRepository extends JpaRepository { - + List findAllByOrderByCategoryCd(); } diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java index 20efb506..2e3b69dc 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java @@ -13,6 +13,6 @@ public interface CodeMgtRepository extends JpaRepository findByCategoryCdAndUseChkOrderByOrderNumAsc(String categoryCd, String useChk); Optional findByCategoryCdAndItemValue(String categoryCd, String itemValue); List findByUseChkOrderByItemCdAsc(String useChk); - List findByOrderByOrderNumAsc(); + List findByOrderByOrderNumAscItemCdAsc(); Optional findTop1ByCategoryCdOrderByItemCdDesc(String categoryCd); } diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java b/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java index 4a9aabf5..94c909b1 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java @@ -65,7 +65,7 @@ public class CodeMgtService{ } public List selectCodeCatgAndChild() { - List codeCatgList = codeCatgRepository.findAll(); + List codeCatgList = codeCatgRepository.findAllByOrderByCategoryCd(); for(CodeCatg codeCatg: codeCatgList){ codeCatg.setItemList(codeMgtRepository.findByCategoryCdOrderByItemCdAsc(codeCatg.getCategoryCd())); } @@ -73,8 +73,8 @@ public class CodeMgtService{ } public Map> getCommonCode() { - List categoryList = codeCatgRepository.findAll(); - List codeList = codeMgtRepository.findByOrderByOrderNumAsc(); + List categoryList = codeCatgRepository.findAllByOrderByCategoryCd(); + List codeList = codeMgtRepository.findByOrderByOrderNumAscItemCdAsc(); Map> categoryMap = new HashMap<>(); for(CodeCatg category: categoryList){ List childList = new ArrayList<>(); @@ -102,10 +102,10 @@ public class CodeMgtService{ } public List selectAllCategoryList() { - return codeCatgRepository.findAll(); + return codeCatgRepository.findAllByOrderByCategoryCd(); } public List selectAllCodeList() { - return codeMgtRepository.findByOrderByOrderNumAsc(); + return codeMgtRepository.findByOrderByOrderNumAscItemCdAsc(); } } diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java new file mode 100644 index 00000000..7fe9baea --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/CounterIntelligenceController.java @@ -0,0 +1,66 @@ +package com.dbnt.faisp.main.counterIntelligence; + +import com.dbnt.faisp.main.authMgt.service.AuthMgtService; +import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; +import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; +import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceService; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import java.time.LocalDateTime; +import java.util.ArrayList; + +@RestController +@RequiredArgsConstructor +@RequestMapping("/counterIntelligence") +public class CounterIntelligenceController { + private final CounterIntelligenceService ciService; + private final AuthMgtService authMgtService; + private final CodeMgtService codeMgtService; + + @GetMapping("/ciWorkList") + public ModelAndView ciWorkListPage(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceWork ciWork){ + ModelAndView mav = new ModelAndView("counterIntelligence/ciWorkBoard"); + mav.addObject("searchUrl", "/counterIntelligence/ciWorkList"); + String accessAuth = authMgtService.selectAccessConfigList + (loginUser.getUserSeq(), "/counterIntelligence/ciWorkList").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + if(accessAuth.equals("ACC003")){ + mav.addObject("downOrganCdList", loginUser.getDownOrganCdList()); + } + + ciWork.setQueryInfo(); + mav.addObject("faRptList", new ArrayList()); + ciWork.setContentCnt(0); + ciWork.setPaginationInfo(); + mav.addObject("searchParams", ciWork); + return mav; + } + + @GetMapping("/ciWorkEditModal") + public ModelAndView ciWorkEditModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceWork ciWork){ + ModelAndView mav = new ModelAndView("counterIntelligence/ciWorkEditModal"); + + mav.addObject("ciwrCodeList", codeMgtService.selectCodeMgtList("CIWR")); + mav.addObject("atCodeList", codeMgtService.selectCodeMgtList("AT")); + mav.addObject("at2CodeList", ciWork.getCiwKey()!=null?codeMgtService.selectCodeMgtList(ciWork.getArrestType2()):null); + if(ciWork.getCiwKey()==null){ + ciWork.setWrtOrgan(loginUser.getOgCd()); + ciWork.setWrtPart(loginUser.getOfcCd()); + ciWork.setWrtUserSeq(loginUser.getUserSeq()); + ciWork.setWrtUserGrd(loginUser.getTitleCd()); + ciWork.setWrtUserNm(loginUser.getUserNm()); + ciWork.setWrtDt(LocalDateTime.now()); + }else{ + ciWork = ciService.selectCounterIntelligenceWork(ciWork.getCiwKey()); + + } + mav.addObject("ciWork", ciWork); + return mav; + } +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/mapper/CounterIntelligenceMapper.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/mapper/CounterIntelligenceMapper.java new file mode 100644 index 00000000..45ccad15 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/mapper/CounterIntelligenceMapper.java @@ -0,0 +1,14 @@ +package com.dbnt.faisp.main.counterIntelligence.mapper; + +import com.dbnt.faisp.main.faRpt.model.FaRptBoard; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + + +@Mapper +public interface CounterIntelligenceMapper { + + String selectHashTags(Integer ciwKey); + +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiwFile.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiwFile.java new file mode 100644 index 00000000..fa28ad5c --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CiwFile.java @@ -0,0 +1,46 @@ +package com.dbnt.faisp.main.counterIntelligence.model; + +import com.dbnt.faisp.config.FileInfo; +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 = "ciw_file") +@IdClass(CiwFile.CiwFileId.class) +public class CiwFile extends FileInfo { + @Id + @Column(name = "ciw_key") + private Integer ciwKey; + @Id + @Column(name = "file_seq") + private Integer fileSeq; + @Column(name = "orig_nm") + private String origNm; + @Column(name = "conv_nm") + private String convNm; + @Column(name = "file_extn") + private String fileExtn; + @Column(name = "file_size") + private String fileSize; + @Column(name = "save_path") + private String savePath; + + + @Embeddable + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class CiwFileId implements Serializable { + private Integer ciwKey; + private Integer fileSeq; + } +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CounterIntelligenceWork.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CounterIntelligenceWork.java new file mode 100644 index 00000000..af0f13aa --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/CounterIntelligenceWork.java @@ -0,0 +1,71 @@ +package com.dbnt.faisp.main.counterIntelligence.model; + +import com.dbnt.faisp.config.BaseModel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; +import org.springframework.web.multipart.MultipartFile; + +import javax.persistence.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; + +@Getter +@Setter +@Entity +@NoArgsConstructor +@DynamicInsert +@DynamicUpdate +@Table(name = "counter_intelligence_work") +public class CounterIntelligenceWork extends BaseModel { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ciw_key") + private Integer ciwKey; + @Column(name = "status") + private String status; + @Column(name = "work_rating") + private String workRating; + @Column(name = "work_start_date") + private LocalDate workStartDate; + @Column(name = "work_end_date") + private LocalDate workEndDate; + @Column(name = "re_rating_date1") + private LocalDate reRatingDate1; + @Column(name = "re_rating_date2") + private LocalDate reRatingDate2; + @Column(name = "arrest_type1") + private String arrestType1; + @Column(name = "arrest_type2") + private String arrestType2; + @Column(name = "title") + private String title; + @Column(name = "summary_info") + private String summaryInfo; + @Column(name = "content") + private String content; + @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") + private LocalDateTime wrtDt; + + @Transient + private String hashTags; + @Transient + private Integer fileCnt; + @Transient + private List fileList; + @Transient + private List multipartFileList; +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/HashTagLinkCiw.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/HashTagLinkCiw.java new file mode 100644 index 00000000..0d090775 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/model/HashTagLinkCiw.java @@ -0,0 +1,36 @@ +package com.dbnt.faisp.main.counterIntelligence.model; + +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 = "hash_tag_link_ciw") +@IdClass(HashTagLinkCiw.HashTagLinkCiwId.class) +public class HashTagLinkCiw { + @Id + @Column(name = "ciw_key") + private Integer ciwKey; + @Id + @Column(name = "tag_key") + private Integer tagKey; + + + @Embeddable + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class HashTagLinkCiwId implements Serializable { + private Integer ciwKey; + private Integer tagKey; + } + +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CiwFileRepository.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CiwFileRepository.java new file mode 100644 index 00000000..20569d88 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CiwFileRepository.java @@ -0,0 +1,14 @@ +package com.dbnt.faisp.main.counterIntelligence.repository; + +import com.dbnt.faisp.main.counterIntelligence.model.CiwFile; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +import java.util.Optional; + + +public interface CiwFileRepository extends JpaRepository { + List findByCiwKey(Integer ciwKey); + Optional findTopByCiwKeyOrderByFileSeq(Integer ciwKey); + +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CounterIntelligenceWorkRepository.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CounterIntelligenceWorkRepository.java new file mode 100644 index 00000000..3f978eac --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/CounterIntelligenceWorkRepository.java @@ -0,0 +1,9 @@ +package com.dbnt.faisp.main.counterIntelligence.repository; + +import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; +import org.springframework.data.jpa.repository.JpaRepository; + + +public interface CounterIntelligenceWorkRepository extends JpaRepository { + +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/HashTagLinkCiwRepository.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/HashTagLinkCiwRepository.java new file mode 100644 index 00000000..02d29b94 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/repository/HashTagLinkCiwRepository.java @@ -0,0 +1,9 @@ +package com.dbnt.faisp.main.counterIntelligence.repository; + +import com.dbnt.faisp.main.counterIntelligence.model.HashTagLinkCiw; +import org.springframework.data.jpa.repository.JpaRepository; + + +public interface HashTagLinkCiwRepository extends JpaRepository { + void deleteByCiwKey(Integer ciwKey); +} diff --git a/src/main/java/com/dbnt/faisp/main/counterIntelligence/service/CounterIntelligenceService.java b/src/main/java/com/dbnt/faisp/main/counterIntelligence/service/CounterIntelligenceService.java new file mode 100644 index 00000000..3e652fc0 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/counterIntelligence/service/CounterIntelligenceService.java @@ -0,0 +1,27 @@ +package com.dbnt.faisp.main.counterIntelligence.service; + +import com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper; +import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; +import com.dbnt.faisp.main.counterIntelligence.repository.CiwFileRepository; +import com.dbnt.faisp.main.counterIntelligence.repository.CounterIntelligenceWorkRepository; +import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class CounterIntelligenceService { + private final CounterIntelligenceMapper ciMapper; + private final CounterIntelligenceWorkRepository ciwRepository; + private final CiwFileRepository ciwFileRepository; + private final HashTagLinkCiwRepository hashTagLinkCiwRepository; + + public CounterIntelligenceWork selectCounterIntelligenceWork(Integer ciwKey) { + CounterIntelligenceWork ciw = ciwRepository.findById(ciwKey).orElse(null); + if(ciw!=null){ + ciw.setFileList(ciwFileRepository.findByCiwKey(ciwKey)); + ciw.setHashTags(ciMapper.selectHashTags(ciwKey)); + } + return ciw; + } +} diff --git a/src/main/java/com/dbnt/faisp/main/faRpt/model/HashTagLinkFaRpt.java b/src/main/java/com/dbnt/faisp/main/faRpt/model/HashTagLinkFaRpt.java index 39db389c..7d631c65 100644 --- a/src/main/java/com/dbnt/faisp/main/faRpt/model/HashTagLinkFaRpt.java +++ b/src/main/java/com/dbnt/faisp/main/faRpt/model/HashTagLinkFaRpt.java @@ -1,6 +1,5 @@ package com.dbnt.faisp.main.faRpt.model; -import com.dbnt.faisp.config.FileInfo; import lombok.*; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; @@ -16,7 +15,7 @@ import java.io.Serializable; @DynamicUpdate @Table(name = "hash_tag_link_fa_rpt") @IdClass(HashTagLinkFaRpt.HashTagLinkFaRptId.class) -public class HashTagLinkFaRpt extends FileInfo { +public class HashTagLinkFaRpt { @Id @Column(name = "fa_rpt_key") private Integer faRptKey; diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 063984fc..767b53e8 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -6,7 +6,7 @@ spring.servlet.multipart.location=/backup/faisp/uploadFiles spring.servlet.multipart.max-file-size=200MB spring.servlet.multipart.max-request-size=500MB -site.domain=10.187.58.46:8080 +site.domain=10.187.58.15 #file file.dir=/backup/faisp/uploadFiles @@ -37,9 +37,9 @@ spring.datasource-main.username=faisp spring.datasource-main.password=dbnt0928! #tibero spring.datasource-kwms.driverClassName=com.tmax.tibero.jdbc.TbDriver -spring.datasource-kwms.jdbcUrl=jdbc:tibero:thin:@10.29.2.199:8629:tibero -spring.datasource-kwms.username=smartonek_hrms -spring.datasource-kwms.password=SmartOneK5715 +spring.datasource-kwms.jdbcUrl=jdbc:tibero:thin:@10.188.171.206:9629:KCGHRDB +spring.datasource-kwms.username=KCGEXT +spring.datasource-kwms.password=kcgextuser #jpa spring.jpa.show-sql=false diff --git a/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml new file mode 100644 index 00000000..53a51370 --- /dev/null +++ b/src/main/resources/mybatisMapper/CounterIntelligenceMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/css/common.css b/src/main/resources/static/css/common.css index 8635f35d..e255f3fd 100644 --- a/src/main/resources/static/css/common.css +++ b/src/main/resources/static/css/common.css @@ -115,4 +115,9 @@ } .mouse-hover:hover{ cursor: pointer; +} + +.codeMgtDiv{ + max-height: 700px; + overflow-y: auto; } \ No newline at end of file diff --git a/src/main/resources/static/js/counterIntelligence/ciWork.js b/src/main/resources/static/js/counterIntelligence/ciWork.js new file mode 100644 index 00000000..4dc5c7f5 --- /dev/null +++ b/src/main/resources/static/js/counterIntelligence/ciWork.js @@ -0,0 +1,46 @@ +$(document).on('click', '#addCiWorkBtn', function (){ + getCiWorkEditModal(null); +}) + +$(document).on('click', '#arrestType1', function (){ + getArrestType2Option(this.value); +}) + +function getCiWorkEditModal(ciwKey){ + $.ajax({ + url: '/counterIntelligence/ciWorkEditModal', + data: {ciwKey: ciwKey}, + type: 'GET', + dataType:"html", + success: function(html){ + $("#ciWorkEditModalContent").empty().append(html) + $(".dateSelector").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + setUploadDiv(); + setEditor('editor', '400'); + $("#ciWorkEditModal").modal('show'); + }, + error:function(){ + + } + }); +} + +function getArrestType2Option(categoryCd){ + $.ajax({ + url: '/selectBoxOptions', + data: {categoryCd: categoryCd}, + type: 'GET', + dataType:"html", + success: function(html){ + const arrestType2 = $("#arrestType2"); + arrestType2.empty().append(html); + }, + error:function(){ + + } + }); +} \ No newline at end of file diff --git a/src/main/resources/static/js/menuMgt/menuMgt.js b/src/main/resources/static/js/menuMgt/menuMgt.js index 37a5bd28..dfdf3b1c 100644 --- a/src/main/resources/static/js/menuMgt/menuMgt.js +++ b/src/main/resources/static/js/menuMgt/menuMgt.js @@ -51,8 +51,8 @@ $(document).on('click', '#saveMenuBtn', function (){ if(result!==""){ alert("url: "+result+"로 저장되어있습니다.") }else{ - // location.reload(); alert("저장되었습니다.") + location.reload(); } contentFade("out"); }, diff --git a/src/main/resources/templates/adminPage/authMgt/authEditModal.html b/src/main/resources/templates/adminPage/authMgt/authEditModal.html index a963f67e..bebb2585 100644 --- a/src/main/resources/templates/adminPage/authMgt/authEditModal.html +++ b/src/main/resources/templates/adminPage/authMgt/authEditModal.html @@ -8,10 +8,10 @@ 대분류 중분류 소분류 + 해제 - 해제 @@ -35,14 +35,14 @@ + + + - - - @@ -54,10 +54,10 @@ 대분류 중분류 소분류 + 해제 - 해제 @@ -81,14 +81,14 @@ + + + - - - diff --git a/src/main/resources/templates/adminPage/codeMgt/codeMgt2.html b/src/main/resources/templates/adminPage/codeMgt/codeMgt2.html index ea3eeaec..4f2fa75e 100644 --- a/src/main/resources/templates/adminPage/codeMgt/codeMgt2.html +++ b/src/main/resources/templates/adminPage/codeMgt/codeMgt2.html @@ -31,27 +31,29 @@ - - - - - - - - - - - - - - - - - +
+
분류코드분류명설명
+ + + + + - - -
분류코드분류명설명
+ + + + + + + + + + + + + + + @@ -63,33 +65,35 @@ - - - - - - - - - - - - - - - - - - - - +
+
하위코드코드값정렬순번사용
+ + + + + + - - - - - -
하위코드코드값정렬순번사용
분류를 선택해주세요.
+ + + + + + + + + + + + + + + + + 분류를 선택해주세요. + + + diff --git a/src/main/resources/templates/counterIntelligence/ciWorkBoard.html b/src/main/resources/templates/counterIntelligence/ciWorkBoard.html new file mode 100644 index 00000000..72d4ab88 --- /dev/null +++ b/src/main/resources/templates/counterIntelligence/ciWorkBoard.html @@ -0,0 +1,164 @@ + + + + + +
+
+
+
+

방첩공작

+
+
+

외사방첩관리 > 방첩공작

+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
분류제목관서부서작성자작성일시첨부파일열람수
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ + + +
+ \ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciWorkEditModal.html b/src/main/resources/templates/counterIntelligence/ciWorkEditModal.html new file mode 100644 index 00000000..ea68e6af --- /dev/null +++ b/src/main/resources/templates/counterIntelligence/ciWorkEditModal.html @@ -0,0 +1,133 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/counterIntelligence/ciWorkViewModal.html b/src/main/resources/templates/counterIntelligence/ciWorkViewModal.html new file mode 100644 index 00000000..b35ce0a2 --- /dev/null +++ b/src/main/resources/templates/counterIntelligence/ciWorkViewModal.html @@ -0,0 +1,123 @@ + + + + + \ No newline at end of file