Merge branch 'master' of http://118.219.150.34:50501/DBNT/FAISP
commit
9a78cf701e
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.config;
|
||||||
|
|
||||||
import com.dbnt.faisp.fpiMgt.affair.service.AffairService;
|
import com.dbnt.faisp.fpiMgt.affair.service.AffairService;
|
||||||
import com.dbnt.faisp.fpiMgt.affairPlan.service.PlanService;
|
import com.dbnt.faisp.fpiMgt.affairPlan.service.PlanService;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.service.BoardInvestigationService;
|
||||||
import com.dbnt.faisp.publicBoard.service.PublicBoardService;
|
import com.dbnt.faisp.publicBoard.service.PublicBoardService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.util.FileCopyUtils;
|
import org.springframework.util.FileCopyUtils;
|
||||||
|
|
@ -20,6 +21,7 @@ public class FileController {
|
||||||
private final PlanService planService;
|
private final PlanService planService;
|
||||||
private final PublicBoardService publicBoardService;
|
private final PublicBoardService publicBoardService;
|
||||||
private final AffairService affairService;
|
private final AffairService affairService;
|
||||||
|
private final BoardInvestigationService boardInvestigationService;
|
||||||
|
|
||||||
@GetMapping("/file/fileDownload")
|
@GetMapping("/file/fileDownload")
|
||||||
public void fileDownload(HttpServletRequest request,
|
public void fileDownload(HttpServletRequest request,
|
||||||
|
|
@ -38,6 +40,9 @@ public class FileController {
|
||||||
case "affair":
|
case "affair":
|
||||||
downloadFile = affairService.selectAffairFile(parentKey, fileSeq);
|
downloadFile = affairService.selectAffairFile(parentKey, fileSeq);
|
||||||
break;
|
break;
|
||||||
|
case "ivsgt":
|
||||||
|
downloadFile = boardInvestigationService.selectIvsgtFile(parentKey, fileSeq);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedInputStream in;
|
BufferedInputStream in;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.dbnt.faisp.authMgt.service.AuthMgtService;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
|
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartWork;
|
import com.dbnt.faisp.fipTarget.model.PartWork;
|
||||||
|
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
|
||||||
import com.dbnt.faisp.fipTarget.service.FipTargetService;
|
import com.dbnt.faisp.fipTarget.service.FipTargetService;
|
||||||
import com.dbnt.faisp.organMgt.service.OrganConfigService;
|
import com.dbnt.faisp.organMgt.service.OrganConfigService;
|
||||||
import com.dbnt.faisp.userInfo.model.UserInfo;
|
import com.dbnt.faisp.userInfo.model.UserInfo;
|
||||||
|
|
@ -175,15 +176,12 @@ public class FipTargetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/partInfoFileDownload")
|
@GetMapping("/partInfoFileDownload")
|
||||||
public void fileDownload(HttpServletRequest request,
|
public void partInfoFileDownload(HttpServletRequest request,
|
||||||
HttpServletResponse response,
|
HttpServletResponse response,
|
||||||
Integer fileSeq,
|
Integer fileSeq,
|
||||||
Integer piSeq,
|
Integer piSeq,
|
||||||
Integer versionNo) {
|
Integer versionNo) {
|
||||||
PartInfoFile downloadFile = null;
|
PartInfoFile downloadFile = fipTargetService.selectPartInfoFileDown(fileSeq, piSeq,versionNo);
|
||||||
|
|
||||||
downloadFile = fipTargetService.selectPartInfoFileDown(fileSeq, piSeq,versionNo);
|
|
||||||
|
|
||||||
|
|
||||||
BufferedInputStream in;
|
BufferedInputStream in;
|
||||||
BufferedOutputStream out;
|
BufferedOutputStream out;
|
||||||
|
|
@ -257,11 +255,26 @@ public class FipTargetController {
|
||||||
public ModelAndView partWorkList(@AuthenticationPrincipal UserInfo loginUser,PartWork partWork, HttpServletResponse response) {
|
public ModelAndView partWorkList(@AuthenticationPrincipal UserInfo loginUser,PartWork partWork, HttpServletResponse response) {
|
||||||
ModelAndView mav = new ModelAndView("fipTarget/partWorkList");
|
ModelAndView mav = new ModelAndView("fipTarget/partWorkList");
|
||||||
partWork.setDownOrganCdList(loginUser.getDownOrganCdList());
|
partWork.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
//엑셀다운
|
||||||
//메뉴권한 확인
|
if(partWork.getExcel() != null && partWork.getExcel().equals("Y")){
|
||||||
|
String[] headers = { "terminal_nm", "wrt_nm", "work_dt", "work_type_ch", "work_type_poci", "work_type_sri", "work_type_ji", "work_type_mt", "work_type_etc", "description", "file_cnt","wrt_dt"};
|
||||||
|
String[] headerNames = { "외사 터미널명", "작성자","일시", "종류", "", "", "", "", "", "비고", "첨부파일", "최근수정일"};
|
||||||
|
String[] headerNames2 = { "", "","", "사건처리", "범죄첩보제공", "SRI", "합동점검", "회의", "기타", "", "", ""};
|
||||||
|
String[] columnType = { "String", "String","String", "String", "String", "String", "String", "String", "String", "String", "String","String"};
|
||||||
|
String sheetName = "외사분실 실적";
|
||||||
|
String excelFileName = "외사분실 실적";
|
||||||
|
List<PartWork> partWorkList= fipTargetService.selectPartWorkList(partWork);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Utils.partWorkListToExcel(partWorkList, response, headers, headerNames,headerNames2, columnType, sheetName, excelFileName);
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
partWork.setQueryInfo();
|
partWork.setQueryInfo();
|
||||||
mav.addObject("partWorkList", fipTargetService.selectPartWorkList(partWork));
|
mav.addObject("partWorkList", fipTargetService.selectPartWorkList(partWork));
|
||||||
partWork.setContentCnt(fipTargetService.selectPartWorkListCnt(partWork));
|
partWork.setContentCnt(fipTargetService.selectPartWorkListCnt(partWork));
|
||||||
|
|
@ -313,15 +326,43 @@ public class FipTargetController {
|
||||||
MultipartHttpServletRequest request,
|
MultipartHttpServletRequest request,
|
||||||
@RequestParam(value = "fileSeq", required = false) List < Integer > deleteFileSeq){
|
@RequestParam(value = "fileSeq", required = false) List < Integer > deleteFileSeq){
|
||||||
partWork.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
partWork.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||||
partWork.setWrtNm(loginUser.getUserId());
|
|
||||||
partWork.setWrtPart(loginUser.getOfcCd());
|
|
||||||
partWork.setWrtUserSeq(loginUser.getUserSeq());
|
|
||||||
partWork.setWrtOrgan(loginUser.getOgCd());
|
|
||||||
partWork.setWrtDt(LocalDateTime.now());
|
partWork.setWrtDt(LocalDateTime.now());
|
||||||
fipTargetService.updatePartWork(partWork,deleteFileSeq);
|
fipTargetService.updatePartWork(partWork,deleteFileSeq);
|
||||||
return partWork;
|
return partWork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deletePartWork")
|
||||||
|
@ResponseBody
|
||||||
|
public void deletePartWork(@RequestBody PartWork partWork) {
|
||||||
|
fipTargetService.deletePartWork(partWork);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/partWorkFileDownload")
|
||||||
|
public void partWorkFileDownload(HttpServletRequest request,
|
||||||
|
HttpServletResponse response,
|
||||||
|
Integer fileSeq,
|
||||||
|
Integer pwSeq,
|
||||||
|
Integer piSeq) {
|
||||||
|
PartWorkFile downloadFile = fipTargetService.selectPartWorkFileDown(fileSeq, pwSeq,piSeq);
|
||||||
|
|
||||||
|
BufferedInputStream in;
|
||||||
|
BufferedOutputStream out;
|
||||||
|
try {
|
||||||
|
File file = new File(downloadFile.getFilePath(), downloadFile.getConvNm());
|
||||||
|
|
||||||
|
setDisposition(downloadFile.getOrigNm()+'.'+downloadFile.getFileExtn(), request, response);
|
||||||
|
in = new BufferedInputStream(new FileInputStream(file));
|
||||||
|
out = new BufferedOutputStream(response.getOutputStream());
|
||||||
|
FileCopyUtils.copy(in, out);
|
||||||
|
out.flush();
|
||||||
|
if(out!=null) out.close();
|
||||||
|
if(in!=null )in.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//외사분실실적 끝
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
package com.dbnt.faisp.fipTarget.repository;
|
package com.dbnt.faisp.fipTarget.repository;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
|
|
||||||
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
|
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
|
||||||
import com.dbnt.faisp.publicBoard.model.PublicFile;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -19,6 +18,10 @@ public interface PartWorkFileRepository extends JpaRepository<PartWorkFile, Part
|
||||||
|
|
||||||
List<PartWorkFile> findByPwSeqAndPiSeq(Integer pwSeq, Integer piSeq);
|
List<PartWorkFile> findByPwSeqAndPiSeq(Integer pwSeq, Integer piSeq);
|
||||||
|
|
||||||
|
void deleteByPwSeqAndPiSeq(Integer pwSeq, Integer piSeq);
|
||||||
|
|
||||||
|
List<PartWorkFile> findByPiSeq(Integer piSeq);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@ public interface PartWorkRepository extends JpaRepository<PartWork, PartWork.Par
|
||||||
|
|
||||||
PartWork findTopByPiSeqOrderByPwSeqDesc(Integer piSeq);
|
PartWork findTopByPiSeqOrderByPwSeqDesc(Integer piSeq);
|
||||||
|
|
||||||
|
void deleteByPwSeqAndPiSeq(Integer pwSeq, Integer piSeq);
|
||||||
|
|
||||||
|
void deleteByPiSeq(Integer piSeq);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,16 @@ public class FipTargetService extends BaseService {
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void deletePartInfo(PartInfo partInfo) {
|
public void deletePartInfo(PartInfo partInfo) {
|
||||||
//파일삭제
|
//외사실적 파일,데이터삭제
|
||||||
|
List<PartWorkFile> partWorkFileList = partWorkFileRepository.findByPiSeq(partInfo.getPiSeq());
|
||||||
|
if(partWorkFileList != null) {
|
||||||
|
for(PartWorkFile file: partWorkFileList){
|
||||||
|
deleteStoredFile(new File(file.getFilePath(), file.getConvNm()));
|
||||||
|
partWorkFileRepository.deleteByPwSeqAndPiSeq(file.getPwSeq(),file.getPiSeq());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
partWorkRepository.deleteByPiSeq(partInfo.getPiSeq());
|
||||||
|
//외사분실운영현황파일삭제
|
||||||
List<PartInfoFile> partInfoFileList= selectPartInfoFile(partInfo);
|
List<PartInfoFile> partInfoFileList= selectPartInfoFile(partInfo);
|
||||||
for(PartInfoFile file: partInfoFileList){
|
for(PartInfoFile file: partInfoFileList){
|
||||||
if(file.getOrigNm() != null){
|
if(file.getOrigNm() != null){
|
||||||
|
|
@ -276,6 +285,11 @@ public class FipTargetService extends BaseService {
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updatePartWork(PartWork partWork, List<Integer> deleteFileSeq) {
|
public void updatePartWork(PartWork partWork, List<Integer> deleteFileSeq) {
|
||||||
|
PartWork dbParkWork = partWorkRepository.findById(new PartWorkId(partWork.getPwSeq(),partWork.getPiSeq())).orElse(null);
|
||||||
|
partWork.setWrtNm(dbParkWork.getWrtNm());
|
||||||
|
partWork.setWrtOrgan(dbParkWork.getWrtOrgan());
|
||||||
|
partWork.setWrtPart(dbParkWork.getWrtPart());
|
||||||
|
partWork.setWrtUserSeq(dbParkWork.getWrtUserSeq());
|
||||||
partWorkRepository.save(partWork);
|
partWorkRepository.save(partWork);
|
||||||
if(deleteFileSeq!=null && deleteFileSeq.size()>0){
|
if(deleteFileSeq!=null && deleteFileSeq.size()>0){
|
||||||
deletePartWorkFile(partWork, deleteFileSeq);
|
deletePartWorkFile(partWork, deleteFileSeq);
|
||||||
|
|
@ -294,6 +308,23 @@ public class FipTargetService extends BaseService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void deletePartWork(PartWork partWork) {
|
||||||
|
//파일삭제
|
||||||
|
List<PartWorkFile> partWorkFileList= partWorkFileRepository.findByPwSeqAndPiSeq(partWork.getPwSeq(),partWork.getPiSeq());
|
||||||
|
if(partWorkFileList != null) {
|
||||||
|
for(PartWorkFile file: partWorkFileList){
|
||||||
|
deleteStoredFile(new File(file.getFilePath(), file.getConvNm()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
partWorkFileRepository.deleteByPwSeqAndPiSeq(partWork.getPwSeq(),partWork.getPiSeq());
|
||||||
|
partWorkRepository.deleteByPwSeqAndPiSeq(partWork.getPwSeq(),partWork.getPiSeq());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PartWorkFile selectPartWorkFileDown(Integer fileSeq, Integer pwSeq, Integer piSeq) {
|
||||||
|
return partWorkFileRepository.findById(new PartWorkFileId(fileSeq, pwSeq,piSeq)).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.authMgt.service.AuthMgtService;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.service.BoardInvestigationService;
|
||||||
|
import com.dbnt.faisp.userInfo.model.UserInfo;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/ivsgt")
|
||||||
|
public class IvsgtController {
|
||||||
|
|
||||||
|
private final AuthMgtService authMgtService;
|
||||||
|
private final BoardInvestigationService boardInvestigationService;
|
||||||
|
|
||||||
|
@GetMapping("/arrest")
|
||||||
|
public ModelAndView ivsgt(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation) {
|
||||||
|
ModelAndView mav = new ModelAndView("ivsgt/arrest");
|
||||||
|
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
|
mav.addObject("boardInvestigationList", boardInvestigationService.selectBoardInvestigationList(boardInvestigation));
|
||||||
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
|
|
||||||
|
boardInvestigation.setQueryInfo();
|
||||||
|
boardInvestigation.setContentCnt(boardInvestigationService.selectBoardInvestigationListCnt(boardInvestigation));
|
||||||
|
boardInvestigation.setPaginationInfo();
|
||||||
|
mav.addObject("searchParams", boardInvestigation);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/arrestEditModal")
|
||||||
|
public ModelAndView arrestEditModal(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation){
|
||||||
|
ModelAndView mav = new ModelAndView("ivsgt/arrestEditModal");
|
||||||
|
if(boardInvestigation.getIvsgtKey()!=null){
|
||||||
|
boardInvestigation = boardInvestigationService.selectBoardInvestigation(boardInvestigation.getIvsgtKey());
|
||||||
|
System.out.println(boardInvestigation.toString());
|
||||||
|
}else{
|
||||||
|
boardInvestigation.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
boardInvestigation.setWrtNm(loginUser.getUserNm());
|
||||||
|
boardInvestigation.setWrtDt(LocalDateTime.now());
|
||||||
|
}
|
||||||
|
mav.addObject("boardInvestigation", boardInvestigation);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/arrestViewModal")
|
||||||
|
public ModelAndView arrestViewModal(@AuthenticationPrincipal UserInfo loginUser, BoardInvestigation boardInvestigation){
|
||||||
|
ModelAndView mav = new ModelAndView("ivsgt/arrestViewModal");
|
||||||
|
boardInvestigation = boardInvestigationService.selectBoardInvestigation(boardInvestigation.getIvsgtKey());
|
||||||
|
mav.addObject("boardInvestigation", boardInvestigation);
|
||||||
|
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||||
|
//메뉴권한 확인
|
||||||
|
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/saveBoardInvestigation")
|
||||||
|
public Integer saveBoardInvestigation(@AuthenticationPrincipal UserInfo loginUser,
|
||||||
|
BoardInvestigation boardInvestigation,
|
||||||
|
ArrestType arrestType,
|
||||||
|
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, deleteFileSeq);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.mapper;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.dbnt.faisp.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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.dbnt.faisp.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 String arrestCd;
|
||||||
|
@Transient
|
||||||
|
private String arrestCd2;
|
||||||
|
@Transient
|
||||||
|
private String arrestCdName;
|
||||||
|
@Transient
|
||||||
|
private String arrestCd2Name;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.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_ivsgt")
|
||||||
|
@IdClass(HashTagLinkIvsgt.HashTagLinkIvsgtId.class)
|
||||||
|
public class HashTagLinkIvsgt {
|
||||||
|
@Id
|
||||||
|
@Column(name = "ivsgt_key")
|
||||||
|
private Integer ivsgtKey;
|
||||||
|
@Id
|
||||||
|
@Column(name = "tag_key")
|
||||||
|
private Integer tagKey;
|
||||||
|
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class HashTagLinkIvsgtId implements Serializable {
|
||||||
|
private Integer ivsgtKey;
|
||||||
|
private Integer tagKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.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 = "ivsgt_file")
|
||||||
|
@IdClass(IvsgtFile.IvsgtFileId.class)
|
||||||
|
public class IvsgtFile extends FileInfo {
|
||||||
|
@Id
|
||||||
|
@Column(name = "ivsgt_key")
|
||||||
|
private Integer ivsgtKey;
|
||||||
|
@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 IvsgtFileId implements Serializable {
|
||||||
|
private Integer ivsgtKey;
|
||||||
|
private Integer fileSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.dbnt.faisp.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 = "parent_ivsgt")
|
||||||
|
public class parentIvsgt extends BaseModel {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "parent_ivsgt")
|
||||||
|
private Integer parentIvsgt;
|
||||||
|
@Column(name = "ivsgt_key")
|
||||||
|
private String ivsgtKey;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ArrestTypeRepository extends JpaRepository<ArrestType, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface BoardInvestigationRepository extends JpaRepository<BoardInvestigation, Integer> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.HashTagLinkIvsgt;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface HashTagLinkIvsgtRepository extends JpaRepository<HashTagLinkIvsgt, HashTagLinkIvsgt.HashTagLinkIvsgtId> {
|
||||||
|
void deleteByIvsgtKey(Integer ivsgtKey);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.dbnt.faisp.ivsgtMgt.boardInvestigation.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.BaseService;
|
||||||
|
import com.dbnt.faisp.config.FileInfo;
|
||||||
|
import com.dbnt.faisp.fpiMgt.affair.model.HashTag;
|
||||||
|
import com.dbnt.faisp.fpiMgt.affair.repository.HashTagRepository;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.ArrestType;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.BoardInvestigation;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.HashTagLinkIvsgt;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.IvsgtFile;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.ArrestTypeRepository;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.BoardInvestigationRepository;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.HashTagLinkIvsgtRepository;
|
||||||
|
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.IvsgtFileRepository;
|
||||||
|
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 BoardInvestigationService extends BaseService {
|
||||||
|
private final BoardInvestigationRepository boardInvestigationRepository;
|
||||||
|
private final IvsgtFileRepository ivsgtFileRepository;
|
||||||
|
private final ArrestTypeRepository arrestTypeRepository;
|
||||||
|
private final HashTagRepository hashTagRepository;
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
return savedBoardInvestigation;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public Integer saveBoardInvestigation(BoardInvestigation boardInvestigation, ArrestType arrestType, 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(deleteFileSeq != null && deleteFileSeq.size()>0){
|
||||||
|
deletePlanFile(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+"monthPlan"+File.separator;
|
||||||
|
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 deletePlanFile(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){
|
||||||
|
HashTag savedTag = hashTagRepository.findByTagNm(tagNm).orElse(null);
|
||||||
|
Integer tagKey;
|
||||||
|
if(savedTag==null){
|
||||||
|
HashTag tag = new HashTag();
|
||||||
|
tag.setTagNm(tagNm);
|
||||||
|
tagKey = hashTagRepository.save(tag).getTagKey();
|
||||||
|
}else{
|
||||||
|
tagKey = savedTag.getTagKey();
|
||||||
|
}
|
||||||
|
HashTagLinkIvsgt hashTagLinkIvsgt = new HashTagLinkIvsgt();
|
||||||
|
hashTagLinkIvsgt.setIvsgtKey(ivsgtKey);
|
||||||
|
hashTagLinkIvsgt.setTagKey(tagKey);
|
||||||
|
hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FileInfo selectIvsgtFile(Integer parentKey, Integer fileSeq) {
|
||||||
|
return ivsgtFileRepository.findById(new IvsgtFile.IvsgtFileId(parentKey, fileSeq)).orElse(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -26,6 +26,7 @@ import org.apache.poi.xssf.usermodel.XSSFDataFormat;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
||||||
|
import com.dbnt.faisp.fipTarget.model.PartWork;
|
||||||
|
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
@ -513,6 +514,137 @@ public class Utils {
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void partWorkListToExcel(List<PartWork> partWorkList, HttpServletResponse response, String[] headers,
|
||||||
|
String[] headerNames, String[] headerNames2, String[] columnType, String sheetName, String excelFileName) throws IOException {
|
||||||
|
if(Utils.isNotEmpty(partWorkList)) {
|
||||||
|
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
|
||||||
|
XSSFWorkbook wb = new XSSFWorkbook();
|
||||||
|
Sheet sheet = wb.createSheet(sheetName);
|
||||||
|
Row headerRow = sheet.createRow(0);
|
||||||
|
Row headerRow2 = sheet.createRow(1);
|
||||||
|
CellStyle cellStyle1 = wb.createCellStyle(); //쉼표들어간 숫자 양식
|
||||||
|
CellStyle cellStyle2 = wb.createCellStyle(); //숫자양식
|
||||||
|
CellStyle headerStyle = wb.createCellStyle(); //숫자양식
|
||||||
|
CellStyle headerStyle2 = wb.createCellStyle();
|
||||||
|
CellStyle headerStyle3 = wb.createCellStyle();
|
||||||
|
|
||||||
|
XSSFDataFormat format = wb.createDataFormat();
|
||||||
|
cellStyle1.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
cellStyle2.setDataFormat(format.getFormat("#,##0"));
|
||||||
|
cellStyle2.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle2.setBorderTop(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderBottom(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderLeft(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderRight(BorderStyle.THIN);
|
||||||
|
headerStyle2.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
headerStyle2.setFillForegroundColor((short)3);
|
||||||
|
headerStyle2.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||||
|
headerStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
headerStyle.setFillForegroundColor((short)3);
|
||||||
|
headerStyle.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||||
|
headerStyle3.setBorderTop(BorderStyle.THIN);
|
||||||
|
headerStyle3.setBorderBottom(BorderStyle.THIN);
|
||||||
|
headerStyle3.setBorderLeft(BorderStyle.THIN);
|
||||||
|
headerStyle3.setBorderRight(BorderStyle.THIN);
|
||||||
|
headerStyle3.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle3.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
headerStyle3.setFillForegroundColor((short)3);
|
||||||
|
headerStyle3.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||||
|
//로우그리기
|
||||||
|
for(int i=0; i<partWorkList.size(); i++) {
|
||||||
|
ParamMap rowData = new ParamMap();
|
||||||
|
Row row = sheet.createRow(i+2);
|
||||||
|
rowData.set("terminal_nm", partWorkList.get(i).getTerminalNm());
|
||||||
|
rowData.set("wrt_nm", partWorkList.get(i).getWrtNm());
|
||||||
|
if(partWorkList.get(i).getWorkDt() != null) {
|
||||||
|
rowData.set("work_dt", partWorkList.get(i).getWorkDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
}else {
|
||||||
|
rowData.set("work_dt", "");
|
||||||
|
}
|
||||||
|
rowData.set("work_type_ch", partWorkList.get(i).getWorkTypeCh());
|
||||||
|
rowData.set("work_type_poci", partWorkList.get(i).getWorkTypePoci());
|
||||||
|
rowData.set("work_type_sri", partWorkList.get(i).getWorkTypeSri());
|
||||||
|
rowData.set("work_type_ji", partWorkList.get(i).getWorkTypeJi());
|
||||||
|
rowData.set("work_type_mt", partWorkList.get(i).getWorkTypeMt());
|
||||||
|
rowData.set("work_type_etc", partWorkList.get(i).getWorkTypeEtc());
|
||||||
|
rowData.set("description", partWorkList.get(i).getDescription());
|
||||||
|
if(partWorkList.get(i).getFileCnt() > 0) {
|
||||||
|
rowData.set("file_cnt", "●");
|
||||||
|
}else {
|
||||||
|
rowData.set("file_cnt", "");
|
||||||
|
}
|
||||||
|
rowData.set("wrt_dt", partWorkList.get(i).getWrtDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")));
|
||||||
|
for(int j=0; j<headers.length; j++) {
|
||||||
|
Cell cell = row.createCell(j);
|
||||||
|
|
||||||
|
if(columnType[j].equalsIgnoreCase("Int")) {
|
||||||
|
cell.setCellValue(rowData.getInt(headers[j]));
|
||||||
|
cell.setCellStyle(cellStyle2);
|
||||||
|
} else if(columnType[j].equalsIgnoreCase("String")) {
|
||||||
|
cell.setCellValue(rowData.getString(headers[j]));
|
||||||
|
cell.setCellStyle(cellStyle1);
|
||||||
|
} else {
|
||||||
|
cell.setCellValue(rowData.getString(headers[j]));
|
||||||
|
cell.setCellStyle(cellStyle1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//헤더
|
||||||
|
for(int j=0; j<headerNames.length; j++) {
|
||||||
|
Cell cell = headerRow.createCell(j);
|
||||||
|
cell.setCellValue(headerNames[j]);
|
||||||
|
cell.setCellStyle(headerStyle3);
|
||||||
|
sheet.autoSizeColumn(j);
|
||||||
|
sheet.setColumnWidth(j, (sheet.getColumnWidth(j)) + 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int j=0; j<headerNames2.length; j++) {
|
||||||
|
Cell cell = headerRow2.createCell(j);
|
||||||
|
cell.setCellValue(headerNames2[j]);
|
||||||
|
cell.setCellStyle(headerStyle2);
|
||||||
|
sheet.autoSizeColumn(j);
|
||||||
|
sheet.setColumnWidth(j, (sheet.getColumnWidth(j)) + 1024);
|
||||||
|
}
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,0,0));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,1,1));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,2,2));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,0,3,8));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,9,9));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,10,10));
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0,1,11,11));
|
||||||
|
|
||||||
|
//엑셀이름 한글깨짐방지
|
||||||
|
String outputFileName = new String(excelFileName.getBytes("KSC5601"), "8859_1");
|
||||||
|
|
||||||
|
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
||||||
|
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+outputFileName+"_"+Utils.getTimeStampString("yyyyMMdd_HHmm")+".xlsx\""));
|
||||||
|
|
||||||
|
wb.write(response.getOutputStream());
|
||||||
|
wb.close();
|
||||||
|
} else {
|
||||||
|
response.setHeader("Content-Type", "text/html; charset=UTF-8");
|
||||||
|
PrintWriter out = response.getWriter();
|
||||||
|
|
||||||
|
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
|
||||||
|
out.write("<html lang=\"ko\">");
|
||||||
|
out.write("<head>");
|
||||||
|
out.write("<script type=\"text/javascript\">");
|
||||||
|
out.write("alert('데이터가 없습니다.');");
|
||||||
|
out.write("history.back(-1);");
|
||||||
|
out.write("</script>");
|
||||||
|
out.write("</head>");
|
||||||
|
out.write("</html>");
|
||||||
|
|
||||||
|
out.flush();
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?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.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper">
|
||||||
|
<sql id="selectBoardInvestigationListWhere">
|
||||||
|
<where>
|
||||||
|
<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='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_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
|
||||||
|
<include refid="selectBoardInvestigationListWhere"></include>
|
||||||
|
</select>
|
||||||
|
<select id="selectHashTags" resultType="string" parameterType="int">
|
||||||
|
SELECT aa.hashTags
|
||||||
|
FROM (
|
||||||
|
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}
|
||||||
|
GROUP BY a.ivsgt_key) aa
|
||||||
|
</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>
|
||||||
|
</mapper>
|
||||||
|
|
@ -376,7 +376,9 @@
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
order by wrt_dt desc
|
order by wrt_dt desc
|
||||||
limit #{rowCnt} offset #{firstIndex}
|
<if test='excel != "Y"'>
|
||||||
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPartWorkListCnt" resultType="int" parameterType="PartWork">
|
<select id="selectPartWorkListCnt" resultType="int" parameterType="PartWork">
|
||||||
|
|
@ -435,6 +437,7 @@
|
||||||
pw.work_info,
|
pw.work_info,
|
||||||
work_type,
|
work_type,
|
||||||
pw.description,
|
pw.description,
|
||||||
|
pw.wrt_nm,
|
||||||
pw.wrt_dt
|
pw.wrt_dt
|
||||||
from part_work pw,
|
from part_work pw,
|
||||||
part_info pi,
|
part_info pi,
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,10 @@ function setUploadDiv(){
|
||||||
}
|
}
|
||||||
}).on('click', function (e){
|
}).on('click', function (e){
|
||||||
if(e.target.className.indexOf("ileDelete")<0){
|
if(e.target.className.indexOf("ileDelete")<0){
|
||||||
if( e.target.className.indexOf("artInfo")<0){
|
if(e.target.className.indexOf("artInfo")<0){
|
||||||
$("#fileInputer").click();
|
if(e.target.className.indexOf("artWork")<0){
|
||||||
|
$("#fileInputer").click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,51 @@ $(document).on('click', '#updateBtn', function (){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#deletePartWork', function (){
|
||||||
|
const pwSeq = $('input[name=pwSeq]').val();
|
||||||
|
const piSeq = $('#mPiSeq').val();
|
||||||
|
console.log(piSeq);
|
||||||
|
if(confirm("삭제하시겠습니까?")){
|
||||||
|
contentFade("in");
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
url : "/target/deletePartWork",
|
||||||
|
data : JSON.stringify({pwSeq:pwSeq,
|
||||||
|
piSeq:piSeq}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
beforeSend: function (xhr){
|
||||||
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
|
},
|
||||||
|
success : function(data) {
|
||||||
|
alert("삭제 처리되었습니다.");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("삭제 처리에 실패하였습니다");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '.fileDownPartWork', function (){
|
||||||
|
const target = $(this)
|
||||||
|
let url = "/target/partWorkFileDownload?"
|
||||||
|
url += "&fileSeq="+target.attr("data-fileSeq");
|
||||||
|
url += "&pwSeq="+target.attr("data-pwSeq");
|
||||||
|
url += "&piSeq="+target.attr("data-piSeq");
|
||||||
|
window.open(encodeURI(url));
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#goExcel', function (){
|
||||||
|
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
||||||
|
$('input[name=excel]').val('Y');
|
||||||
|
$('#searchFm').submit();
|
||||||
|
$('input[name=excel]').val('');
|
||||||
|
}else{
|
||||||
|
false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
$(document).on('click', '.btn-close', function (){
|
$(document).on('click', '.btn-close', function (){
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
$(document).on('click', '#arrestAddBtn', function () {
|
||||||
|
getArrestEditModal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#arrestEditBtn', function () {
|
||||||
|
$("#arrestViewModal").modal('hide');
|
||||||
|
getArrestEditModal(Number($("#arrestViewBody").find("[name='ivsgtKey']").val()));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('click', '#contentInfoAddBtn', function (){
|
||||||
|
$("#contentInfoDiv").append("<input type='text' class='form-control' name='contentInfos'>")
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#saveArrestBtn', function (){
|
||||||
|
saveBoardInvestigation('N')
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#saveTempBtn', function (){
|
||||||
|
saveBoardInvestigation('Y')
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.tr', function (){
|
||||||
|
getArrestViewModal($(this).data('key'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$("#dateSelectorDiv").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function getArrestViewModal(ivsgtKey){
|
||||||
|
$.ajax({
|
||||||
|
url: '/ivsgt/arrestViewModal',
|
||||||
|
data: {ivsgtKey: ivsgtKey},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#arrestViewBody").empty().append(html)
|
||||||
|
$("#arrestViewModal").modal('show');
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getArrestEditModal(ivsgtKey){
|
||||||
|
$.ajax({
|
||||||
|
url: '/ivsgt/arrestEditModal',
|
||||||
|
data: {ivsgtKey: ivsgtKey},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#arrestEditModalContent").empty().append(html)
|
||||||
|
$("#arrestEditModal").modal('show');
|
||||||
|
$("[name='contentInfo']").summernote({
|
||||||
|
lang:'ko-KR',
|
||||||
|
height: 120,
|
||||||
|
disableDragAndDrop: true,
|
||||||
|
toolbar: [
|
||||||
|
['style', ['style']],
|
||||||
|
['font', ['bold', 'underline', 'clear']],
|
||||||
|
['color', ['color']],
|
||||||
|
['para', ['ul', 'ol', 'paragraph']],
|
||||||
|
['table', ['table']]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
$("[name='contentMain']").summernote({
|
||||||
|
lang:'ko-KR',
|
||||||
|
height: 120,
|
||||||
|
disableDragAndDrop: true,
|
||||||
|
toolbar: [
|
||||||
|
['style', ['style']],
|
||||||
|
['font', ['bold', 'underline', 'clear']],
|
||||||
|
['color', ['color']],
|
||||||
|
['para', ['ul', 'ol', 'paragraph']],
|
||||||
|
['table', ['table']]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
setUploadDiv();
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveBoardInvestigation(contentState){
|
||||||
|
if(contentCheck()){
|
||||||
|
if(confirm("저장하시겠습니까?")){
|
||||||
|
$("#contentStatus").val(contentState);
|
||||||
|
contentFade("in");
|
||||||
|
const formData = new FormData($("#arrestEditForm")[0]);
|
||||||
|
for(const file of files) {
|
||||||
|
if(!file.isDelete)
|
||||||
|
formData.append('uploadFiles', file, file.name);
|
||||||
|
}
|
||||||
|
$(".text-decoration-line-through").each(function (idx, el){
|
||||||
|
formData.append('fileSeq', $(el).attr("data-fileseq"));
|
||||||
|
})
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
url : "/ivsgt/saveBoardInvestigation",
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success : function(result) {
|
||||||
|
alert("저장되었습니다.");
|
||||||
|
contentFade("out");
|
||||||
|
$("#arrestEditModal").modal('hide');
|
||||||
|
getArrestViewModal(result);
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("저장에 실패하였습니다.")
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function contentCheck(){
|
||||||
|
let flag = true;
|
||||||
|
if(!$("#contentTitle").val()){
|
||||||
|
alert("제목을 입력해주세요.")
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
else if(!$("#arrestCd").val()){
|
||||||
|
alert("검거유형1을 선택해주세요.")
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
else if(!$("#arrestCd2").val()){
|
||||||
|
alert("검거유형2를 선택해주세요.")
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = fileCheck(flag, files);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="menuEditModalLabel">등록</h5>
|
<h5 class="modal-title" id="menuEditModalLabel">외사분실 현황등록</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
</th:block>
|
</th:block>
|
||||||
<div layout:fragment="content">
|
<div layout:fragment="content">
|
||||||
<main class="pt-3">
|
<main class="pt-3">
|
||||||
<h4>외사 분실 현황</h4>
|
<h4>외사분실 실적</h4>
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
<div class="row mx-0">
|
<div class="row mx-0">
|
||||||
<div class="col-12 card text-center">
|
<div class="col-12 card text-center">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form id="searchFm" method="get" th:action="@{/target/partInfoList}">
|
<form id="searchFm" method="get" th:action="@{/target/partWorkList}">
|
||||||
<input type="hidden" name="excel">
|
<input type="hidden" name="excel">
|
||||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
<div class="row justify-content-between pe-3 py-1">
|
<div class="row justify-content-between pe-3 py-1">
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
|
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="row justify-content-start">
|
<div class="row justify-content-start">
|
||||||
|
|
@ -125,7 +126,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<input type="button" class="btn btn-success" value="등록" id="addPartWork">
|
<input type="button" class="btn btn-success" value="등록" id="addPartWork" th:unless="${accessAuth eq 'ACC001'}">
|
||||||
<button id="goExcel">엑셀다운</button>
|
<button id="goExcel">엑셀다운</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
<input type="hidden" name="pwSeq" th:value="${pwInfo.pwSeq}">
|
<input type="hidden" name="pwSeq" th:value="${pwInfo.pwSeq}">
|
||||||
<input type="hidden" name="piSeq" th:value="${pwInfo.piSeq}">
|
<input type="hidden" id="mPiSeq" name="piSeq" th:value="${pwInfo.piSeq}">
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">터미널명</label>
|
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">터미널명</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<th:block th:unless="${#arrays.isEmpty(pwInfo.fileList)}">
|
<th:block th:unless="${#arrays.isEmpty(pwInfo.fileList)}">
|
||||||
<div class='row-col-6' th:each="infoFile:${pwInfo.fileList}">
|
<div class='row-col-6' th:each="infoFile:${pwInfo.fileList}">
|
||||||
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
|
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
|
||||||
<a href='#' class='fileDownPartInfo text-decoration-none' th:data-fileSeq="${infoFile.fileSeq}" th:data-pwSeq="${infoFile.pwSeq}" th:data-piSeq="${infoFile.piSeq}">다운</a>
|
<a href='#' class='fileDownPartWork text-decoration-none' th:data-fileSeq="${infoFile.fileSeq}" th:data-pwSeq="${infoFile.pwSeq}" th:data-piSeq="${infoFile.piSeq}">다운</a>
|
||||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
@ -84,6 +84,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" id="btn-close" data-bs-dismiss="modal">닫기</button>
|
<button type="button" class="btn btn-secondary" id="btn-close" data-bs-dismiss="modal">닫기</button>
|
||||||
|
<th:block th:if="${userId eq pwInfo.wrtNm} or ${accessAuth eq 'ACC003'}">
|
||||||
|
<button type="button" class="btn btn-danger" id="deletePartWork">삭제</button>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${userId eq pwInfo.wrtNm} or ${accessAuth eq 'ACC003'}"><!--작성자 관리자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-primary" id="updateBtn">수정</button>
|
<button type="button" class="btn btn-primary" id="updateBtn">수정</button>
|
||||||
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||||
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
|
layout:decorate="~{layout/layout}">
|
||||||
|
<th:block layout:fragment="script">
|
||||||
|
<script type="text/javascript" th:src="@{/js/ivsgt/arrest.js}"></script>
|
||||||
|
</th:block>
|
||||||
|
<div layout:fragment="content">
|
||||||
|
<main class="pt-3">
|
||||||
|
<h4>사건 보고</h4>
|
||||||
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
<div class="row mx-0">
|
||||||
|
<div class="col-12 card">
|
||||||
|
<div class="card-body">
|
||||||
|
<form method="get" th:action="@{/ivsgt/arrest}">
|
||||||
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
|
<input type="hidden" name="dateSelector" value="wrtDt">
|
||||||
|
<div class="row justify-content-between pe-3 py-1">
|
||||||
|
<div class="col-auto">
|
||||||
|
<select class="form-select" name="rowCnt" id="rowCnt">
|
||||||
|
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||||
|
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<div class="row justify-content-end">
|
||||||
|
<div class="col-auto" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
|
||||||
|
<select class="form-select form-select-sm" name="wrtOrgan">
|
||||||
|
<option value="">관서 선택</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
|
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}">
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<!-- 탭 메뉴 -->
|
||||||
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link active" id="arrest-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#arrest" type="button" role="tab" aria-controls="arrest"
|
||||||
|
aria-selected="true">검거보고서</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="proceeding-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#proceeding" type="button" role="tab"
|
||||||
|
aria-controls="proceeding" aria-selected="false">진행보고서</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="result-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#result" type="button" role="tab"
|
||||||
|
aria-controls="result" aria-selected="false">결과보고서</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- 내용 -->
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane fade show active" id="arrest" role="tabpanel"
|
||||||
|
aria-labelledby="arrest-tab">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>문서번호</th>
|
||||||
|
<th>관서</th>
|
||||||
|
<th>검거유형1</th>
|
||||||
|
<th>검거유형2</th>
|
||||||
|
<th>제목</th>
|
||||||
|
<th>작성자</th>
|
||||||
|
<th>작성일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="tr" th:each="boardInvestigation:${boardInvestigationList}" th:data-key="${boardInvestigation.ivsgtKey}">
|
||||||
|
<td th:text="${boardInvestigation.ivsgtKey}"></td>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
|
<td th:if="${boardInvestigation.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||||
|
</th:block>
|
||||||
|
<td th:text="${boardInvestigation.arrestCdName}"></td>
|
||||||
|
<td th:text="${boardInvestigation.arrestCd2Name}"></td>
|
||||||
|
<td 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>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button id="arrestAddBtn">등록</button>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="proceeding" role="tabpanel"
|
||||||
|
aria-labelledby="proceeding-tab">진행보고서</div>
|
||||||
|
<div class="tab-pane fade" id="result" role="tabpanel"
|
||||||
|
aria-labelledby="result-tab">결과보고서</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 페이징 -->
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-auto">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
|
<th:block th:if="${searchParams.pageIndex>3}">
|
||||||
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||||
|
<a class="page-link" href="#" aria-label="Previous">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||||
|
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||||
|
<a class="page-link" href="#" th:text="${num}"></a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||||
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||||
|
<a class="page-link" href="#" aria-label="Next">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="arrestEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="arrestEditModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="arrestEditModalContent">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="arrestViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="arrestViewModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="arrestViewBody">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="planEditModalLabel" th:text="${boardInvestigation.ivsgtKey eq null?'검거보고서 작성':'검거보고서 수정'}"></h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="arrestEditBody">
|
||||||
|
<form action="#" method="post" id="arrestEditForm">
|
||||||
|
<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="ivsgtKey" th:value="${boardInvestigation.wrtNm}">
|
||||||
|
<input type="hidden" name="ivsgtKey" th:value="${boardInvestigation.wrtDt}">
|
||||||
|
<input type="hidden" name="wrtOrgan" th:value="${boardInvestigation.wrtOrgan}">
|
||||||
|
<input type="hidden" id="contentStatus" name="contentStatus">
|
||||||
|
<input type="hidden" name="ivsgtType" value="arrest">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="wrtNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control" id="wrtNm" name="wrtNm" th:value="${boardInvestigation.wrtNm}" readonly>
|
||||||
|
</div>
|
||||||
|
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="contentTitle" name="contentTitle" th:value="${boardInvestigation.contentTitle}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row" id="arrestTypeDiv">
|
||||||
|
<label class="col-sm-2 col-form-label text-center">검거유형1</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<select class="form-select form-select-sm" name="arrestCd" id="arrestCd">
|
||||||
|
<option value="">검거유형1 선택-</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('AT1')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
|
||||||
|
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<label class="col-sm-2 col-form-label text-center">검거유형2</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<select class="form-select form-select-sm" name="arrestCd2" id="arrestCd2">
|
||||||
|
<option value="">검거유형2 선택-</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('AT2')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
|
||||||
|
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd2}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags" th:value="${boardInvestigation.hashTags}"
|
||||||
|
placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row justify-content-center">
|
||||||
|
<label for="contentInfoDiv" class="col-sm-2 col-form-label text-center">사건개요</label>
|
||||||
|
<div class="col-sm-10" id="contentInfoDiv">
|
||||||
|
<textarea type='text' name='contentInfo' th:utext="${boardInvestigation.contentInfo}"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row justify-content-center">
|
||||||
|
<label for="contentMainDiv" class="col-sm-2 col-form-label text-center">주요내용</label>
|
||||||
|
<div class="col-sm-10" id="contentMainDiv">
|
||||||
|
<textarea type='text' name='contentMain' th:utext="${boardInvestigation.contentMain}"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="fileInputer" class="col-sm-2 col-form-label text-center">업로드 자료</label>
|
||||||
|
<div class="col-sm-10" 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)}">
|
||||||
|
<br>파일을 업로드 해주세요.
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${#arrays.isEmpty(boardInvestigation.fileList)}">
|
||||||
|
<div class='row-col-6' th:each="ivsgtFile:${boardInvestigation.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>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<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="saveArrestBtn">저장</button>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="arrestViewModalLabel">검거보고서</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="arrestViewBody">
|
||||||
|
<form action="#" method="post" id="arrestEditForm">
|
||||||
|
<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" name="contentState">
|
||||||
|
<input type="hidden" name="ivsgtType" value="arrest">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${boardInvestigation.wrtNm}" readonly>
|
||||||
|
</div>
|
||||||
|
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control border-0" id="contentTitle" name="contentTitle" th:value="${boardInvestigation.contentTitle}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row" id="arrestTypeDiv">
|
||||||
|
<label class="col-sm-2 col-form-label text-center">검거유형1</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<div th:utext="${boardInvestigation.arrestType.arrestCdName}"></div>
|
||||||
|
</div>
|
||||||
|
<label class="col-sm-2 col-form-label text-center">검거유형2</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<div th:utext="${boardInvestigation.arrestType.arrestCd2Name}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control form-control-sm border-0" id="hashTags" name="hashTags" th:value="${boardInvestigation.hashTags}"
|
||||||
|
placeholder="없음" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row justify-content-center">
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="contentInfoDiv" class="col-sm-2 col-form-label text-center">사건개요</label>
|
||||||
|
<div class="col-sm-10" id="contentInfoDiv">
|
||||||
|
<textarea type='text' class="col-sm-10" name='contentInfos'th:utext="${boardInvestigation.contentInfo}" readonly></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="contentMainDiv" class="col-sm-2 col-form-label text-center">주요내용</label>
|
||||||
|
<div class="col-sm-10" id="contentMainDiv">
|
||||||
|
<textarea type='text' class="col-sm-10" name='contentMain' th:utext="${boardInvestigation.contentMain}" readonly></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>파일명</th>
|
||||||
|
<th>사이즈</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<th:block th:if="${#lists.isEmpty(boardInvestigation.fileList)}">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">파일이 없습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${#lists.isEmpty(boardInvestigation.fileList)}">
|
||||||
|
<th:block th:each="file:${boardInvestigation.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>
|
||||||
|
<td th:text="${file.fileSize}"></td>
|
||||||
|
</tr>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<th:block th:if="${userSeq eq boardInvestigation.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
||||||
|
<button type="button" class="btn btn-warning" id="arrestEditBtn">수정</button>
|
||||||
|
</th:block>
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue