사건보고서 작업중.
parent
b7a502ff6a
commit
ae8c069842
|
|
@ -10,7 +10,7 @@ import com.dbnt.faisp.main.fpiMgt.affairResult.service.ResultService;
|
|||
import com.dbnt.faisp.main.fpiMgt.intelligenceNetwork.service.IntelligenceNetworkService;
|
||||
import com.dbnt.faisp.main.fpiMgt.monitoring.service.MonitoringService;
|
||||
import com.dbnt.faisp.main.faRpt.service.SriService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service.BoardInvestigationService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service.IvsgtService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.service.MajorStatusService;
|
||||
import com.dbnt.faisp.main.publicBoard.service.PublicBoardService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -48,7 +48,7 @@ public class FileController extends BaseService{
|
|||
private final PublicBoardService publicBoardService;
|
||||
private final AffairService affairService;
|
||||
private final ResultService resultService;
|
||||
private final BoardInvestigationService boardInvestigationService;
|
||||
private final IvsgtService ivsgtService;
|
||||
private final FishingBoatService fishingBoatService;
|
||||
private final SailorService sailorService;
|
||||
private final SriService sriService;
|
||||
|
|
@ -212,7 +212,7 @@ public class FileController extends BaseService{
|
|||
downloadFile = resultService.selectResultFile(parentKey, fileSeq);
|
||||
break;
|
||||
case "ivsgt":
|
||||
downloadFile = boardInvestigationService.selectIvsgtFile(parentKey, fileSeq);
|
||||
downloadFile = ivsgtService.selectIvsgtFile(parentKey, fileSeq);
|
||||
break;
|
||||
case "sailor":
|
||||
downloadFile = sailorService.selectSailorFile(parentKey, fileSeq);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper;
|
||||
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.asfCov.AsfCov;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation;
|
||||
|
||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.RelatedReports;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service.BoardInvestigationService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationBoard;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationRelatedReports;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service.IvsgtService;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
|
|
@ -21,12 +20,12 @@ import java.util.List;
|
|||
public class IvsgtController {
|
||||
|
||||
private final AuthMgtService authMgtService;
|
||||
private final BoardInvestigationService boardInvestigationService;
|
||||
private final IvsgtService ivsgtService;
|
||||
|
||||
@GetMapping("/{ivsgtType}")
|
||||
public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType, BoardInvestigation boardInvestigation) {
|
||||
public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType, InvestigationBoard investigationBoard) {
|
||||
ModelAndView mav = new ModelAndView("ivsgt/ivsgt");
|
||||
boardInvestigation.setIvsgtType(ivsgtType);
|
||||
investigationBoard.setIvsgtType(ivsgtType);
|
||||
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth();
|
||||
|
|
@ -34,34 +33,38 @@ public class IvsgtController {
|
|||
mav.addObject("accessAuth", accessAuth);
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
|
||||
boardInvestigation.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
boardInvestigation.setQueryInfo();
|
||||
mav.addObject("boardInvestigationList", boardInvestigationService.selectBoardInvestigationList(boardInvestigation));
|
||||
boardInvestigation.setContentCnt(boardInvestigationService.selectBoardInvestigationListCnt(boardInvestigation));
|
||||
boardInvestigation.setPaginationInfo();
|
||||
mav.addObject("searchParams", boardInvestigation);
|
||||
investigationBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
investigationBoard.setQueryInfo();
|
||||
mav.addObject("investigationList", ivsgtService.selectBoardInvestigationList(investigationBoard));
|
||||
investigationBoard.setContentCnt(ivsgtService.selectBoardInvestigationListCnt(investigationBoard));
|
||||
investigationBoard.setPaginationInfo();
|
||||
mav.addObject("searchParams", investigationBoard);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/ivsgtEditModal")
|
||||
public ModelAndView ivsgtEditModal(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation){
|
||||
public ModelAndView ivsgtEditModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
||||
ModelAndView mav = new ModelAndView("ivsgt/ivsgtEditModal");
|
||||
if(boardInvestigation.getIvsgtKey()!=null){
|
||||
boardInvestigation = boardInvestigationService.selectBoardInvestigation(boardInvestigation.getIvsgtKey());
|
||||
if(investigationBoard.getIvsgtKey()!=null){
|
||||
investigationBoard = ivsgtService.selectBoardInvestigation(investigationBoard.getIvsgtKey());
|
||||
}else{
|
||||
boardInvestigation.setWrtOrgan(loginUser.getOgCd());
|
||||
boardInvestigation.setWrtNm(loginUser.getUserNm());
|
||||
boardInvestigation.setWrtDt(LocalDateTime.now());
|
||||
|
||||
investigationBoard.setWrtOrgan(loginUser.getOgCd());
|
||||
investigationBoard.setWrtPart(loginUser.getOfcCd());
|
||||
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||
investigationBoard.setWrtUserGrd(loginUser.getTitleCd());
|
||||
investigationBoard.setWrtUserNm(loginUser.getUserNm());
|
||||
investigationBoard.setWrtDt(LocalDateTime.now());
|
||||
}
|
||||
mav.addObject("boardInvestigation", boardInvestigation);
|
||||
mav.addObject("investigation", investigationBoard);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/ivsgtViewModal")
|
||||
public ModelAndView ivsgtViewModal(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation){
|
||||
public ModelAndView ivsgtViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
||||
ModelAndView mav = new ModelAndView("ivsgt/ivsgtViewModal");
|
||||
boardInvestigation = boardInvestigationService.selectBoardInvestigation(boardInvestigation.getIvsgtKey());
|
||||
mav.addObject("boardInvestigation", boardInvestigation);
|
||||
investigationBoard = ivsgtService.selectBoardInvestigation(investigationBoard.getIvsgtKey());
|
||||
mav.addObject("boardInvestigation", investigationBoard);
|
||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||
//메뉴권한 확인
|
||||
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth());
|
||||
|
|
@ -70,25 +73,25 @@ public class IvsgtController {
|
|||
|
||||
@PostMapping("/saveBoardInvestigation")
|
||||
public Integer saveBoardInvestigation(@AuthenticationPrincipal UserInfo loginUser,
|
||||
BoardInvestigation boardInvestigation,
|
||||
ArrestType arrestType,
|
||||
RelatedReports relatedReports,
|
||||
InvestigationBoard investigationBoard,
|
||||
InvestigationRelatedReports relatedReports,
|
||||
MultipartHttpServletRequest request,
|
||||
@RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){
|
||||
boardInvestigation.setWrtUserSeq(loginUser.getUserSeq());
|
||||
boardInvestigation.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
return boardInvestigationService.saveBoardInvestigation(boardInvestigation, arrestType, relatedReports, deleteFileSeq);
|
||||
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||
investigationBoard.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
return ivsgtService.saveBoardInvestigation(investigationBoard, relatedReports, deleteFileSeq);
|
||||
}
|
||||
|
||||
@GetMapping("/searchViewModal")
|
||||
public ModelAndView searchViewModal(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation){
|
||||
public ModelAndView searchViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
||||
ModelAndView mav = new ModelAndView("ivsgt/searchViewModal");
|
||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||
//메뉴권한 확인
|
||||
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth());
|
||||
|
||||
boardInvestigation.setIvsgtType(null);
|
||||
mav.addObject("boardInvestigationList", boardInvestigationService.selectBoardInvestigationList(boardInvestigation));
|
||||
investigationBoard.setFirstIndex(0);
|
||||
investigationBoard.setRowCnt(Integer.MAX_VALUE);
|
||||
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||
mav.addObject("boardInvestigationList", ivsgtService.selectBoardInvestigationList(investigationBoard));
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.RelatedReports;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BoardInvestigationMapper {
|
||||
List<BoardInvestigation> selectBoardInvestigationList(BoardInvestigation boardInvestigation);
|
||||
Integer selectBoardInvestigationListCnt(BoardInvestigation boardInvestigation);
|
||||
String selectHashTags(Integer ivsgtKey);
|
||||
ArrestType selectArrestType(Integer ivsgtKey);
|
||||
List<RelatedReports> selectRelatedReportsList(Integer ivsgtKey);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationBoard;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationRelatedReports;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InvestigationBoardMapper {
|
||||
List<InvestigationBoard> selectInvestigationBoardList(InvestigationBoard investigationBoard);
|
||||
Integer selectInvestigationBoardListCnt(InvestigationBoard investigationBoard);
|
||||
String selectHashTags(Integer ivsgtKey);
|
||||
List<InvestigationRelatedReports> selectRelatedReportsList(Integer ivsgtKey);
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.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 javax.persistence.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "arrest_type")
|
||||
public class ArrestType extends BaseModel {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "arrest_type_key")
|
||||
private Integer arrestTypeKey;
|
||||
@Column(name = "ivsgt_key")
|
||||
private Integer ivsgtKey;
|
||||
@Column(name = "arrest_cd")
|
||||
private String arrestCd;
|
||||
@Column(name = "arrest_cd2")
|
||||
private String arrestCd2;
|
||||
|
||||
@Transient
|
||||
private String arrestCdName;
|
||||
@Transient
|
||||
private String arrestCd2Name;
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.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.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "board_investigation")
|
||||
public class BoardInvestigation extends BaseModel {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ivsgt_key")
|
||||
private Integer ivsgtKey;
|
||||
@Column(name = "ivsgt_type")
|
||||
private String ivsgtType;
|
||||
@Column(name = "content_title")
|
||||
private String contentTitle;
|
||||
@Column(name = "content_info")
|
||||
private String contentInfo;
|
||||
@Column(name = "content_main")
|
||||
private String contentMain;
|
||||
@Column(name = "content_status")
|
||||
private String contentStatus;
|
||||
@Column(name = "wrt_organ")
|
||||
private String wrtOrgan;
|
||||
@Column(name = "wrt_user_seq")
|
||||
private Integer wrtUserSeq;
|
||||
@Column(name = "wrt_nm")
|
||||
private String wrtNm;
|
||||
@Column(name = "wrt_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Transient
|
||||
private Integer fileCnt;
|
||||
@Transient
|
||||
private List<IvsgtFile> fileList;
|
||||
@Transient
|
||||
private List<MultipartFile> multipartFileList;
|
||||
@Transient
|
||||
private List<String> contentInfos;
|
||||
@Transient
|
||||
private String hashTags;
|
||||
@Transient
|
||||
private ArrestType arrestType;
|
||||
@Transient
|
||||
private RelatedReports relatedReports;
|
||||
@Transient
|
||||
private List<RelatedReports> relatedReportsList;
|
||||
@Transient
|
||||
private Integer arrestTypeKey;
|
||||
@Transient
|
||||
private String arrestCd;
|
||||
@Transient
|
||||
private String arrestCd2;
|
||||
@Transient
|
||||
private String arrestCdName;
|
||||
@Transient
|
||||
private String arrestCd2Name;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.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.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "investigation_board")
|
||||
public class InvestigationBoard extends BaseModel {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ivsgt_key")
|
||||
private Integer ivsgtKey;
|
||||
@Column(name = "ivsgt_type")
|
||||
private String ivsgtType;
|
||||
@Column(name = "arrest_cd")
|
||||
private String arrestCd;
|
||||
@Column(name = "arrest_cd2")
|
||||
private String arrestCd2;
|
||||
@Column(name = "title")
|
||||
private String title;
|
||||
@Column(name = "summary_info")
|
||||
private String summaryInfo;
|
||||
@Column(name = "content")
|
||||
private String content;
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
@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")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Transient
|
||||
private String hashTags;
|
||||
@Transient
|
||||
private Integer fileCnt;
|
||||
@Transient
|
||||
private List<InvestigationFile> fileList;
|
||||
@Transient
|
||||
private List<InvestigationRelatedReports> relatedReportsList;
|
||||
@Transient
|
||||
private List<MultipartFile> multipartFileList;
|
||||
}
|
||||
|
|
@ -15,8 +15,8 @@ import java.io.Serializable;
|
|||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "ivsgt_file")
|
||||
@IdClass(IvsgtFile.IvsgtFileId.class)
|
||||
public class IvsgtFile extends FileInfo {
|
||||
@IdClass(InvestigationFile.InvestigationFileId.class)
|
||||
public class InvestigationFile extends FileInfo {
|
||||
@Id
|
||||
@Column(name = "ivsgt_key")
|
||||
private Integer ivsgtKey;
|
||||
|
|
@ -39,7 +39,7 @@ public class IvsgtFile extends FileInfo {
|
|||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class IvsgtFileId implements Serializable {
|
||||
public static class InvestigationFileId implements Serializable {
|
||||
private Integer ivsgtKey;
|
||||
private Integer fileSeq;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model;
|
||||
|
||||
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 = "investigation_related_reports")
|
||||
@IdClass(InvestigationRelatedReports.InvestigationRelatedReportsId.class)
|
||||
public class InvestigationRelatedReports{
|
||||
|
||||
@Id
|
||||
@Column(name = "parent_ivsgt_key")
|
||||
private Integer parentIvsgtKey;
|
||||
@Id
|
||||
@Column(name = "related_reports_key")
|
||||
private Integer childReportsKey;
|
||||
|
||||
|
||||
@Embeddable
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class InvestigationRelatedReportsId implements Serializable {
|
||||
private Integer parentIvsgtKey;
|
||||
private Integer childReportsKey;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.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 javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "related_reports")
|
||||
public class RelatedReports extends BaseModel {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "related_reports_key")
|
||||
private Integer relatedReportsKey;
|
||||
@Column(name = "parent_ivsgt_key")
|
||||
private Integer parentIvsgtKey;
|
||||
@Column(name = "child_ivsgt_key")
|
||||
private Integer childIvsgtKey;
|
||||
|
||||
@Transient
|
||||
private List<Integer> relatedReportsKeyList;
|
||||
@Transient
|
||||
private List<Integer> childIvsgtKeyList;
|
||||
@Transient
|
||||
private List<Integer> deleteKeyList;
|
||||
@Transient
|
||||
private String contentTitle;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface ArrestTypeRepository extends JpaRepository<ArrestType, Integer> {
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
|
||||
public interface BoardInvestigationRepository extends JpaRepository<BoardInvestigation, Integer> {
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationBoard;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
|
||||
public interface InvestigationBoardRepository extends JpaRepository<InvestigationBoard, Integer> {
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationFile;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public interface InvestigationFileRepository extends JpaRepository<InvestigationFile, InvestigationFile.InvestigationFileId> {
|
||||
List<InvestigationFile> findByIvsgtKey(Integer ivsgtKey);
|
||||
Optional<InvestigationFile> findTopByIvsgtKeyOrderByFileSeqDesc(Integer ivsgtKey);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.RelatedReports;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationRelatedReports;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
|
@ -9,9 +9,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public interface RelatedReportsRepository extends JpaRepository<RelatedReports, Integer> {
|
||||
@Transactional
|
||||
@Modifying
|
||||
@Query("delete from RelatedReports r where r.relatedReportsKey in :idList")
|
||||
void deleteAllByIdInQuery(@Param("idList") List<Integer> deleteKeyList);
|
||||
public interface InvestigationRelatedReportsRepository extends JpaRepository<InvestigationRelatedReports, Integer> {
|
||||
void deleteByParentIvsgtKey(Integer parentIvsgtKey);
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.IvsgtFile;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public interface IvsgtFileRepository extends JpaRepository<IvsgtFile, IvsgtFile.IvsgtFileId> {
|
||||
List<IvsgtFile> findByIvsgtKey(Integer ivsgtKey);
|
||||
Optional<IvsgtFile> findTopByIvsgtKeyOrderByFileSeqDesc(Integer ivsgtKey);
|
||||
}
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service;
|
||||
|
||||
|
||||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.hashTag.service.HashTagService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.*;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BoardInvestigationService extends BaseService {
|
||||
private final HashTagService hashTagService;
|
||||
private final BoardInvestigationRepository boardInvestigationRepository;
|
||||
private final IvsgtFileRepository ivsgtFileRepository;
|
||||
private final ArrestTypeRepository arrestTypeRepository;
|
||||
private final RelatedReportsRepository relatedReportsRepository;
|
||||
private final HashTagLinkIvsgtRepository hashTagLinkIvsgtRepository;
|
||||
private final BoardInvestigationMapper boardInvestigationMapper;
|
||||
|
||||
public List<BoardInvestigation> selectBoardInvestigationList(BoardInvestigation boardInvestigation) {
|
||||
return boardInvestigationMapper.selectBoardInvestigationList(boardInvestigation);
|
||||
}
|
||||
|
||||
public Integer selectBoardInvestigationListCnt(BoardInvestigation boardInvestigation) {
|
||||
return boardInvestigationMapper.selectBoardInvestigationListCnt(boardInvestigation);
|
||||
}
|
||||
|
||||
public BoardInvestigation selectBoardInvestigation(Integer ivsgtKey) {
|
||||
BoardInvestigation savedBoardInvestigation = boardInvestigationRepository.findById(ivsgtKey).orElse(null);
|
||||
if (savedBoardInvestigation != null) {
|
||||
savedBoardInvestigation.setFileList(ivsgtFileRepository.findByIvsgtKey(ivsgtKey));
|
||||
savedBoardInvestigation.setHashTags(boardInvestigationMapper.selectHashTags(ivsgtKey));
|
||||
savedBoardInvestigation.setArrestType(boardInvestigationMapper.selectArrestType(ivsgtKey));
|
||||
savedBoardInvestigation.setRelatedReportsList(boardInvestigationMapper.selectRelatedReportsList(ivsgtKey));
|
||||
}
|
||||
return savedBoardInvestigation;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Integer saveBoardInvestigation(BoardInvestigation boardInvestigation, ArrestType arrestType, RelatedReports relatedReports, List<Integer> deleteFileSeq) {
|
||||
Integer ivsgtKey = boardInvestigationRepository.save(boardInvestigation).getIvsgtKey();
|
||||
String[] hashTagAry = boardInvestigation.getHashTags().split(" ");
|
||||
if(hashTagAry.length>0){
|
||||
saveHashTagLink(ivsgtKey, hashTagAry);
|
||||
}
|
||||
arrestType.setIvsgtKey(ivsgtKey);
|
||||
arrestTypeRepository.save(arrestType);
|
||||
|
||||
if (relatedReports.getDeleteKeyList() != null) {
|
||||
relatedReportsRepository.deleteAllByIdInQuery(relatedReports.getDeleteKeyList());
|
||||
}
|
||||
|
||||
if (relatedReports.getChildIvsgtKeyList() != null) {
|
||||
List<RelatedReports> relatedReportsList = new ArrayList<>();
|
||||
for (int i = 0; i < relatedReports.getChildIvsgtKeyList().size(); i++) {
|
||||
RelatedReports relatedReportsTemp = new RelatedReports();
|
||||
if (relatedReports.getRelatedReportsKeyList().get(i) > 0) {
|
||||
relatedReportsTemp.setRelatedReportsKey(relatedReports.getRelatedReportsKeyList().get(i));
|
||||
}
|
||||
relatedReportsTemp.setChildIvsgtKey(relatedReports.getChildIvsgtKeyList().get(i));
|
||||
relatedReportsTemp.setParentIvsgtKey(ivsgtKey);
|
||||
relatedReportsList.add(relatedReportsTemp);
|
||||
}
|
||||
relatedReportsRepository.saveAll(relatedReportsList);
|
||||
}
|
||||
|
||||
if(deleteFileSeq != null && deleteFileSeq.size()>0){
|
||||
deletIvsgtFile(ivsgtKey, deleteFileSeq);
|
||||
}
|
||||
if(boardInvestigation.getMultipartFileList()!=null){
|
||||
saveUploadFiles(ivsgtKey, boardInvestigation.getMultipartFileList());
|
||||
}
|
||||
return ivsgtKey;
|
||||
}
|
||||
|
||||
private void saveUploadFiles(Integer ivsgtKey, List<MultipartFile> multipartFileList){
|
||||
IvsgtFile lastFileInfo = ivsgtFileRepository.findTopByIvsgtKeyOrderByFileSeqDesc(ivsgtKey).orElse(null);
|
||||
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
||||
for(MultipartFile file : multipartFileList){
|
||||
String saveName = UUID.randomUUID().toString();
|
||||
String path = locationPath+ File.separator+"ivsgt";
|
||||
saveFile(file, new File(path+File.separator+saveName));
|
||||
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
int extnIdx = originalFilename.lastIndexOf(".");
|
||||
IvsgtFile fileInfo = new IvsgtFile();
|
||||
fileInfo.setIvsgtKey(ivsgtKey);
|
||||
fileInfo.setFileSeq(fileSeq++);
|
||||
fileInfo.setOrigNm(originalFilename.substring(0, extnIdx));
|
||||
fileInfo.setFileExtn(originalFilename.substring(extnIdx+1));
|
||||
fileInfo.setConvNm(saveName);
|
||||
fileInfo.setFileSize(calculationSize(file.getSize()));
|
||||
fileInfo.setSavePath(path);
|
||||
ivsgtFileRepository.save(fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void deletIvsgtFile(Integer ivsgtKey, List<Integer> deleteFileSeq) {
|
||||
List<IvsgtFile> ivsgtFileList = ivsgtFileRepository.findByIvsgtKey(ivsgtKey);
|
||||
for(IvsgtFile file: ivsgtFileList){
|
||||
if(deleteFileSeq.contains(file.getFileSeq())){
|
||||
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
|
||||
ivsgtFileRepository.delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveHashTagLink(Integer ivsgtKey, String[] hashTagAry){
|
||||
hashTagLinkIvsgtRepository.deleteByIvsgtKey(ivsgtKey);
|
||||
for(String tagNm : hashTagAry){
|
||||
HashTagLinkIvsgt hashTagLinkIvsgt = new HashTagLinkIvsgt();
|
||||
hashTagLinkIvsgt.setIvsgtKey(ivsgtKey);
|
||||
hashTagLinkIvsgt.setTagKey(hashTagService.selectTagKey(tagNm));
|
||||
hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt);
|
||||
}
|
||||
}
|
||||
|
||||
public FileInfo selectIvsgtFile(Integer parentKey, Integer fileSeq) {
|
||||
return ivsgtFileRepository.findById(new IvsgtFile.IvsgtFileId(parentKey, fileSeq)).orElse(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service;
|
||||
|
||||
|
||||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.hashTag.service.HashTagService;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper.InvestigationBoardMapper;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.*;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.repository.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class IvsgtService extends BaseService {
|
||||
private final HashTagService hashTagService;
|
||||
private final InvestigationBoardRepository ivsgtboardRepository;
|
||||
private final InvestigationFileRepository ivsgtFileRepository;
|
||||
private final InvestigationRelatedReportsRepository ivsgtRelatedReportsRepository;
|
||||
private final HashTagLinkIvsgtRepository hashTagLinkIvsgtRepository;
|
||||
private final InvestigationBoardMapper boardIvsgtMapper;
|
||||
|
||||
public List<InvestigationBoard> selectBoardInvestigationList(InvestigationBoard investigationBoard) {
|
||||
return boardIvsgtMapper.selectInvestigationBoardList(investigationBoard);
|
||||
}
|
||||
|
||||
public Integer selectBoardInvestigationListCnt(InvestigationBoard investigationBoard) {
|
||||
return boardIvsgtMapper.selectInvestigationBoardListCnt(investigationBoard);
|
||||
}
|
||||
|
||||
public InvestigationBoard selectBoardInvestigation(Integer ivsgtKey) {
|
||||
InvestigationBoard savedInvestigationBoard = ivsgtboardRepository.findById(ivsgtKey).orElse(null);
|
||||
if (savedInvestigationBoard != null) {
|
||||
savedInvestigationBoard.setFileList(ivsgtFileRepository.findByIvsgtKey(ivsgtKey));
|
||||
savedInvestigationBoard.setHashTags(boardIvsgtMapper.selectHashTags(ivsgtKey));
|
||||
savedInvestigationBoard.setRelatedReportsList(boardIvsgtMapper.selectRelatedReportsList(ivsgtKey));
|
||||
}
|
||||
return savedInvestigationBoard;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Integer saveBoardInvestigation(InvestigationBoard investigationBoard, InvestigationRelatedReports relatedReports, List<Integer> deleteFileSeq) {
|
||||
Integer ivsgtKey = ivsgtboardRepository.save(investigationBoard).getIvsgtKey();
|
||||
String[] hashTagAry = investigationBoard.getHashTags().split(" ");
|
||||
if(hashTagAry.length>0){
|
||||
saveHashTagLink(ivsgtKey, hashTagAry);
|
||||
}
|
||||
if(deleteFileSeq != null && deleteFileSeq.size()>0){
|
||||
deletIvsgtFile(ivsgtKey, deleteFileSeq);
|
||||
}
|
||||
if(investigationBoard.getRelatedReportsList().size()>0){
|
||||
ivsgtRelatedReportsRepository.deleteByParentIvsgtKey(ivsgtKey);
|
||||
ivsgtRelatedReportsRepository.saveAll(investigationBoard.getRelatedReportsList());
|
||||
}
|
||||
if(investigationBoard.getMultipartFileList()!=null){
|
||||
saveUploadFiles(ivsgtKey, investigationBoard.getMultipartFileList());
|
||||
}
|
||||
return ivsgtKey;
|
||||
}
|
||||
|
||||
private void saveUploadFiles(Integer ivsgtKey, List<MultipartFile> multipartFileList){
|
||||
InvestigationFile lastFileInfo = ivsgtFileRepository.findTopByIvsgtKeyOrderByFileSeqDesc(ivsgtKey).orElse(null);
|
||||
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
||||
for(MultipartFile file : multipartFileList){
|
||||
String saveName = UUID.randomUUID().toString();
|
||||
String path = locationPath+ File.separator+"ivsgt";
|
||||
saveFile(file, new File(path+File.separator+saveName));
|
||||
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
int extnIdx = originalFilename.lastIndexOf(".");
|
||||
InvestigationFile fileInfo = new InvestigationFile();
|
||||
fileInfo.setIvsgtKey(ivsgtKey);
|
||||
fileInfo.setFileSeq(fileSeq++);
|
||||
fileInfo.setOrigNm(originalFilename.substring(0, extnIdx));
|
||||
fileInfo.setFileExtn(originalFilename.substring(extnIdx+1));
|
||||
fileInfo.setConvNm(saveName);
|
||||
fileInfo.setFileSize(calculationSize(file.getSize()));
|
||||
fileInfo.setSavePath(path);
|
||||
ivsgtFileRepository.save(fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void deletIvsgtFile(Integer ivsgtKey, List<Integer> deleteFileSeq) {
|
||||
List<InvestigationFile> investigationFileList = ivsgtFileRepository.findByIvsgtKey(ivsgtKey);
|
||||
for(InvestigationFile file: investigationFileList){
|
||||
if(deleteFileSeq.contains(file.getFileSeq())){
|
||||
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
|
||||
ivsgtFileRepository.delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveHashTagLink(Integer ivsgtKey, String[] hashTagAry){
|
||||
hashTagLinkIvsgtRepository.deleteByIvsgtKey(ivsgtKey);
|
||||
for(String tagNm : hashTagAry){
|
||||
HashTagLinkIvsgt hashTagLinkIvsgt = new HashTagLinkIvsgt();
|
||||
hashTagLinkIvsgt.setIvsgtKey(ivsgtKey);
|
||||
hashTagLinkIvsgt.setTagKey(hashTagService.selectTagKey(tagNm));
|
||||
hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt);
|
||||
}
|
||||
}
|
||||
|
||||
public FileInfo selectIvsgtFile(Integer parentKey, Integer fileSeq) {
|
||||
return ivsgtFileRepository.findById(new InvestigationFile.InvestigationFileId(parentKey, fileSeq)).orElse(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package com.dbnt.faisp.main.ivsgtMgt.majorStatus.mapper;
|
||||
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.RelatedReports;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.InvestigationRelatedReports;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
@ -11,7 +10,6 @@ import java.util.List;
|
|||
public interface MajorStatusMapper {
|
||||
List<MajorStatus> selectMajorList(MajorStatus majorStatus);
|
||||
List<MajorStatus> selectContentListWhere(MajorStatus majorStatus);
|
||||
ArrestType selectArrestType(Integer majorKey);
|
||||
Integer selectMajorListCnt(MajorStatus majorStatus);
|
||||
List<RelatedReports> selectRelatedReportsList(Integer majorKey);
|
||||
List<InvestigationRelatedReports> selectRelatedReportsList(Integer majorKey);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,25 +3,16 @@ package com.dbnt.faisp.main.ivsgtMgt.majorStatus.service;
|
|||
|
||||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.model.ActivityCaseFile;
|
||||
import com.dbnt.faisp.main.equip.model.Equip;
|
||||
import com.dbnt.faisp.main.fipTarget.model.VulnFile;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.model.IvsgtFile;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.mapper.MajorStatusMapper;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorFile;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.repository.MajorFileRepository;
|
||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.repository.MajorStatusRepository;
|
||||
import com.dbnt.faisp.main.publicBoard.model.PublicBoard;
|
||||
import com.dbnt.faisp.main.publicBoard.model.PublicComment;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
|
|
|||
|
|
@ -1,133 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper">
|
||||
<sql id="selectBoardInvestigationListWhere">
|
||||
<where>
|
||||
<if test='downOrganCdList != null'>
|
||||
and a.wrt_organ in
|
||||
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
||||
#{organCd}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='ivsgtType != null and ivsgtType != ""'>
|
||||
AND ivsgt_type = #{ivsgtType}
|
||||
</if>
|
||||
<if test='wrtNm != null and wrtNm != ""'>
|
||||
AND a.wrt_nm LIKE '%'||#{wrtNm}||'%'
|
||||
</if>
|
||||
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||||
AND a.wrt_organ = #{wrtOrgan}
|
||||
</if>
|
||||
<if test='contentTitle != null and contentTitle != ""'>
|
||||
AND a.content_title LIKE '%'||#{contentTitle}||'%'
|
||||
</if>
|
||||
<if test='arrestCd != null and arrestCd != ""'>
|
||||
AND t.arrest_cd = #{arrestCd}
|
||||
</if>
|
||||
<if test='arrestCd2 != null and arrestCd2 != ""'>
|
||||
AND t.arrest_cd2 = #{arrestCd2}
|
||||
</if>
|
||||
<if test='dateSelector == "wrtDt"'>
|
||||
<if test='startDate != null and startDate != ""'>
|
||||
And a.wrt_dt >= #{startDate}::DATE
|
||||
</if>
|
||||
<if test='endDate != null and endDate != ""'>
|
||||
AND a.wrt_dt <= #{endDate}::DATE+1
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<select id="selectBoardInvestigationList" resultType="BoardInvestigation" parameterType="BoardInvestigation">
|
||||
SELECT
|
||||
a.ivsgt_key,
|
||||
a.ivsgt_type,
|
||||
a.content_title,
|
||||
a.content_info,
|
||||
a.content_main,
|
||||
a.content_status,
|
||||
a.wrt_organ,
|
||||
a.wrt_user_seq,
|
||||
a.wrt_nm,
|
||||
a.wrt_dt,
|
||||
b.fileCnt,
|
||||
t.arrest_type_key,
|
||||
t.arrest_cd,
|
||||
t.arrest_cd2,
|
||||
cm.item_value AS arrestCdName,
|
||||
cm2.item_value AS arrestCd2Name
|
||||
FROM board_investigation a
|
||||
LEFT OUTER JOIN (
|
||||
SELECT
|
||||
ivsgt_key,
|
||||
count(file_seq) AS fileCnt
|
||||
FROM ivsgt_file
|
||||
GROUP BY ivsgt_key
|
||||
) b ON a.ivsgt_key = b.ivsgt_key
|
||||
INNER JOIN arrest_type t
|
||||
ON a.ivsgt_key = t.ivsgt_key
|
||||
INNER JOIN code_mgt cm
|
||||
ON t.arrest_cd = cm.item_cd
|
||||
INNER JOIN code_mgt cm2
|
||||
ON t.arrest_cd2 = cm2.item_cd
|
||||
<include refid="selectBoardInvestigationListWhere"></include>
|
||||
ORDER BY ivsgt_key DESC
|
||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||
</select>
|
||||
<select id="selectBoardInvestigationListCnt" resultType="int" parameterType="BoardInvestigation">
|
||||
SELECT count(*)
|
||||
FROM board_investigation a
|
||||
LEFT OUTER JOIN (
|
||||
SELECT
|
||||
ivsgt_key,
|
||||
count(file_seq) AS fileCnt
|
||||
FROM ivsgt_file
|
||||
GROUP BY ivsgt_key
|
||||
) b
|
||||
ON a.ivsgt_key = b.ivsgt_key
|
||||
INNER JOIN arrest_type t
|
||||
ON a.ivsgt_key = t.ivsgt_key
|
||||
INNER JOIN code_mgt cm
|
||||
ON t.arrest_cd = cm.item_cd
|
||||
INNER JOIN code_mgt cm2
|
||||
ON t.arrest_cd2 = cm2.item_cd
|
||||
<include refid="selectBoardInvestigationListWhere"></include>
|
||||
</select>
|
||||
<select id="selectHashTags" resultType="string" parameterType="int">
|
||||
SELECT array_to_string(array_agg(b.tag_nm), ' ') AS hashTags
|
||||
FROM hash_tag_link_ivsgt a
|
||||
INNER JOIN hash_tag b ON a.tag_key = b.tag_key
|
||||
WHERE a.ivsgt_key = #{ivsgtKey}
|
||||
</select>
|
||||
<select id="selectArrestType" resultType="ArrestType" parameterType="int">
|
||||
SELECT
|
||||
a.arrest_type_key,
|
||||
a.ivsgt_key,
|
||||
a.arrest_cd,
|
||||
a.arrest_cd2,
|
||||
cm.item_value AS arrestCdName,
|
||||
cm2.item_value AS arrestCd2Name
|
||||
FROM arrest_type a
|
||||
INNER JOIN board_investigation i
|
||||
ON i.ivsgt_key = a.ivsgt_key
|
||||
INNER JOIN code_mgt cm
|
||||
ON a.arrest_cd = cm.item_cd
|
||||
INNER JOIN code_mgt cm2
|
||||
ON a.arrest_cd2 = cm2.item_cd
|
||||
WHERE a.ivsgt_key = #{ivsgtKey}
|
||||
</select>
|
||||
|
||||
<select id="selectRelatedReportsList" resultType="RelatedReports" parameterType="int">
|
||||
SELECT
|
||||
a.related_reports_key,
|
||||
a.child_ivsgt_key,
|
||||
a.parent_ivsgt_key,
|
||||
i.content_title
|
||||
FROM related_reports a
|
||||
INNER JOIN board_investigation i
|
||||
ON i.ivsgt_key = a.child_ivsgt_key
|
||||
WHERE a.parent_ivsgt_key = #{ivsgtKey}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.mapper.InvestigationBoardMapper">
|
||||
<sql id="selectInvestigationBoardListWhere">
|
||||
<where>
|
||||
<if test='downOrganCdList != null'>
|
||||
and a.wrt_organ in
|
||||
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
||||
#{organCd}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='ivsgtType != null and ivsgtType != ""'>
|
||||
AND a.ivsgt_type = #{ivsgtType}
|
||||
</if>
|
||||
<if test='wrtUserNm != null and wrtUserNm != ""'>
|
||||
AND a.wrt_user_nm LIKE '%'||#{wrtUserNm}||'%'
|
||||
</if>
|
||||
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||||
AND a.wrt_organ = #{wrtOrgan}
|
||||
</if>
|
||||
<if test='wrtPart != null and wrtPart != ""'>
|
||||
AND a.wrt_part = #{wrtPart}
|
||||
</if>
|
||||
<if test='wrtUserSeq != null and wrtUserSeq != ""'>
|
||||
AND a.wrt_user_seq = #{wrtUserSeq}
|
||||
</if>
|
||||
<if test='title != null and title != ""'>
|
||||
AND a.title LIKE '%'||#{title}||'%'
|
||||
</if>
|
||||
<if test='arrestCd != null and arrestCd != ""'>
|
||||
AND a.arrest_cd = #{arrestCd}
|
||||
</if>
|
||||
<if test='arrestCd2 != null and arrestCd2 != ""'>
|
||||
AND a.arrest_cd2 = #{arrestCd2}
|
||||
</if>
|
||||
<if test='dateSelector == "wrtDt"'>
|
||||
<if test='startDate != null and startDate != ""'>
|
||||
And a.wrt_dt >= #{startDate}::DATE
|
||||
</if>
|
||||
<if test='endDate != null and endDate != ""'>
|
||||
AND a.wrt_dt <= #{endDate}::DATE+1
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvestigationBoardList" resultType="InvestigationBoard" parameterType="InvestigationBoard">
|
||||
SELECT
|
||||
a.ivsgt_key,
|
||||
a.ivsgt_type,
|
||||
a.arrest_cd,
|
||||
a.arrest_cd2,
|
||||
a.title,
|
||||
a.content,
|
||||
a.status,
|
||||
a.wrt_organ,
|
||||
a.wrt_part,
|
||||
a.wrt_user_grd,
|
||||
a.wrt_user_seq,
|
||||
a.wrt_user_nm,
|
||||
a.wrt_dt,
|
||||
b.fileCnt
|
||||
FROM investigation_board a
|
||||
LEFT OUTER JOIN (
|
||||
SELECT
|
||||
ivsgt_key,
|
||||
count(file_seq) AS fileCnt
|
||||
FROM investigation_file
|
||||
GROUP BY ivsgt_key
|
||||
) b ON a.ivsgt_key = b.ivsgt_key
|
||||
<include refid="selectInvestigationBoardListWhere"></include>
|
||||
ORDER BY ivsgt_key DESC
|
||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="selectInvestigationBoardListCnt" resultType="int" parameterType="InvestigationBoard">
|
||||
SELECT count(*)
|
||||
FROM investigation_board a
|
||||
LEFT OUTER JOIN (
|
||||
SELECT
|
||||
ivsgt_key,
|
||||
count(file_seq) AS fileCnt
|
||||
FROM investigation_file
|
||||
GROUP BY ivsgt_key
|
||||
) b
|
||||
ON a.ivsgt_key = b.ivsgt_key
|
||||
<include refid="selectInvestigationBoardListWhere"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectHashTags" resultType="string" parameterType="int">
|
||||
SELECT array_to_string(array_agg(b.tag_nm), ' ') AS hashTags
|
||||
FROM hash_tag_link_ivsgt a
|
||||
INNER JOIN hash_tag b ON a.tag_key = b.tag_key
|
||||
WHERE a.ivsgt_key = #{ivsgtKey}
|
||||
</select>
|
||||
|
||||
<select id="selectRelatedReportsList" resultType="InvestigationRelatedReports" parameterType="int">
|
||||
SELECT
|
||||
a.related_reports_key,
|
||||
a.child_ivsgt_key,
|
||||
a.parent_ivsgt_key,
|
||||
i.content_title
|
||||
FROM investigation_related_reports a
|
||||
INNER JOIN investigation_board i
|
||||
ON i.ivsgt_key = a.child_ivsgt_key
|
||||
WHERE a.parent_ivsgt_key = #{ivsgtKey}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -7,15 +7,12 @@ $(document).on('click', '#ivsgtEditBtn', function () {
|
|||
getIvsgtEditModal(Number($("#ivsgtViewBody").find("[name='ivsgtKey']").val()));
|
||||
});
|
||||
|
||||
$(document).on('click', '#saveIvsgtBtn', function (){
|
||||
saveBoardInvestigation('N')
|
||||
});
|
||||
$(document).on('change', '#arrestCd', function (){
|
||||
$(".arrestCd2").hide();
|
||||
$("."+this.value).show();
|
||||
})
|
||||
$(document).on('click', '#saveTempBtn', function (){
|
||||
saveBoardInvestigation('Y')
|
||||
$(document).on('click', '.saveBtn', function (){
|
||||
saveBoardInvestigation($(this).attr('data-state'))
|
||||
});
|
||||
|
||||
$(document).on('click', '.tr', function (){
|
||||
|
|
@ -104,10 +101,6 @@ function getIvsgtEditModal(ivsgtKey, ivsgtType){
|
|||
$("#ivsgtViewBody").empty();
|
||||
$("#ivsgtEditModalContent").empty().append(html)
|
||||
$("#ivsgtEditModal").modal('show');
|
||||
const selectedArrestCd = $("#ivsgtEditForm").find("#arrestCd").val()
|
||||
if(selectedArrestCd){
|
||||
$("."+selectedArrestCd).show();
|
||||
}
|
||||
setEditor('editor', '400')
|
||||
setUploadDiv();
|
||||
},
|
||||
|
|
@ -117,13 +110,9 @@ function getIvsgtEditModal(ivsgtKey, ivsgtType){
|
|||
});
|
||||
}
|
||||
|
||||
function getSearchViewModal(ivsgtType, contentTitle){
|
||||
function getSearchViewModal(){
|
||||
$.ajax({
|
||||
url: '/ivsgt/searchViewModal',
|
||||
data: {
|
||||
contentTitle: contentTitle,
|
||||
ivsgtType: ivsgtType
|
||||
},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
|
|
@ -136,10 +125,10 @@ function getSearchViewModal(ivsgtType, contentTitle){
|
|||
});
|
||||
}
|
||||
|
||||
function saveBoardInvestigation(contentState){
|
||||
if(contentCheck()){
|
||||
function saveBoardInvestigation(state){
|
||||
if(state === "DST001" || contentCheck()){
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
$("#contentStatus").val(contentState);
|
||||
$("#status").val(state);
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#ivsgtEditForm")[0]);
|
||||
for(const file of files) {
|
||||
|
|
@ -174,7 +163,7 @@ function saveBoardInvestigation(contentState){
|
|||
|
||||
function contentCheck(){
|
||||
let flag = true;
|
||||
if(!$("#contentTitle").val()){
|
||||
if(!$("#title").val()){
|
||||
alert("제목을 입력해주세요.")
|
||||
flag = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,18 +73,18 @@
|
|||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="arrestCd" id="searchArrestCd">
|
||||
<option value="">범죄테마 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('AT')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
|
||||
th:selected="${searchParams.arrestCd != null and commonCode.itemCd eq searchParams.arrestCd}"></option>
|
||||
<th:block th:each="code:${session.commonCode.get('AT')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"
|
||||
th:selected="${searchParams.arrestCd != null and code.itemCd eq searchParams.arrestCd}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="arrestCd2" id="searchArrestCd2">
|
||||
<option value="">위반유형 선택</option>
|
||||
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('AT')))}">
|
||||
<th:block th:if="${'AT'+num == searchParams.arrestCd}" th:each="commonCode:${session.commonCode.get('AT'+num)}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.arrestCd2 eq commonCode.itemCd}"></option>
|
||||
<th:block th:each="parent:${session.commonCode.get('AT')}">
|
||||
<th:block th:each="code:${session.commonCode.get(parent.itemCd)}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.arrestCd2 eq code.itemCd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
|
|
@ -92,10 +92,10 @@
|
|||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtNm" th:value="${searchParams.wrtNm}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<tr class="table-secondary">
|
||||
<!--<th>문서번호</th>-->
|
||||
<th>순번</th>
|
||||
<th>관서</th>
|
||||
<th th:if="${accessAuth eq 'ACC003'}">관서</th>
|
||||
<th>범죄테마</th>
|
||||
<th>위반유형</th>
|
||||
<th>제목</th>
|
||||
|
|
@ -128,17 +128,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider align-middle text-center">
|
||||
<tr class="tr" th:each="boardInvestigation,cnt:${boardInvestigationList}" th:data-key="${boardInvestigation.ivsgtKey}">
|
||||
<!--<td th:text="${boardInvestigation.ivsgtKey}"></td>-->
|
||||
<tr class="tr" th:each="ivsgt,cnt:${investigationList}" th:data-key="${ivsgt.ivsgtKey}">
|
||||
<!--<td th:text="${investigationBoard.ivsgtKey}"></td>-->
|
||||
<td th:text="${cnt.count}"></td>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<td th:if="${boardInvestigation.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
<td th:if="${accessAuth eq 'ACC003'}">
|
||||
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${ivsgt.wrtOrgan eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
<td th:text="${boardInvestigation.arrestCdName}"></td>
|
||||
<td th:text="${boardInvestigation.arrestCd2Name}"></td>
|
||||
<td class="titleLeft" th:text="${boardInvestigation.contentStatus == 'Y' ? '[임시저장]' : ''} + ${boardInvestigation.contentTitle}"></td>
|
||||
<td th:text="${boardInvestigation.wrtNm}"></td>
|
||||
<td th:text="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||
</td>
|
||||
<td th:text="${ivsgt.arrestCd}"></td>
|
||||
<td th:text="${ivsgt.arrestCd2}"></td>
|
||||
<td class="titleLeft" th:text="${ivsgt.status == 'Y' ? '[임시저장]' : ''} + ${ivsgt.title}"></td>
|
||||
<td th:text="${ivsgt.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(ivsgt.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -2,25 +2,25 @@
|
|||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title text-white" id="planEditModalLabel">
|
||||
<th:block th:if="${boardInvestigation.ivsgtKey eq null}">
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'arrest'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtKey eq null}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'arrest'}">
|
||||
검거보고서 작성
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'proceeding'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'proceeding'}">
|
||||
진행보고서 작성
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'result'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'result'}">
|
||||
결과보고서 작성
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtKey != null}">
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'arrest'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtKey != null}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'arrest'}">
|
||||
검거보고서 수정
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'proceeding'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'proceeding'}">
|
||||
진행보고서 수정
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'result'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'result'}">
|
||||
결과보고서 수정
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
|
@ -31,25 +31,27 @@
|
|||
<form action="#" method="post" id="ivsgtEditForm">
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<input type="hidden" name="ivsgtKey" th:value="${boardInvestigation.ivsgtKey}">
|
||||
<input type="hidden" name="wrtOrgan" th:value="${boardInvestigation.wrtOrgan}">
|
||||
<input type="hidden" id="contentStatus" name="contentStatus">
|
||||
<input type="hidden" name="ivsgtType" th:value="${boardInvestigation.ivsgtType}">
|
||||
<input type="hidden" name="arrestTypeKey" th:value="${boardInvestigation.arrestType != null ? boardInvestigation.arrestType.arrestTypeKey: ''}">
|
||||
<input type="hidden" name="ivsgtKey" th:value="${investigation.ivsgtKey}">
|
||||
<input type="hidden" name="ivsgtType" th:value="${investigation.ivsgtType}">
|
||||
<input type="hidden" name="wrtOrgan" th:value="${investigation.wrtOrgan}">
|
||||
<input type="hidden" name="wrtPart" th:value="${investigation.wrtPart}">
|
||||
<input type="hidden" name="wrtUserSeq" th:value="${investigation.wrtUserSeq}">
|
||||
<input type="hidden" name="wrtUserGrd" th:value="${investigation.wrtUserGrd}">
|
||||
<input type="hidden" id="status" name="status">
|
||||
<div class="row mb-1">
|
||||
<label for="wrtNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<label for="wrtUserNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" id="wrtNm" name="wrtNm" th:value="${boardInvestigation.wrtNm}" readonly>
|
||||
<input type="text" class="form-control form-control-sm" id="wrtUserNm" name="wrtUserNm" th:value="${investigation.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(investigation.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentTitle" class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
|
||||
<label for="title" class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
|
||||
<div class="col-sm-11">
|
||||
<input type="text" class="form-control form-control-sm" id="contentTitle" name="contentTitle" th:value="${boardInvestigation.contentTitle}">
|
||||
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="${investigation.title}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1" id="arrestTypeDiv">
|
||||
|
|
@ -59,7 +61,7 @@
|
|||
<option value="">범죄테마 선택-</option>
|
||||
<th:block th:each="code:${session.commonCode.get('CTH')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"
|
||||
th:selected="${boardInvestigation.arrestType != null and code.itemCd eq boardInvestigation.arrestType.arrestCd}"></option>
|
||||
th:selected="${code.itemCd eq investigation.arrestCd}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -69,8 +71,9 @@
|
|||
<option value="">위반유형 선택-</option>
|
||||
<th:block th:each="cthCode:${session.commonCode.get('CTH')}">
|
||||
<th:block th:each="code:${session.commonCode.get(cthCode.itemCd)}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" class="arrestCd2" th:classappend="${cthCode.itemCd}" style="display: none"
|
||||
th:selected="${boardInvestigation.arrestType != null and code.itemCd eq boardInvestigation.arrestType.arrestCd2}"></option>
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" class="arrestCd2"
|
||||
th:classappend="${cthCode.itemCd}" style="display: none"
|
||||
th:selected="${code.itemCd eq investigation.arrestCd2}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
|
|
@ -79,20 +82,20 @@
|
|||
<div class="row mb-1">
|
||||
<label for="contentInfoDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">사건개요</label>
|
||||
<div class="col-sm-11" id="contentInfoDiv">
|
||||
<textarea class="form-control form-control-sm" name='contentInfo' th:text="${boardInvestigation.contentInfo}"></textarea>
|
||||
<textarea class="form-control form-control-sm" name='summaryInfo' th:text="${investigation.summaryInfo}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentMainDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">주요내용</label>
|
||||
<div class="col-sm-11" id="contentMainDiv">
|
||||
<div id="editor"></div>
|
||||
<textarea id='content' class="d-none" th:utext="${boardInvestigation.contentMain}"></textarea>
|
||||
<textarea id='content' class="d-none" th:utext="${investigation.content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="hashTags" class="col-sm-1 col-form-label col-form-label-sm text-center">해시태그</label>
|
||||
<div class="col-sm-11">
|
||||
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags" th:value="${boardInvestigation.hashTags}"
|
||||
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags" th:value="${investigation.hashTags}"
|
||||
placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,11 +103,11 @@
|
|||
<label for="fileInputer" class="col-sm-1 col-form-label col-form-label-sm text-center">첨부파일</label>
|
||||
<div class="col-sm-11" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(boardInvestigation.fileList)}">
|
||||
<th:block th:if="${#arrays.isEmpty(investigation.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(boardInvestigation.fileList)}">
|
||||
<div class='row-col-6' th:each="ivsgtFile:${boardInvestigation.fileList}">
|
||||
<th:block th:unless="${#arrays.isEmpty(investigation.fileList)}">
|
||||
<div class='row-col-6' th:each="ivsgtFile:${investigation.fileList}">
|
||||
<span th:data-fileseq="${ivsgtFile.fileSeq}" th:text="|${ivsgtFile.origNm}.${ivsgtFile.fileExtn} ${ivsgtFile.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
|
|
@ -113,7 +116,7 @@
|
|||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'proceeding' or boardInvestigation.ivsgtType eq 'result'}">
|
||||
<th:block th:if="${investigation.ivsgtType ne 'arrest'}">
|
||||
<div class="row mb-1">
|
||||
<label for="relatedReportDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">연관보고서</label>
|
||||
<div class="col-sm-11" id="relatedReportDiv">
|
||||
|
|
@ -123,7 +126,7 @@
|
|||
</div>
|
||||
<input type="button" class="btn btn-sm btn-primary col-auto" id="relatedReportSearchBtn" value="검색">
|
||||
<div class="col-auto">
|
||||
<input type="checkbox" id="relatedReport" th:checked="${#lists.isEmpty(boardInvestigation.relatedReportsList)}">
|
||||
<input type="checkbox" id="relatedReport" th:checked="${#lists.isEmpty(investigation.relatedReportsList)}">
|
||||
<label for="relatedReport">연관보고서 없음</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -132,7 +135,7 @@
|
|||
<div class="row">
|
||||
<label for="relatedReportDiv" class="col-sm-1 col-form-label col-form-label-sm text-center"></label>
|
||||
<div class="col-sm-11 row mb-1" id="relatedReportSearchDiv">
|
||||
<th:block th:each="relatedReports:${boardInvestigation.relatedReportsList}">
|
||||
<th:block th:each="relatedReports:${investigation.relatedReportsList}">
|
||||
<div class="col-auto">
|
||||
<input type="hidden" name="relatedReportsKeyList" th:value="${relatedReports.relatedReportsKey}">
|
||||
<input type="hidden" name="childIvsgtKeyList" th:value="${relatedReports.childIvsgtKey}">
|
||||
|
|
@ -158,7 +161,7 @@
|
|||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
||||
<button type="button" class="btn btn-primary" id="saveIvsgtBtn">저장</button>
|
||||
<button type="button" class="btn btn-warning saveBtn" data-state="DST001">임시저장</button>
|
||||
<button type="button" class="btn btn-primary saveBtn" data-state="DST007">저장</button>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -2,26 +2,26 @@
|
|||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title text-white" id="ivsgtViewModalLabel">
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'arrest'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'arrest'}">
|
||||
검거보고서
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'proceeding'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'proceeding'}">
|
||||
진행보고서
|
||||
</th:block>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'result'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'result'}">
|
||||
결과보고서
|
||||
</th:block>
|
||||
</h5>
|
||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="ivsgtViewBody">
|
||||
<input type="hidden" name="ivsgtKey" th:value="${boardInvestigation.ivsgtKey}">
|
||||
<input type="hidden" name="ivsgtKey" th:value="${investigationBoard.ivsgtKey}">
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation" th:if="${#lists.size(boardInvestigation.fileList)>0}">
|
||||
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(boardInvestigation.fileList), ')')}"></button>
|
||||
<li class="nav-item" role="presentation" th:if="${#lists.size(investigationBoard.fileList)>0}">
|
||||
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(investigationBoard.fileList), ')')}"></button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content bg-white border border-top-0 p-2">
|
||||
|
|
@ -30,41 +30,41 @@
|
|||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">범죄테마</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
|
||||
<th:block th:each="code:${session.commonCode.get('CTH')}">
|
||||
<th:block th:if="${code.itemCd eq boardInvestigation.arrestType.arrestCd}" th:text="${code.itemValue}"></th:block>
|
||||
<th:block th:if="${code.itemCd eq investigationBoard.arrestType.arrestCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</label>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">위반유형</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
|
||||
<th:block th:each="code:${session.commonCode.get(boardInvestigation.arrestType.arrestCd)}">
|
||||
<th:block th:if="${code.itemCd eq boardInvestigation.arrestType.arrestCd2}" th:text="${code.itemValue}"></th:block>
|
||||
<th:block th:each="code:${session.commonCode.get(investigationBoard.arrestType.arrestCd)}">
|
||||
<th:block th:if="${code.itemCd eq investigationBoard.arrestType.arrestCd2}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</label>
|
||||
<div class="col-sm-3"></div>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(investigationBoard.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
|
||||
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="${boardInvestigation.contentTitle}"></label>
|
||||
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="${investigationBoard.contentTitle}"></label>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${boardInvestigation.wrtNm}"></label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${investigationBoard.wrtNm}"></label>
|
||||
</div>
|
||||
<hr class="my-1">
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">사건개요</label>
|
||||
<div class="col-sm-11 form-control-sm">
|
||||
<div class="form-control-sm" th:text="${boardInvestigation.contentInfo}"></div>
|
||||
<div class="form-control-sm" th:text="${investigationBoard.contentInfo}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-1">
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">주요내용</label>
|
||||
<div class="col-sm-11 form-control-sm">
|
||||
<div class="form-control-sm" th:utext="${boardInvestigation.contentMain}"></div>
|
||||
<div class="form-control-sm" th:utext="${investigationBoard.contentMain}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-1">
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">해시태그</label>
|
||||
<label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${boardInvestigation.hashTags}"></label>
|
||||
<label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${investigationBoard.hashTags}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
|
||||
|
|
@ -76,13 +76,13 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:if="${#lists.isEmpty(boardInvestigation.fileList)}">
|
||||
<th:block th:if="${#lists.isEmpty(investigationBoard.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(boardInvestigation.fileList)}">
|
||||
<th:block th:each="file:${boardInvestigation.fileList}">
|
||||
<th:block th:unless="${#lists.isEmpty(investigationBoard.fileList)}">
|
||||
<th:block th:each="file:${investigationBoard.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<td><a href="#" class="fileDownLink" data-board="ivsgt"
|
||||
th:data-parentkey="${file.ivsgtKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
|
||||
|
|
@ -93,12 +93,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<th:block th:if="${boardInvestigation.ivsgtType eq 'proceeding' or boardInvestigation.ivsgtType eq 'result'}">
|
||||
<th:block th:if="${investigationBoard.ivsgtType eq 'proceeding' or investigationBoard.ivsgtType eq 'result'}">
|
||||
<div class="p-2 row mb-3">
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">연관보고서</label>
|
||||
<div class="col-sm-11" id="relatedReportDiv">
|
||||
<div class="row justify-content-start">
|
||||
<th:block th:each="relatedReports:${boardInvestigation.relatedReportsList}">
|
||||
<th:block th:each="relatedReports:${investigationBoard.relatedReportsList}">
|
||||
<label class="col-sm-auto col-form-label col-form-label-sm" th:text="${relatedReports.contentTitle}"></label>
|
||||
</th:block>
|
||||
</div>
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<th:block th:if="${userSeq eq boardInvestigation.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
||||
<th:block th:if="${userSeq eq investigationBoard.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
||||
<button type="button" class="btn btn-warning" id="ivsgtEditBtn">수정</button>
|
||||
</th:block>
|
||||
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||
|
|
|
|||
|
|
@ -5,13 +5,47 @@
|
|||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="searchViewBody">
|
||||
<th:block th:if="${#lists.isEmpty(boardInvestigationList)}">
|
||||
<div>검색된 보고서가 없습니다.</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>보고서유형</th>
|
||||
<th>제목</th>
|
||||
<th>범죄테마</th>
|
||||
<th>위반유형</th>
|
||||
<th>작성일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:if="${#lists.isEmpty(boardInvestigationList)}">
|
||||
<td colspan="6">검색된 보고서가 없습니다.</td>
|
||||
</tr>
|
||||
<tr th:each="investigation:${boardInvestigationList}">
|
||||
<td><input type="checkbox" class="reportChk" th:id="'reportChk'+${investigationBoard.ivsgtKey}" th:name="${investigation.contentTitle}" th:value="${investigation.ivsgtKey}"></td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('')}">
|
||||
<th:block th:if="${code.itemCd eq investigation.ivsgtType}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
<div th:each="boardInvestigation:${boardInvestigationList}">
|
||||
<input type="checkbox" class="reportChk" th:id="'reportChk'+${boardInvestigation.ivsgtKey}" th:name="${boardInvestigation.contentTitle}" th:value="${boardInvestigation.ivsgtKey}">
|
||||
<label th:for="'reportChk'+${boardInvestigation.ivsgtKey}" th:text="${boardInvestigation.contentTitle}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td th:text="${investigation.contentTitle}"></td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('')}">
|
||||
<th:block th:if="${code.itemCd eq investigation.}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('')}">
|
||||
<th:block th:if="${code.itemCd eq investigation.}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('')}">
|
||||
<th:block th:if="${code.itemCd eq investigation.}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-primary" id="completeBtn" data-bs-dismiss="modal">선택완료</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue