부과제외 수정.

main
jjh 1 year ago
parent 3ed0a0bdc7
commit 87a61585a8

@ -5,7 +5,6 @@ import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.cmmn.CrdnSttsHstryQuery;
import cokr.xit.fims.excl.Excl01;
import cokr.xit.fims.excl.Excl01Query;
import cokr.xit.foundation.component.AbstractMapper;

@ -58,5 +58,13 @@ public interface Excl01Service {
*/
boolean removeLevyExclusion(Excl01 excl01);
}
/** .
* @param excl
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
boolean removeLevyExclusionList(Excl01 excl01);
}

@ -1,5 +1,7 @@
package cokr.xit.fims.excl.service.bean;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -155,28 +157,46 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
@Override
public boolean removeLevyExclusion(Excl01 excl01) {
public boolean removeLevyExclusionList(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
Excl01 infoLevyExcl = new Excl01(); // 부과제외(TB_LEVY_EXCL) 조회
String levyExclID = "";
// 부과제외ID 건수를 확인하여 1건이하면.. 종료
if (excl01.getLevyExclIDs().length < 1 ) {
return retSuccess;
}
DataObject infoCrdnSttsCd = new DataObject(); // 단속(TB_CRDN) 조회
Excl01 updtCrdnSttsCd = new Excl01(); // 단속(TB_CRDN) 수정
DataObject infoCrdnSttsHstry = new DataObject(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 조회
CrdnSttsHstry deltCrdnSttsHstry = new CrdnSttsHstry(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 삭제
// 부과제외ID 만큼 반복..
for (int iLoop = 0; iLoop < excl01.getLevyExclIDs().length; iLoop++) {
infoLevyExcl.setLevyExclId(excl01.getLevyExclIDs()[iLoop]); // 부과제외 ID
infoLevyExcl.setDelRsn(excl01.getDelRsn()); // 삭제 사유
// 부과제외 삭제
retSuccess = excl01Bean.removeLevyExclusion(excl01);
retSuccess = removeLevyExclusion(infoLevyExcl);
if (!retSuccess) {
return retSuccess;
}
}
for (int iLoop = 0; iLoop < excl01.getLevyExclIDs().length; iLoop++) {
levyExclID = excl01.getLevyExclIDs()[iLoop];
// 처리 성공
retSuccess = true;
return retSuccess;
}
@Override
public boolean removeLevyExclusion(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
DataObject infoCrdnSttsCd = new DataObject(); // 단속(TB_CRDN) 조회
DataObject infoCrdnSttsHstry = new DataObject(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 조회
Excl01 updtCrdnSttsCd = new Excl01(); // 단속(TB_CRDN) 수정
CrdnSttsHstry deltCrdnSttsHstry = new CrdnSttsHstry(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 삭제
// 부과제외(TB_LEVY_EXCL) + 단속(TB_CRDN) 자료 조회
infoCrdnSttsCd = excl01Bean.getLevyExclusionInfo(new Excl01Query().setLevyExclId(levyExclID));
infoCrdnSttsCd = excl01Bean.getLevyExclusionInfo(new Excl01Query().setLevyExclId(excl01.getLevyExclId()));
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 대장에서 부과제외 자료 조회
infoCrdnSttsHstry = crdnSttsHstryBean.getCrdnSttsHstryInfo(infoCrdnSttsCd.string("CRDN_ID"));
@ -186,11 +206,19 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
return retSuccess;
}
// 부과제외(TB_LEVY_EXCL) 삭제
retSuccess = excl01Bean.removeLevyExclusion(excl01);
if (!retSuccess) {
return retSuccess;
}
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 삭제
deltCrdnSttsHstry.setSttsHstryId(infoCrdnSttsHstry.string("STTS_HSTRY_ID"));
retSuccess = crdnSttsHstryBean.remove(deltCrdnSttsHstry);
if (!retSuccess) {
// if (retSuccess) {
// throw new RuntimeException("오류"); // 예외 발생하여 롤백..
return retSuccess;
}
@ -204,8 +232,10 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
return retSuccess;
}
/*
* // 추가필요 20230718 조재현 //////////////////////////////////////////////////////////
// 추가필요 20230718 조재현 //////////////////////////////////////////////////////////
// 부과제외구분이 비부과(서손), 계고일 경우
if (excl01.getLevyExclSeCd().equals("1") || excl01.getLevyExclSeCd().equals("2")) {
/*
if GB <> 3 then
begin
//서손 취소하는데, cp_answer의 처리상태가 답변대상 또는 서손의 답변 미대상 자료이면 원래 초기상태로 되돌린다
@ -286,7 +316,7 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
end;
end;
*/
*/
}

