fix : 방첩활동 중간저장

master
TaehunPark 2023-01-04 17:54:59 +09:00
parent cb12ee46d0
commit 1a0fe54630
21 changed files with 1212 additions and 35 deletions

View File

@ -130,8 +130,6 @@ public class CounterIntelligenceController {
cia = ciService.selectSaftyDemandInfo(cia);
}
mav.addObject("cia", cia);
return mav;
}
@ -150,7 +148,15 @@ public class CounterIntelligenceController {
cia.setWrtDt(LocalDateTime.now());
}
Integer ciKey = ciService.saveCiActivity(cia, deleteFileSeq);
switch (cia.getCiType()) {
case "SDI": // 공지사항
ciService.saveSaftyDemand(cia);
break;
case "MCI": // 공용게시판
ciService.saveManageCompany(cia);
break;
}
return ciKey;
}
@ -162,4 +168,64 @@ public class CounterIntelligenceController {
mav.addObject("cia", ciService.selectSaftyDemandInfo(cia));
return mav;
}
@GetMapping("/ciaManageCompanyList")
public ModelAndView ciaManageCompanyList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaManageCompanyList");
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setQueryInfo();
mav.addObject("mciList", ciService.selectCiaManageCompanyList(cia));
cia.setContentCnt(ciService.selectCiaManageCompanyListCnt(cia));
cia.setPaginationInfo();
mav.addObject("searchParams", cia);
return mav;
}
@GetMapping("/ciaManageCompanyEditModal")
public ModelAndView ciaManageCompanyEditModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaManageCompanyEditModal");
if(cia.getCiKey() != null) {
cia = ciService.selectManageCompanyInfo(cia);
}
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("cia", cia);
return mav;
}
@GetMapping("/ciaManageCompanyViewModal")
public ModelAndView ciaManageCompanyViewModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaManageCompanyViewModal");
mav.addObject("lineSeparator", '\n');
mav.addObject("viewUserSeq", loginUser.getUserSeq());
mav.addObject("cia", ciService.selectManageCompanyInfo(cia));
return mav;
}
@GetMapping("/ciaForeignerList")
public ModelAndView ciaForeignerList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaForeignerList");
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setQueryInfo();
mav.addObject("mciList", ciService.selectCiaManageCompanyList(cia));
cia.setContentCnt(ciService.selectCiaManageCompanyListCnt(cia));
cia.setPaginationInfo();
mav.addObject("searchParams", cia);
return mav;
}
@GetMapping("/ciaForeignerEditModal")
public ModelAndView ciaForeignerEditModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaForeignerEditModal");
if(cia.getCiKey() != null) {
cia = ciService.selectManageCompanyInfo(cia);
}
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("cia", cia);
return mav;
}
}

View File

@ -24,4 +24,8 @@ public interface CounterIntelligenceMapper {
List<CounterIntelligenceActivity> selectCiaSaftyDemandList(CounterIntelligenceActivity cia);
Integer selectCiaSaftyDemandListCnt(CounterIntelligenceActivity cia);
List<CounterIntelligenceActivity> selectCiaManageCompanyList(CounterIntelligenceActivity cia);
Integer selectCiaManageCompanyListCnt(CounterIntelligenceActivity cia);
}

View File

@ -53,6 +53,24 @@ public class CounterIntelligenceActivity extends BaseModel {
@Transient
private SaftyDemandInfo saftyDemandInfo;
@Transient
private ManageCompanyInfo manageCompanyInfo;
@Transient
private String mgtOrgan;
@Transient
private String companyNm;
@Transient
private String companyLocation;
@Transient
private String relatedField;
@Transient
private String description;
@Transient
private String cellPhone;
@Transient
private String department;
@Transient
private String name;
@Transient
private List<CiaFile> fileList;
@Transient
private List<MultipartFile> multipartFileList;

View File

@ -0,0 +1,42 @@
package com.dbnt.faisp.main.counterIntelligence.model;
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 java.time.LocalDate;
import javax.persistence.*;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "foreigner_info")
public class ForeignerInfo {
@Id
@Column(name = "ci_key")
private Integer ciKey;
@Column(name = "manager")
private String manager;
@Column(name = "commu_location")
private String commuLocation;
@Column(name = "commu_national")
private String commuNational;
@Column(name = "commu_address")
private String commuAddress;
@Column(name = "select_reason")
private String selectReason;
@Column(name = "monitoring_info")
private String monitoringInfo;
@Column(name = "fix_date")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate fixDate;
}

View File

