민원상담 수정 기능 수정.

main
jjh 1 year ago
parent 0c4faaead8
commit 0ae3fbec50

@ -38,7 +38,8 @@ public class CvlcptDscsnQuery extends CmmnQuery {
// 동적 검색 조건 // 동적 검색 조건
private String inquiryCondition; private String inquiryCondition;
private String vhrno; private String vhrno; // 차량번호
private String rtpyrNo; // 납부자 번호
// ETC // ETC
private String callPurpose; // 자료 조회시 호출용도. (view 조회, create 등록, update 수정, refresh 재조회) private String callPurpose; // 자료 조회시 호출용도. (view 조회, create 등록, update 수정, refresh 재조회)
@ -201,6 +202,16 @@ public class CvlcptDscsnQuery extends CmmnQuery {
return self(); return self();
} }
public String getRtpyrNo() {
return ifEmpty(rtpyrNo, () -> null);
}
public <T extends CvlcptDscsnQuery> T setRtpyrNo(String rtpyrNo) {
this.rtpyrNo = rtpyrNo;
return self();
}
// 동적 검색 조건 /////////////////////////////////////////////////////////////// // 동적 검색 조건 ///////////////////////////////////////////////////////////////
// ETC ///////////////////////////////////////////////////////////////////// // ETC /////////////////////////////////////////////////////////////////////

