From 9dde232153e6d0be2475604cd6f288f4af3d9bba Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 1 Sep 2023 17:32:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/web/Crdn02Controller.java | 35 +++++++++ .../xit/fims/crdn/web/Crdn03Controller.java | 27 +++++++ .../fims/cvlc/service/CrdnCvlcptService.java | 6 ++ .../service/bean/CrdnCvlcptServiceBean.java | 10 +++ .../xit/fims/cvlc/web/Cvlc02Controller.java | 18 +++++ .../cokr/xit/fims/task/web/DpvController.java | 35 +++------ .../cokr/xit/fims/task/web/PvsController.java | 39 +--------- .../mapper/fims/cvlc/crdnCvlcpt-mapper.xml | 1 + .../WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp | 78 +++++++++++++++++-- 9 files changed, 182 insertions(+), 67 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java index 012fb28b..771a7992 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java @@ -10,8 +10,10 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.dao.CrdnInfoMapper; import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnStngService; +import cokr.xit.foundation.data.DataObject; /**단속자료검사 서비스 웹 컨트롤러.
* {웹 컨텍스트}/crdn/crdn02 로 접근할 수 있다. @@ -36,6 +38,9 @@ public class Crdn02Controller extends ApplicationController { @Resource(name="crdnStngService") private CrdnStngService crdnStngService; + @Resource(name="crdnInfoMapper") + private CrdnInfoMapper crdnInfoMapper; + /** 단속 자료 검사 메인화면을 연다. * @return fims/crdn/crdn02010-main */ @@ -69,4 +74,34 @@ public class Crdn02Controller extends ApplicationController { setFetchSize(query); return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),""); } + + /**2시간 초과처리 팝업을 호출한다.
+ * @param crdnId 단속 ID + * @return crdn02050-info + */ + public ModelAndView getOverTimeInfo(String openerPageName, String savedCallbackFuncName, String crdnId) { + ModelAndView mav = new ModelAndView(); + mav.setViewName("fims/crdn/crdn02050-info"); + mav.addObject("pageName","crdn02050-info"); + + DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnId); + + mav.addObject("crdnInfo", toJson(crdnInfo)); + mav.addObject("openerPageName", openerPageName); + mav.addObject("savedCallbackFuncName", savedCallbackFuncName); + return mav; + } + + /**단속자료의 2시간 초과여부를 변경하고, 금액을 수정한다.
+ * @param chgAmtSe 금액 변경 구분, crdnId 단속 ID + * @return jsonView + *
 {
+	 *     "saved": 수정되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + public ModelAndView updateOverTimeInfo(String chgAmtSe, String crdnId) { + boolean saved = crdnService.updateOverTimeInfo(chgAmtSe, crdnId); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } } diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn03Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn03Controller.java index 21ac0ab1..22ed4058 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn03Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn03Controller.java @@ -9,6 +9,8 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; +import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnStngService; @@ -47,4 +49,29 @@ public class Crdn03Controller extends ApplicationController { return mav; } + /**표지정보미확인자료 목록을 조회한다.
+ * {@link CrdnService#getCrackdownList(CrdnQuery)} 참고 + * @param req 표지정보미확인자료 목록 조회 조건 + * @return jsonView + */ + public ModelAndView getTagInformationUndefinedDataList(CrdnQuery query) { + query.setGridType("tagInformationUndefinedData"); + setFetchSize(query); + return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),""); + } + + /**표지정보 미확인 자료를 수정한다. + * @param crdn 단속 대장 정보 + * @return jsonView + *
 {
+	 *     "saved": 수정되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + public ModelAndView updateTagInfo(Crdn crdn) { + + boolean saved = crdnService.updateTagInfo(crdn); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + } 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 f5c219be..6294f026 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java @@ -126,4 +126,10 @@ public interface CrdnCvlcptService { * @return 저장여부 */ boolean removeDmndDataInfo(String... indivIDs); + + /** 지정한 단속자료에 대해 표지정보조회 실행 후 장애인차량이 아닌 건은 서손 처리한다. + * @param crdnIDs 단속 ID 목록 + * @return 저장여부 + */ + boolean executeDisabledTagInfoInquire(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 02eebd9f..31f3d142 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 @@ -741,4 +741,14 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv return crdnCvlcptMainBean.removeDmndDataInfo(indivIDs); } + @Override + public boolean executeDisabledTagInfoInquire(String... crdnIDs) { + + // for + // TODO 연계 + // TODO 서손처리 + + return false; + } + } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc02Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc02Controller.java index 321b6db7..82acc23f 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc02Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc02Controller.java @@ -29,6 +29,7 @@ public class Cvlc02Controller extends ApplicationController { civilComplaintAnswerTargetDataMain = "/010/main.do", selectCivilComplaintAnswerTargetDataList = "/030/list.do", updateAnswerTargetProcessStatus = "/030/update.do", + executeDisabledTagInfoInquire = "/040/update.do", answerPreviewInfo = "/060/info.do", updateAnswerContent = "/060/update.do" ; @@ -123,4 +124,21 @@ public class Cvlc02Controller extends ApplicationController { return new ModelAndView("jsonView") .addObject("saved", saved); } + + /**지정한 단속자료에 대해 표지정보조회 실행 후 장애인차량이 아닌 건은 서손 처리한다. + * @param crdnIDs 단속ID 목록 + * @return jsonView + *
 {
+	 *     "affected": 저장된 정보수
+	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + public ModelAndView executeDisabledTagInfoInquire(String... crdnIDs) { + boolean saved = false; + + saved = crdnCvlcptService.executeDisabledTagInfoInquire(crdnIDs); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + } } diff --git a/src/main/java/cokr/xit/fims/task/web/DpvController.java b/src/main/java/cokr/xit/fims/task/web/DpvController.java index ba5bb5a9..7766dd2a 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -1,6 +1,5 @@ package cokr.xit.fims.task.web; -import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; @@ -10,7 +9,6 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; -import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.sprt.SprtQuery; @@ -101,6 +99,12 @@ public class DpvController { return super.updateAnswerTargetProcessStatus(processType, crdnIDs); } + @Override + @RequestMapping(name="장애인과태료업무 표지정보조회 실행", value=METHOD_URL.executeDisabledTagInfoInquire) + public ModelAndView executeDisabledTagInfoInquire(String... crdnIDs) { + return super.executeDisabledTagInfoInquire(crdnIDs); + } + } @Controller @@ -197,33 +201,16 @@ public class DpvController { @RequestMapping(name="장애인과태료업무 표지정보확인 업무", value=CLASS_URL+Crdn03Controller.CLASS_URL) class Crdn03Controller extends cokr.xit.fims.crdn.web.Crdn03Controller { - @Resource(name="crdnService") - private CrdnService crdnService; - - /**표지정보미확인자료 목록을 조회한다.
- * {@link CrdnService#getCrackdownList(CrdnQuery)} 참고 - * @param req 표지정보미확인자료 목록 조회 조건 - * @return jsonView - */ + @Override @RequestMapping(name="장애인과태료업무 표지정보미확인자료 목록", value=METHOD_URL.getTagInformationUndefinedDataList) public ModelAndView getTagInformationUndefinedDataList(CrdnQuery query) { - query.setGridType("tagInformationUndefinedData"); - setFetchSize(query); - return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),""); + return super.getTagInformationUndefinedDataList(query); } - /**표지정보 미확인 자료를 수정한다. - * @param crdn 단속 대장 정보 - * @return jsonView - *
 {
-		 *     "saved": 수정되었으면 true, 그렇지 않으면 false
-		 * }
- */ + @Override @RequestMapping(name = "표지정보 미확인 자료 수정", value=METHOD_URL.updateTagInfo) - public ModelAndView update(Crdn crdn) { - boolean saved = crdnService.updateTagInfo(crdn); - return new ModelAndView("jsonView") - .addObject("saved", saved); + public ModelAndView updateTagInfo(Crdn crdn) { + return super.updateTagInfo(crdn); } } diff --git a/src/main/java/cokr/xit/fims/task/web/PvsController.java b/src/main/java/cokr/xit/fims/task/web/PvsController.java index 142f1b1d..7c247947 100644 --- a/src/main/java/cokr/xit/fims/task/web/PvsController.java +++ b/src/main/java/cokr/xit/fims/task/web/PvsController.java @@ -1,6 +1,5 @@ package cokr.xit.fims.task.web; -import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; @@ -10,11 +9,8 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; -import cokr.xit.fims.crdn.dao.CrdnInfoMapper; -import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.sprt.SprtQuery; -import cokr.xit.foundation.data.DataObject; @Controller @@ -188,49 +184,22 @@ public class PvsController { @RequestMapping(name="주정차과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL) class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { - @Resource(name="crdnService") - private CrdnService crdnService; - - @Resource(name="crdnInfoMapper") - private CrdnInfoMapper crdnInfoMapper; - @Override @RequestMapping(name="주정차과태료업무 검사자료 목록 조회", value=METHOD_URL.getInspectionDataList) public ModelAndView getInspectionDataList(CrdnQuery query) { return super.getInspectionDataList(query); } - /**2시간 초과처리 팝업을 호출한다.
- * @param crdnId 단속 ID - * @return crdn02050-info - */ + @Override @RequestMapping(name="2시간 초과 처리 화면 호출", value=METHOD_URL.getOverTimeInfo) public ModelAndView getOverTimeInfo(String openerPageName, String savedCallbackFuncName, String crdnId) { - - ModelAndView mav = new ModelAndView(); - mav.setViewName("fims/crdn/crdn02050-info"); - mav.addObject("pageName","crdn02050-info"); - - DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnId); - - mav.addObject("crdnInfo", toJson(crdnInfo)); - mav.addObject("openerPageName", openerPageName); - mav.addObject("savedCallbackFuncName", savedCallbackFuncName); - return mav; + return super.getOverTimeInfo(openerPageName, savedCallbackFuncName, crdnId); } - /**단속자료의 2시간 초과여부를 변경하고, 금액을 수정한다.
- * @param chgAmtSe 금액 변경 구분, crdnId 단속 ID - * @return jsonView - *
 {
-		 *     "saved": 수정되었으면 true, 그렇지 않으면 false
-		 * }
- */ + @Override @RequestMapping(name = "2시간 초과 정보 수정", value=METHOD_URL.updateOverTimeInfo) public ModelAndView updateOverTimeInfo(String chgAmtSe, String crdnId) { - boolean saved = crdnService.updateOverTimeInfo(chgAmtSe, crdnId); - return new ModelAndView("jsonView") - .addObject("saved", saved); + return super.updateOverTimeInfo(chgAmtSe, crdnId); } } diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml index 9f19e966..1589461b 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml @@ -584,6 +584,7 @@ SELECT C.CRDN_ID THEN 'Y' ELSE 'N' END) AS COPY_EXIST_YN + , CC.CVLCPT_PRCS_CD FROM TB_CRDN C INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID) LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N') diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 9f264b43..fdd0c246 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -74,11 +74,23 @@ - - - - - + + + + + + + + @@ -284,8 +296,9 @@ $(document).ready(function(){ checkbox.prop("checked", keys.includes(checkbox.val())); }); - $("#btnAnswerExecute--${pageName}").prop("disabled", keys.length < 1); + $("#btnExecuteAnswer--${pageName}").prop("disabled", keys.length < 1); $("#btnAnswerComplete--${pageName}").prop("disabled", keys.length < 1); + $("#btnExecuteDisabledTagInfoInquire--${pageName}").prop("disabled", keys.length < 1); }; /************************************************************************** @@ -298,6 +311,13 @@ $(document).ready(function(){ } $P.fnResetAndChangeBiz = taskSeCd => { + var clsForTask = taskSeCd.toLowerCase(); + //업무별 버튼 + renderForTask("gridbuttonArea--${pageName}", clsForTask); + //버튼 이벤트 재매핑 + $("#btnExecuteDisabledTagInfoInquire--${pageName}").off("click"); + $("#btnExecuteDisabledTagInfoInquire--${pageName}").on("click", () => $P.fnExecuteDisabledTagInfoInquire()); + $P.fnReset(); $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc02/030/list.do"); $P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do"); @@ -492,7 +512,7 @@ $(document).ready(function(){ }); } - $P.fnAnswerExecute = () => { + $P.fnExecuteAnswer = () => { var count = $P.crdnControl.dataset.getKeys("selected").length; @@ -516,6 +536,47 @@ $(document).ready(function(){ }); } + //표지정보 조회 + $P.fnExecuteDisabledTagInfoInquire = () => { + + var keys = []; + + var selected = $P.crdnControl.dataset.getDataset("selected"); + + for(var i=0; i < selected.length; i++){ + if(selected[i].CVLCPT_PRCS_CD == "02"){ + keys.push(selected[i].CRDN_ID); + } + } + + if(keys.length == 0){ + dialog.alert("표지조회는 부과대상자료만 가능합니다.
선택된 자료 중에 부과대상자료가 없습니다."); + return; + } + + var message = "※표지정보 조회 후 장애인차량이 아닌 자료는 서손처리 됩니다." + +"
※현재 날짜("+dateFormat.format(new Date())+")를 기준으로 차량번호로 조회합니다." + +"
표지조회를 실행하시겠습니까?" + +"
부과대상 자료 : "+keys.length+"건"; + + dialog.alert({ + content : message, + onOK : () => { + ajax.get({ + url : wctx.url("/DPV/cvlc/cvlc02/040/update.do"), + data : { + "crdnIDs" : keys.join(",") + }, + success : resp => { + + dialog.alert("표지정보조회가 실행되었습니다."); + + } + }); + } + }); + } + $P.provide = { "getCountStatus" : function(currentKey){ var ds = $P.crdnControl.dataset.getDataset(); @@ -555,8 +616,9 @@ $(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", () => $P.fnAnswerExecute()); + $("#btnExecuteAnswer--${pageName}").on("click", () => $P.fnExecuteAnswer()); $("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete()); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /**************************************************************************