사건보고서

- 모달 오류 수정.
 - 범죄테마 공통코드 오류 수정.
master
강석 최 2023-01-31 15:54:05 +09:00
parent 6c756e1326
commit bf4539695f
5 changed files with 31 additions and 24 deletions

View File

@ -24,7 +24,7 @@ public class IvsgtController {
private final BoardInvestigationService boardInvestigationService; private final BoardInvestigationService boardInvestigationService;
@GetMapping("/{ivsgtType}") @GetMapping("/{ivsgtType}")
public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType,BoardInvestigation boardInvestigation) { public ModelAndView arrest(@AuthenticationPrincipal UserInfo loginUser, @PathVariable("ivsgtType") String ivsgtType, BoardInvestigation boardInvestigation) {
ModelAndView mav = new ModelAndView("ivsgt/ivsgt"); ModelAndView mav = new ModelAndView("ivsgt/ivsgt");
boardInvestigation.setIvsgtType(ivsgtType); boardInvestigation.setIvsgtType(ivsgtType);
@ -64,7 +64,7 @@ public class IvsgtController {
mav.addObject("boardInvestigation", boardInvestigation); mav.addObject("boardInvestigation", boardInvestigation);
mav.addObject("userSeq",loginUser.getUserSeq()); mav.addObject("userSeq",loginUser.getUserSeq());
//메뉴권한 확인 //메뉴권한 확인
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/"+boardInvestigation.getIvsgtType()).get(0).getAccessAuth()); mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/ivsgt/arrest").get(0).getAccessAuth());
return mav; return mav;
} }

View File

@ -59,20 +59,19 @@
cm.item_value AS arrestCdName, cm.item_value AS arrestCdName,
cm2.item_value AS arrestCd2Name cm2.item_value AS arrestCd2Name
FROM board_investigation a FROM board_investigation a
LEFT OUTER JOIN ( LEFT OUTER JOIN (
SELECT SELECT
ivsgt_key, ivsgt_key,
count(file_seq) AS fileCnt count(file_seq) AS fileCnt
FROM ivsgt_file FROM ivsgt_file
GROUP BY ivsgt_key GROUP BY ivsgt_key
) b ) b ON a.ivsgt_key = b.ivsgt_key
ON a.ivsgt_key = b.ivsgt_key INNER JOIN arrest_type t
INNER JOIN arrest_type t ON a.ivsgt_key = t.ivsgt_key
ON a.ivsgt_key = t.ivsgt_key INNER JOIN code_mgt cm
INNER JOIN code_mgt cm ON t.arrest_cd = cm.item_cd
ON t.arrest_cd = cm.item_cd INNER JOIN code_mgt cm2
INNER JOIN code_mgt cm2 ON t.arrest_cd2 = cm2.item_cd
ON t.arrest_cd2 = cm2.item_cd
<include refid="selectBoardInvestigationListWhere"></include> <include refid="selectBoardInvestigationListWhere"></include>
ORDER BY ivsgt_key DESC ORDER BY ivsgt_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex} LIMIT #{rowCnt} OFFSET #{firstIndex}

View File

@ -10,7 +10,10 @@ $(document).on('click', '#ivsgtEditBtn', function () {
$(document).on('click', '#saveIvsgtBtn', function (){ $(document).on('click', '#saveIvsgtBtn', function (){
saveBoardInvestigation('N') saveBoardInvestigation('N')
}); });
$(document).on('change', '#arrestCd', function (){
$(".arrestCd2").hide();
$("."+this.value).show();
})
$(document).on('click', '#saveTempBtn', function (){ $(document).on('click', '#saveTempBtn', function (){
saveBoardInvestigation('Y') saveBoardInvestigation('Y')
}); });
@ -101,6 +104,10 @@ function getIvsgtEditModal(ivsgtKey, ivsgtType){
$("#ivsgtViewBody").empty(); $("#ivsgtViewBody").empty();
$("#ivsgtEditModalContent").empty().append(html) $("#ivsgtEditModalContent").empty().append(html)
$("#ivsgtEditModal").modal('show'); $("#ivsgtEditModal").modal('show');
const selectedArrestCd = $("#ivsgtEditForm").find("#arrestCd").val()
if(selectedArrestCd){
$("."+selectedArrestCd).show();
}
setEditor('editor', '400') setEditor('editor', '400')
setUploadDiv(); setUploadDiv();
}, },

View File

@ -57,9 +57,9 @@
<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="">범죄테마 선택-</option> <option value="">범죄테마 선택-</option>
<th:block th:each="commonCode:${session.commonCode.get('CTH')}"> <th:block th:each="code:${session.commonCode.get('CTH')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" <option th:value="${code.itemCd}" th:text="${code.itemValue}"
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option> th:selected="${boardInvestigation.arrestType != null and code.itemCd eq boardInvestigation.arrestType.arrestCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
@ -67,9 +67,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="">위반유형 선택-</option> <option value="">위반유형 선택-</option>
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('AT')))}"> <th:block th:each="cthCode:${session.commonCode.get('CTH')}">
<th:block th:if="${boardInvestigation.arrestType ne null && 'AT'+num == boardInvestigation.arrestType.arrestCd}" th:each="commonCode:${session.commonCode.get('AT'+num)}"> <th:block th:each="code:${session.commonCode.get(cthCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${boardInvestigation.arrestType.arrestCd2 eq commonCode.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" class="arrestCd2" th:classappend="${cthCode.itemCd}" style="display: none"
th:selected="${boardInvestigation.arrestType != null and code.itemCd eq boardInvestigation.arrestType.arrestCd2}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>

View File

@ -29,7 +29,7 @@
<div class="row mb-1"> <div class="row mb-1">
<label 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>
<label class="col-sm-2 col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('AT')}"> <th:block th:each="code:${session.commonCode.get('CTH')}">
<th:block th:if="${code.itemCd eq boardInvestigation.arrestType.arrestCd}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq boardInvestigation.arrestType.arrestCd}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>