외사활동 관리대장 검색기능 추가, 열람모달 추가.
parent
46785fc5f6
commit
c4d14c5cd4
|
|
@ -84,6 +84,7 @@ public class ActivityCaseController {
|
|||
@GetMapping("/activityCaseSummaryModal")
|
||||
public ModelAndView activityCaseSummaryModal(@AuthenticationPrincipal UserInfo loginUser, ActivityCaseSummary activityCase){
|
||||
ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/activityCaseSummaryModal");
|
||||
mav.addObject("modalType", activityCase.getModalType());
|
||||
List<ActivityCaseSummary> activityCaseList = activityCaseService.selectActivityCaseInfoList(activityCase.getReceiptKey());
|
||||
mav.addObject("viewUserSeq", loginUser.getUserSeq());
|
||||
mav.addObject("wrtUserSeq", activityCaseList.get(activityCaseList.size()-1).getWrtUserSeq());
|
||||
|
|
@ -97,6 +98,7 @@ public class ActivityCaseController {
|
|||
@GetMapping("/activityCaseViewModal")
|
||||
public ModelAndView activityCaseViewModal(@AuthenticationPrincipal UserInfo loginUser, ActivityCase activityCase, ActivityCaseInfo activityCaseInfo){
|
||||
ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/activityCaseViewModal");
|
||||
mav.addObject("modalType", activityCase.getModalType());
|
||||
activityCase = activityCaseService.selectActivityCase(activityCase.getReceiptKey());
|
||||
activityCaseInfo = activityCaseService.selectActivityCaseInfo(activityCaseInfo.getCaseKey());
|
||||
mav.addObject("viewUserSeq", loginUser.getUserSeq());
|
||||
|
|
|
|||
|
|
@ -191,11 +191,77 @@
|
|||
|
||||
<sql id="selectActivityCaseMgtWhere">
|
||||
<where>
|
||||
<if test='caseType != null and caseType != ""'>
|
||||
and c.case_type = #{caseType}
|
||||
</if>
|
||||
<if test='receiptNum != null and receiptNum != ""'>
|
||||
and a.receipt_num like '%'||#{receiptNum}||'%'
|
||||
</if>
|
||||
<if test='suspectNm != null and suspectNm != ""'>
|
||||
and e.name like '%'||#{suspectNm}||'%'
|
||||
</if>
|
||||
<if test='suspectAddress != null and suspectAddress != ""'>
|
||||
and e.address like '%'||#{suspectAddress}||'%'
|
||||
</if>
|
||||
<if test='activityResult != null and activityResult != ""'>
|
||||
and c.activity_result = #{activityResult}
|
||||
</if>
|
||||
<if test='wrtUserNm != null and wrtUserNm != ""'>
|
||||
and a.wrt_user_nm like '%'||#{wrtUserNm}||'%'
|
||||
</if>
|
||||
<if test='apprvUserNm != null and apprvUserNm != ""'>
|
||||
and f.user_nm like '%'||#{apprvUserNm}||'%'
|
||||
</if>
|
||||
<if test='dateSelector == "reportDate"'>
|
||||
<if test='startDate != null and startDate != ""'>
|
||||
and c.report_date >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null and endDate != ""'>
|
||||
and c.report_date <= #{endDate}::date+1
|
||||
</if>
|
||||
</if>
|
||||
<if test='dateSelector == "activityStartDate"'>
|
||||
<if test='startDate != null and startDate != ""'>
|
||||
and d.report_date >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null and endDate != ""'>
|
||||
and d.report_date <= #{endDate}::date+1
|
||||
</if>
|
||||
</if>
|
||||
<if test='dateSelector == "activityEndDate"'>
|
||||
<if test='startDate != null and startDate != ""'>
|
||||
and c.report_date >= #{startDate}::date
|
||||
</if>
|
||||
<if test='endDate != null and endDate != ""'>
|
||||
and c.report_date <= #{endDate}::date+1
|
||||
</if>
|
||||
<if test='(startDate != null and startDate != "") or (endDate != null and endDate != "")'>
|
||||
and c.case_type = 'ACR003'
|
||||
</if>
|
||||
</if>
|
||||
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||||
and a.wrt_organ = #{wrtOrgan}
|
||||
|
||||
<if test='wrtUserSeq != null and wrtUserSeq != 0'>
|
||||
and (a.wrt_user_seq = #{wrtUserSeq}
|
||||
or a.receipt_key in (select a.receipt_key
|
||||
from activity_case_info a
|
||||
inner join activity_case_apprv b
|
||||
on a.case_key = b.case_key
|
||||
where b.user_seq = #{wrtUserSeq}))
|
||||
</if>
|
||||
</if>
|
||||
<if test="downOrganCdList != null">
|
||||
and a.wrt_organ in
|
||||
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
||||
#{organCd}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<select id="selectActivityCaseMgt" resultType="ActivityCaseBoard" parameterType="ActivityCaseBoard">
|
||||
select c.case_type , -- 구분
|
||||
select a.receipt_key,
|
||||
c.case_type , -- 구분
|
||||
a.receipt_num , -- 접수번호
|
||||
c.report_date , --접수일시
|
||||
c.case_num , -- 문서번호
|
||||
|
|
@ -271,5 +337,6 @@
|
|||
from activity_case_apprv
|
||||
group by case_key
|
||||
) f on c.case_key = f.case_key
|
||||
<include refid="selectActivityCaseMgtWhere"></include>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -54,11 +54,11 @@ $(document).on('click', '.addInfoBtn', function (){
|
|||
})
|
||||
|
||||
$(document).on('click', '.activityCaseTr', function (){
|
||||
getActivityCaseSummaryModal($(this).find(".receiptKey").val());
|
||||
getActivityCaseSummaryModal($(this).attr("data-receiptkey"), $(this).attr("data-modaltype"));
|
||||
})
|
||||
|
||||
$(document).on('click', '.summaryTr', function (){
|
||||
getActivityCaseViewModal($(this).find(".receiptKey").val(), $(this).find(".caseKey").val());
|
||||
getActivityCaseViewModal($(this).attr("data-receiptkey"), $(this).attr("data-casekey"), $(this).attr("data-modaltype"));
|
||||
})
|
||||
|
||||
$(document).on('click', '#editInfoBtn', function (){
|
||||
|
|
@ -137,10 +137,10 @@ function getApprvDiv(apprvList){
|
|||
});
|
||||
}
|
||||
|
||||
function getActivityCaseSummaryModal(receiptKey){
|
||||
function getActivityCaseSummaryModal(receiptKey, modalType){
|
||||
$.ajax({
|
||||
url: '/counterIntelligence/activityCaseSummaryModal',
|
||||
data: {receiptKey: receiptKey},
|
||||
data: {receiptKey: receiptKey, modalType: modalType},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
|
|
@ -153,10 +153,10 @@ function getActivityCaseSummaryModal(receiptKey){
|
|||
});
|
||||
}
|
||||
|
||||
function getActivityCaseViewModal(receiptKey, caseKey){
|
||||
function getActivityCaseViewModal(receiptKey, caseKey, modalType){
|
||||
$.ajax({
|
||||
url: '/counterIntelligence/activityCaseViewModal',
|
||||
data: {receiptKey: receiptKey, caseKey: caseKey},
|
||||
data: {receiptKey: receiptKey, caseKey: caseKey, modalType: modalType},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr class="activityCaseTr" th:each="case,cnt:${activityCaseList}">
|
||||
<th:block th:each="case,cnt:${activityCaseList}">
|
||||
<tr class="activityCaseTr" th:data-receiptkey="${case.receiptKey}">
|
||||
<input type="hidden" class="receiptKey" th:value="${case.receiptKey}">
|
||||
<td th:text="${cnt.count+(searchParams.pageIndex-1)*searchParams.rowCnt}"></td>
|
||||
<td th:text="${case.receiptNum}"></td>
|
||||
|
|
@ -152,6 +153,7 @@
|
|||
<td th:text="${#temporals.format(case.reportDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${#temporals.format(case.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-2">
|
||||
<select class="form-select form-select-sm" name="caseType">
|
||||
<select class="form-select form-select-sm" name="activityResult">
|
||||
<option value="">처리결과</option>
|
||||
<th:block th:each="code:${session.commonCode.get('ACR')}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<th:block th:each="case,cnt:${activityCaseList}">
|
||||
<tr>
|
||||
<tr class="activityCaseTr" th:data-receiptkey="${case.receiptKey}" data-modaltype="viewOnly">
|
||||
<td rowspan="2">
|
||||
<th:block th:each="code:${session.commonCode.get('ACT')}">
|
||||
<th:block th:if="${code.itemCd eq case.caseType}" th:text="${#strings.replace(code.itemValue, '보고서', '')}"></th:block>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
<td th:text="${case.wrtUserNm}"></td>
|
||||
<td rowspan="2" th:text="${case.description}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="activityCaseTr" th:data-receiptkey="${case.receiptKey}" data-modaltype="viewOnly">
|
||||
<td th:text="${case.reportDate}"></td>
|
||||
<td th:text="${case.suspectBirthDate}"></td>
|
||||
<td>
|
||||
|
|
@ -200,5 +200,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="modal fade" id="activityCaseSummaryModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="activityCaseModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="activityCaseSummaryModalBody">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="activityCaseViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="activityCaseModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="activityCaseViewModalBody">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -20,9 +20,8 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr class="summaryTr" th:each="case,cnt:${activityCaseList}">
|
||||
<input type="hidden" class="receiptKey" th:value="${case.receiptKey}">
|
||||
<input type="hidden" class="caseKey" th:value="${case.caseKey}">
|
||||
<th:block th:each="case,cnt:${activityCaseList}">
|
||||
<tr class="summaryTr" th:data-receiptkey="${case.receiptKey}" th:data-casekey="${case.caseKey}" th:data-modaltype="${modalType}">
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('ACT')}">
|
||||
<th:block th:if="${code.itemCd eq case.caseType}" th:text="${code.itemValue}"></th:block>
|
||||
|
|
@ -41,10 +40,13 @@
|
|||
<td th:text="${#strings.concat(case.apprvCnt, '/', case.allCnt)}"></td>
|
||||
<td th:text="${case.fileCnt}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<th:block th:if="${modalType ne 'viewOnly'}">
|
||||
<div class="modal-footer bg-light" th:if="${lastCaseType ne 'ACT003' and viewUserSeq eq wrtUserSeq}">
|
||||
<button type="button" class="btn btn-outline-dark addInfoBtn" th:data-receiptkey="${receiptKey}" data-casetype="ACT002" th:data-laststatus="${lastStatus}">진행보고서 작성</button>
|
||||
<button type="button" class="btn btn-outline-dark addInfoBtn" th:data-receiptkey="${receiptKey}" data-casetype="ACT003" th:data-laststatus="${lastStatus}">결과보고서 작성</button>
|
||||
</div>
|
||||
</th:block>
|
||||
|
|
@ -191,7 +191,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:if="${modalType ne 'viewOnly'}">
|
||||
<div class="modal-footer bg-light" th:if="${activityCaseInfo.status eq 'DST001' and viewUserSeq eq activityCase.wrtUserSeq}">
|
||||
<!--<button type="button" class="btn btn-danger" id="deleteInfoBtn">삭제</button>-->
|
||||
<button type="button" class="btn btn-warning" id="editInfoBtn">수정</button>
|
||||
</div>
|
||||
</th:block>
|
||||
Loading…
Reference in New Issue