fix : 방첩활동완료

master
TaehunPark 2023-01-06 17:58:15 +09:00
parent 5ed8983fa1
commit 511f28c397
13 changed files with 121 additions and 39 deletions

View File

@ -120,8 +120,12 @@ public class CounterIntelligenceController {
@GetMapping("/ciaSaftyDemandList")
public ModelAndView ciaSaftyDemandList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandList");
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/ciaSaftyDemandList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setWrtUserSeq(loginUser.getUserSeq());
cia.setQueryInfo();
mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia));
cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia));
@ -187,7 +191,11 @@ public class CounterIntelligenceController {
@GetMapping("/ciaManageCompanyList")
public ModelAndView ciaManageCompanyList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaManageCompanyList");
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/ciaManageCompanyList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
cia.setWrtUserSeq(loginUser.getUserSeq());
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setQueryInfo();
mav.addObject("mciList", ciService.selectCiaManageCompanyList(cia));
@ -223,7 +231,11 @@ public class CounterIntelligenceController {
@GetMapping("/ciaForeignerList")
public ModelAndView ciaForeignerList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaForeignerList");
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/ciaForeignerList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
cia.setWrtUserSeq(loginUser.getUserSeq());
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setQueryInfo();
mav.addObject("fiList", ciService.selectCiaForeignerList(cia));
@ -259,7 +271,11 @@ public class CounterIntelligenceController {
@GetMapping("/ciaEduList")
public ModelAndView ciaEduList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
ModelAndView mav = new ModelAndView("counterIntelligence/ciaEduList");
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/ciaEduList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
cia.setWrtUserSeq(loginUser.getUserSeq());
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
cia.setQueryInfo();
mav.addObject("eiList", ciService.selectCiaEduList(cia));
@ -294,6 +310,7 @@ public class CounterIntelligenceController {
@PostMapping("/deleteCounterIntelligenceActivity")
public void deleteCounterIntelligenceActivity(@AuthenticationPrincipal UserInfo loginUser,@RequestBody CounterIntelligenceActivity cia){
cia.setContentStatus("DST008");
ciService.deleteCounterIntelligenceActivity(cia);
}

View File

@ -135,7 +135,7 @@
<select id="selectCiaSaftyDemandList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info,
@ -148,6 +148,7 @@
safty_demand_info sdi
where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
@ -172,7 +173,7 @@
select count(*)
from(
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info,
@ -185,6 +186,7 @@
safty_demand_info sdi
where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
@ -207,7 +209,7 @@
<select id="selectCiaManageCompanyList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
@ -225,6 +227,7 @@
manage_company_info mci
where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
@ -252,7 +255,7 @@
select count(*)
from(
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
@ -270,6 +273,7 @@
manage_company_info mci
where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
@ -295,7 +299,7 @@
<select id="selectCiaForeignerList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager,
fi.commu_location,
@ -312,6 +316,7 @@
foreigner_info fi
where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='manager != null and manager != ""'>
and fi.manager like '%'||#{manager}||'%'
</if>
@ -349,7 +354,7 @@
select count(*)
from(
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager,
fi.commu_location,
@ -366,6 +371,7 @@
foreigner_info fi
where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='manager != null and manager != ""'>
and fi.manager like '%'||#{manager}||'%'
</if>
@ -401,7 +407,7 @@
<select id="selectCiaEduList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date,
ei.edu_type,
@ -415,6 +421,7 @@
edu_info ei
where cia.ci_key = ei.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='mgtOrgan != null and mgtOrgan != ""'>
and ei.mgt_organ = #{mgtOrgan}
</if>
@ -449,7 +456,7 @@
select count(*)
from(
select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date,
ei.edu_type,
@ -462,6 +469,8 @@
from counter_intelligence_activity cia,
edu_info ei
where cia.ci_key = ei.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test='mgtOrgan != null and mgtOrgan != ""'>
and ei.mgt_organ = #{mgtOrgan}
</if>

View File

@ -101,3 +101,25 @@ $(document).on('click', '#excelDown', function (){
exportExcel("방첩교육 실시 현황","ciaEduTb");
})
$(document).on('click', '#deleteBtn', function (){
const ciKey = $(this).attr("data-cikey");
if(confirm("삭제 하시겠습니까?")){
$.ajax({
type : 'POST',
url : "/counterIntelligence/deleteCounterIntelligenceActivity",
data : JSON.stringify({ciKey:ciKey}),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("삭제처리 되었습니다.");
location.reload();
},
error : function(xhr, status) {
alert("삭제처리에 실패하였습니다");
}
})
}
})

View File

@ -106,3 +106,25 @@ $(document).on('click', '#excelDown', function (){
exportExcel("외국인 커뮤니티 모니터링 현황","ciaForeignerTb");
})
$(document).on('click', '#deleteBtn', function (){
const ciKey = $(this).attr("data-cikey");
if(confirm("삭제 하시겠습니까?")){
$.ajax({
type : 'POST',
url : "/counterIntelligence/deleteCounterIntelligenceActivity",
data : JSON.stringify({ciKey:ciKey}),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("삭제처리 되었습니다.");
location.reload();
},
error : function(xhr, status) {
alert("삭제처리에 실패하였습니다");
}
})
}
})

View File

@ -95,3 +95,25 @@ $(document).on('click', '#editBtn', function (){
$(document).on('click', '#excelDown', function (){
exportExcel("해양산업보호 관리업체 현황","mciTb");
})
$(document).on('click', '#deleteBtn', function (){
const ciKey = $(this).attr("data-cikey");
if(confirm("삭제 하시겠습니까?")){
$.ajax({
type : 'POST',
url : "/counterIntelligence/deleteCounterIntelligenceActivity",
data : JSON.stringify({ciKey:ciKey}),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("삭제처리 되었습니다.");
location.reload();
},
error : function(xhr, status) {
alert("삭제처리에 실패하였습니다");
}
})
}
})

View File

@ -73,7 +73,7 @@ $(document).on('click', '#deleteBtn', function (){
$.ajax({
type : 'POST',
url : "/counterIntelligence/deleteCounterIntelligenceActivity",
data : {ciKey:ciKey,contentStatus:'DST008'},
data : JSON.stringify({ciKey:ciKey}),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());

View File

@ -72,6 +72,7 @@
<table class="table table-sm table-bordered table-hover" id="ciaEduTb">
<thead>
<tr class="table-secondary">
<th>상태</th>
<th>시행일자</th>
<th>시행관서</th>
<th>교육방식</th>
@ -83,6 +84,7 @@
</thead>
<tbody class="table-group-divider">
<tr class="eiTr" th:each="list:${eiList}">
<td th:text="${list.contentStatus}"></td>
<td th:text="${list.eduDate}"></td>
<td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.eduType}"></td>

View File

@ -75,6 +75,7 @@
<table class="table table-sm table-bordered table-hover" id="ciaForeignerTb">
<thead>
<tr class="table-secondary">
<th rowspan="2">상태</th>
<th rowspan="2">관리관서</th>
<th rowspan="2">담당관</th>
<th colspan="3">대상커뮤니티</th>
@ -92,6 +93,7 @@
</thead>
<tbody class="table-group-divider">
<tr class="fiTr" th:each="list:${fiList}">
<td th:text="${list.contentStatus}"></td>
<td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.manager}"></td>
<td th:text="${list.commuLocation}"></td>

View File

@ -104,7 +104,7 @@
<div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button>
<button type="button" class="btn btn-danger" id="deleteBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block>
</div>
<div class="col-auto">

View File

@ -72,7 +72,7 @@
<table class="table table-sm table-bordered table-hover" id="mciTb">
<thead>
<tr class="table-secondary">
<th>문서번호</th>
<th>상태</th>
<th>관리관서</th>
<th>업체명</th>
<th>소재지</th>
@ -85,7 +85,7 @@
</thead>
<tbody class="table-group-divider">
<tr class="mciTr" th:each="list:${mciList}">
<td th:text="${list.ciKey}"></td>
<td th:text="${list.contentStatus}"></td>
<td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.companyNm}"></td>
<td th:text="${list.companyLocation}"></td>

View File

@ -96,7 +96,7 @@
<div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button>
<button type="button" class="btn btn-danger" id="deleteBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block>
</div>
<div class="col-auto">

View File

@ -69,7 +69,7 @@
<table class="table table-sm table-bordered table-hover" id="sdiTb">
<thead>
<tr class="table-secondary">
<th>문서번호</th>
<th>상태</th>
<th>관서</th>
<th>지역특성</th>
<th>예상문제점</th>
@ -79,8 +79,7 @@
</thead>
<tbody class="table-group-divider">
<tr class="sdiTr" th:each="list:${sdiList}">
<th:block th:if="${list.contentStatus eq 'DST001'} and ${list.wrtUserSeq eq loginUserSeq}">
<td th:text="|[임시저장]${list.ciKey}|"></td>
<td th:text="${list.contentStatus}"></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>
@ -92,21 +91,6 @@
</td>
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</th:block>
<th:block th:unless="${list.contentStatus eq 'DST001'} and ${list.wrtUserSeq eq loginUserSeq}">
<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>
</th:block>
<th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block>

View File

@ -4,6 +4,8 @@
<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>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="modal-body" id="ciaSaftyDemandViewBody">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">