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

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 != ""'>
AND a.content_title LIKE '%'||#{contentTitle}||'%'
</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='startDate != null and startDate != ""'>
And a.wrt_dt >= #{startDate}::DATE
@ -68,6 +74,20 @@
<select id="selectBoardInvestigationListCnt" resultType="int" parameterType="BoardInvestigation">
SELECT count(*)
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>
</select>
<select id="selectHashTags" resultType="string" parameterType="int">

View File

@ -188,7 +188,7 @@ function fileCheck(flag, files){
return flag;
}
function dynamicOption(targetTagName, code) {
function dynamicOption(targetTagName, code, defaultOptionName='') {
$(targetTagName).empty();
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='') {

View File

@ -55,6 +55,13 @@ $(document).on('click', '.cancel-btn', function (){
$("#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(){
$("#dateSelectorDiv").datepicker({

View File

@ -4,6 +4,9 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<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>
</th:block>
<div layout:fragment="content">
@ -38,9 +41,31 @@
</th:block>
</select>
</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">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}">
</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="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}">
@ -76,8 +101,8 @@
<div class="tab-content">
<div class="tab-pane fade show active" id="arrest" role="tabpanel"
aria-labelledby="arrest-tab">
<table class="table table-striped">
<thead>
<table class="table table-hover table-bordered ws-nowrap">
<thead class="align-middle text-center">
<tr>
<th>문서번호</th>
<th>관서</th>
@ -88,7 +113,7 @@
<th>작성일</th>
</tr>
</thead>
<tbody>
<tbody class="table-group-divider align-middle text-center">
<tr class="tr" th:each="boardInvestigation:${boardInvestigationList}" th:data-key="${boardInvestigation.ivsgtKey}">
<td th:text="${boardInvestigation.ivsgtKey}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
@ -102,7 +127,7 @@
</tr>
</tbody>
</table>
<button id="ivsgtAddBtn">등록</button>
<button class="btn btn-sm btn-primary" id="ivsgtAddBtn">등록</button>
</div>
<div class="tab-pane fade" id="proceeding" role="tabpanel"
aria-labelledby="proceeding-tab">진행보고서</div>

View File

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