@ -131,7 +131,7 @@ public class Excl01Controller extends ApplicationController {
.addObject("retMessage", retMap.get("retMessage"));
}
/** .
/** ID .
* @param levyExclIDs
* @return jsonView
* <pre><code> {
@ -147,4 +147,20 @@ public class Excl01Controller extends ApplicationController {
.addObject("saved", saved);
}
/** ID .
* @param levyExclIDs IDs
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
@PostMapping(name = "부과제외 대장 제거", value = "/010/removes.do")
public ModelAndView removeLevyExclusionList(Excl01 excl01) {
boolean saved = excl01Service.removeLevyExclusionList(excl01);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
}

@ -185,56 +185,58 @@
<table class="datatables-ajax table table-bordered dataTable no-footer"
id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead>
<tr id="theadTr--${pageName}" style="text-align:center;">
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;">NO.</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;">
<tr>
<th class="sorting" style="width: 24px;">NO.</th>
<th class="sorting" style="width: 24px;">
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외구분명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외사유</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">기타내용</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">민원접수번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">민원접수일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">차량번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속장소</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">납부자명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">처리상태명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록사용자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정사용자</th>
<th>부과제외일자</th>
<th>부과제외구분명</th>
<th>부과제외사유</th>
<th>기타내용</th>
<th>민원접수번호</th>
<th>민원접수일자</th>
<th>단속일시</th>
<th>차량번호</th>
<th>단속장소</th>
<th>처리상태명</th>
<th>납부자명</th>
<th class="privacy-mask">주민번호(마스크)</th>
<th>등록일시</th>
<th>등록사용자</th>
<th>수정일시</th>
<th>수정사용자</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{LEVY_EXCL_ID}">
<td style="text-align:center;" {onclick} {ondblclick}>{ROW_NUM}</td>
<td style="text-align:center;">
<input value="{LEVY_EXCL_ID}" onchange="${pageName}Control.select('{LEVY_EXCL_ID}', this.checked);" type="checkbox" class="form-check-input">
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="text-center">
<input type="checkbox" class="form-check-input" value="{LEVY_EXCL_ID}" onchange="${pageName}Control.select('{LEVY_EXCL_ID}', this.checked);">
</td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_SE_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_RSN_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{ETC_CN}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CVLCPT_RCPT_NO}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CVLCPT_RCPT_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CRDN_YMD_TM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{VHRNO}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{CRDN_PLC}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{RTPYR_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CRDN_STTS_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{REG_DT}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{RGTR}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFCN_DT}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFR}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_YMD}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_SE_NM}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_RSN_NM}</td>
<td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ETC_CN}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_NO}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_YMD}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
<td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
<td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STTS_NM}</td>
<td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
<td class="text-center privacy-mask" onclick="{onclick}" ondblclick="{ondblclick}">******-*******</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR}</td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="18" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
@ -279,9 +281,10 @@
, urls : {
load : wctx.url(prefixUrl + "/010/list.do") // 검색
, getInfo : wctx.url(prefixUrl + "/020/info.do") // 등록 및 수정 팝업
, create : wctx.url(prefixUrl + "/020/create.do") // 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 수정
, remove : wctx.url(prefixUrl + "/010/remove.do") // 삭제
, create : wctx.url(prefixUrl + "/020/create.do") // 신규 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 자료 수정
// , remove : wctx.url(prefixUrl + "/010/remove.do") // 자료 삭제
, remove : wctx.url(prefixUrl + "/010/removes.do") // 선택(체크) 자료 삭제
, getTotalInfo : wctx.url("/sprt/sprt01/020/info.do") // 개별총정보
}
, formats : {
@ -344,8 +347,8 @@
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, 'onclick="${pageName}Control.setCurrent(\'' + dataItem.getValue("LEVY_EXCL_ID") + '\');"')
.replace(/{ondblclick}/gi, 'ondblclick="${pageName}Control.getTotalInfo(\'' + 'crdnId=' + dataItem.getValue("CRDN_ID") + '\')"')
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
);
$("#tbody--${pageName}").html(trs.join());
@ -451,6 +454,19 @@
});
}
// 일자 포맷
$("frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5){
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
/**************************************************************************
* function
**************************************************************************/
@ -530,7 +546,7 @@
// 이벤트 설정
setEvent${pageName}();
// Dataset 셋팅 - List 일경우 addData
// Dataset 셋팅 - List 일경우 addData 하여 자료를 추가
${pageName}Control.addData(${levyExcl});
});

@ -91,6 +91,7 @@
LEVY_EXCL_YMD : dateFormat
}
});
${pageName}Control.onCurrentChange = item => {
${pageName}Fields.set(item);
setFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
@ -154,17 +155,17 @@
// 일자 포맷
$("#frmEdit--${pageName}").find(".form-date").each(function() {
$(this).on("input",function(){
var value = this.value.replaceAll("-","");
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if(value.length > 7){
this.value = value.substring(0,4)+"-"+value.substring(4,6)+"-"+value.substring(6);
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5){
this.value = value.substring(0,4)+"-"+value.substring(4);
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
/**************************************************************************
* function
**************************************************************************/

Loading…
Cancel
Save