@ -41,7 +41,7 @@ public interface CvlcptDscsnMapper extends AbstractMapper {
*/ */
default DataObject selectCvlcptDscsnInfo(CvlcptDscsnQuery req) { default DataObject selectCvlcptDscsnInfo(CvlcptDscsnQuery req) {
if (req.getOrderBy() == null) { if (req.getOrderBy() == null) {
req.setOrderBy("CDC.CVLCPT_DSCSN_ID DESC"); req.setOrderBy("CD.CVLCPT_DSCSN_ID DESC");
} }
List<DataObject> cvlcptDscsns = selectCvlcptDscsns(req); List<DataObject> cvlcptDscsns = selectCvlcptDscsns(req);

@ -43,7 +43,7 @@ public class Sprt04Bean extends AbstractComponent {
*/ */
public List<DataObject> getCvlcptDscsns(CvlcptDscsnQuery req) { public List<DataObject> getCvlcptDscsns(CvlcptDscsnQuery req) {
if (req.getOrderBy() == null) { if (req.getOrderBy() == null) {
req.setOrderBy("CDC.REG_DT DESC, CDC.CVLCPT_DSCSN_ID DESC"); req.setOrderBy("CD.REG_DT DESC, CD.CVLCPT_DSCSN_ID DESC");
} }
return cvlcptDscsnMapper.selectCvlcptDscsns(req); return cvlcptDscsnMapper.selectCvlcptDscsns(req);

@ -100,7 +100,7 @@ public class Sprt04Controller extends ApplicationController {
return mav return mav
.addObject("pageName", "sprt04020") // .addObject("pageName", "sprt04020") //
.addObject("FIM065List", commonCodes.get("FIM065")) // 부과 제외 구분 코드(LEVY_EXCL_SE_CD) .addObject("FIM065List", commonCodes.get("FIM065")) // 민원 접수 구분 코드(CVLCPT_RCPT_SE_CD)
.addObject("cvlcptDscsn", json ? cvlcptDscsn : toJson(cvlcptDscsn)) .addObject("cvlcptDscsn", json ? cvlcptDscsn : toJson(cvlcptDscsn))
; ;
} }

@ -161,7 +161,7 @@
, NULL <!-- 납부자 번호 --> , NULL <!-- 납부자 번호 -->
</otherwise> </otherwise>
</choose> </choose>
, #{cvlcptDscsn.dscsnYmd} <!-- 상담 일자 --> , <include refid="utility.today" /> <!-- 상담 일자 -->
, ( CASE DAYOFWEEK(NOW()) , ( CASE DAYOFWEEK(NOW())
WHEN '1' THEN '일' WHEN '1' THEN '일'
WHEN '2' THEN '월' WHEN '2' THEN '월'
@ -184,7 +184,9 @@
<update id="updateCvlcptDscsn" parameterType="map">/* 민원 상담 내용 수정(cvlcptDscsnMapper.updateCvlcptDscsn) */ <update id="updateCvlcptDscsn" parameterType="map">/* 민원 상담 내용 수정(cvlcptDscsnMapper.updateCvlcptDscsn) */
UPDATE TB_CVLCPT_DSCSN UPDATE TB_CVLCPT_DSCSN
SET DSCSN_CN = #{cvlcptDscsn.dscsnCn} <!-- 상담 내용 --> SET CVLPR_NM = #{cvlcptDscsn.cvlprNm} <!-- 민원인 명 -->
, CVLPR_CTTPC = #{cvlcptDscsn.cvlprCttpc} <!-- 민원인 연락처 -->
, DSCSN_CN = #{cvlcptDscsn.dscsnCn} <!-- 상담 내용 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 --> , MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{cvlcptDscsn.modifiedBy} <!-- 수정자 --> , MDFR = #{cvlcptDscsn.modifiedBy} <!-- 수정자 -->
WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} <!-- 민원 상담 ID --> WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} <!-- 민원 상담 ID -->

@ -61,6 +61,9 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- -->
<div class="col-6">
</div>
<!-- 차량번호 --> <!-- 차량번호 -->
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title text-end">차량번호</label> <label class="form-label fw-bold form-search-title text-end">차량번호</label>
@ -73,7 +76,7 @@
</div> </div>
<!-- 민원인명 --> <!-- 민원인명 -->
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title text-end">상담민원인</label> <label class="form-label fw-bold form-search-title text-end">민원인</label>
<input type="text" class="form-control w-px-160" id="schCvlprNm--${pageName}" name="schCvlprNm"autocomplete="off" /> <input type="text" class="form-control w-px-160" id="schCvlprNm--${pageName}" name="schCvlprNm"autocomplete="off" />
</div> </div>
<!-- 동적검색 --> <!-- 동적검색 -->
@ -291,9 +294,33 @@
$("#btnRemove--${pageName}").prop("disabled", keys.length < 1); $("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
}; };
// 개별총정보 dialog // 민원상담 dialog
${pageName}Control.getInfo = (crdnId) => { ${pageName}Control.getInfo = (cvlcptDscsnId) => {
// if (typeof cvlcptDscsnId == "undefined" || cvlcptDscsnId == null || cvlcptDscsnId == "") {
return;
}
let params = {
callPurpose : "update"
, sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
, taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
, cvlcptDscsnId : cvlcptDscsnId
};
ajax.get({
url : wctx.url(params.taskSeCd + ${pageName}PrefixUrl + "/020/info.do")
, data : params || {}
, success : resp => {
dialog.open({
id : ${pageName}Control.prefixed("Dialog")
, title : ${pageName}Control.prefixName + " 수정"
, content : resp
, size : "lg"
, init : () => { }
, onClose : () => { ${pageName}Control.load(${pageName}Control.query.pageNum); } // callback 자료 재조회
});
}
});
} }
// 삭제 callback // 삭제 callback
@ -341,7 +368,7 @@
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, "${pageName}Control.setCurrent('" + dataItem.getValue("CVLCPT_DSCSN_ID") + "');") .replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("CVLCPT_DSCSN_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getInfo('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{ondblclick}/gi, "${pageName}Control.getInfo('" + dataItem.getValue("CVLCPT_DSCSN_ID") + "');")
); );
$("#tbody--${pageName}").html(trs.join()); $("#tbody--${pageName}").html(trs.join());
@ -471,7 +498,7 @@
// 수정 버튼 이벤트 // 수정 버튼 이벤트
fnUpdate${pageName} = () => { fnUpdate${pageName} = () => {
${pageName}Control.getInfo(${pageName}Control.dataset.getValue("CVLCPT_DSCSN_ID"));
} }
// 삭제 버튼 이벤트 // 삭제 버튼 이벤트

@ -30,6 +30,16 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 민원인명 -->
<div class="col-md-6">
<label for="cvlprNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">민원인명</label>
<input type="text" class="form-control w-px-160" id="cvlprNm--${pageName}" name="cvlprNm" data-map="CVLPR_NM" autocomplete="off" />
</div>
<!-- 민원인 연락처 -->
<div class="col-md-6">
<label for="cvlprCttpc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">연락처</label>
<input type="text" class="form-control w-px-160" id="cvlprCttpc--${pageName}" name="cvlprCttpc" data-map="CVLPR_CTTPC" autocomplete="off" />
</div>
<!-- 상담 내용 --> <!-- 상담 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="dscsnCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상담 내용</label> <label for="dscsnCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상담 내용</label>
@ -66,20 +76,23 @@
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
var ${pageName}Control = new DatasetControl({ var ${pageName}Control = new DatasetControl({
prefix : "cvlcptDscsnCn" prefix : "cvlcptDscsn"
, prefixName : "민원상담내용" , prefixName : "민원상담"
, keymapper : info => info ? info.CVLCPT_DSCSN_ID : "" , keymapper : info => info ? info.CVLCPT_DSCSN_ID : ""
, dataGetter : obj => obj.cvlcptDscsnCn , dataGetter : obj => obj.cvlcptDscsn
, urls : {
create : wctx.url(${pageName}PrefixUrl + "/020/create.do") // 등록
, update : wctx.url(${pageName}PrefixUrl + "/020/update.do") // 수정
}
}); });
${pageName}Control.onCurrentChange = item => { ${pageName}Control.onCurrentChange = item => {
// Dataset 셋팅 // Dataset 셋팅
${pageName}Fields.set(item); ${pageName}Fields.set(item);
// 민원상담을 등록시 접수구분을 선택할 수 있게 한다.
if (item.data.CVLCPT_DSCSN_ID == null || item.data.CVLCPT_DSCSN_ID == "") {
$("#cvlcptRcptSeCd--${pageName}").prop("disabled", false);
} else {
$("#cvlcptRcptSeCd--${pageName}").prop("disabled", true);
}
// 업무구분에 따른 url 변경 // 업무구분에 따른 url 변경
${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/create.do"); ${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/create.do");
${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/update.do"); ${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/update.do");
@ -118,13 +131,7 @@
**************************************************************************/ **************************************************************************/
// 검색조건 초기값 셋팅 // 검색조건 초기값 셋팅
initForm${pageName} = () => { initForm${pageName} = () => {
let initDataset = ${cvlcptDscsnCn};
$("#cvlcptRcptSeCd--${pageName}").prop("disabled", true);
if (initDataset.CVLCPT_DSCSN_ID == undefined || initDataset.CVLCPT_DSCSN_ID == null) {
$("#cvlcptRcptSeCd--${pageName}").prop("disabled", false);
}
} }
// 이벤트 설정 // 이벤트 설정
@ -159,8 +166,7 @@
initForm${pageName}(); initForm${pageName}();
// Data 셋팅 // Data 셋팅
${pageName}Control.setData([${cvlcptDscsnCn}]); ${pageName}Control.setData([${cvlcptDscsn}]);
}); });
// #sourceURL=sprt04020-info.jsp
</script> </script>

Loading…
Cancel
Save