개별총정보 - 단속자료 수정 추가.

main
jjh 1 year ago
parent 0deac61623
commit e1fbe82357

@ -49,10 +49,16 @@ public interface CrdnService {
*/ */
boolean updateTagInfo(Crdn crdn); boolean updateTagInfo(Crdn crdn);
/** .
* @param query
* @return
*/
DataObject getCrackdownInfo(CrdnQuery query);
/** . /** .
* @param crdn * @param crdn
* @return * @return
*/ */
public String removeCrackdown(Crdn crdn); String removeCrackdown(Crdn crdn);
} }

@ -217,7 +217,7 @@ public class CrdnBean extends AbstractComponent {
} }
/** . /** .
* @param crdnIDs * @param crdn
* @return * @return
* <ul><li> true</li> * <ul><li> true</li>
* <li> false</li> * <li> false</li>
@ -229,7 +229,7 @@ public class CrdnBean extends AbstractComponent {
String retMessage = ""; // 처리 결과 메시지 String retMessage = ""; // 처리 결과 메시지
int effected = 0; int effected = 0;
// 단속 ID로 단속, 부과제외 정보 조회 // 단속 ID로 단속 정보 조회
DataObject infoCrdn = crdnInfoMapper.selectCrdnInfo(crdn.getCrdnId()); DataObject infoCrdn = crdnInfoMapper.selectCrdnInfo(crdn.getCrdnId());
// 단속상태이력(TB_CRDN_STTS_HSTRY) // 단속상태이력(TB_CRDN_STTS_HSTRY)

@ -212,6 +212,13 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
return crdnUpdtMapper.updateTagInfo(crdn) == 1 ? true : false; return crdnUpdtMapper.updateTagInfo(crdn) == 1 ? true : false;
} }
@Override
public DataObject getCrackdownInfo(CrdnQuery query) {
return crdnInfoMapper.selectCrdnInfo(query.getCrdnId());
}
@Override @Override
public String removeCrackdown(Crdn crdn) { public String removeCrackdown(Crdn crdn) {
return crdnBean.removeCrackdown(crdn); return crdnBean.removeCrackdown(crdn);

@ -5,15 +5,16 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService; import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.foundation.data.DataObject;
/** .<br /> /** .<br />
* { }/crdn/crdn06 . * { }/crdn/crdn06 .
@ -26,7 +27,10 @@ public class Crdn06Controller extends ApplicationController {
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
crackdownManagementMain = "/010/main.do", crackdownManagementMain = "/010/main.do",
getCrackdownList = "/010/list.do" getCrackdownList = "/010/list.do",
getCrackdownInfo = "/020/info.do",
updateCrackdown = "/020/update.do",
removeCrackdown = "/010/remove.do"
; ;
} }
@ -36,6 +40,9 @@ public class Crdn06Controller extends ApplicationController {
@Resource(name="crdnStngService") @Resource(name="crdnStngService")
private CrdnStngService crdnStngService; private CrdnStngService crdnStngService;
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
/** . /** .
* @return fims/crdn/crdn06010-main * @return fims/crdn/crdn06010-main
*/ */
@ -64,6 +71,95 @@ public class Crdn06Controller extends ApplicationController {
return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),""); return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),"");
} }
/** ID (info) .
* @param query
* @return fims/crdn/crdn06020-info jsonView
* <pre>{
* "crdnInfo":
* }</pre>
*/
public ModelAndView getCrackdownInfo(CrdnQuery query) {
DataObject crdnInfo = crdnService.getCrackdownInfo(query);
boolean json = jsonResponse();
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/crdn/crdn06020-info");
// 법정동
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
// 공통코드 - 위반 내역 코드
String vltnByTask = "";
switch(query.getTaskSeCd()) {
case "PVS" -> { vltnByTask = "WEB002"; }
case "BPV" -> { vltnByTask = "FIM005"; }
case "DPV" -> { vltnByTask = "FIM006"; }
case "ECA" -> { vltnByTask = "FIM061"; }
}
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM011","FIM053","LVS005",vltnByTask);
mav.addObject("FIM011List", commonCodes.get("FIM011"));
mav.addObject("FIM053List", commonCodes.get("FIM053"));
mav.addObject("LVS005List", commonCodes.get("LVS005"));
mav.addObject("VLTNList", commonCodes.get(vltnByTask));
// 단속조
List<DataObject> teamList = crdnStngService.getTeamList(query);
// 단속부가정보(TB_CRDN_ADI) 공통코드
switch(query.getTaskSeCd()) {
case "PVS" -> {
commonCodes = getCodesOf("FIM002","FIM007","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM007List", commonCodes.get("FIM007"));
mav.addObject("FIM009List", commonCodes.get("FIM009"));
mav.addObject("TeamList", teamList);
}
case "BPV" -> {
commonCodes = getCodesOf("FIM002","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM009List", commonCodes.get("FIM009"));
mav.addObject("TeamList", teamList);
}
case "DPV" -> {
commonCodes = getCodesOf("FIM034");
mav.addObject("FIM034List", commonCodes.get("FIM034"));
}
case "ECA" -> { }
}
return mav
.addObject("pageName", "crdn06020") //
.addObject("crdnInfo", json ? crdnInfo : toJson(crdnInfo))
;
}
/** ID .
* @param crdnID ID
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
public ModelAndView updateCrackdown(Crdn crdn) {
boolean saved = false;
// String retMessage = crdnService.removeCrackdown(crdn);
//
// if (retMessage.contains("[S]")) {
// saved = true;
// } else {
// saved = false;
// }
String retMessage = "성공";
return new ModelAndView("jsonView")
.addObject("saved", saved)
.addObject("retMessage", retMessage);
}
/** ID . /** ID .
* @param crdnID ID * @param crdnID ID
* @return jsonView * @return jsonView
@ -72,7 +168,6 @@ public class Crdn06Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name = "단속 대장 제거", value = "/010/remove.do")
public ModelAndView removeCrackdown(Crdn crdn) { public ModelAndView removeCrackdown(Crdn crdn) {
boolean saved = false; boolean saved = false;
String retMessage = crdnService.removeCrackdown(crdn); String retMessage = crdnService.removeCrackdown(crdn);

@ -37,7 +37,7 @@ public class Excl01Bean extends AbstractComponent {
private CrdnSttsHstryBean crdnSttsHstryBean; private CrdnSttsHstryBean crdnSttsHstryBean;
/** . /** .
* @param req * @param req
* @return * @return
*/ */
public List<DataObject> getLevyExclList(ExclQuery req) { public List<DataObject> getLevyExclList(ExclQuery req) {
@ -49,8 +49,8 @@ public class Excl01Bean extends AbstractComponent {
} }
/** . /** .
* @param req * @param req
* @return * @return
*/ */
public List<DataObject> getLevyExcls(ExclQuery req) { public List<DataObject> getLevyExcls(ExclQuery req) {
if (req.getOrderBy() == null) { if (req.getOrderBy() == null) {
@ -61,7 +61,7 @@ public class Excl01Bean extends AbstractComponent {
} }
/** ID .<br /> /** ID .<br />
* @param levyExclId ID * @param req
* @return * @return
*/ */
public DataObject getLevyExclInfo(ExclQuery req) { public DataObject getLevyExclInfo(ExclQuery req) {

@ -249,6 +249,23 @@ public class DpvController {
return super.getCrackdownList(query); return super.getCrackdownList(query);
} }
@Override
@RequestMapping(name="장애인과태료업무 단속자료", value=METHOD_URL.getCrackdownInfo)
public ModelAndView getCrackdownInfo(CrdnQuery query) {
return super.getCrackdownInfo(query);
}
@Override
@RequestMapping(name="장애인과태료업무 단속자료 수정", value=METHOD_URL.updateCrackdown)
public ModelAndView updateCrackdown(Crdn crdn) {
return super.updateCrackdown(crdn);
}
@Override
@RequestMapping(name="장애인과태료업무 단속자료 삭제", value=METHOD_URL.removeCrackdown)
public ModelAndView removeCrackdown(Crdn crdn) {
return super.removeCrackdown(crdn);
}
} }
@Controller @Controller

@ -85,21 +85,26 @@
<result property="delRsn" column="DEL_RSN" /> <!-- 삭제 사유 --> <result property="delRsn" column="DEL_RSN" /> <!-- 삭제 사유 -->
</resultMap> </resultMap>
<select id="selectCrdnInfo" parameterType="string"> <select id="selectCrdnInfo" parameterType="string">/* 단속정보 조회(crdnInfoMapper.selectCrdnInfo) */
/* 단속정보 조회(crdnInfoMapper.selectCrdnInfo) */
SELECT C.CRDN_ID <!-- 단속 ID --> SELECT C.CRDN_ID <!-- 단속 ID -->
, C.SGG_CD <!-- 시군구 코드 --> , C.SGG_CD <!-- 시군구 코드 -->
, C.TASK_SE_CD <!-- 업무 구분 코드 --> , C.TASK_SE_CD <!-- 업무 구분 코드 -->
, C.VHRNO <!-- 차량번호 -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 --> , C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->
, C.CRDN_YMD <!-- 단속 일자 -->
, C.CRDN_TM <!-- 단속 시간 -->
, C.VHRNO <!-- 차량번호 -->
, C.CRDN_STDG_NM <!-- 단속 법정동 명 -->
, C.CRDN_ROAD_NM <!-- 단속 도로 명 -->
, C.CRDN_PLC <!-- 단속 장소 -->
, C.VLTN_ID <!-- 위반 ID -->
, C.VIN VIN <!-- 차대번호 -->
, C.VHCL_NM <!-- 차량 명 -->
, C.VHCL_COLOR <!-- 차량 색상 -->
, C.FFNLG_CRDN_AMT <!-- 과태료 단속 금액 -->
, C.CRDN_STTS_CD <!-- 단속 상태 코드 --> , C.CRDN_STTS_CD <!-- 단속 상태 코드 -->
, C.CRDN_STTS_CHG_DT <!-- 단속 상태 변경 일시 --> , C.CRDN_STTS_CHG_DT <!-- 단속 상태 변경 일시 -->
, C.LINK_TBL_NM <!-- 연계 테이블 명 --> , C.LINK_TBL_NM <!-- 연계 테이블 명 -->
, C.LINK_ID <!-- 연계 ID --> , C.LINK_ID <!-- 연계 ID -->
, C.FFNLG_CRDN_AMT <!-- 과태료 단속 금액 -->
, C.CRDN_YMD <!-- 단속 일자 -->
, C.CRDN_TM <!-- 단속 시간 -->
, C.VLTN_ID <!-- 위반 ID -->
, (SELECT VLTN_CD FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) AS VLTN_CD , (SELECT VLTN_CD FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) AS VLTN_CD
, CA.OVTIME_YN <!-- 시간외 여부 --> , CA.OVTIME_YN <!-- 시간외 여부 -->
, CA.OVTIME_PRTTN_YN <!-- 시간외 분할 여부 --> , CA.OVTIME_PRTTN_YN <!-- 시간외 분할 여부 -->

@ -0,0 +1,329 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">단속자료 수정</c:set>
<!-- Page Body -->
<div class="card">
<!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<!-- hidden -->
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<div class="row g-1">
<!-- 단속 일자 -->
<div class="col-md-6">
<label for="crdnYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">단속일자</label>
<input type="text" class="form-control form-date" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD" data-fmt-type="day" maxlength="10" required />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<!-- 단속 시간 -->
<div class="col-md-6">
<label for="crdnTm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">단속시간</label>
<input type="text" class="form-control form-time" id="crdnTm--${pageName}" name="crdnTm" data-map="CRDN_TM" data-fmt-type="time" maxlength="8" required placeholder="시:분:초" />
</div>
<!-- 차량번호 -->
<div class="col-md-6">
<label for="vhrno--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량번호</label>
<input type="text" class="form-control w-30" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 위반 내용 -->
<div class="col-md-6">
<label for="vltnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">위반내용</label>
<select id="vltnCd--${pageName}" class="form-select" name="vltnCd" data-map="VLTN_CD">
<c:forEach items="${VLTNList}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 법정동 -->
<div class="col-md-6 select2-primary">
<label for="crdnStdgNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<input type="text" class="form-control w-px-150" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" list="stdgNmList--${pageName}" />
<datalist id="stdgNmList--${pageName}">
<c:forEach items="${stdgNmList}" var="item">
<option value="${item}"></option>
</c:forEach>
</datalist>
</div>
<!-- 도로명 -->
<div class="col-md-6 select2-primary">
<label for="crdnRoadNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">도로명</label>
<input type="text" class="form-control" id="crdnRoadNm--${pageName}" name="crdnRoadNm" data-map="CRDN_ROAD_NM" />
</div>
<!-- 단속 장소 -->
<div class="col-md-12">
<label for="crdnPlc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속장소</label>
<input type="text" class="form-control w-80" id="crdnPlc--${pageName}" name="crdnPlc" data-map="CRDN_PLC" data-maxlengthb="200" />
</div>
<!-- 상세 단속 장소 -->
<div class="col-md-12" slot="edit">
<template class="bpv">
<slot>
<label for="dtlCrdnPlc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상세단속장소</label>
<input type="text" class="form-control w-80" id="dtlCrdnPlc--${pageName}" name="dtlCrdnPlc" data-map="DTL_CRDN_PLC" data-maxlenghb="200" />
</slot>
</template>
</div>
<div class="col-md-6" slot="edit">
<template class="pvs">
<slot>
<label for="crdnSpareaCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label>
<select class="form-select" id="crdnSpareaCd--${pageName}" name="crdnSpareaCd" data-map="CRDN_SPAREA_CD">
<c:forEach items="${FIM007List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-6" slot="edit">
<template class="pvs">
<slot>
<label for="towngYnNm--${pageName}">
<input type="checkbox" class="form-check-input" id="towngYnNm--${pageName}" name="towngYnNm" data-map="TOWNG_YN_NM" />견인여부
</label>
</slot>
</template>
</div>
<div class="col-md-12">
<label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
<input type="text" class="form-control w-80" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" data-maxlengthb="1000" />
</div>
<div class="col-md-6">
<label for="vin--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차대번호</label>
<input type="text" class="form-control" id="vin--${pageName}" name="vin" data-map="VIN" readonly placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-6">
<label for="vhclNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
<input type="text" class="form-control" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" readonly placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-6">
<label for="vhclColor--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량색상</label>
<input type="text" class="form-control" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" readonly placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="ffnlgCarmdlCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
<select class="form-select" id="ffnlgCarmdlCd--${pageName}" name ="ffnlgCarmdlCd" data-map="FFNLG_CARMDL_CD">
<option value=""></option>
<c:forEach items="${FIM009List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-12" slot="edit">
<template class="eca">
<slot>
<label for="useFuelCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<select id="useFuelCd--${pageName}" class="form-select" name="useFuelCd" data-map="USE_FUEL_CD" disabled>
<option value=""></option>
<c:forEach items="${LVS005List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot>
<label for="towngYn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
<select class="form-select" id="towngYn--${pageName}" name="towngYn" data-map="TOWNG_YN">
<c:forEach items="${FIM053List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot>
<label for="crdnSn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label>
<input type="text" class="form-control" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" maxlength="20" data-maxlengthb="20" />
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="dpv">
<slot>
<label for="parkngPsbltyRsltCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
<select class="form-select" id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD">
<c:forEach items="${FIM034List}" var="item">
<c:if test="${item.code == '0' or item.code == '1'}">
<option value="${item.code}">${item.value}</option>
</c:if>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="teamId--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속조</label>
<select class="form-select" id="teamId--${pageName}" name="teamId" data-map="TEAM_ID">
<option value=""></option>
<c:forEach items="${TeamList}" var="item">
<option value="${item.TEAM_ID}">${item.TEAM_NM}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속원</label>
<input type="text" class="form-control" id="teamer1--${pageName}" name="teamer1" data-map="TEAMER_1" />
<input type="text" class="form-control" id="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" />
<input type="text" class="form-control" id="teamer3--${pageName}" name="teamer3" data-map="TEAMER_3" />
<input type="text" class="form-control" id="teamer4--${pageName}" name="teamer4" data-map="TEAMER_4" />
</slot>
</template>
</div>
</div>
</form>
<!-- /입력 영역 -->
</div>
<!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
// URL
var ${pageName}PrefixUrl = "/crdn/crdn06";
// FormFields
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "crdn"
, prefixName : "단속"
, keymapper : info => info ? info.CRDN_ID : ""
, dataGetter : obj => obj.crdnInfo
, urls : {
update : wctx.url(${pageName}PrefixUrl + "/020/update.do") // 수정
}
, formats : {
CRDN_YMD : dateFormat
, CRDN_TM : timeFormat
}
});
${pageName}Control.onCurrentChange = item => {
// Dataset 셋팅
${pageName}Fields.set(item);
}
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 저장 callback
${pageName}Control.onSave = (resp) => {
let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html();
let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle);
dialog.alert(showMessage);
if (resp.saved) {
// 폼을 리셋해서 uploadFiles에 출력된 선택 파일을 초기화시킨다.
document.getElementById("frmFile--${pageName}").reset();
dialog.close(${pageName}Control.prefix + "Dialog");
}
}
// 저장
${pageName}Control.save = (info) => {
if (!info) return;
ajax.post({
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
, data : formData
, contentType : false
, processData : false
, success : resp => ${pageName}Control.onSave(resp)
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 검색조건 초기값 셋팅
function initForm${pageName}() {
// 달력 초기화
initDatepicker("frmEdit--${pageName}");
$("#rcptYmd--${pageName}").datepicker("setDate", new Date());
}
// 이벤트 설정
function setEvent${pageName}() {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmEdit--${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);
}
});
});
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFiles--${pageName}").trigger("click"); });
}
/**************************************************************************
* function
**************************************************************************/
// 저장
function fnSave${pageName}() {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
, onOK : () => {
${pageName}Control.save(${pageName}Fields.get());
}
});
}
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// 이벤트 설정
setEvent${pageName}();
// 화면 초기 설정
initForm${pageName}();
// Dataset 셋팅 - 단건일 경우 setData
${pageName}Control.setData([${crdnInfo}]);
});
// #sourceURL=excl01020-info.jsp
</script>

