국제범죄검거현황 검색 및 페이징 추가

jiHyung 2022-10-20 09:42:29 +09:00
parent f85c38c194
commit 5a1a727d6b
6 changed files with 106 additions and 4 deletions

View File

@ -48,6 +48,7 @@ public class InternationalCrimeArrestController {
mav.addObject("internationalCrimeArrestList", internationalCrimeArrestList); mav.addObject("internationalCrimeArrestList", internationalCrimeArrestList);
internationalCrimeArrest.setContentCnt(internationalCrimeArrestService.selectInternationalCrimeArrestListCnt(internationalCrimeArrest)); internationalCrimeArrest.setContentCnt(internationalCrimeArrestService.selectInternationalCrimeArrestListCnt(internationalCrimeArrest));
internationalCrimeArrest.setPaginationInfo(); internationalCrimeArrest.setPaginationInfo();
mav.addObject("organConfigList", selectOrganList());
mav.addObject("searchParams", internationalCrimeArrest); mav.addObject("searchParams", internationalCrimeArrest);
return mav; return mav;
} }

View File

@ -6,15 +6,30 @@
<mapper namespace="com.dbnt.faisp.faStatistics.internationalCrimeArrest.mapper.InternationalCrimeArrestMapper"> <mapper namespace="com.dbnt.faisp.faStatistics.internationalCrimeArrest.mapper.InternationalCrimeArrestMapper">
<sql id="selectInternationalCrimeArrestListWhere"> <sql id="selectInternationalCrimeArrestListWhere">
<where> <where>
<if test='wrtOrgan != null and wrtOrgan != ""'> <if test='organ != null and organ != ""'>
AND a.wrt_organ = #{wrtOrgan} AND organ = #{organ}
</if>
<if test='department != null and department != ""'>
AND department = #{department}
</if>
<if test='crimeType != null and crimeType != ""'>
AND crime_type = #{crimeType}
</if>
<if test='violationType != null and violationType != ""'>
AND violation_type = #{violationType}
</if>
<if test='caseNum != null and caseNum != ""'>
AND case_num = #{caseNum}
</if>
<if test='crimeName != null and crimeName != ""'>
AND crime_name LIKE CONCAT('%', #{crimeName}, '%')
</if> </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 wrt_dt >= #{startDate}::DATE
</if> </if>
<if test='endDate != null and endDate != ""'> <if test='endDate != null and endDate != ""'>
AND a.wrt_dt &lt;= #{endDate}::DATE+1 AND wrt_dt &lt;= #{endDate}::DATE+1
</if> </if>
</if> </if>
</where> </where>

View File

@ -1,3 +1,11 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
});
$(document).on('click', '#icaAddBtn', function () { $(document).on('click', '#icaAddBtn', function () {
getIcaEditModal(null); getIcaEditModal(null);
}); });

View File

@ -18,6 +18,72 @@
<div class="row mx-0"> <div class="row mx-0">
<div class="col-12 card"> <div class="col-12 card">
<div class="card-body"> <div class="card-body">
<form method="get" th:action="@{/faStatistics/internationalCrimeArrest}">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<input type="hidden" name="dateSelector" value="wrtDt">
<div class="row justify-content-between pe-3 py-1">
<div class="col-auto">
<select class="form-select" name="rowCnt" id="rowCnt">
<th:block th:each="num : ${#numbers.sequence(1,5)}">
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="사건번호" name="caseNum" th:value="${searchParams.caseNum}">
</div>
<div class="col-auto" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
<select class="form-select form-select-sm" name="organ">
<option value="">지방청 선택</option>
<th:block th:each="organConfig:${organConfigList}">
<th:block th:if="${organConfig.parentOrgan eq 'OG001' && organConfig.organType ne 'OGC001'}">
<option th:value="${organConfig.organCd}" th:text="${organConfig.organNm}" th:selected="${organConfig.organCd eq searchParams.organ}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="department">
<option value="">경찰서 선택</option>
<th:block th:each="organConfig:${organConfigList}">
<th:block th:if="${organConfig.parentOrgan ne null && organConfig.organType ne 'OGC002'}">
<option th:value="${organConfig.organCd}" th:text="${organConfig.organNm}" th:selected="${organConfig.organCd eq searchParams.department}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="crimeType">
<option value="">범죄테마 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('CTH')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.crimeType}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="violationType">
<option value="">위반유형</option>
<th:block th:each="commonCode:${session.commonCode.get('VLT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.violationType}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="죄명" name="crimeName" th:value="${searchParams.crimeName}">
</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}">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div>
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<div class="tab-pane fade show active" id="ica" role="tabpanel" <div class="tab-pane fade show active" id="ica" role="tabpanel"
aria-labelledby="arrest-tab"> aria-labelledby="arrest-tab">
<table class="table table-striped"> <table class="table table-striped">

View File

@ -14,6 +14,12 @@
<input type="hidden" name="wrtNm" th:value="${internationalCrimeArrest.wrtNm}"> <input type="hidden" name="wrtNm" th:value="${internationalCrimeArrest.wrtNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(internationalCrimeArrest.wrtDt, 'yyyy-MM-dd HH:mm')}"> <input type="hidden" name="wrtDt" th:value="${#temporals.format(internationalCrimeArrest.wrtDt, 'yyyy-MM-dd HH:mm')}">
<input type="hidden" id="contentStatus" name="contentStatus"> <input type="hidden" id="contentStatus" name="contentStatus">
<div class="mb-3 row">
<label class="col-sm-2 col-form-label text-center">사건번호</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="caseNum" th:value="${internationalCrimeArrest.caseNum}">
</div>
</div>
<div class="mb-3 row"> <div class="mb-3 row">
<label class="col-sm-2 col-form-label text-center">지방청</label> <label class="col-sm-2 col-form-label text-center">지방청</label>
<div class="col-sm-2"> <div class="col-sm-2">

View File

@ -13,6 +13,12 @@
<input type="hidden" name="wrtNm" th:value="${internationalCrimeArrest.wrtNm}"> <input type="hidden" name="wrtNm" th:value="${internationalCrimeArrest.wrtNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(internationalCrimeArrest.wrtDt, 'yyyy-MM-dd HH:mm')}"> <input type="hidden" name="wrtDt" th:value="${#temporals.format(internationalCrimeArrest.wrtDt, 'yyyy-MM-dd HH:mm')}">
<input type="hidden" id="contentStatus" name="contentStatus"> <input type="hidden" id="contentStatus" name="contentStatus">
<div class="mb-3 row">
<label class="col-sm-2 col-form-label text-center">사건번호</label>
<div class="col-sm-2">
<input type="text" name="caseNum" class="form-control border-0" th:value="${internationalCrimeArrest.caseNum}" readonly>
</div>
</div>
<div class="mb-3 row"> <div class="mb-3 row">
<label class="col-sm-2 col-form-label text-center">지방청</label> <label class="col-sm-2 col-form-label text-center">지방청</label>
<div class="col-sm-2"> <div class="col-sm-2">