부과제외 수정.

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 org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.cmmn.CrdnSttsHstryQuery;
import cokr.xit.fims.excl.Excl01; import cokr.xit.fims.excl.Excl01;
import cokr.xit.fims.excl.Excl01Query; import cokr.xit.fims.excl.Excl01Query;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;

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

@ -48,8 +48,8 @@ public class Excl01Bean extends AbstractComponent {
DataObject dataCrdn = excl01Mapper.selectCrdnLevyExcl(req); // 등록(단속 조회) DataObject dataCrdn = excl01Mapper.selectCrdnLevyExcl(req); // 등록(단속 조회)
// 초기 데이터 설정 // 초기 데이터 설정
dataCrdn.set("LEVY_EXCL_YMD", dataCrdn.get("TODAY")); // 부과 제외 일자 dataCrdn.set("LEVY_EXCL_YMD", dataCrdn.get("TODAY")); // 부과 제외 일자
dataCrdn.set("LEVY_EXCL_SE_CD", req.getLevyExclSeCd()); // 부과 제외 구분 코드 dataCrdn.set("LEVY_EXCL_SE_CD", req.getLevyExclSeCd()); // 부과 제외 구분 코드
return dataCrdn; return dataCrdn;
} }

@ -1,5 +1,7 @@
package cokr.xit.fims.excl.service.bean; package cokr.xit.fims.excl.service.bean;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -154,139 +156,167 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
return retMap; return retMap;
} }
@Override
public boolean removeLevyExclusionList(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
Excl01 infoLevyExcl = new Excl01(); // 부과제외(TB_LEVY_EXCL) 조회
// 부과제외ID 건수를 확인하여 1건이하면.. 종료
if (excl01.getLevyExclIDs().length < 1 ) {
return retSuccess;
}
// 부과제외ID 만큼 반복..
for (int iLoop = 0; iLoop < excl01.getLevyExclIDs().length; iLoop++) {
infoLevyExcl.setLevyExclId(excl01.getLevyExclIDs()[iLoop]); // 부과제외 ID
infoLevyExcl.setDelRsn(excl01.getDelRsn()); // 삭제 사유
retSuccess = removeLevyExclusion(infoLevyExcl);
if (!retSuccess) {
return retSuccess;
}
}
// 처리 성공
retSuccess = true;
return retSuccess;
}
@Override @Override
public boolean removeLevyExclusion(Excl01 excl01) { public boolean removeLevyExclusion(Excl01 excl01) {
// 변수 선언 // 변수 선언
boolean retSuccess = false; // DB 처리 결과 boolean retSuccess = false; // DB 처리 결과
String levyExclID = "";
DataObject infoCrdnSttsCd = new DataObject(); // 단속(TB_CRDN) 조회 DataObject infoCrdnSttsCd = new DataObject(); // 단속(TB_CRDN) 조회
Excl01 updtCrdnSttsCd = new Excl01(); // 단속(TB_CRDN) 수정
DataObject infoCrdnSttsHstry = new DataObject(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 조회 DataObject infoCrdnSttsHstry = new DataObject(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 조회
Excl01 updtCrdnSttsCd = new Excl01(); // 단속(TB_CRDN) 수정
CrdnSttsHstry deltCrdnSttsHstry = new CrdnSttsHstry(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 삭제 CrdnSttsHstry deltCrdnSttsHstry = new CrdnSttsHstry(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 삭제
// 부과제외 삭제 // 부과제외(TB_LEVY_EXCL) + 단속(TB_CRDN) 자료 조회
infoCrdnSttsCd = excl01Bean.getLevyExclusionInfo(new Excl01Query().setLevyExclId(excl01.getLevyExclId()));
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 대장에서 부과제외 자료 조회
infoCrdnSttsHstry = crdnSttsHstryBean.getCrdnSttsHstryInfo(infoCrdnSttsCd.string("CRDN_ID"));
// 단속 상태 비교..
if (!infoCrdnSttsHstry.string("CRDN_STTS_CD").equals(infoCrdnSttsCd.string("CRDN_STTS_CD"))) {
return retSuccess;
}
// 부과제외(TB_LEVY_EXCL) 삭제
retSuccess = excl01Bean.removeLevyExclusion(excl01); retSuccess = excl01Bean.removeLevyExclusion(excl01);
if (!retSuccess) { if (!retSuccess) {
return retSuccess; return retSuccess;
} }
for (int iLoop = 0; iLoop < excl01.getLevyExclIDs().length; iLoop++) { // 단속 상태 이력(TB_CRDN_STTS_HSTRY) 삭제
levyExclID = excl01.getLevyExclIDs()[iLoop]; deltCrdnSttsHstry.setSttsHstryId(infoCrdnSttsHstry.string("STTS_HSTRY_ID"));
// 부과제외(TB_LEVY_EXCL) + 단속(TB_CRDN) 자료 조회
infoCrdnSttsCd = excl01Bean.getLevyExclusionInfo(new Excl01Query().setLevyExclId(levyExclID));
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 대장에서 부과제외 자료 조회
infoCrdnSttsHstry = crdnSttsHstryBean.getCrdnSttsHstryInfo(infoCrdnSttsCd.string("CRDN_ID"));
// 단속 상태 비교.. retSuccess = crdnSttsHstryBean.remove(deltCrdnSttsHstry);
if (!infoCrdnSttsHstry.string("CRDN_STTS_CD").equals(infoCrdnSttsCd.string("CRDN_STTS_CD"))) { if (!retSuccess) {
return retSuccess; // if (retSuccess) {
} // throw new RuntimeException("오류"); // 예외 발생하여 롤백..
return retSuccess;
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 삭제 }
deltCrdnSttsHstry.setSttsHstryId(infoCrdnSttsHstry.string("STTS_HSTRY_ID"));
retSuccess = crdnSttsHstryBean.remove(deltCrdnSttsHstry);
if (!retSuccess) {
return retSuccess;
}
// 단속(TB_CRDN) 대장 상태 코드 수정 // 단속(TB_CRDN) 대장 상태 코드 수정
updtCrdnSttsCd.setCrdnId(infoCrdnSttsHstry.string("CRDN_ID")); updtCrdnSttsCd.setCrdnId(infoCrdnSttsHstry.string("CRDN_ID"));
updtCrdnSttsCd.setCrdnSttsCd(infoCrdnSttsHstry.string("BFR_STTS_CD")); updtCrdnSttsCd.setCrdnSttsCd(infoCrdnSttsHstry.string("BFR_STTS_CD"));
updtCrdnSttsCd.setCrdnSttsChgDt(infoCrdnSttsHstry.string("BFR_STTS_CHG_DT")); updtCrdnSttsCd.setCrdnSttsChgDt(infoCrdnSttsHstry.string("BFR_STTS_CHG_DT"));
retSuccess = excl01Bean.updateCrackdownStatus(updtCrdnSttsCd); retSuccess = excl01Bean.updateCrackdownStatus(updtCrdnSttsCd);
if (!retSuccess) { if (!retSuccess) {
return retSuccess; return retSuccess;
} }
/* // 추가필요 20230718 조재현 //////////////////////////////////////////////////////////
* // 추가필요 20230718 조재현 ////////////////////////////////////////////////////////// // 부과제외구분이 비부과(서손), 계고일 경우
if GB <> 3 then if (excl01.getLevyExclSeCd().equals("1") || excl01.getLevyExclSeCd().equals("2")) {
begin /*
//서손 취소하는데, cp_answer의 처리상태가 답변대상 또는 서손의 답변 미대상 자료이면 원래 초기상태로 되돌린다 if GB <> 3 then
with qryAnswer_Get do begin begin
Close; //서손 취소하는데, cp_answer의 처리상태가 답변대상 또는 서손의 답변 미대상 자료이면 원래 초기상태로 되돌린다
ParamByName('AS_MMCODE').AsString :=MainInfo.mm_code; with qryAnswer_Get do begin
Open; Close;
if (not IsEmpty) then ParamByName('AS_MMCODE').AsString :=MainInfo.mm_code;
begin Open;
{ if (not IsEmpty) then
old_state := FieldByName('AS_STATE').AsString; begin
if (FieldByName('AS_STATE').AsString = ANSWER_STATE_ANSWER_FOR_CANCEL) or {
(FieldByName('AS_STATE').AsString = ANSWER_STATE_CANCEL_IGNORE) then old_state := FieldByName('AS_STATE').AsString;
begin if (FieldByName('AS_STATE').AsString = ANSWER_STATE_ANSWER_FOR_CANCEL) or
qryAnswer_SetState.ParamByName('AS_STATE').AsString := ANSWER_STATE_FIRST; (FieldByName('AS_STATE').AsString = ANSWER_STATE_CANCEL_IGNORE) then
qryAnswer_SetState.ParamByName('AS_STATE_DT').AsString := sDateTime; begin
qryAnswer_SetState.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code; qryAnswer_SetState.ParamByName('AS_STATE').AsString := ANSWER_STATE_FIRST;
qryAnswer_SetState.ExecSQL; qryAnswer_SetState.ParamByName('AS_STATE_DT').AsString := sDateTime;
end; qryAnswer_SetState.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code;
} qryAnswer_SetState.ExecSQL;
end;
//2017.01.17 서손취소를 하면 무조건 초기상태로 되게 }
{
qryAnswer_SetState.ParamByName('AS_STATE').AsString := ANSWER_STATE_FIRST; //2017.01.17 서손취소를 하면 무조건 초기상태로 되게
qryAnswer_SetState.ParamByName('AS_STATE_DT').AsString := sDateTime; {
qryAnswer_SetState.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code; qryAnswer_SetState.ParamByName('AS_STATE').AsString := ANSWER_STATE_FIRST;
qryAnswer_SetState.ExecSQL; qryAnswer_SetState.ParamByName('AS_STATE_DT').AsString := sDateTime;
} qryAnswer_SetState.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code;
qryAnswer_SetState.ExecSQL;
//20201203 UIJIN 재등록 자료가 서손>취소>차적조회 시에 사전통보 대상에 올라오지 않아서 추가.. }
if (MainInfo.MM_DLGB = '3') or
(MainInfo.MM_DLGB = '4') then //20201203 UIJIN 재등록 자료가 서손>취소>차적조회 시에 사전통보 대상에 올라오지 않아서 추가..
as_state := ANSWER_STATE_CANCEL_COPY if (MainInfo.MM_DLGB = '3') or
else (MainInfo.MM_DLGB = '4') then
as_state := ANSWER_STATE_FIRST; as_state := ANSWER_STATE_CANCEL_COPY
else
qryAnswer_Set.ParamByName('AS_POST_DT').AsString := ''; as_state := ANSWER_STATE_FIRST;
qryAnswer_Set.ParamByName('AS_STATE').AsString := as_state;
qryAnswer_Set.ParamByName('AS_TEXT').AsString := ''; qryAnswer_Set.ParamByName('AS_POST_DT').AsString := '';
qryAnswer_Set.ParamByName('AS_REUSER').AsInteger := 0; qryAnswer_Set.ParamByName('AS_STATE').AsString := as_state;
qryAnswer_Set.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code; qryAnswer_Set.ParamByName('AS_TEXT').AsString := '';
qryAnswer_Set.ExecSQL; qryAnswer_Set.ParamByName('AS_REUSER').AsInteger := 0;
qryAnswer_Set.ParamByName('AS_MMCODE').AsString := MainInfo.mm_code;
end; qryAnswer_Set.ExecSQL;
end;
end;
end;
// 답변내용을 초기화,
// 답변대상이었다가 답변내용보기를 했다가 서손처리하면 답변내용이 이미 세팅되어 있으므로 초기화해야 한다.
// 서손사유 수정시도 답변내용보기를 했을 수 있으므로 초기화해야 한다. // 답변내용을 초기화,
// 서손취소시도 답변내용이 부과 기본 내용으로 바꾸이야 하므로 초기화해야 한다. // 답변대상이었다가 답변내용보기를 했다가 서손처리하면 답변내용이 이미 세팅되어 있으므로 초기화해야 한다.
with qryAnswer_SetTextNull do begin // 서손사유 수정시도 답변내용보기를 했을 수 있으므로 초기화해야 한다.
ParamByName('AS_MMCODE').AsString := MainInfo.mm_code; // 서손취소시도 답변내용이 부과 기본 내용으로 바꾸이야 하므로 초기화해야 한다.
ExecSQL; with qryAnswer_SetTextNull do begin
end; ParamByName('AS_MMCODE').AsString := MainInfo.mm_code;
ExecSQL;
end;
//표지정보 확인여부가 조회미대상이면 -> 미확인 으로
//혹시 차적조회가 안되었으면? 놔두자 차적조회되면 그 때 표지정보 BJ_Send가 처리할테니
if MainInfo.mm_carcheck = CARCHECK_STATE_IGNORE then //표지정보 확인여부가 조회미대상이면 -> 미확인 으로
begin //혹시 차적조회가 안되었으면? 놔두자 차적조회되면 그 때 표지정보 BJ_Send가 처리할테니
with qryMain_SetCarCheck do begin if MainInfo.mm_carcheck = CARCHECK_STATE_IGNORE then
ParamByName('MM_CARCHECK').AsString := CARCHECK_STATE_BEFORE; begin
ParamByName('MM_CODE').AsString := MainInfo.mm_code; with qryMain_SetCarCheck do begin
ExecSQL; ParamByName('MM_CARCHECK').AsString := CARCHECK_STATE_BEFORE;
end; ParamByName('MM_CODE').AsString := MainInfo.mm_code;
if MainCD <> nil then ExecSQL;
begin end;
if MainCD.FindField('MM_CARCHECK') <> nil then if MainCD <> nil then
begin begin
MainCD.Edit; if MainCD.FindField('MM_CARCHECK') <> nil then
MainCD.FieldByName('MM_CARCHECK').AsString := CARCHECK_STATE_BEFORE; begin
MainCD.Post; MainCD.Edit;
end; MainCD.FieldByName('MM_CARCHECK').AsString := CARCHECK_STATE_BEFORE;
end; MainCD.Post;
end;
end; end;
end; end;
*/
end;
*/
} }

@ -131,7 +131,7 @@ public class Excl01Controller extends ApplicationController {
.addObject("retMessage", retMap.get("retMessage")); .addObject("retMessage", retMap.get("retMessage"));
} }
/** . /** ID .
* @param levyExclIDs * @param levyExclIDs
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
@ -147,4 +147,20 @@ public class Excl01Controller extends ApplicationController {
.addObject("saved", saved); .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" <table class="datatables-ajax table table-bordered dataTable no-footer"
id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead> <thead>
<tr id="theadTr--${pageName}" style="text-align:center;"> <tr>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;">NO.</th> <th class="sorting" style="width: 24px;">NO.</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;"> <th class="sorting" style="width: 24px;">
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);"> <input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
</th> </th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외일자</th> <th>부과제외일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외구분명</th> <th>부과제외구분명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">부과제외사유</th> <th>부과제외사유</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">기타내용</th> <th>기타내용</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">민원접수번호</th> <th>민원접수번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">민원접수일자</th> <th>민원접수일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속일시</th> <th>단속일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">차량번호</th> <th>차량번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속장소</th> <th>단속장소</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">납부자명</th> <th>처리상태명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">처리상태명</th> <th>납부자명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록일시</th> <th class="privacy-mask">주민번호(마스크)</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록사용자</th> <th>등록일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정일시</th> <th>등록사용자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정사용자</th> <th>수정일시</th>
<th>수정사용자</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}"> <tbody id="tbody--${pageName}">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="{LEVY_EXCL_ID}"> <tr data-key="{LEVY_EXCL_ID}">
<td style="text-align:center;" {onclick} {ondblclick}>{ROW_NUM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td style="text-align:center;"> <td class="text-center">
<input value="{LEVY_EXCL_ID}" onchange="${pageName}Control.select('{LEVY_EXCL_ID}', this.checked);" type="checkbox" class="form-check-input"> <input type="checkbox" class="form-check-input" value="{LEVY_EXCL_ID}" onchange="${pageName}Control.select('{LEVY_EXCL_ID}', this.checked);">
</td> </td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_YMD}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_SE_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_SE_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{LEVY_EXCL_RSN_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LEVY_EXCL_RSN_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{ETC_CN}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ETC_CN}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CVLCPT_RCPT_NO}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_NO}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CVLCPT_RCPT_YMD}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CRDN_YMD_TM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{VHRNO}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{CRDN_PLC}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{RTPYR_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STTS_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CRDN_STTS_NM}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{REG_DT}</td> <td class="text-center privacy-mask" onclick="{onclick}" ondblclick="{ondblclick}">******-*******</td>
<td style="text-align:center;" {onclick} {ondblclick}>{RGTR}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFCN_DT}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFR}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR}</td>
</tr> </tr>
</template> </template>
<template id="${infoPrefix}NotFound--${pageName}"> <template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd"> <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> </tr>
</template> </template>
</table> </table>
@ -279,9 +281,10 @@
, urls : { , urls : {
load : wctx.url(prefixUrl + "/010/list.do") // 검색 load : wctx.url(prefixUrl + "/010/list.do") // 검색
, getInfo : wctx.url(prefixUrl + "/020/info.do") // 등록 및 수정 팝업 , getInfo : wctx.url(prefixUrl + "/020/info.do") // 등록 및 수정 팝업
, create : wctx.url(prefixUrl + "/020/create.do") // 등록 , create : wctx.url(prefixUrl + "/020/create.do") // 신규 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 수정 , update : wctx.url(prefixUrl + "/020/update.do") // 자료 수정
, remove : wctx.url(prefixUrl + "/010/remove.do") // 삭제 // , remove : wctx.url(prefixUrl + "/010/remove.do") // 자료 삭제
, remove : wctx.url(prefixUrl + "/010/removes.do") // 선택(체크) 자료 삭제
, getTotalInfo : wctx.url("/sprt/sprt01/020/info.do") // 개별총정보 , getTotalInfo : wctx.url("/sprt/sprt01/020/info.do") // 개별총정보
} }
, formats : { , formats : {
@ -344,8 +347,8 @@
${infoPrefix}List.inStrings( ${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%> document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str (str, dataItem) => str
.replace(/{onclick}/gi, 'onclick="${pageName}Control.setCurrent(\'' + dataItem.getValue("LEVY_EXCL_ID") + '\');"') .replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, 'ondblclick="${pageName}Control.getTotalInfo(\'' + 'crdnId=' + dataItem.getValue("CRDN_ID") + '\')"') .replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
); );
$("#tbody--${pageName}").html(trs.join()); $("#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 * function
**************************************************************************/ **************************************************************************/
@ -530,7 +546,7 @@
// 이벤트 설정 // 이벤트 설정
setEvent${pageName}(); setEvent${pageName}();
// Dataset 셋팅 - List 일경우 addData // Dataset 셋팅 - List 일경우 addData 하여 자료를 추가
${pageName}Control.addData(${levyExcl}); ${pageName}Control.addData(${levyExcl});
}); });

