diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index 2b6addbb..2a105974 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -174,6 +174,12 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService //if(!ifEmpty(crdn.getTeamId(), () -> "").equals("")) { //} + + //TODO : 입력파라미터에 납부자ID가 없고, 납부자명이 있을때 납부자 신규등록 + //TODO : 납부자정보의 납부자ID와 입력파라미터의 납부자ID가 동일하고, 납부자명이 다를때 납부자 신규등록 + //TODO : 납부자정보ID,납부자명이 동일하고, 주소가 다를 때 주소업데이트 + + if(ifEmpty(crdn.getCrdnSttsCd(), () -> "").equals("")){ if(!ifEmpty(crdn.getRtpyrId(), () -> "").equals("")) { crdn.setCrdnSttsCd("21"); diff --git a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java index 2217e5b8..ee2aa381 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java @@ -62,4 +62,10 @@ public interface CrdnCvlcptService { */ boolean updateAnswerContent(CrdnCvlcpt crdnCvlcpt); + /** 민원답변대상의 처리 상태를 변경한다. + * @param processType 처리 유형, crdnIDs 단속ID목록 + * @return 저장여부 + */ + boolean updateAnswerTargetProcessStatus(String processType, String[] crdnIDs); + } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java index f1b8c61b..3178930d 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java @@ -555,4 +555,18 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv } + @Override + public boolean updateAnswerTargetProcessStatus(String processType, String[] crdnIDs) { + + if(processType.equals("answerExecute")) { + // TODO : 답변완료실행 + } else if(processType.equals("answerComplete")) { + // TODO : 답변완료 + } else { + return false; + } + + return true; + } + } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java index 8e073157..ac84167e 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java @@ -361,4 +361,23 @@ public class Cvlc01Controller extends ApplicationController { .addObject("saved", saved); } + /**민원 답변 대상 자료의 처리 상태를 변경한다. + * @param crdnCvlcpt 단속민원 정보 + * @return jsonView + *
{
+ * "affected": 저장된 정보수
+ * "saved": 저장되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ @RequestMapping(name="답변 내용 저장", value="/030/update.do")
+ public ModelAndView updateAnswerTargetProcessStatus(String processType, String... crdnIDs) {
+
+ boolean saved = false;
+
+ saved = crdnCvlcptService.updateAnswerTargetProcessStatus(processType, crdnIDs);
+
+ return new ModelAndView("jsonView")
+ .addObject("saved", saved);
+ }
+
}
diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp
index 648bbb48..6b123689 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp
@@ -197,6 +197,25 @@ $(document).ready(function(){
$P.crdnControl.beforeCurrent = null;
$P.crdnControl.tableRenderComplete = false;
+ $P.crdnControl.save = (processType) => {
+
+ var keyArr = $P.crdnControl.dataset.getKeys("selected");
+
+ ajax.post({
+ url : $P.crdnControl.urls.update,
+ data : {
+ "processType" : processType,
+ "crdnIDs" : $P.crdnControl.dataset.getKeys("selected")
+ },
+ success : resp => {
+ if(resp.saved){
+ dialog.alert({ content : "저장됐습니다." });
+ $P.refreshCrdnList();
+ }
+ }
+ });
+ }
+
/**************************************************************************
* DatasetControl.on
**************************************************************************/
@@ -281,7 +300,7 @@ $(document).ready(function(){
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/030/list.do");
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt01/020/info.do");
- $P.crdnControl.urls.update = wctx.url("/"+taskSeCd+"/sprt/cvlc01/030/update.do");
+ $P.crdnControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/030/update.do");
}
$P.refreshCrdnList = () => {
@@ -458,6 +477,30 @@ $(document).ready(function(){
});
}
+ $P.fnAnswerExcute = () => {
+
+ var count = $P.crdnControl.dataset.getKeys("selected").length;
+
+ dialog.alert({
+ content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?"
+ , onOK : () => {
+ $P.crdnControl.save('answerExcute');
+ }
+ });
+ }
+
+ $P.fnAnswerComplete = () => {
+
+ var count = $P.crdnControl.dataset.getKeys("selected").length;
+
+ dialog.alert({
+ content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?"
+ , onOK : () => {
+ $P.crdnControl.save('answerComplete');
+ }
+ });
+ }
+
$P.provide = {
"getCountStatus" : function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
@@ -497,8 +540,8 @@ $(document).ready(function(){
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
$("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview());
- $("#btnAnswerExecute--${pageName}").on("click", () => {});
- $("#btnAnswerComplete--${pageName}").on("click", () => {});
+ $("#btnAnswerExecute--${pageName}").on("click", () => $P.fnAnswerExcute());
+ $("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
/**************************************************************************