From bfc371546b1680ec993bcc6e03adc1e3d84d4587 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 11 Aug 2023 17:36:52 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fims/crdn/service/CrdnCvlcptService.java | 6 ++++ .../service/bean/CrdnCvlcptServiceBean.java | 28 +++++++++++++++++++ .../crdn/service/bean/CrdnServiceBean.java | 6 ---- .../xit/fims/crdn/web/Crdn01Controller.java | 12 ++++---- .../mapper/fims/crdn/crdnCvlcpt-mapper.xml | 10 ++++--- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnCvlcptService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnCvlcptService.java index 0740deab..ab7e60f1 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnCvlcptService.java @@ -10,6 +10,12 @@ import cokr.xit.foundation.data.DataObject; public interface CrdnCvlcptService { + /** 민원 목록을 조회한다. + * @param crdnQuery 조회 요청 + * @return 민원 목록 + */ + List getCrackdownList(CrdnQuery crdnQuery); + /** 민원 원본 상세정보를 조회한다. * @param crdnQuery 조회 요청 * @return 민원원본정보 diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnCvlcptServiceBean.java index cb00e9b9..69efe843 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnCvlcptServiceBean.java @@ -23,6 +23,8 @@ import cokr.xit.fims.cmmn.hwp.InsertingImageCell; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnCvlcpt; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.dao.Crdn05Mapper; +import cokr.xit.fims.crdn.dao.Crdn06Mapper; import cokr.xit.fims.crdn.dao.CrdnCvlcptMapper; import cokr.xit.fims.crdn.service.CrdnCvlcptService; import cokr.xit.fims.sprt.Sprt; @@ -45,6 +47,31 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv @Resource(name = "crdnCvlcptMapper") private CrdnCvlcptMapper crdnCvlcptMapper; + @Resource(name="crdn05Mapper") + protected Crdn05Mapper crdn05Mapper; + + @Resource(name="crdn06Mapper") + protected Crdn06Mapper crdn06Mapper; + + @Override + public List getCrackdownList(CrdnQuery crdnQuery) { + List dataObjectList = new ArrayList(); + switch (ifEmpty(crdnQuery.getGridType(), () -> "")) { + case "receiptData": + dataObjectList = crdnCvlcptMapper.selectCivilComplaintReceiptDataList(crdnQuery.setOrderBy("CVLCPT_RCPT_YMD")); + break; + case "answerTargetData": + dataObjectList = crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList(crdnQuery.setOrderBy("CRDN_ID")); + break; + default: + dataObjectList = crdnCvlcptMapper.selectCivilComplaintList(crdnQuery.setOrderBy("CRDN_ID")); + break; + } + + + return dataObjectList; + } + @Override public Map makeFileFromHwpFormat(CrdnQuery crdnQuery) { String baseFormatFilePath = ("classpath:format/cvlcptOrgnl_text.hwp"); @@ -257,4 +284,5 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv return saved; } + } 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 cc2b9563..eae34cbf 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 @@ -76,12 +76,6 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService case "sameVehicleSub": dataObjectList = crdn06Mapper.selectSameVehicleSubList(req.setOrderBy("CRDN_ID")); break; - case "receiptData": - dataObjectList = crdnCvlcptMapper.selectCivilComplaintReceiptDataList(req.setOrderBy("CVLCPT_RCPT_YMD")); - break; - case "answerTargetData": - dataObjectList = crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList(req.setOrderBy("CRDN_ID")); - break; case "todayInsert": req.setCurrentUserId(currentUser().getId()); req.setOrderBy("CRDN_ID"); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index f0007245..ea1babad 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -120,7 +120,7 @@ public class Crdn01Controller extends ApplicationController { public ModelAndView getCivilComplaintReceiptDataList(CrdnQuery req) { req.setGridType("receiptData"); setFetchSize(req); - return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(req),""); + return setCollectionInfo(new ModelAndView("jsonView"), crdnCvlcptService.getCrackdownList(req),""); } /**민원접수 초기자료 상세조회 팝업 화면을 연다.
@@ -193,7 +193,7 @@ public class Crdn01Controller extends ApplicationController { public ModelAndView selectCivilComplaintAnswerTargetDataList(CrdnQuery req) { req.setGridType("answerTargetData"); setFetchSize(req); - return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(req), ""); + return setCollectionInfo(new ModelAndView("jsonView"), crdnCvlcptService.getCrackdownList(req), ""); } /**민원자료 목록을 조회한다.
@@ -210,7 +210,7 @@ public class Crdn01Controller extends ApplicationController { @RequestMapping(name="민원자료 목록", value="/040/list.do") public ModelAndView getCivilComplaintList(CrdnQuery req) { setFetchSize(req); - return setCollectionInfo(new ModelAndView("jsonView"),crdnService.getCrackdownList(req),""); + return setCollectionInfo(new ModelAndView("jsonView"),crdnCvlcptService.getCrackdownList(req),""); } /**지정한 민원자료를 제거한다. @@ -230,7 +230,7 @@ public class Crdn01Controller extends ApplicationController { .addObject("saved", saved); } - /**지정한 민원자료의 부과요청을 수용(저장)한다. + /**지정한 민원자료를 수정한다. * @param crdnId 단속대장 아이디 * @return jsonView *
 {
@@ -238,8 +238,8 @@ public class Crdn01Controller extends ApplicationController {
 	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
 	 * }
*/ - @RequestMapping(name="민원내용 수용", value="/020/save.do") - public ModelAndView acceptCivilComplaint(HttpServletRequest req, Crdn crdn, MultipartFile[] newFileList, MultipartFile[] modifyFileList) { + @RequestMapping(name="민원 정보 수정", value="/020/save.do") + public ModelAndView saveCivilComplaintProcess(HttpServletRequest req, Crdn crdn, MultipartFile[] newFileList, MultipartFile[] modifyFileList) { boolean saved = false; diff --git a/src/main/resources/sql/mapper/fims/crdn/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdnCvlcpt-mapper.xml index 44379638..e787f903 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdnCvlcpt-mapper.xml @@ -413,7 +413,7 @@ INSERT INTO TB_CRDN_CVLCPT ( WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} /* 연계 ID */ - + /* 단속정보 수정(crdnCvlcptMapper.updateCrdn) */ UPDATE TB_CRDN SET MDFCN_DT = /* 수정일시 */ @@ -430,15 +430,17 @@ INSERT INTO TB_CRDN_CVLCPT ( , VHCL_NM = #{crdn.vhclNm} /* 차량 명 */ , VHCL_COLOR = #{crdn.vhclColor} /* 차량 색상 */ , ETC_CN = #{crdn.etcCn} /* 기타 내용 */ + , FFNLG_AMT = #{crdn.ffnlgAmt} /* 과태료 금액 */ , LEVY_AMT = #{crdn.levyAmt} /* 부과 금액 */ , FFNLG_RDUCT_RT = #{crdn.ffnlgRductRt} /* 과태료 감경 율 */ , ADVNTCE_LEVY_AMT = #{crdn.advntceLevyAmt} /* 사전통지 부과 금액 */ - - , CRDN_STTS_CD = #{crdnSttsCd} /* 단속 상태 코드 */ + + + , CRDN_STTS_CD = #{crdn.crdnSttsCd} /* 단속 상태 코드 */ , CRDN_STTS_CHG_DT = /* 단속 상태 변경 일시 */ - WHERE CRDN_ID = #{crdnId} /* 단속 ID */ + WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */ \ No newline at end of file