방첩공작 작업중.

파일업로드 경로 세팅방식 변경.
화면가리개 디자인 변경.
master
강석 최 2022-12-30 18:01:34 +09:00
parent b81bff3b71
commit 52f367f4e3
27 changed files with 738 additions and 326 deletions

View File

@ -14,6 +14,38 @@ public class BaseService {
@Value("${spring.servlet.multipart.location}") @Value("${spring.servlet.multipart.location}")
protected String locationPath; protected String locationPath;
@Value("${file.dir.publicBoard}")
protected String publicBoardPath;
@Value("${file.dir.faRpt}")
protected String faRptPath;
@Value("${file.dir.vulnerable}")
protected String vulnerablePath;
@Value("${file.dir.part}")
protected String partPath;
@Value("${file.dir.equip}")
protected String equipPath;
@Value("${file.dir.sailor}")
protected String sailorPath;
@Value("${file.dir.affair}")
protected String affairPath;
@Value("${file.dir.affair.plan}")
protected String affairPlanPath;
@Value("${file.dir.affair.result}")
protected String affairResultPath;
@Value("${file.dir.editor}")
protected String editorPath;
@Value("${file.dir.sri}")
protected String sriPath;
@Value("${file.dir.ciw}")
protected String ciwPath;
@Value("${file.dir.cia.safty}")
protected String ciaSaftyPath;
@Value("${file.dir.cia.company}")
protected String ciaCompanyPath;
@Value("${file.dir.cia.foreigner}")
protected String ciaForeignerPath;
@Value("${file.dir.cia.edu}")
protected String ciaEduPath;
protected String calculationSize(double fileSize){ protected String calculationSize(double fileSize){
String[] units = {"bytes", "KB", "MB", "GB", "TB", "PB"}; String[] units = {"bytes", "KB", "MB", "GB", "TB", "PB"};
@ -25,11 +57,11 @@ public class BaseService {
} }
} }
public void deleteStoredFile(File deleteFile){ protected void deleteStoredFile(File deleteFile){
deleteFile.delete(); deleteFile.delete();
} }
public void saveFile(MultipartFile file, File saveFile){ protected void saveFile(MultipartFile file, File saveFile){
if(file.getSize()!=0){ // 저장될 파일 확인 if(file.getSize()!=0){ // 저장될 파일 확인
if(!saveFile.exists()){ // 저장될 경로 확인 if(!saveFile.exists()){ // 저장될 경로 확인
if(saveFile.getParentFile().mkdirs()){ if(saveFile.getParentFile().mkdirs()){

View File

@ -35,17 +35,11 @@ import javax.servlet.http.HttpSession;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
public class EditorController { public class EditorController extends BaseService{
@Value("${site.domain}") @Value("${site.domain}")
protected String siteDomain; protected String siteDomain;
@Value("${file.dir}")
protected String fileDir;
@Value("${file.dir.editor}")
protected String editorPath;
@Value("${editor.img.view}") @Value("${editor.img.view}")
protected String imgView; protected String imgView;
@ -71,7 +65,7 @@ public class EditorController {
String extNm = attach_file_Name.substring( attach_file_Name.lastIndexOf( "." ) + 1); String extNm = attach_file_Name.substring( attach_file_Name.lastIndexOf( "." ) + 1);
if("jpg,png,jpeg".contains(extNm.toLowerCase())) { if("jpg,png,jpeg".contains(extNm.toLowerCase())) {
File dir = new File(fileDir+File.separator+editorPath); File dir = new File(locationPath+editorPath);
if (!dir.exists()) { if (!dir.exists()) {
try{ try{
@ -90,7 +84,7 @@ public class EditorController {
System.out.println("Directory already exists"); System.out.println("Directory already exists");
} }
File file = new File(fileDir+File.separator+editorPath, attach_save_Name +"."+ extNm); File file = new File(locationPath+editorPath, attach_save_Name +"."+ extNm);
FileCopyUtils.copy(mFile.getBytes(), file); FileCopyUtils.copy(mFile.getBytes(), file);
InputStream is = new FileInputStream(file); InputStream is = new FileInputStream(file);
BufferedImage input = ImageIO.read(is); BufferedImage input = ImageIO.read(is);

View File

@ -32,7 +32,7 @@ import java.nio.file.Paths;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/file") @RequestMapping("/file")
public class FileController { public class FileController extends BaseService{
private final FaRptService faRptService; private final FaRptService faRptService;
private final PlanService planService; private final PlanService planService;
@ -43,17 +43,12 @@ public class FileController {
private final FishingBoatService fishingBoatService; private final FishingBoatService fishingBoatService;
private final SriService sriService; private final SriService sriService;
@Value("${file.dir}")
protected String fileDir;
@Value("${file.dir.editor}")
protected String editorPath;
@GetMapping("/editorFileDisplay") @GetMapping("/editorFileDisplay")
public ResponseEntity<Resource> editorFileDisplay(HttpServletRequest request, public ResponseEntity<Resource> editorFileDisplay(HttpServletRequest request,
HttpServletResponse response, HttpServletResponse response,
String fileNm) { String fileNm) {
String pathStr = fileDir+File.separator+editorPath+File.separator+fileNm; String pathStr = locationPath+editorPath+File.separator+fileNm;
Resource resource = new FileSystemResource(pathStr); Resource resource = new FileSystemResource(pathStr);
if(!resource.exists()){ if(!resource.exists()){
return new ResponseEntity<>(HttpStatus.NOT_FOUND); return new ResponseEntity<>(HttpStatus.NOT_FOUND);

View File

@ -7,13 +7,12 @@ import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceServic
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.List;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@ -32,11 +31,13 @@ public class CounterIntelligenceController {
mav.addObject("accessAuth", accessAuth); mav.addObject("accessAuth", accessAuth);
if(accessAuth.equals("ACC003")){ if(accessAuth.equals("ACC003")){
mav.addObject("downOrganCdList", loginUser.getDownOrganCdList()); mav.addObject("downOrganCdList", loginUser.getDownOrganCdList());
}else{
ciWork.setWrtUserSeq(loginUser.getUserSeq());
} }
ciWork.setQueryInfo(); ciWork.setQueryInfo();
mav.addObject("faRptList", new ArrayList<CounterIntelligenceWork>()); mav.addObject("ciWorkList", ciService.selectCounterIntelligenceWorkList(ciWork));
ciWork.setContentCnt(0); ciWork.setContentCnt(ciService.selectCounterIntelligenceWorkCnt(ciWork));
ciWork.setPaginationInfo(); ciWork.setPaginationInfo();
mav.addObject("searchParams", ciWork); mav.addObject("searchParams", ciWork);
return mav; return mav;
@ -63,4 +64,18 @@ public class CounterIntelligenceController {
mav.addObject("ciWork", ciWork); mav.addObject("ciWork", ciWork);
return mav; return mav;
} }
@GetMapping("/ciWorkViewModal")
public ModelAndView ciWorkViewModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceWork ciWork){
ModelAndView mav = new ModelAndView("counterIntelligence/ciWorkViewModal");
mav.addObject("ciWork", ciService.selectCounterIntelligenceWork(ciWork.getCiwKey()));
return mav;
}
@PostMapping("/saveCiWork")
public Integer saveCiWork(CounterIntelligenceWork ciWork,
MultipartHttpServletRequest request,
@RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){
ciWork.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
return ciService.saveCiWork(ciWork, deleteFileSeq);
}
} }

View File

@ -1,5 +1,6 @@
package com.dbnt.faisp.main.counterIntelligence.mapper; package com.dbnt.faisp.main.counterIntelligence.mapper;
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
import com.dbnt.faisp.main.faRpt.model.FaRptBoard; import com.dbnt.faisp.main.faRpt.model.FaRptBoard;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -9,6 +10,9 @@ import java.util.List;
@Mapper @Mapper
public interface CounterIntelligenceMapper { public interface CounterIntelligenceMapper {
String selectHashTags(Integer ciwKey); List<CounterIntelligenceWork> selectCounterIntelligenceWorkList(CounterIntelligenceWork ciWork);
Integer selectCounterIntelligenceWorkCnt(CounterIntelligenceWork ciWork);
String selectHashTags(Integer ciwKey);
} }

View File

@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.persistence.*; import javax.persistence.*;
@ -30,12 +31,16 @@ public class CounterIntelligenceWork extends BaseModel {
@Column(name = "work_rating") @Column(name = "work_rating")
private String workRating; private String workRating;
@Column(name = "work_start_date") @Column(name = "work_start_date")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate workStartDate; private LocalDate workStartDate;
@Column(name = "work_end_date") @Column(name = "work_end_date")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate workEndDate; private LocalDate workEndDate;
@Column(name = "re_rating_date1") @Column(name = "re_rating_date1")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate reRatingDate1; private LocalDate reRatingDate1;
@Column(name = "re_rating_date2") @Column(name = "re_rating_date2")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate reRatingDate2; private LocalDate reRatingDate2;
@Column(name = "arrest_type1") @Column(name = "arrest_type1")
private String arrestType1; private String arrestType1;
@ -58,6 +63,7 @@ public class CounterIntelligenceWork extends BaseModel {
@Column(name = "wrt_user_nm") @Column(name = "wrt_user_nm")
private String wrtUserNm; private String wrtUserNm;
@Column(name = "wrt_dt") @Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt; private LocalDateTime wrtDt;
@Transient @Transient
@ -68,4 +74,6 @@ public class CounterIntelligenceWork extends BaseModel {
private List<CiwFile> fileList; private List<CiwFile> fileList;
@Transient @Transient
private List<MultipartFile> multipartFileList; private List<MultipartFile> multipartFileList;
@Transient
private List<HashTagLinkCiw> tagLinkList;
} }

View File

@ -9,6 +9,6 @@ import java.util.Optional;
public interface CiwFileRepository extends JpaRepository<CiwFile, CiwFile.CiwFileId> { public interface CiwFileRepository extends JpaRepository<CiwFile, CiwFile.CiwFileId> {
List<CiwFile> findByCiwKey(Integer ciwKey); List<CiwFile> findByCiwKey(Integer ciwKey);
Optional<CiwFile> findTopByCiwKeyOrderByFileSeq(Integer ciwKey); Optional<CiwFile> findTopByCiwKeyOrderByFileSeqDesc(Integer ciwKey);
} }

View File

@ -1,21 +1,38 @@
package com.dbnt.faisp.main.counterIntelligence.service; package com.dbnt.faisp.main.counterIntelligence.service;
import com.dbnt.faisp.config.BaseService;
import com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper; import com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper;
import com.dbnt.faisp.main.counterIntelligence.model.CiwFile;
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
import com.dbnt.faisp.main.counterIntelligence.model.HashTagLinkCiw;
import com.dbnt.faisp.main.counterIntelligence.repository.CiwFileRepository; import com.dbnt.faisp.main.counterIntelligence.repository.CiwFileRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.CounterIntelligenceWorkRepository; import com.dbnt.faisp.main.counterIntelligence.repository.CounterIntelligenceWorkRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository; import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository;
import com.dbnt.faisp.main.hashTag.service.HashTagService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; 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 @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class CounterIntelligenceService { public class CounterIntelligenceService extends BaseService {
private final CounterIntelligenceMapper ciMapper; private final HashTagService hashTagService;
private final CounterIntelligenceWorkRepository ciwRepository; private final CounterIntelligenceWorkRepository ciwRepository;
private final CiwFileRepository ciwFileRepository; private final CiwFileRepository ciwFileRepository;
private final HashTagLinkCiwRepository hashTagLinkCiwRepository; private final HashTagLinkCiwRepository hashTagLinkCiwRepository;
private final CounterIntelligenceMapper ciMapper;
public List<CounterIntelligenceWork> selectCounterIntelligenceWorkList(CounterIntelligenceWork ciWork){
return ciMapper.selectCounterIntelligenceWorkList(ciWork);
}
public Integer selectCounterIntelligenceWorkCnt(CounterIntelligenceWork ciWork){
return ciMapper.selectCounterIntelligenceWorkCnt(ciWork);
}
public CounterIntelligenceWork selectCounterIntelligenceWork(Integer ciwKey) { public CounterIntelligenceWork selectCounterIntelligenceWork(Integer ciwKey) {
CounterIntelligenceWork ciw = ciwRepository.findById(ciwKey).orElse(null); CounterIntelligenceWork ciw = ciwRepository.findById(ciwKey).orElse(null);
if(ciw!=null){ if(ciw!=null){
@ -24,4 +41,62 @@ public class CounterIntelligenceService {
} }
return ciw; return ciw;
} }
@Transactional
public Integer saveCiWork(CounterIntelligenceWork ciWork, List<Integer> deleteFileSeq) {
Integer ciwKey = ciwRepository.save(ciWork).getCiwKey();
if(!ciWork.getHashTags().isEmpty()){
saveHashTagLink(ciwKey, ciWork.getHashTags().split(" "));
}
if(deleteFileSeq != null && deleteFileSeq.size()>0){
deleteCiWorkFile(ciwKey, deleteFileSeq);
}
if(ciWork.getMultipartFileList()!=null){
saveUploadFiles(ciwKey, ciWork.getMultipartFileList());
}
return ciwKey;
}
private void saveHashTagLink(Integer ciwKey, String[] hashTagAry){
hashTagLinkCiwRepository.deleteByCiwKey(ciwKey);
for(String tagNm : hashTagAry){
HashTagLinkCiw hashTagLink = new HashTagLinkCiw();
hashTagLink.setCiwKey(ciwKey);
hashTagLink.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkCiwRepository.save(hashTagLink);
}
}
private void deleteCiWorkFile(Integer ciwKey, List<Integer> deleteFileSeq) {
List<CiwFile> ciwFileList = ciwFileRepository.findByCiwKey(ciwKey);
for(CiwFile file: ciwFileList){
if(deleteFileSeq.contains(file.getFileSeq())){
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
ciwFileRepository.delete(file);
}
}
}
private void saveUploadFiles(Integer ciwKey, List<MultipartFile> multipartFileList){
CiwFile lastFileInfo = ciwFileRepository.findTopByCiwKeyOrderByFileSeqDesc(ciwKey).orElse(null);
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+ciwPath;
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();
int extnIdx = originalFilename.lastIndexOf(".");
CiwFile fileInfo = new CiwFile();
fileInfo.setCiwKey(ciwKey);
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);
ciwFileRepository.save(fileInfo);
}
}
} }

View File

@ -1,6 +1,7 @@
package com.dbnt.faisp.main.equip.service; package com.dbnt.faisp.main.equip.service;
import com.dbnt.faisp.config.BaseService;
import com.dbnt.faisp.main.equip.mapper.EquipMapper; import com.dbnt.faisp.main.equip.mapper.EquipMapper;
import com.dbnt.faisp.main.equip.model.CellPhone; import com.dbnt.faisp.main.equip.model.CellPhone;
import com.dbnt.faisp.main.equip.model.Equip; import com.dbnt.faisp.main.equip.model.Equip;
@ -35,11 +36,7 @@ import java.util.*;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class EquipService { public class EquipService extends BaseService {
@Value("${file.dir}")
protected String fileDir;
@Value("${file.dir.equip}")
protected String equ;
private final EquipRepository equipRepository; private final EquipRepository equipRepository;
private final EquipFileRepository equipFileRepository; private final EquipFileRepository equipFileRepository;
@ -83,7 +80,7 @@ public class EquipService {
public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception { public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception {
try { try {
String path = fileDir+equ; String path = locationPath+equipPath;
String FileSize; String FileSize;
File dir = new File(path); File dir = new File(path);
if(!dir.exists()) dir.mkdir(); if(!dir.exists()) dir.mkdir();
@ -126,17 +123,6 @@ public class EquipService {
} }
} }
private String calculationSize(double fileSize){
String[] units = {"bytes", "KB", "MB", "GB", "TB", "PB"};
double unitSelector = Math.floor(Math.log(fileSize)/Math.log(1024));
if(fileSize>0){
return Math.round((fileSize/Math.pow(1024, unitSelector))*100)/100d+" "+units[(int)unitSelector];
}else{
return "";
}
}
public List<ParamMap> selectEquipStatus(Equip equip) { public List<ParamMap> selectEquipStatus(Equip equip) {
return equipMapper.selectEquipStatus(equip); return equipMapper.selectEquipStatus(equip);
} }
@ -192,7 +178,7 @@ public class EquipService {
public void updateFile(Equip equip, Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception { public void updateFile(Equip equip, Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception {
try { try {
String path = fileDir+equ; String path = locationPath+equipPath;
String FileSize; String FileSize;
File dir = new File(path); File dir = new File(path);
if(!dir.exists()) dir.mkdir(); if(!dir.exists()) dir.mkdir();

View File

@ -105,7 +105,7 @@ public class FaRptService extends BaseService {
int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1); int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1);
for(MultipartFile file: multipartFileList){ for(MultipartFile file: multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"faRpt"; String path = locationPath+faRptPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -211,9 +211,6 @@ public class FishingBoatService extends BaseService {
return crackdownStatus; return crackdownStatus;
} }
@Value("${file.dir.sailor}")
protected String sailorPath;
private void saveCaptainPhoto(Integer sailorKey, Integer versionNo, List<MultipartFile> fileList){ private void saveCaptainPhoto(Integer sailorKey, Integer versionNo, List<MultipartFile> fileList){
int fileSeq = 1; int fileSeq = 1;
for(MultipartFile file : fileList){ for(MultipartFile file : fileList){

View File

@ -41,12 +41,6 @@ import java.util.*;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class FipTargetService extends BaseService { public class FipTargetService extends BaseService {
@Value("${file.dir}")
protected String fileDir;
@Value("${file.dir.vulnerable}")
protected String vulnerable;
@Value("${file.dir.part}")
protected String part;
private final PartInfoRepository partInfoRepository; private final PartInfoRepository partInfoRepository;
private final PartInfoFileRepository partInfoFileRepository; private final PartInfoFileRepository partInfoFileRepository;
@ -72,7 +66,7 @@ public class FipTargetService extends BaseService {
saveUploadFiles(partInfo.getPiSeq(),partInfo.getVersionNo(), partInfo.getMultipartFileList()); saveUploadFiles(partInfo.getPiSeq(),partInfo.getVersionNo(), partInfo.getMultipartFileList());
} }
private void saveUploadFiles(Integer piSeq,Integer versionNo, List<MultipartFile> multipartFileList) { private void saveUploadFiles(Integer piSeq, Integer versionNo, List<MultipartFile> multipartFileList) {
PartInfoFile lastFileInfo = partInfoFileRepository.findTopByPiSeqAndVersionNoOrderByFileSeqDesc(piSeq,versionNo); PartInfoFile lastFileInfo = partInfoFileRepository.findTopByPiSeqAndVersionNoOrderByFileSeqDesc(piSeq,versionNo);
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
if(multipartFileList == null || multipartFileList.isEmpty()) { if(multipartFileList == null || multipartFileList.isEmpty()) {
@ -87,7 +81,7 @@ public class FipTargetService extends BaseService {
} else { } else {
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = fileDir+part; String path = locationPath+partPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();
@ -253,7 +247,7 @@ public class FipTargetService extends BaseService {
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = fileDir+part; String path = locationPath+partPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();
@ -353,7 +347,7 @@ public class FipTargetService extends BaseService {
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = fileDir+vulnerable; String path = locationPath+vulnerablePath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -22,6 +22,7 @@ import java.util.UUID;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class AffairService extends BaseService { // 견문보고 public class AffairService extends BaseService { // 견문보고
private final UserAlarmService userAlarmService; private final UserAlarmService userAlarmService;
private final HashTagService hashTagService; private final HashTagService hashTagService;
private final AffairBoardRepository affairBoardRepository; private final AffairBoardRepository affairBoardRepository;
@ -99,7 +100,7 @@ public class AffairService extends BaseService { // 견문보고
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"affair"; String path = locationPath+affairPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -121,7 +121,7 @@ public class PlanService extends BaseService { // 월간계획
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"monthPlan"; String path = locationPath+affairPlanPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -112,7 +112,7 @@ public class ResultService extends BaseService { // 월간계획
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"affairResult"; String path = locationPath+affairResultPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -35,11 +35,6 @@ public class SriService extends BaseService {
private final SriFileRepository sriFileRepository; private final SriFileRepository sriFileRepository;
private final SriMapper sriMapper; private final SriMapper sriMapper;
@Value("${file.dir}")
protected String fileDir;
@Value("${file.dir.sri}")
protected String sriDir;
public List<Sri> selectSriList(Sri sri) { public List<Sri> selectSriList(Sri sri) {
return sriMapper.selectSriList(sri); return sriMapper.selectSriList(sri);
@ -104,7 +99,7 @@ public class SriService extends BaseService {
int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1); int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1);
for(MultipartFile file: multipartFileList){ for(MultipartFile file: multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = fileDir+sriDir; String path = locationPath+sriPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -63,7 +63,7 @@ public class PublicBoardService extends BaseService {
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1); int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){ for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString(); String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"publicFile"; String path = locationPath+publicBoardPath;
saveFile(file, new File(path+File.separator+saveName)); saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();

View File

@ -9,14 +9,22 @@ spring.servlet.multipart.max-request-size=500MB
site.domain=http://localhost:8080 site.domain=http://localhost:8080
#file #file
file.dir=C:\\faispUploadFiles file.dir.publicBoard=/publicBoard
file.dir.faRpt=/faRpt
file.dir.vulnerable=/vulnerable file.dir.vulnerable=/vulnerable
file.dir.part=/part file.dir.part=/part
file.dir.equip=/equip file.dir.equip=/equip
file.dir.sailor=sailor file.dir.sailor=/sailor
file.dir.affair=affair file.dir.affair=/affair
file.dir.editor=editor file.dir.affair.plan=/affairPlan
file.dir.affair.result=/affairResult
file.dir.editor=/editor
file.dir.sri=/sri file.dir.sri=/sri
file.dir.ciw=/ciw
file.dir.cia.safty=/cia/safty
file.dir.cia.company=/cia/company
file.dir.cia.foreigner=/cia/foreigner
file.dir.cia.edu=/cia/edu
editor.img.view=/file/editorFileDisplay?fileNm= editor.img.view=/file/editorFileDisplay?fileNm=

View File

@ -6,17 +6,25 @@ spring.servlet.multipart.location=/backup/faisp/uploadFiles
spring.servlet.multipart.max-file-size=200MB spring.servlet.multipart.max-file-size=200MB
spring.servlet.multipart.max-request-size=500MB spring.servlet.multipart.max-request-size=500MB
site.domain=10.187.58.15 site.domain=10.187.58.12
#file #file
file.dir=/backup/faisp/uploadFiles file.dir.publicBoard=/publicBoard
file.dir.faRpt=/faRpt
file.dir.vulnerable=/vulnerable file.dir.vulnerable=/vulnerable
file.dir.part=/part file.dir.part=/part
file.dir.equip=/equip file.dir.equip=/equip
file.dir.sailor=sailor file.dir.sailor=/sailor
file.dir.affair=affair file.dir.affair=/affair
file.dir.editor=editor file.dir.affair.plan=/affairPlan
file.dir.affair.result=/affairResult
file.dir.editor=/editor
file.dir.sri=/sri file.dir.sri=/sri
file.dir.ciw=/ciw
file.dir.cia.safty=/cia/safty
file.dir.cia.company=/cia/company
file.dir.cia.foreigner=/cia/foreigner
file.dir.cia.edu=/cia/edu
editor.img.view=/file/editorFileDisplay?fileNm= editor.img.view=/file/editorFileDisplay?fileNm=

View File

@ -8,14 +8,22 @@ spring.servlet.multipart.max-request-size=500MB
site.domain=http://118.219.150.34:50580 site.domain=http://118.219.150.34:50580
#file #file
file.dir=/uploadFiles file.dir.publicBoard=/publicBoard
file.dir.faRpt=/faRpt
file.dir.vulnerable=/vulnerable file.dir.vulnerable=/vulnerable
file.dir.part=/part file.dir.part=/part
file.dir.equip=/equip file.dir.equip=/equip
file.dir.sailor=sailor file.dir.sailor=/sailor
file.dir.affair=affair file.dir.affair=/affair
file.dir.editor=editor file.dir.affair.plan=/affairPlan
file.dir.affair.result=/affairResult
file.dir.editor=/editor
file.dir.sri=/sri file.dir.sri=/sri
file.dir.ciw=/ciw
file.dir.cia.safty=/cia/safty
file.dir.cia.company=/cia/company
file.dir.cia.foreigner=/cia/foreigner
file.dir.cia.edu=/cia/edu
editor.img.view=/file/editorFileDisplay?fileNm= editor.img.view=/file/editorFileDisplay?fileNm=

View File

@ -4,7 +4,111 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper"> <mapper namespace="com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper">
<sql id="selectCounterIntelligenceWorkListWhere">
<where>
<if test='wrtUserSeq != null and wrtUserSeq != 0'>
and (a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST002') or a.status = 'DST007'
</if>
<if test='workRating != null and workRating != ""'>
and a.work_rating = #{workRating}
</if>
<if test='arrestType1 != null and arrestType1 != ""'>
and a.arrest_type1 = #{arrestType1}
</if>
<if test='arrestType2 != null and arrestType2 != ""'>
and a.arrest_type2 = #{arrestType2}
</if>
<if test='title != null and title != ""'>
and a.title like '%'||#{title}||'%'
</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='hashTags != null and hashTags != ""'>
and a.ciw_key in (
select aa.ciw_key
from hash_tag_link_ciw aa
inner join hash_tag ab on aa.tag_key = ab.tag_key
where ab.tag_nm like '%'||#{hashTags}||'%'
)
</if>
<if test='dateSelector == "workStartDate"'>
<if test='startDate != null and startDate != ""'>
and a.work_start_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and a.work_start_date &lt;= #{endDate}::date+1
</if>
</if>
<if test='dateSelector == "workEndDate"'>
<if test='startDate != null and startDate != ""'>
and a.work_end_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and a.work_end_date &lt;= #{endDate}::date+1
</if>
</if>
<if test='dateSelector == "reRatingDate1"'>
<if test='startDate != null and startDate != ""'>
and a.re_rating_date1 >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and a.re_rating_date1 &lt;= #{endDate}::date+1
</if>
</if>
<if test='dateSelector == "reRatingDate2"'>
<if test='startDate != null and startDate != ""'>
and a.re_rating_date2 >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and a.re_rating_date2 &lt;= #{endDate}::date+1
</if>
</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 &lt;= #{endDate}::date+1
</if>
</if>
</where>
</sql>
<select id="selectCounterIntelligenceWorkList" parameterType="CounterIntelligenceWork" resultType="CounterIntelligenceWork">
select a.ciw_key,
a.status,
a.work_rating,
a.work_start_date,
a.work_end_date,
a.re_rating_date1,
a.re_rating_date2,
a.arrest_type1,
a.arrest_type2,
a.title,
a.wrt_organ,
a.wrt_part,
a.wrt_user_seq,
a.wrt_user_grd,
a.wrt_user_nm,
a.wrt_dt,
b.fileCnt
from counter_intelligence_work a
inner join (select ciw_key, count(*) as fileCnt from ciw_file group by ciw_key) b
on a.ciw_key = b.ciw_key
<include refid="selectCounterIntelligenceWorkListWhere"></include>
ORDER BY a.ciw_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
<select id="selectCounterIntelligenceWorkCnt" parameterType="CounterIntelligenceWork" resultType="int">
select count(*)
from counter_intelligence_work a
inner join (select ciw_key, count(*) as fileCnt from ciw_file group by ciw_key) b
on a.ciw_key = b.ciw_key
<include refid="selectCounterIntelligenceWorkListWhere"></include>
</select>
<select id="selectHashTags" resultType="string" parameterType="int"> <select id="selectHashTags" resultType="string" parameterType="int">
select array_to_string(array_agg(b.tag_nm), ' ') as hashTags select array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link_ciw a from hash_tag_link_ciw a

View File

@ -121,3 +121,17 @@
max-height: 700px; max-height: 700px;
overflow-y: auto; overflow-y: auto;
} }
#loading-spinner{
--bs-spinner-width: 8rem;
--bs-spinner-height: 8rem;
--bs-spinner-border-width: 0.8em;
--bs-spinner-animation-speed: 1s;
--bs-text-opacity: 0.75;
}
#loading-spinner-text{
position: absolute;
top: 6rem;
left: 4.3rem;
}

View File

@ -6,6 +6,10 @@ $(document).on('click', '#arrestType1', function (){
getArrestType2Option(this.value); getArrestType2Option(this.value);
}) })
$(document).on('click', '#saveTempBtn,#saveCiWorkBtn', function(){
saveCiWork($(this).attr("data-status"));
})
function getCiWorkEditModal(ciwKey){ function getCiWorkEditModal(ciwKey){
$.ajax({ $.ajax({
url: '/counterIntelligence/ciWorkEditModal', url: '/counterIntelligence/ciWorkEditModal',
@ -29,6 +33,102 @@ function getCiWorkEditModal(ciwKey){
}); });
} }
function getCiwViewModal(ciwKey){
$.ajax({
url: '/counterIntelligence/ciWorkViewModal',
data: {ciwKey: ciwKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciWorkViewModalBody").empty().append(html)
$("#ciWorkViewModal").modal('show');
},
error:function(){
}
});
}
function saveCiWork(status){
if(confirm("저장하시겠습니까?")){
let flag = true;
if(status === "DST007"){
flag = contentCheck();
}
if(flag){
const ciWorkEditForm = $("#ciWorkEditForm");
ciWorkEditForm.find("#status").val(status);
const formData = new FormData(ciWorkEditForm[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"));
})
formData.append('content', CrossEditor.GetBodyValue());
$.ajax({
type : 'POST',
data : formData,
url : "/counterIntelligence/saveCiWork",
processData: false,
contentType: false,
success : function(result) {
alert("저장되었습니다.");
contentFade("out");
$("#affairEditModal").modal('hide');
getCiwViewModal(result);
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.")
contentFade("out");
}
})
}
}
}
function contentCheck(){
if(!$("#workStartDate").val()){
alert("착수일을 입력해주세요.")
return false;
}
if(!$("#workEndDate").val()){
alert("종결일을 입력해주세요.")
return false;
}
if(!$("#reRatingDate1").val()){
alert("1차재평가를 입력해주세요.")
return false;
}
if(!$("#reRatingDate2").val()){
alert("2차재평가를 입력해주세요.")
return false;
}
if(!$("#workRating").val()){
alert("등급을 선택해주세요.")
return false;
}
if(!$("#arrestType1").val()){
alert("검거유형1을 선택해주세요.")
return false;
}
if(!$("#arrestType2").val()){
alert("검거유형2를 선택해주세요.")
return false;
}
if(!$("#title").val()){
alert("공작명을 입력해주세요.")
return false;
}
if(!$("#summaryInfo").val()){
alert("사건개요를 입력해주세요.")
return false;
}
return true;
}
function getArrestType2Option(categoryCd){ function getArrestType2Option(categoryCd){
$.ajax({ $.ajax({
url: '/selectBoxOptions', url: '/selectBoxOptions',

View File

@ -20,6 +20,15 @@
<div class="row mx-0"> <div class="row mx-0">
<div class="col-12 card bg-light text-center"> <div class="col-12 card bg-light text-center">
<div class="card-body"> <div class="card-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="ciWorkTab" data-bs-toggle="tab" type="button" role="tab">공작 목록</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="performanceTab" data-bs-toggle="tab" type="button" role="tab">실적</button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0 p-2">
<form method="get" th:action="${searchUrl}"> <form method="get" th:action="${searchUrl}">
<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 py-1"> <div class="row justify-content-between py-1">
@ -30,9 +39,11 @@
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-8">
<div class="row justify-content-end"> <div class="row">
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}"> <div class="col-11">
<div class="row justify-content-end pb-1">
<div class="col-2" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="wrtOrgan"> <select class="form-select form-select-sm" name="wrtOrgan">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
@ -42,22 +53,57 @@
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-2">
<select class="form-select form-select-sm" name="workRating">
<option value="">등급</option>
<th:block th:each="code:${session.commonCode.get('CIWR')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType1">
<option value="">검거유형1</option>
<th:block th:each="code:${session.commonCode.get('AT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType2">
<option value="">검거유형2</option>
<th:block th:each="code:${session.commonCode.get('AT2')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end">
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}"> <input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
</div> </div>
<div class="col-auto"> <div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}"> <input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}">
</div> </div>
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}"> <div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}"> <input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
</div> </div>
<div class="col-auto"> <div class="col-4">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv"> <div class="input-group 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}"> <select class="form-select form-select-sm w-30" name="dateSelector">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}"> <option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
<option value="workStartDate" th:selected="${searchParams.dateSelector eq 'workStartDate'}">착수일</option>
<option value="workEndDate" th:selected="${searchParams.dateSelector eq 'workEndDate'}">종결일</option>
<option value="reRatingDate1" th:selected="${searchParams.dateSelector eq 'reRatingDate1'}">1차재평가</option>
<option value="reRatingDate2" th:selected="${searchParams.dateSelector eq 'reRatingDate2'}">2차재평가</option>
</select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div> </div>
</div> </div>
<div class=" col-auto"> </div>
</div>
<div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div> </div>
</div> </div>
@ -69,43 +115,63 @@
<table class="table table-sm table-bordered table-hover"> <table class="table table-sm table-bordered table-hover">
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th></th> <th>등급</th>
<th>분류</th> <th>검거유형1</th>
<th>제목</th> <th>검거유형2</th>
<th>공작명</th>
<th>착수일<br>/종결일</th>
<th>관서</th> <th>관서</th>
<th>부서</th> <th>부서</th>
<th>작성자</th> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th> <th>첨부파일</th>
<th>열람수</th> <th>재평가일</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<!--<tr class="faRptTr" th:each="faRpt:${faRptList}"> <tr class="faRptTr" th:each="ciWork:${ciWorkList}">
<input type="hidden" class="faRptKey" th:value="${faRpt.faRptKey}"> <input type="hidden" class="ciwKey" th:value="${ciWork.ciwKey}">
<td><input type="checkbox" class="trChkBox"></td> <td>
<td th:if="${faRpt.status ne 'receive'}"> <th:block th:each="code:${session.commonCode.get('CIWR')}">
<th:block th:each="commonCode:${session.commonCode.get('DST')}"> <th:block th:if="${code.itemCd eq ciWork.workRating}" th:text="${code.itemValue}"></th:block>
<th:text th:if="${commonCode.itemCd eq faRpt.status}" th:text="${commonCode.itemValue}"></th:text>
</th:block> </th:block>
</td> </td>
<td> <td>
<th:block th:each="commonCode:${session.commonCode.get('FRC')}"> <th:block th:each="code:${session.commonCode.get('AT')}">
<th:text th:if="${commonCode.itemCd eq faRpt.faRptType}" th:text="${commonCode.itemValue}"></th:text> <th:block th:if="${code.itemCd eq ciWork.arrestType1}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</td> </td>
<td th:text="${faRpt.title}"></td> <td>
<th:block th:each="code:${session.commonCode.get(ciWork.arrestType1)}">
<th:block th:if="${code.itemCd eq ciWork.arrestType2}" th:text="${code.itemValue}"></th:block>
</th:block>
</td>
<td>
<th:block th:if="${ciWork.status eq 'DST002'}">[임시]</th:block>
<th:block th:text="${ciWork.title}"></th:block>
</td>
<td>
<div th:text="${ciWork.workStartDate}"></div>
<div th:text="${#strings.concat('~ ', ciWork.workEndDate)}"></div>
</td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${faRpt.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${ciWork.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}"> <th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<td th:if="${faRpt.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${ciWork.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
<td th:text="${faRpt.wrtUserNm}"></td> <td>
<td th:text="${#temporals.format(faRpt.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <th:block th:each="code:${session.commonCode.get('JT')}">
<td th:text="${faRpt.fileCnt eq null?'파일 없음':#strings.concat(faRpt.fileCnt,' 건')}"></td> <th:block th:if="${code.itemCd eq ciWork.wrtUserGrd}" th:text="|${code.itemValue} ${ciWork.wrtUserNm}|"></th:block>
<td th:text="|${faRpt.readCnt}/${faRpt.userCnt}|"></td> </th:block>
</tr>--> </td>
<td th:text="${#temporals.format(ciWork.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${ciWork.fileCnt eq null?'파일 없음':#strings.concat(ciWork.fileCnt,' 건')}"></td>
<td>
<div th:text="|1차: ${ciWork.reRatingDate1}|"></div>
<div th:text="|2차: ${ciWork.reRatingDate2}|"></div>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@ -144,6 +210,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</main> </main>
<div class="modal fade" id="ciWorkEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ciWorkModalLabel" aria-hidden="true"> <div class="modal fade" id="ciWorkEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ciWorkModalLabel" aria-hidden="true">

View File

@ -90,7 +90,7 @@
<div class="row mb-1 justify-content-center"> <div class="row mb-1 justify-content-center">
<label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">사건개요</label> <label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">사건개요</label>
<div class="col-sm-11"> <div class="col-sm-11">
<textarea class="form-control form-control-sm" id="summaryInfo" th:utext="${ciWork.summaryInfo}"></textarea> <textarea class="form-control form-control-sm" id="summaryInfo" name="summaryInfo" th:utext="${ciWork.summaryInfo}"></textarea>
</div> </div>
</div> </div>
<div class="row mb-1 justify-content-center"> <div class="row mb-1 justify-content-center">
@ -128,6 +128,6 @@
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <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-warning" id="saveTempBtn" data-status="DST002">임시저장</button>
<button type="button" class="btn btn-primary" id="saveFaRptBtn">저장</button> <button type="button" class="btn btn-primary" id="saveCiWorkBtn" data-status="DST007">저장</button>
</div> </div>

View File

@ -83,8 +83,6 @@
</div> </div>
</div> </div>
</form> </form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
@ -214,8 +212,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</main> </main>

View File

@ -57,9 +57,20 @@
<div layout:fragment="content"></div> <div layout:fragment="content"></div>
</div> </div>
</div> </div>
<div id="fadeDiv" style="display: none;"> <div id="fadeDiv" style="display: none;">
<div class="p-5 rounded"><h1>저장중입니다.</h1></div> <div class="p-5 rounded text-center">
<div>
<div class="spinner-border text-info" id="loading-spinner" role="status">
<span class="visually-hidden">Loading...</span>
</div> </div>
</div>
<div id="loading-spinner-text">
<h3>Loading</h3>
</div>
</div>
</div>
<th:block layout:fragment="modal"></th:block> <th:block layout:fragment="modal"></th:block>
</body> </body>
</html> </html>