외사수사관리 사건보고서 수정

jiHyung 2022-11-11 16:51:08 +09:00
parent 8300b2749a
commit e7e531235a
5 changed files with 74 additions and 21 deletions

View File

@ -18,6 +18,12 @@
<if test='contentTitle != null and contentTitle != ""'> <if test='contentTitle != null and contentTitle != ""'>
AND a.content_title LIKE '%'||#{contentTitle}||'%' AND a.content_title LIKE '%'||#{contentTitle}||'%'
</if> </if>
<if test='arrestCd != null and arrestCd != ""'>
AND t.arrest_cd = #{arrestCd}
</if>
<if test='arrestCd2 != null and arrestCd2 != ""'>
AND t.arrest_cd2 = #{arrestCd2}
</if>
<if test='dateSelector == "wrtDt"'> <if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'> <if test='startDate != null and startDate != ""'>
And a.wrt_dt >= #{startDate}::DATE And a.wrt_dt >= #{startDate}::DATE
@ -68,6 +74,20 @@
<select id="selectBoardInvestigationListCnt" resultType="int" parameterType="BoardInvestigation"> <select id="selectBoardInvestigationListCnt" resultType="int" parameterType="BoardInvestigation">
SELECT count(*) SELECT count(*)
FROM board_investigation a FROM board_investigation a
LEFT OUTER JOIN (
SELECT
ivsgt_key,
count(file_seq) AS fileCnt
FROM ivsgt_file
GROUP BY ivsgt_key
) b
ON a.ivsgt_key = b.ivsgt_key
INNER JOIN arrest_type t
ON a.ivsgt_key = t.ivsgt_key
INNER JOIN code_mgt cm
ON t.arrest_cd = cm.item_cd
INNER JOIN code_mgt cm2
ON t.arrest_cd2 = cm2.item_cd
<include refid="selectBoardInvestigationListWhere"></include> <include refid="selectBoardInvestigationListWhere"></include>
</select> </select>
<select id="selectHashTags" resultType="string" parameterType="int"> <select id="selectHashTags" resultType="string" parameterType="int">

View File