@ -91,6 +91,7 @@
LEVY_EXCL_YMD : dateFormat LEVY_EXCL_YMD : dateFormat
} }
}); });
${pageName}Control.onCurrentChange = item => { ${pageName}Control.onCurrentChange = item => {
${pageName}Fields.set(item); ${pageName}Fields.set(item);
setFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD); setFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
@ -154,17 +155,17 @@
// 일자 포맷 // 일자 포맷
$("#frmEdit--${pageName}").find(".form-date").each(function() { $("#frmEdit--${pageName}").find(".form-date").each(function() {
$(this).on("input",function(){ $(this).on("input",function() {
var value = this.value.replaceAll("-",""); let value = this.value.replaceAll("-", "");
if(value.length > 7){ if (value.length > 7) {
this.value = value.substring(0,4)+"-"+value.substring(4,6)+"-"+value.substring(6); this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5){ } else if(value.length > 5){
this.value = value.substring(0,4)+"-"+value.substring(4); this.value = value.substring(0, 4) + "-" + value.substring(4);
} }
}); });
}); });
/************************************************************************** /**************************************************************************
* function * function
**************************************************************************/ **************************************************************************/
@ -173,7 +174,7 @@
let formFields = new FimsFormFields("#frmEdit--${pageName}"); let formFields = new FimsFormFields("#frmEdit--${pageName}");
let data = formFields.get(); let data = formFields.get();
dialog.alert({ dialog.alert({
content : "현재 prefixName 정보를 저장하시겠습니까?" content : "현재 prefixName 정보를 저장하시겠습니까?"
, onOK : () => { , onOK : () => {
${pageName}Control.save(formFields.get()); ${pageName}Control.save(formFields.get());

Loading…
Cancel
Save