외사활동 > 사건목록 작업중.

master
강석 최 2023-01-06 18:22:18 +09:00
parent 5ed8983fa1
commit 60fee7b55d
13 changed files with 111 additions and 83 deletions

View File

@ -48,12 +48,13 @@ public class ModalController {
}
@GetMapping("/userModal")
public ModelAndView userMoadlPage(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo){
public ModelAndView userMoadlPage(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, String pageName){
ModelAndView mav = new ModelAndView("common/modal/userModal");
userInfo.setQueryInfo();
if(userInfo.getUserStatus() == null || userInfo.getUserStatus().equals("")) {
userInfo.setUserStatus("USC003");
}
mav.addObject("pageName", pageName);
mav.addObject("OgList", codeMgtService.selectCodeMgtList("OG"));
mav.addObject("OfcList", codeMgtService.selectCodeMgtList("OFC"));
mav.addObject("userInfoList", userInfoService.selectUserInfoList(userInfo));

View File

@ -24,7 +24,6 @@ public class ActivityCaseController {
private final ActivityCaseService activityCaseService;
private final AuthMgtService authMgtService;
private final CodeMgtService codeMgtService;
private final UserInfoService userInfoService;
@GetMapping("/activityCaseList")
public ModelAndView activityCaseListPage(@AuthenticationPrincipal UserInfo loginUser, ActivityCase activityCase){
@ -33,12 +32,9 @@ public class ActivityCaseController {
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/activityCaseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
if(accessAuth.equals("ACC003")){
mav.addObject("downOrganCdList", loginUser.getDownOrganCdList());
}else{
activityCase.setWrtUserSeq(loginUser.getUserSeq());
}
mav.addObject("ogCd", loginUser.getOgCd());
activityCase.setWrtOrgan(loginUser.getOgCd());
activityCase.setQueryInfo();
mav.addObject("activityCaseList", activityCaseService.selectActivityCaseList(activityCase));
activityCase.setContentCnt(activityCaseService.selectActivityCaseCnt(activityCase));
@ -71,13 +67,15 @@ public class ActivityCaseController {
@GetMapping("/getSuspectDiv")
public ModelAndView suspectDiv(){
ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/suspectDiv");
mav.addObject("acsList", codeMgtService.selectCodeMgtList("ACS"));
return mav;
}
@GetMapping("/getOfficerDiv")
public ModelAndView officerDiv(Integer userSeq){
@ResponseBody
@PostMapping("/getOfficerDiv")
public ModelAndView officerDiv(@RequestBody List<UserInfo> userList){
ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/officerDiv");
mav.addObject("officer", userInfoService.selectUserInfo(userSeq));
mav.addObject("officerList", userList);
mav.addObject("acoList", codeMgtService.selectCodeMgtList("ACO"));
return mav;
}

View File

@ -8,7 +8,7 @@
<where>
a.status &lt;> 'DST008'
<if test='wrtUserSeq != null and wrtUserSeq != 0'>
and ((a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST002') or a.status = 'DST007')
and ((a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST001') or a.status = 'DST007')
</if>
<if test='workRating != null and workRating != ""'>
and a.work_rating = #{workRating}

View File

@ -1,4 +1,4 @@
let selectedList= [];
$(document).on('click', '#addActivityCaseBtn', function (){
getActivityCaseEditModal(null);
})
@ -7,8 +7,15 @@ $(document).on('click', '#suspectAddBtn', function (){
getSuspectDiv()
})
$(document).on('click', '#officerAddBtn', function (){
getUserModal
getOfficerDiv()
searchModalSubmit(1);
$("#userModal").modal('show');
})
$(document).on('click', '#getUserBtn', function (){
getOfficerDiv();
})
$(document).on('click', '.rowDeleteBtn', function (){
$(this).parents(".suspectDiv").remove();
$(this).parents(".officerRow").remove();
})
$(document).on('click', '#saveTempBtn,#saveActivityCaseBtn', function(){
@ -65,11 +72,17 @@ function getSuspectDiv(){
}
function getOfficerDiv(){
$.ajax({
type: 'POST',
url: '/counterIntelligence/getOfficerDiv',
type: 'GET',
data: JSON.stringify(selectedList),
contentType: 'application/json',
dataType:"html",
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success: function(html){
$("#officerHome").append(html)
$("#userModal").modal("hide");
},
error:function(){
@ -111,7 +124,25 @@ function saveActivityCase(status){
$(".text-decoration-line-through").each(function (idx, el){
formData.append('fileSeq', $(el).attr("data-fileseq"));
})
formData.append('content', CrossEditor.GetBodyValue());
$(".suspectDiv").each(function (idx, el){
formData.append('suspectList['+idx+'].type', $(el).find(".suspectType").val());
formData.append('suspectList['+idx+'].name', $(el).find(".suspectName").val());
formData.append('suspectList['+idx+'].sex', $(el).find(".suspectSex").val());
formData.append('suspectList['+idx+'].birthDate', $(el).find(".suspectBirthDate").val());
formData.append('suspectList['+idx+'].phone', $(el).find(".suspectPhone").val());
formData.append('suspectList['+idx+'].addr', $(el).find(".suspectAddr").val());
formData.append('suspectList['+idx+'].job', $(el).find(".suspectJob").val());
formData.append('suspectList['+idx+'].area', $(el).find(".suspectArea").val());
formData.append('suspectList['+idx+'].etc', $(el).find(".suspectEtc").val());
})
$(".officerRow").each(function (idx, el){
formData.append('officerList['+idx+'].type', $(el).find(".officerType").val());
formData.append('officerList['+idx+'].userSeq', $(el).find(".userSeq").val());
formData.append('officerList['+idx+'].ogCd', $(el).find(".ogCd").val());
formData.append('officerList['+idx+'].ofcCd', $(el).find(".ofcCd").val());
formData.append('officerList['+idx+'].titleCd', $(el).find(".titleCd").val());
formData.append('officerList['+idx+'].userNm', $(el).find(".userNm").val());
})
$.ajax({
type : 'POST',
data : formData,
@ -161,32 +192,20 @@ function deleteActivityCase(caseKey){
}
function contentCheck(){
if(!$("#workStartDate").val()){
alert("착수일을 입력해주세요.")
if(!$("#receiptNum").val()){
alert("접수번호을 입력해주세요.")
return false;
}
if(!$("#workEndDate").val()){
alert("종결일을 입력해주세요.")
if(!$("#receiptDt").val()){
alert("접수일을 입력해주세요.")
return false;
}
if(!$("#reRatingDate1").val()){
alert("1차재평가를 입력해주세요.")
if(!$("#receiptClue").val()){
alert("접수단서를 입력해주세요.")
return false;
}
if(!$("#reRatingDate2").val()){
alert("2차재평가를 입력해주세요.")
return false;
}
if(!$("#workRating").val()){
alert("등급을 선택해주세요.")
return false;
}
if(!$("#title").val()){
alert("공작명을 입력해주세요.")
return false;
}
if(!$("#summaryInfo").val()){
alert("사건개요를 입력해주세요.")
if(!$("#caseInfo").val()){
alert("첩보개요를 입력해주세요.")
return false;
}
return true;

View File

@ -5,11 +5,12 @@
<form method="get" action="#" id="modalSearchForm">
<input type="hidden" name="userStatus" id="userStatus" th:value="${searchParams.userStatus}">
<input type="hidden" name="pageIndex" id="modalPageIndex" th:value="${searchParams.pageIndex}">
<input type="hidden" name="pageName" th:value="${pageName}">
<input type="hidden" name="rowCnt" value="10">
<div class="row justify-content-end pe-3 py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<div class="col-auto" th:classappend="${pageName eq 'activityCase'?'d-none':''}">
<select class="form-select form-select-sm" name="ogCd">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${OgList}">

View File

@ -4,6 +4,7 @@
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/counterIntelligence/activityCase.js}"></script>
<script type="text/javascript" th:src="@{/js/modal/userModal.js}"></script>
</th:block>
<div layout:fragment="content">
<main>
@ -228,12 +229,14 @@
<form method="get" action="#" id="modalSearchForm">
<input type="hidden" name="pageIndex" id="modalPageIndex" value="1">
<input type="hidden" name="rowCnt" value="10">
<input type="hidden" name="pageName" value="activityCase">
<input type="hidden" name="ogCd" th:value="${ogCd}">
</form>
</div>
</div>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-primary" id="getMenuBtn">추가</button>
<button type="button" class="btn btn-primary" id="getUserBtn">추가</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</div>

View File

@ -43,23 +43,26 @@
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="receiptDt" name="receiptDt" th:value="${#temporals.format(activityCase.receiptDt, 'yyyy-MM-dd')}" readonly>
</div>
<label for="receiptNum" 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="receiptNum" name="receiptNum" th:value="${activityCase.receiptNum}">
</div>
<div class="col-sm-3"></div>
<label for="resultDt" 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 dateSelector" id="resultDt" name="resultDt" th:value="${#temporals.format(activityCase.resultDt, 'yyyy-MM-dd')}" readonly>
</div>
</div>
<div class="row mb-1 justify-content-center">
<label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">첩보개요</label>
<div class="row mb-1">
<label for="receiptClue" class="col-sm-1 col-form-label col-form-label-sm text-center">접수단서</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" id="summaryInfo" name="summaryInfo"></textarea>
<input type="text" class="form-control form-control-sm" id="receiptClue" name="receiptClue" th:value="${activityCase.receiptClue}">
</div>
</div>
<div class="row mb-1 justify-content-center">
<label for="caseInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">첩보개요</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" id="caseInfo" name="caseInfo"></textarea>
</div>
</div>
<div class="row mb-1">
<label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">
<label for="suspectAddBtn" class="col-sm-1 col-form-label col-form-label-sm text-center">
혐의자
<button type="button" class="border-0 bg-white" id="suspectAddBtn">
<i class="bi bi-plus-square text-primary"></i>
@ -74,24 +77,22 @@
</div>
</div>
<div class="row mb-1">
<label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">
<label for="officerAddBtn" class="col-sm-1 col-form-label col-form-label-sm text-center">
담당관
<button type="button" class="border-0 bg-white" id="officerAddBtn">
<i class="bi bi-plus-square text-primary"></i>
</button>
</label>
<div class="col-sm-11">
<div class="border h-100">
<div class="row" id="officerHome">
</div>
<div class="border h-100" id="officerHome">
</div>
</div>
</div>
<div class="row mb-1">
<label for="summaryInfo" class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<label for="etc" class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-11">
<input type="text" class="form-control form-control-sm" id="receiptNum" name="receiptNum" th:value="${activityCase.receiptNum}">
<input type="text" class="form-control form-control-sm" id="etc" name="etc" th:value="${activityCase.etc}">
</div>
</div>
<div class="row mb-3">
@ -117,7 +118,7 @@
<th:block th:if="${activityCase.caseKey ne null and accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-danger" id="deleteActivityCaseBtn" th:data-casekey="${activityCase.caseKey}">삭제</button>
</th:block>
<button type="button" class="btn btn-warning" id="saveTempBtn" data-status="DST002">임시저장</button>
<button type="button" class="btn btn-warning" id="saveTempBtn" data-status="DST001">임시저장</button>
<button type="button" class="btn btn-primary" id="saveActivityCaseBtn" data-status="DST007">저장</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>

View File

@ -21,7 +21,7 @@
<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(ciWork.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">공작명</label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="|${ciWork.status eq 'DST002'?'[임시] ':''}${ciWork.title}|"></label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="|${ciWork.status eq 'DST001'?'[임시] ':''}${ciWork.title}|"></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="${ciWork.wrtUserNm}"></label>
</div>

View File

@ -1,20 +1,20 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="row my-1 officerRow">
<div class="row my-1 mx-3 officerRow" th:each="officer:${officerList}">
<input type="hidden" class="userSeq" th:value="${officer.userSeq}">
<input type="hidden" class="ogCd" th:value="${officer.ogCd}">
<input type="hidden" class="ofcCd" th:value="${officer.ofcCd}">
<input type="hidden" class="titleCd" th:value="${officer.titleCd}">
<input type="hidden" class="userNm" th:value="${officer.userNm}">
<div class="col-2">
<select class="form-select form-select-sm">
<div class="col-auto">
<select class="form-select form-select-sm officerType">
<option value="">선택</option>
<th:block th:each="code:${acoList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<div class="col-9">
<div class="col-auto">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq officer.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
@ -22,11 +22,11 @@
<th:block th:if="${commonCode.itemCd eq officer.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq officer.titleCd}" th:text="|${commonCode.itemValue} ${officer.userNm}|"></th:block>
<th:block th:if="${commonCode.itemCd eq officer.titleCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:text="${officer.userNm}"></th:block>
</div>
<div class="col-1">
<div class="col-auto">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>

View File

@ -4,49 +4,54 @@
<div class="row mx-2 my-1">
<div class="col-12 mb-1">
<div class="row">
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">분류</label>
<label 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="asdf">
<select class="form-select form-select-sm suspectType">
<option value="">선택</option>
<th:block th:each="code:${acsList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">성명</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectName">
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">성별</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectSex">
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">생년월일</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectBirthDate">
</div>
</div>
</div>
<div class="col-12 mb-1">
<div class="row">
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">핸드폰</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectPhone">
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">주소</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectAddr">
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">직업</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectJob">
</div>
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">등록기준지</label>
<label 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="asdf">
<input type="text" class="form-control form-control-sm suspectArea">
</div>
</div>
</div>
<div class="col-12 mb-1">
<div class="row">
<label for="asdf" class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" id="asdf">
<input type="text" class="form-control form-control-sm suspectEtc">
</div>
<div class="col-1">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>

View File

@ -119,7 +119,7 @@
</th:block>
</td>
<td>
<th:block th:if="${ciWork.status eq 'DST002'}">[임시]</th:block>
<th:block th:if="${ciWork.status eq 'DST001'}">[임시]</th:block>
<th:block th:text="${ciWork.title}"></th:block>
</td>
<td>

View File

@ -116,7 +116,7 @@
<th:block th:if="${ciWork.ciwKey ne null and accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-ciwkey="${ciWork.ciwKey}">삭제</button>
</th:block>
<button type="button" class="btn btn-warning" id="saveTempBtn" data-status="DST002">임시저장</button>
<button type="button" class="btn btn-warning" id="saveTempBtn" data-status="DST001">임시저장</button>
<button type="button" class="btn btn-primary" id="saveCiWorkBtn" data-status="DST007">저장</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>

View File

@ -21,7 +21,7 @@
<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(ciWork.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">공작명</label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="|${ciWork.status eq 'DST002'?'[임시] ':''}${ciWork.title}|"></label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="|${ciWork.status eq 'DST001'?'[임시] ':''}${ciWork.title}|"></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="${ciWork.wrtUserNm}"></label>
</div>