@ -188,7 +188,7 @@ function fileCheck(flag, files){
return flag; return flag;
} }
function dynamicOption(targetTagName, code) { function dynamicOption(targetTagName, code, defaultOptionName='') {
$(targetTagName).empty(); $(targetTagName).empty();
let option = ''; let option = '';
@ -198,7 +198,7 @@ function dynamicOption(targetTagName, code) {
}); });
} }
$(targetTagName).append('<option value="">선택</option>' + option); $(targetTagName).append('<option value="">' +defaultOptionName + '선택</option>' + option);
} }
function departmentDynamicOption(targetTagName, code, defaultOptionName='') { function departmentDynamicOption(targetTagName, code, defaultOptionName='') {

View File

@ -55,6 +55,13 @@ $(document).on('click', '.cancel-btn', function (){
$("#ivsgtEditForm").append('<input type="hidden" name="deleteKeyList" value="' + deleteKey + '">'); $("#ivsgtEditForm").append('<input type="hidden" name="deleteKeyList" value="' + deleteKey + '">');
}); });
$(document).on('change', '#arrestCd', function (){
dynamicOption('#arrestCd2', $(this).val());
});
$(document).on('change', '#searchArrestCd', function (){
dynamicOption('#searchArrestCd2', $(this).val(), '검거유형2');
});
$(function(){ $(function(){
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({

View File

@ -4,6 +4,9 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}"> layout:decorate="~{layout/layout}">
<th:block layout:fragment="script"> <th:block layout:fragment="script">
<script th:inline="javascript">
const commonCode = [[${session.commonCode}]];
</script>
<script type="text/javascript" th:src="@{/js/ivsgt/ivsgt.js}"></script> <script type="text/javascript" th:src="@{/js/ivsgt/ivsgt.js}"></script>
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
@ -38,9 +41,31 @@
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="arrestCd" id="searchArrestCd">
<option value="">검거유형1 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('AT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${searchParams.arrestCd != null and commonCode.itemCd eq searchParams.arrestCd}"></option>
</th:block>
</select>
</div>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="arrestCd2" id="searchArrestCd2">
<option value="">검거유형2 선택</option>
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('AT')))}">
<th:block th:if="${'AT'+num == searchParams.arrestCd}" th:each="commonCode:${session.commonCode.get('AT'+num)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.arrestCd2 eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto"> <div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}"> <input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}">
</div> </div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtNm" th:value="${searchParams.wrtNm}">
</div>
<div class="col-4"> <div class="col-4">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv"> <div class="input-group w-auto input-daterange" id="dateSelectorDiv">
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}"> <input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
@ -76,8 +101,8 @@
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade show active" id="arrest" role="tabpanel" <div class="tab-pane fade show active" id="arrest" role="tabpanel"
aria-labelledby="arrest-tab"> aria-labelledby="arrest-tab">
<table class="table table-striped"> <table class="table table-hover table-bordered ws-nowrap">
<thead> <thead class="align-middle text-center">
<tr> <tr>
<th>문서번호</th> <th>문서번호</th>
<th>관서</th> <th>관서</th>
@ -88,21 +113,21 @@
<th>작성일</th> <th>작성일</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class="table-group-divider align-middle text-center">
<tr class="tr" th:each="boardInvestigation:${boardInvestigationList}" th:data-key="${boardInvestigation.ivsgtKey}"> <tr class="tr" th:each="boardInvestigation:${boardInvestigationList}" th:data-key="${boardInvestigation.ivsgtKey}">
<td th:text="${boardInvestigation.ivsgtKey}"></td> <td th:text="${boardInvestigation.ivsgtKey}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${boardInvestigation.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${boardInvestigation.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
<td th:text="${boardInvestigation.arrestCdName}"></td> <td th:text="${boardInvestigation.arrestCdName}"></td>
<td th:text="${boardInvestigation.arrestCd2Name}"></td> <td th:text="${boardInvestigation.arrestCd2Name}"></td>
<td th:text="${boardInvestigation.contentStatus == 'Y' ? '[임시저장]' : ''} + ${boardInvestigation.contentTitle}"></td> <td th:text="${boardInvestigation.contentStatus == 'Y' ? '[임시저장]' : ''} + ${boardInvestigation.contentTitle}"></td>
<td th:text="${boardInvestigation.wrtNm}"></td> <td th:text="${boardInvestigation.wrtNm}"></td>
<td th:text="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd')}"></td> <td th:text="${#temporals.format(boardInvestigation.wrtDt, 'yyyy-MM-dd')}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<button id="ivsgtAddBtn">등록</button> <button class="btn btn-sm btn-primary" id="ivsgtAddBtn">등록</button>
</div> </div>
<div class="tab-pane fade" id="proceeding" role="tabpanel" <div class="tab-pane fade" id="proceeding" role="tabpanel"
aria-labelledby="proceeding-tab">진행보고서</div> aria-labelledby="proceeding-tab">진행보고서</div>

View File

@ -55,7 +55,7 @@
<div class="col-sm-2"> <div class="col-sm-2">
<select class="form-select form-select-sm" name="arrestCd" id="arrestCd"> <select class="form-select form-select-sm" name="arrestCd" id="arrestCd">
<option value="">검거유형1 선택-</option> <option value="">검거유형1 선택-</option>
<th:block th:each="commonCode:${session.commonCode.get('AT1')}"> <th:block th:each="commonCode:${session.commonCode.get('AT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option> th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option>
</th:block> </th:block>
@ -65,9 +65,10 @@
<div class="col-sm-2"> <div class="col-sm-2">
<select class="form-select form-select-sm" name="arrestCd2" id="arrestCd2"> <select class="form-select form-select-sm" name="arrestCd2" id="arrestCd2">
<option value="">검거유형2 선택-</option> <option value="">검거유형2 선택-</option>
<th:block th:each="commonCode:${session.commonCode.get('AT2')}"> <th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('AT')))}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" <th:block th:if="${boardInvestigation.arrestType ne null && 'AT'+num == boardInvestigation.arrestType.arrestCd}" th:each="commonCode:${session.commonCode.get('AT'+num)}">
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd2}"></option> <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${boardInvestigation.arrestType.arrestCd2 eq commonCode.itemCd}"></option>
</th:block>
</th:block> </th:block>
</select> </select>
</div> </div>