@ -319,10 +319,10 @@
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
var ${pageName}Control = new DatasetControl({ var ${pageName}Control = new DatasetControl({
prefix : "totalInfoCrdnPayer" prefix : "crdn"
, prefixName : "단속 정보" , prefixName : "단속 정보"
, keymapper : info => info ? info.CRDN_ID : "" , keymapper : info => info ? info.CRDN_ID : ""
, dataGetter : obj => obj.crdnPayer , dataGetter : obj => obj.crdnPayerInfo
, formats : { , formats : {
CRDN_YMD_TM : datetimeFormat CRDN_YMD_TM : datetimeFormat
, CVLCPT_RCPT_YMD : datetimeFormat , CVLCPT_RCPT_YMD : datetimeFormat
@ -631,6 +631,17 @@
}); });
} }
// 납부자 초기화
deletePayer${pageName} = (params) => {
}
// 납부자 정보 수정
updatePayer${pageName} = (params) => {
}
// 자료 재조회 // 자료 재조회
refreshDataInfo${pageName} = () => { refreshDataInfo${pageName} = () => {
@ -781,7 +792,7 @@
} }
let params = { let params = {
callPurpose : "view" callPurpose : "update"
, crdnId : crdnId , crdnId : crdnId
, sggCd : sggCd , sggCd : sggCd
, taskSeCd : taskSeCd , taskSeCd : taskSeCd
@ -790,7 +801,7 @@
${pageName}Control.getInfo(params); ${pageName}Control.getInfo(params);
} }
// 자료 삭제 // 단속정보 삭제
fnRemoveCrdn${pageName} = () => { fnRemoveCrdn${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID"); let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
let sggCd = ${pageName}Control.dataset.getValue("SGG_CD"); let sggCd = ${pageName}Control.dataset.getValue("SGG_CD");

Loading…
Cancel
Save