@ -0,0 +1,41 @@
package com.dbnt.faisp.main.counterIntelligence.model;
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 = "manage_company_info")
public class ManageCompanyInfo {
@Id
@Column(name = "ci_key")
private Integer ciKey;
@Column(name = "mgt_organ")
private String mgtOrgan;
@Column(name = "company_nm")
private String companyNm;
@Column(name = "company_location")
private String companyLocation;
@Column(name = "related_field")
private String relatedField;
@Column(name = "description")
private String description;
@Column(name = "cell_phone")
private String cellPhone;
@Column(name = "department")
private String department;
@Column(name = "name")
private String name;
}

View File

@ -1,18 +1,14 @@
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
@ -21,7 +17,7 @@ import java.util.List;
@DynamicInsert
@DynamicUpdate
@Table(name = "safty_demand_info")
public class SaftyDemandInfo extends BaseModel {
public class SaftyDemandInfo {
@Id
@Column(name = "ci_key")
private Integer ciKey;

View File

@ -0,0 +1,13 @@
package com.dbnt.faisp.main.counterIntelligence.repository;
import com.dbnt.faisp.main.counterIntelligence.model.ForeignerInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
public interface ForeignerInfoRepository extends JpaRepository<ForeignerInfo, Integer> {
}

View File

@ -0,0 +1,13 @@
package com.dbnt.faisp.main.counterIntelligence.repository;
import com.dbnt.faisp.main.counterIntelligence.model.ManageCompanyInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
public interface ManageCompanyInfoRepository extends JpaRepository<ManageCompanyInfo, Integer> {
}

View File

@ -9,12 +9,15 @@ 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.ManageCompanyInfo;
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.ForeignerInfoRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.ManageCompanyInfoRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.SaftyDemandInfoRepository;
import com.dbnt.faisp.main.hashTag.service.HashTagService;
import lombok.RequiredArgsConstructor;
@ -36,6 +39,8 @@ public class CounterIntelligenceService extends BaseService {
private final CounterIntelligenceActivityRepository counterIntelligenceActivityRepository;
private final CiaFileRepository ciaFileRepository;
private final SaftyDemandInfoRepository saftyDemandInfoRepository;
private final ManageCompanyInfoRepository manageCompanyInfoRepository;
private final ForeignerInfoRepository foreignerInfoRepository;
private final CounterIntelligenceMapper ciMapper;
public List<CounterIntelligenceWork> selectCounterIntelligenceWorkList(CounterIntelligenceWork ciWork){
@ -191,12 +196,15 @@ public class CounterIntelligenceService extends BaseService {
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){
@ -206,4 +214,36 @@ public class CounterIntelligenceService extends BaseService {
return dbCia;
}
@Transactional
public void saveManageCompany(CounterIntelligenceActivity cia) {
ManageCompanyInfo mci = new ManageCompanyInfo();
mci.setCiKey(cia.getCiKey());
mci.setMgtOrgan(cia.getMgtOrgan());
mci.setCompanyNm(cia.getCompanyNm());
mci.setCompanyLocation(cia.getCompanyLocation());
mci.setRelatedField(cia.getRelatedField());
mci.setDescription(cia.getDescription());
mci.setCellPhone(cia.getCellPhone());
mci.setDepartment(cia.getDepartment());
mci.setName(cia.getName());
manageCompanyInfoRepository.save(mci);
}
public List<CounterIntelligenceActivity> selectCiaManageCompanyList(CounterIntelligenceActivity cia) {
return ciMapper.selectCiaManageCompanyList(cia);
}
public Integer selectCiaManageCompanyListCnt(CounterIntelligenceActivity cia) {
return ciMapper.selectCiaManageCompanyListCnt(cia);
}
public CounterIntelligenceActivity selectManageCompanyInfo(CounterIntelligenceActivity cia) {
CounterIntelligenceActivity dbCia = counterIntelligenceActivityRepository.findById(cia.getCiKey()).orElse(null);
if(dbCia!=null){
dbCia.setFileList(ciaFileRepository.findByCiKey(cia.getCiKey()));
dbCia.setManageCompanyInfo(manageCompanyInfoRepository.findById(cia.getCiKey()).orElse(null));
}
return dbCia;
}
}

View File

@ -183,4 +183,56 @@
)a
</select>
<select id="selectCiaManageCompanyList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
mci.company_location,
mci.related_field,
mci.description,
mci.cell_phone,
mci.department,
mci."name",
(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,
manage_company_info mci
where cia.ci_key = mci.ci_key
and mci.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
ORDER BY cia.ci_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
<select id="selectCiaManageCompanyListCnt" parameterType="CounterIntelligenceActivity" resultType="Integer">
select count(*)
from(
select cia.ci_key,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
mci.company_location,
mci.related_field,
mci.description,
mci.cell_phone,
mci.department,
mci."name",
(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,
manage_company_info mci
where cia.ci_key = mci.ci_key
and mci.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
ORDER BY cia.ci_key DESC
)a
</select>
</mapper>

View File

@ -0,0 +1,81 @@
$(document).on('click', '#addBtn', function (){
getCiaForeignerEditModal(null);
})
function getCiaForeignerEditModal(ciKey){
$.ajax({
url: '/counterIntelligence/ciaForeignerEditModal',
data: {ciKey: ciKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciaForeignerEditModalContent").empty().append(html);
$("#fixDate").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
setUploadDiv();
setEditor('editor', '400');
$("#ciaForeignerEditModal").modal('show');
},
error:function(){
}
});
}
$(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){
const formData = new FormData($("#ciaManageCompanyEditForm")[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', '.mciTr', function (){
getCiaManageCompanyViewModal($(this).find(".ciKey").val());
})
function getCiaManageCompanyViewModal(ciKey){
$.ajax({
url: '/counterIntelligence/ciaManageCompanyViewModal',
data: {ciKey: ciKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciaManageCompanyViewModalBody").empty().append(html)
$("#ciaManageCompanyViewModal").modal('show');
},
error:function(){
}
});
}
$(document).on('click', '#editBtn', function (){
$("#ciaManageCompanyViewModal").modal('hide');
getCiaManageCompanyEditModal($(this).attr("data-cikey"));
})

View File

@ -0,0 +1,75 @@
$(document).on('click', '#addBtn', function (){
getCiaManageCompanyEditModal(null);
})
function getCiaManageCompanyEditModal(ciKey){
$.ajax({
url: '/counterIntelligence/ciaManageCompanyEditModal',
data: {ciKey: ciKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciaManageCompanyEditModalContent").empty().append(html)
setUploadDiv();
$("#ciaManageCompanyEditModal").modal('show');
},
error:function(){
}
});
}
$(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){
const formData = new FormData($("#ciaManageCompanyEditForm")[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', '.mciTr', function (){
getCiaManageCompanyViewModal($(this).find(".ciKey").val());
})
function getCiaManageCompanyViewModal(ciKey){
$.ajax({
url: '/counterIntelligence/ciaManageCompanyViewModal',
data: {ciKey: ciKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciaManageCompanyViewModalBody").empty().append(html)
$("#ciaManageCompanyViewModal").modal('show');
},
error:function(){
}
});
}
$(document).on('click', '#editBtn', function (){
$("#ciaManageCompanyViewModal").modal('hide');
getCiaManageCompanyEditModal($(this).attr("data-cikey"));
})

View File

@ -60,11 +60,16 @@ function getCiaSaftyDemandViewModal(ciKey){
type: 'GET',
dataType:"html",
success: function(html){
$("#ciWorkViewModalBody").empty().append(html)
$("#ciWorkViewModal").modal('show');
$("#ciaSaftyDemandViewModalBody").empty().append(html)
$("#ciaSaftyDemandViewModal").modal('show');
},
error:function(){
}
});
}
$(document).on('click', '#editBtn', function (){
$("#ciaSaftyDemandViewModal").modal('hide');
getCiaSaftyDemandEditModal($(this).attr("data-cikey"));
})

View File

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" th:text="${cia.ciKey eq null?'외국인 커뮤니티 모니터링 등록':'외국인 커뮤니티 모니터링 수정'}"></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="ciaManageCompanyEditForm">
<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="MCI">
<!-- <input type="hidden" name="ciKey" th:value="${cia.ciKey}">
<input type="hidden" name="wrtOrgan" th:value="${cia.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${cia.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${cia.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${cia.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${cia.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}"> -->
<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">
<select class="form-select" id="mgtOrgan" name="mgtOrgan">
<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:if="${cia.ciKey eq null}"></option>
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:unless="${cia.ciKey eq null}" th:selected="${commonCode.itemCd eq cia.manageCompanyInfo.mgtOrgan}"></option>
</th:block>
</th:block>
</select>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">선정일</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="fixDate" name="fixDate" 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" placeholder="작성일자동입력" readonly>
</div>
</div>
<th:block th:if="${cia.ciKey eq null}">
<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" id="cellPhone" name="cellPhone">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">국적</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="department" name="department">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">주소지</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="name" name="name">
</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="relatedField"></textarea>
</div>
</div>
<div class="row mb-1">
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center">모니터링 사항</label>
<div class="col-sm-11">
<div id="editor"></div>
<textarea class="d-none" id="content"></textarea>
</div>
</div>
</th:block>
<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>

View File

@ -0,0 +1,188 @@
<!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/ciaForeigner.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="@{/counterIntelligence/ciaForeignerList}">
<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 rowspan="2">관리관서</th>
<th colspan="3">대상커뮤니티</th>
<th rowspan="2">선정사유</th>
<th rowspan="2">모니터링 사항</th>
<th rowspan="2">선정일</th>
<th rowspan="2">담당자</th>
<th rowspan="2">작성자</th>
<th rowspan="2">작성일</th>
</tr>
<tr class="table-secondary">
<th>소재지</th>
<th>국적</th>
<th>주소지</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="mciTr">
<th:block>
<input type="hidden" class="ciKey" >
</th:block>
</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">&laquo;</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">&raquo;</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="ciaForeignerEditModal" 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="ciaForeignerEditModalContent">
</div>
</div>
</div>
<div class="modal fade" id="ciaManageCompanyViewModal" 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="ciaManageCompanyViewModalBody">
</div>
</div>
</div>
</div>
</html>

View File

@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" th:text="${cia.ciKey eq null?'해양산업보호 관리업체 등록':'해양산업보호 관리업체 수정'}"></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="ciaManageCompanyEditForm">
<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="MCI">
<input type="hidden" name="ciKey" th:value="${cia.ciKey}">
<input type="hidden" name="wrtOrgan" th:value="${cia.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${cia.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${cia.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${cia.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${cia.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}">
<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">
<select class="form-select" id="mgtOrgan" name="mgtOrgan">
<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:if="${cia.ciKey eq null}"></option>
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:unless="${cia.ciKey eq null}" th:selected="${commonCode.itemCd eq cia.manageCompanyInfo.mgtOrgan}"></option>
</th:block>
</th:block>
</select>
</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" placeholder="작성일자동입력" readonly>
</div>
</div>
<th:block th:if="${cia.ciKey eq null}">
<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" id="companyNm" name="companyNm">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">소재지</label>
<div class="col-sm-5">
<input type="text" class="form-control form-control-sm" id="companyLocation" name="companyLocation">
</div>
</div>
<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" id="cellPhone" name="cellPhone">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">부서</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="department" name="department">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">이름</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="name" name="name">
</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="relatedField"></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="description"></textarea>
</div>
</div>
</th:block>
<th:block th:unless="${cia.ciKey eq null}">
<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" id="companyNm" name="companyNm" th:value="${cia.manageCompanyInfo.companyNm}">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">소재지</label>
<div class="col-sm-5">
<input type="text" class="form-control form-control-sm" id="companyLocation" name="companyLocation" th:value="${cia.manageCompanyInfo.companyLocation}">
</div>
</div>
<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" id="cellPhone" name="cellPhone" th:value="${cia.manageCompanyInfo.cellPhone}">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">부서</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="department" name="department" th:value="${cia.manageCompanyInfo.department}">
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">이름</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="name" name="name" th:value="${cia.manageCompanyInfo.name}">
</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="relatedField" th:utext="${cia.manageCompanyInfo.relatedField}"></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="description" th:utext="${cia.manageCompanyInfo.description}"></textarea>
</div>
</div>
</th:block>
<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>

View File

@ -0,0 +1,190 @@
<!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/ciaManageCompany.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="@{/counterIntelligence/ciaManageCompanyList}">
<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>
<th>작성자</th>
<th>작성일</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="mciTr" th:each="list:${mciList}">
<th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block>
<td th:text="${list.ciKey}"></td>
<td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.companyNm}"></td>
<td th:text="${list.department}"></td>
<td th:text="${list.cellPhone}"></td>
<td th:text="${list.name}"></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">&laquo;</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">&raquo;</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="ciaManageCompanyEditModal" 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="ciaManageCompanyEditModalContent">
</div>
</div>
</div>
<div class="modal fade" id="ciaManageCompanyViewModal" 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="ciaManageCompanyViewModalBody">
</div>
</div>
</div>
</div>
</html>

View File

@ -0,0 +1,107 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="ciWorkViewModalLabel">해양산업보호 관리업체 열람</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="ciWorkViewBody">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
</li>
<li class="nav-item" role="presentation" th:if="${#lists.size(cia.fileList)>0}">
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(cia.fileList), ')')}"></button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">관리관서</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<option th:value="${commonCode.itemCd}" th:if="${commonCode.itemCd eq cia.manageCompanyInfo.mgtOrgan}" th:text="${commonCode.itemValue}"></option>
</th:block>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성자</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<option th:value="${commonCode.itemCd}" th:if="${commonCode.itemCd eq cia.wrtUserGrd}" th:text="|${commonCode.itemValue} ${cia.wrtUserNm}|"></option>
</th:block>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성일시</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">업체명</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${cia.manageCompanyInfo.companyNm}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">소재지</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${cia.manageCompanyInfo.companyLocation}"></label>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">담당자<br>번호</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${cia.manageCompanyInfo.cellPhone}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">담당자<br>부서</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${cia.manageCompanyInfo.department}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">담당자<br>이름</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${cia.manageCompanyInfo.name}"></label>
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">관련분야</label>
<div class="col-sm-11 form-control-sm" th:utext="${#strings.replace(cia.manageCompanyInfo.relatedField, lineSeparator, '<br>')}"></div>
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">특이사항</label>
<div class="col-sm-11 form-control-sm" th:utext="${#strings.replace(cia.manageCompanyInfo.description, lineSeparator, '<br>')}"></div>
</div>
</div>
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
<div class="row mb-3">
<div class="col-sm-12">
<table class="table table-sm" id="fileTable">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(cia.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(cia.fileList)}">
<th:block th:each="file:${cia.fileList}">
<tr class="fileInfoTr">
<td>
<a href="#" class="fileDownLink" data-board="ciWork"
th:data-parentkey="${file.ciKey}" 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>
</div>
</div>
</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>
<th:block th:if="${accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block>
</div>
<div class="col-auto">
<th:block th:if="${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editBtn" th:data-cikey="${cia.ciKey}">수정</button>
</th:block>
</div>
</div>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white">치안수요 등록</h5>
<h5 class="modal-title text-white" th:text="${cia.ciKey eq null?'치안수요 등록':'치안수요 수정'}"></h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="ivsgtEditBody">
@ -9,6 +9,13 @@
<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">
<input type="hidden" name="ciKey" th:value="${cia.ciKey}">
<input type="hidden" name="wrtOrgan" th:value="${cia.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${cia.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${cia.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${cia.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${cia.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}">
<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">
@ -16,19 +23,21 @@
</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>
<input type="text" class="form-control form-control-sm" 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>
<textarea class="form-control form-control-sm" rows="5" cols="30" name="localInfo" th:if="${cia.ciKey eq null}"></textarea>
<textarea class="form-control form-control-sm" rows="5" cols="30" name="localInfo" th:unless="${cia.ciKey eq null}" 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>
<textarea class="form-control form-control-sm" rows="5" cols="30" name="outlookProblem" th:if="${cia.ciKey eq null}"></textarea>
<textarea class="form-control form-control-sm" rows="5" cols="30" name="outlookProblem" th:unless="${cia.ciKey eq null}" th:utext="${cia.saftyDemandInfo.outlookProblem}"></textarea>
</div>
</div>
<div class="row mb-1">

View File

@ -181,9 +181,9 @@
</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 class="modal fade" id="ciaSaftyDemandViewModal" 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="ciaSaftyDemandViewModalBody">
</div>
</div>

View File

@ -1,11 +1,10 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="ciWorkViewModalLabel">방첩공작 열람</h5>
<h5 class="modal-title text-white" id="ciaSaftyDemandViewModalLabel">치안수요 열람</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="ciWorkViewBody">
<input type="hidden" id="ciKey" th:value="${cia.ciKey}">
<div class="modal-body" id="ciaSaftyDemandViewBody">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
@ -25,18 +24,13 @@
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">사건개요</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">지역특성</label>
<div class="col-sm-11 form-control-sm" th:utext="${#strings.replace(cia.saftyDemandInfo.localInfo, lineSeparator, '<br>')}"></div>
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">내용</label>
<div class="col-sm-11 form-control-sm" th:utext="${ciWork.content}"></div>
</div>
<hr class="my-1">
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">해시태그</label>
<label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${ciWork.hashTags}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">예상문제점</label>
<div class="col-sm-11 form-control-sm" th:utext="${#strings.replace(cia.saftyDemandInfo.outlookProblem, lineSeparator, '<br>')}"></div>
</div>
</div>
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
@ -74,9 +68,13 @@
</div>
</div>
</div>
<div class="modal-footer bg-light">
<th:block th:if="${viewUserSeq eq ciWork.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editCiWorkBtn" th:data-ciwkey="${cia.ciKey}">수정</button>
</th:block>
<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">
</div>
<th:block th:if="${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editBtn" th:data-cikey="${cia.ciKey}">수정</button>
</th:block>
</div>