feat : 방첩활동 생성
parent
215c45ccdd
commit
f44d449886
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.counterIntelligence;
|
|||
|
||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
|
||||
import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceService;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
|
|
@ -80,4 +81,47 @@ public class CounterIntelligenceController {
|
|||
ciWork.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
return ciService.saveCiWork(ciWork, deleteFileSeq);
|
||||
}
|
||||
|
||||
@GetMapping("/ciaSaftyDemandList")
|
||||
public ModelAndView ciaSaftyDemandList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
|
||||
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandList");
|
||||
|
||||
cia.setQueryInfo();
|
||||
mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia));
|
||||
cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia));
|
||||
cia.setPaginationInfo();
|
||||
mav.addObject("searchParams", cia);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/ciaSaftyDemandEditModal")
|
||||
public ModelAndView ciaSaftyDemandEditModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
|
||||
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandEditModal");
|
||||
if(cia.getCiKey() != null) {
|
||||
cia = ciService.selectSaftyDemandInfo(cia);
|
||||
}
|
||||
|
||||
|
||||
|
||||
mav.addObject("cia", cia);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/saveCiActivity")
|
||||
public Integer saveCiActivity(CounterIntelligenceActivity cia,@AuthenticationPrincipal UserInfo loginUser,
|
||||
MultipartHttpServletRequest request,
|
||||
@RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){
|
||||
cia.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
if(cia.getCiKey()==null){
|
||||
cia.setWrtOrgan(loginUser.getOgCd());
|
||||
cia.setWrtPart(loginUser.getOfcCd());
|
||||
cia.setWrtUserSeq(loginUser.getUserSeq());
|
||||
cia.setWrtUserGrd(loginUser.getTitleCd());
|
||||
cia.setWrtUserNm(loginUser.getUserNm());
|
||||
cia.setWrtDt(LocalDateTime.now());
|
||||
}
|
||||
Integer ciKey = ciService.saveCiActivity(cia, deleteFileSeq);
|
||||
ciService.saveSaftyDemand(cia);
|
||||
return ciKey;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.mapper;
|
||||
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
|
||||
import com.dbnt.faisp.main.faRpt.model.FaRptBoard;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
@ -15,4 +16,8 @@ public interface CounterIntelligenceMapper {
|
|||
Integer selectCounterIntelligenceWorkCnt(CounterIntelligenceWork ciWork);
|
||||
|
||||
String selectHashTags(Integer ciwKey);
|
||||
|
||||
List<CounterIntelligenceActivity> selectCiaSaftyDemandList(CounterIntelligenceActivity cia);
|
||||
|
||||
Integer selectCiaSaftyDemandListCnt(CounterIntelligenceActivity cia);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.model;
|
||||
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "cia_file")
|
||||
@IdClass(CiaFile.CiaFileId.class)
|
||||
public class CiaFile extends FileInfo {
|
||||
@Id
|
||||
@Column(name = "ci_key")
|
||||
private Integer ciKey;
|
||||
@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 CiaFileId implements Serializable {
|
||||
private Integer ciKey;
|
||||
private Integer fileSeq;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.model;
|
||||
|
||||
import com.dbnt.faisp.config.BaseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "counter_intelligence_activity")
|
||||
public class CounterIntelligenceActivity extends BaseModel {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ci_key")
|
||||
private Integer ciKey;
|
||||
@Column(name = "ci_type")
|
||||
private String ciType;
|
||||
@Column(name = "content_status")
|
||||
private String contentStatus;
|
||||
@Column(name = "wrt_organ")
|
||||
private String wrtOrgan;
|
||||
@Column(name = "wrt_part")
|
||||
private String wrtPart;
|
||||
@Column(name = "wrt_user_seq")
|
||||
private Integer wrtUserSeq;
|
||||
@Column(name = "wrt_user_grd")
|
||||
private String wrtUserGrd;
|
||||
@Column(name = "wrt_user_nm")
|
||||
private String wrtUserNm;
|
||||
@Column(name = "wrt_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Transient
|
||||
private String localInfo;
|
||||
@Transient
|
||||
private String outlookProblem;
|
||||
@Transient
|
||||
private Integer fileCnt;
|
||||
@Transient
|
||||
private SaftyDemandInfo saftyDemandInfo;
|
||||
@Transient
|
||||
private List<CiaFile> fileList;
|
||||
@Transient
|
||||
private List<MultipartFile> multipartFileList;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.model;
|
||||
|
||||
import com.dbnt.faisp.config.BaseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "safty_demand_info")
|
||||
public class SaftyDemandInfo extends BaseModel {
|
||||
@Id
|
||||
@Column(name = "ci_key")
|
||||
private Integer ciKey;
|
||||
@Column(name = "local_info")
|
||||
private String localInfo;
|
||||
@Column(name = "outlook_problem")
|
||||
private String outlookProblem;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.repository;
|
||||
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CiaFile;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public interface CiaFileRepository extends JpaRepository<CiaFile, CiaFile.CiaFileId> {
|
||||
|
||||
List<CiaFile> findByCiKey(Integer ciKey);
|
||||
|
||||
Optional<CiaFile> findTopByCiKeyOrderByFileSeqDesc(Integer ciKey);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.repository;
|
||||
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
|
||||
public interface CounterIntelligenceActivityRepository extends JpaRepository<CounterIntelligenceActivity, Integer> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.repository;
|
||||
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.SaftyDemandInfo;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public interface SaftyDemandInfoRepository extends JpaRepository<SaftyDemandInfo, Integer> {
|
||||
|
||||
}
|
||||
|
|
@ -3,12 +3,18 @@ package com.dbnt.faisp.main.counterIntelligence.service;
|
|||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CiaFile;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CiwFile;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.HashTagLinkCiw;
|
||||
import com.dbnt.faisp.main.counterIntelligence.model.SaftyDemandInfo;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.CiaFileRepository;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.CiwFileRepository;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.CounterIntelligenceActivityRepository;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.CounterIntelligenceWorkRepository;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository;
|
||||
import com.dbnt.faisp.main.counterIntelligence.repository.SaftyDemandInfoRepository;
|
||||
import com.dbnt.faisp.main.hashTag.service.HashTagService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -26,6 +32,9 @@ public class CounterIntelligenceService extends BaseService {
|
|||
private final CounterIntelligenceWorkRepository ciwRepository;
|
||||
private final CiwFileRepository ciwFileRepository;
|
||||
private final HashTagLinkCiwRepository hashTagLinkCiwRepository;
|
||||
private final CounterIntelligenceActivityRepository counterIntelligenceActivityRepository;
|
||||
private final CiaFileRepository ciaFileRepository;
|
||||
private final SaftyDemandInfoRepository saftyDemandInfoRepository;
|
||||
private final CounterIntelligenceMapper ciMapper;
|
||||
|
||||
public List<CounterIntelligenceWork> selectCounterIntelligenceWorkList(CounterIntelligenceWork ciWork){
|
||||
|
|
@ -104,4 +113,72 @@ public class CounterIntelligenceService extends BaseService {
|
|||
public FileInfo selectCiWorkFile(Integer ciwKey, Integer fileSeq) {
|
||||
return ciwFileRepository.findById(new CiwFile.CiwFileId(ciwKey, fileSeq)).orElse(null);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Integer saveCiActivity(CounterIntelligenceActivity cia, List<Integer> deleteFileSeq) {
|
||||
Integer ciKey = counterIntelligenceActivityRepository.save(cia).getCiKey();
|
||||
if(deleteFileSeq != null && deleteFileSeq.size()>0){
|
||||
deleteCiaFile(ciKey, deleteFileSeq);
|
||||
}
|
||||
if(cia.getMultipartFileList()!=null){
|
||||
saveCiaUploadFiles(ciKey, cia.getMultipartFileList());
|
||||
}
|
||||
return ciKey;
|
||||
}
|
||||
|
||||
private void deleteCiaFile(Integer ciKey, List<Integer> deleteFileSeq) {
|
||||
List<CiaFile> ciaFileList = ciaFileRepository.findByCiKey(ciKey);
|
||||
for(CiaFile file: ciaFileList){
|
||||
if(deleteFileSeq.contains(file.getFileSeq())){
|
||||
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
|
||||
ciaFileRepository.delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveCiaUploadFiles(Integer ciKey, List<MultipartFile> multipartFileList){
|
||||
CiaFile lastFileInfo = ciaFileRepository.findTopByCiKeyOrderByFileSeqDesc(ciKey).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(".");
|
||||
CiaFile fileInfo = new CiaFile();
|
||||
fileInfo.setCiKey(ciKey);
|
||||
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);
|
||||
ciaFileRepository.save(fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void saveSaftyDemand(CounterIntelligenceActivity cia) {
|
||||
SaftyDemandInfo sdi = new SaftyDemandInfo();
|
||||
sdi.setCiKey(cia.getCiKey());
|
||||
sdi.setLocalInfo(cia.getLocalInfo());
|
||||
sdi.setOutlookProblem(cia.getOutlookProblem());
|
||||
saftyDemandInfoRepository.save(sdi);
|
||||
}
|
||||
public List<CounterIntelligenceActivity> selectCiaSaftyDemandList(CounterIntelligenceActivity cia) {
|
||||
return ciMapper.selectCiaSaftyDemandList(cia);
|
||||
}
|
||||
public Integer selectCiaSaftyDemandListCnt(CounterIntelligenceActivity cia) {
|
||||
return ciMapper.selectCiaSaftyDemandListCnt(cia);
|
||||
}
|
||||
public CounterIntelligenceActivity selectSaftyDemandInfo(CounterIntelligenceActivity cia) {
|
||||
CounterIntelligenceActivity dbCia = counterIntelligenceActivityRepository.findById(cia.getCiKey()).orElse(null);
|
||||
if(dbCia!=null){
|
||||
dbCia.setFileList(ciaFileRepository.findByCiKey(cia.getCiKey()));
|
||||
dbCia.setSaftyDemandInfo(saftyDemandInfoRepository.findById(cia.getCiKey()).orElse(null));
|
||||
}
|
||||
return dbCia;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,4 +115,39 @@
|
|||
inner join hash_tag b on a.tag_key = b.tag_key
|
||||
where a.ciw_key = #{ciwKey}
|
||||
</select>
|
||||
|
||||
<select id="selectCiaSaftyDemandList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
|
||||
select cia.ci_key,
|
||||
cia.ci_type,
|
||||
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
|
||||
sdi.local_info,
|
||||
sdi.outlook_problem,
|
||||
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
|
||||
cia.wrt_user_nm,
|
||||
cia.wrt_dt
|
||||
from counter_intelligence_activity cia,
|
||||
safty_demand_info sdi
|
||||
where cia.ci_key = sdi.ci_key
|
||||
ORDER BY cia.ci_key DESC
|
||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="selectCiaSaftyDemandListCnt" parameterType="CounterIntelligenceActivity" resultType="Integer">
|
||||
select count(*)
|
||||
from(
|
||||
select cia.ci_key,
|
||||
cia.ci_type,
|
||||
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
|
||||
sdi.local_info,
|
||||
sdi.outlook_problem,
|
||||
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
|
||||
cia.wrt_user_nm,
|
||||
cia.wrt_dt
|
||||
from counter_intelligence_activity cia,
|
||||
safty_demand_info sdi
|
||||
where cia.ci_key = sdi.ci_key
|
||||
ORDER BY cia.ci_key DESC
|
||||
)a
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
$(document).on('click', '#addBtn', function (){
|
||||
getCiaSaftyDemandEditModal(null);
|
||||
})
|
||||
|
||||
function getCiaSaftyDemandEditModal(ciKey){
|
||||
$.ajax({
|
||||
url: '/counterIntelligence/ciaSaftyDemandEditModal',
|
||||
data: {ciKey: ciKey},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#ciaSaftyDemandEditModalContent").empty().append(html)
|
||||
setUploadDiv();
|
||||
$("#ciaSaftyDemandEditModal").modal('show');
|
||||
},
|
||||
error:function(){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
const formData = new FormData($("#ciaSaftyDemandEditForm")[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 : "/counterIntelligence/saveCiActivity",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success : function(result) {
|
||||
alert("저장되었습니다.");
|
||||
contentFade("out");
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("저장에 실패하였습니다.")
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '.sdiTr', function (){
|
||||
getCiaSaftyDemandEditModal($(this).find(".ciKey").val());
|
||||
})
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title text-white">치안수요 등록</h5>
|
||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="ivsgtEditBody">
|
||||
<form action="#" method="post" id="ciaSaftyDemandEditForm">
|
||||
<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="ciType" value="SDI">
|
||||
<div class="row mb-1">
|
||||
<label for="wrtNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="작성자자동입력" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}" placeholder="작성일자동입력" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentInfoDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">지역특성</label>
|
||||
<div class="col-sm-11" id="contentInfoDiv">
|
||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="localInfo" th:utext="${cia.saftyDemandInfo.localInfo}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentInfoDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">예상문제점</label>
|
||||
<div class="col-sm-11" id="contentInfoDiv">
|
||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="outlookProblem" th:utext="${cia.saftyDemandInfo.outlookProblem}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="fileInputer" class="col-sm-1 col-form-label col-form-label-sm text-center">첨부파일</label>
|
||||
<div class="col-sm-11" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(cia.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(cia.fileList)}">
|
||||
<div class='row-col-6' th:each="file:${cia.fileList}">
|
||||
<span th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn} ${file.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between bg-light">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
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/counterIntelligence/ciaSaftyDemand.js}"></script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<h4>방첩공작</h4>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="mb-0 mt-2">외사방첩관리 > 방첩공작</p>
|
||||
</div>
|
||||
</div>
|
||||
<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 bg-light text-center">
|
||||
<div class="card-body">
|
||||
<div class="tab-content bg-white border border-top-0 p-2">
|
||||
<form method="get" th:action="${searchUrl}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<div class="row justify-content-between py-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" 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-8">
|
||||
<!-- <div class="row">
|
||||
<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">
|
||||
<option value="">관서 선택</option>
|
||||
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(downOrganCdList, code.itemCd)}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<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.arrestType1}"></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(arrestType1)}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType2}"></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}">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group input-daterange" id="dateSelectorDiv">
|
||||
<select class="form-select form-select-sm w-30" name="dateSelector">
|
||||
<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-1 d-grid gap-2">
|
||||
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="table-secondary">
|
||||
<th>문서번호</th>
|
||||
<th>관서</th>
|
||||
<th>지역특성</th>
|
||||
<th>예상문제점</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr class="sdiTr" th:each="list:${sdiList}">
|
||||
<th:block>
|
||||
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
|
||||
</th:block>
|
||||
<td th:text="${list.ciKey}"></td>
|
||||
<td th:text="${list.wrtOrgan}"></td>
|
||||
<td>
|
||||
<th:block th:if="${#strings.length(list.localInfo)>35}" th:utext="|${#strings.substring(list.localInfo, 0, 35)}...|"></th:block>
|
||||
<th:block th:unless="${#strings.length(list.localInfo)>35}" th:utext="${list.localInfo}"></th:block>
|
||||
</td>
|
||||
<td>
|
||||
<th:block th:if="${#strings.length(list.outlookProblem)>35}" th:utext="|${#strings.substring(list.outlookProblem, 0, 35)}...|"></th:block>
|
||||
<th:block th:unless="${#strings.length(list.outlookProblem)>35}" th:utext="${list.outlookProblem}"></th:block>
|
||||
</td>
|
||||
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
|
||||
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination mb-0">
|
||||
<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 class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="modal fade" id="ciaSaftyDemandEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ciWorkModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content" id="ciaSaftyDemandEditModalContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="ciWorkViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ciWorkModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="ciWorkViewModalBody">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title text-white">치안수요 등록</h5>
|
||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="ivsgtEditBody">
|
||||
<form action="#" method="post" id="ciaSaftyDemandEditForm">
|
||||
<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="ciType" value="SDI">
|
||||
<div class="row mb-1">
|
||||
<label for="wrtNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="작성자자동입력" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control form-control-sm" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}" placeholder="작성일자동입력" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentInfoDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">지역특성</label>
|
||||
<div class="col-sm-11" id="contentInfoDiv">
|
||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="localInfo" th:utext="${cia.saftyDemandInfo.localInfo}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="contentInfoDiv" class="col-sm-1 col-form-label col-form-label-sm text-center">예상문제점</label>
|
||||
<div class="col-sm-11" id="contentInfoDiv">
|
||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="outlookProblem" th:utext="${cia.saftyDemandInfo.outlookProblem}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label for="fileInputer" class="col-sm-1 col-form-label col-form-label-sm text-center">첨부파일</label>
|
||||
<div class="col-sm-11" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(cia.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(cia.fileList)}">
|
||||
<div class='row-col-6' th:each="file:${cia.fileList}">
|
||||
<span th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn} ${file.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between bg-light">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
Loading…
Reference in New Issue