From 1edb612699a58d37e0ee41a0c468b6bd9e90c90a Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 26 Jan 2024 15:22:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=EC=83=81=EB=8B=B4=EB=82=B4?= =?UTF-8?q?=EC=97=AD=20=EA=B1=B4=EC=88=98=20=EC=A1=B0=ED=9A=8C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/sprt/CvlcptDscsn.java | 2 +- .../xit/fims/sprt/dao/CvlcptDscsnMapper.java | 6 + .../xit/fims/sprt/service/Sprt04Service.java | 6 + .../fims/sprt/service/bean/Sprt04Bean.java | 12 + .../sprt/service/bean/Sprt04ServiceBean.java | 5 + .../xit/fims/sprt/web/Sprt04Controller.java | 18 ++ .../mapper/fims/sprt/cvlcptDscsn-mapper.xml | 261 ++++++++++-------- 7 files changed, 187 insertions(+), 123 deletions(-) diff --git a/src/main/java/cokr/xit/fims/sprt/CvlcptDscsn.java b/src/main/java/cokr/xit/fims/sprt/CvlcptDscsn.java index 9d53a346..89c16cad 100644 --- a/src/main/java/cokr/xit/fims/sprt/CvlcptDscsn.java +++ b/src/main/java/cokr/xit/fims/sprt/CvlcptDscsn.java @@ -75,7 +75,7 @@ public class CvlcptDscsn extends AbstractEntity { /** * 삭제 여부 */ - private String delYn; + private String delYN; /** * 삭제 사유 diff --git a/src/main/java/cokr/xit/fims/sprt/dao/CvlcptDscsnMapper.java b/src/main/java/cokr/xit/fims/sprt/dao/CvlcptDscsnMapper.java index 5c4b3b54..4dee0886 100644 --- a/src/main/java/cokr/xit/fims/sprt/dao/CvlcptDscsnMapper.java +++ b/src/main/java/cokr/xit/fims/sprt/dao/CvlcptDscsnMapper.java @@ -35,6 +35,12 @@ public interface CvlcptDscsnMapper extends AbstractMapper { */ List selectCvlcptDscsns(CvlcptDscsnQuery req); + /**지정한 조건에 따라 민원 상담 내용 건수를 반환한다. + * @param req 민원 상담 내용 조회 조건 + * @return 민원 상담 내용 객체 목록 + */ + DataObject selectCvlcptDscsnNocs(CvlcptDscsnQuery req); + /**지정한 조건에 따라 민원 상담 내용 대장 객체의 마지막 1개를 반환한다. * @param cvlcptDscsnId 민원 상담 ID * @return 민원 상담 내용 대장 객체 diff --git a/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java b/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java index 5a172de7..a96549d1 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java +++ b/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java @@ -30,6 +30,12 @@ public interface Sprt04Service { */ List getCvlcptDscsns(CvlcptDscsnQuery req); + /**지정한 조건에 따라 민원 상담 내용 건수를 반환한다. + * @param req 민원 상담 내용 조회 조건 + * @return 민원 상담 내용 객체 목록 + */ + DataObject getCvlcptDscsnNocs(CvlcptDscsnQuery req); + /**지정한 조건에 따라 민원 상담 내용을 반환한다.
* @param cvlcptDscsnId 민원 상담 ID * @return 부과제외 정보 diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java index 8b5bc202..d032b73d 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java @@ -56,6 +56,18 @@ public class Sprt04Bean extends AbstractComponent { return cvlcptDscsnMapper.selectCvlcptDscsns(req); } + /**지정한 조건에 따라 민원 상담 내용 건수를 반환한다. + * @param req 민원 상담 내용 조회 조건 + * @return 민원 상담 내용 객체 목록 + */ + public DataObject getCvlcptDscsnNocs(CvlcptDscsnQuery req) { + if (req.getOrderBy() == null) { + req.setOrderBy("CD.CVLCPT_DSCSN_ID DESC"); + } + + return cvlcptDscsnMapper.selectCvlcptDscsnNocs(req); + } + /**지정한 민원 상담 ID의 민원 상담 내용 정보를 반환한다.
* @param cvlcptDscsnId 민원 상담 ID * @return 민원 상담 내용 정보 diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java index 0995423d..203b707b 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java @@ -39,6 +39,11 @@ public class Sprt04ServiceBean extends AbstractServiceBean implements Sprt04Serv return sprt04Bean.getCvlcptDscsns(req); } + @Override + public DataObject getCvlcptDscsnNocs(CvlcptDscsnQuery req) { + return sprt04Bean.getCvlcptDscsnNocs(req); + } + @Override public DataObject getCvlcptDscsnInfo(CvlcptDscsnQuery req) { if (req.getCvlcptDscsnId() != null) { diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java index 6b881660..4dcb6616 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java @@ -142,6 +142,24 @@ public class Sprt04Controller extends ApplicationController { } } + /**민원 상담 내용 건수를 조회하여 반환한다.
+ * {@link CvlcptDscsnService#getCvlcptDscsnList(CvlcptDscsnQuery)} 참고 + * @param req 민원 상담 내용 조회 조건 + * @return jsonView + *
{
+	 *     "cvlcptDscsnInfo": 민원 상담 정보
+	 * }
+ */ + public ModelAndView getCvlcptDscsnNocs(CvlcptDscsnQuery req) { + // + DataObject result = sprt04Service.getCvlcptDscsnNocs(req); + + boolean json = jsonResponse(); + + return new ModelAndView("jsonView") + .addObject("cvlcptDscsnNocs", json ? result : toJson(result)); + } + /**지정한 ID의 민원 상담 정보(info)를 반환한다. * @param SprtQuery req * @return fims/sprt/sprt04020-info 또는 jsonView diff --git a/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsn-mapper.xml b/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsn-mapper.xml index b631b0f7..413248bd 100644 --- a/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsn-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsn-mapper.xml @@ -8,79 +8,79 @@ ============================ --> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - SELECT CD.CVLCPT_DSCSN_ID - , CD.SGG_CD - , CD.TASK_SE_CD - , CD.CVLCPT_RCPT_SE_CD - , (SELECT GET_CODE_NM('FIM065', CD.CVLCPT_RCPT_SE_CD) FROM DUAL) AS CVLCPT_RCPT_SE_NM - , CD.CRDN_ID - , CD.VHRNO - , CD.RTPYR_NO - , CD.DSCSN_YMD - , CD.WEEK_NM - , CD.CVLPR_NM - , CD.CVLPR_CTTPC - , CD.DSCSN_CN - , CD.DEL_YN - , CD.REG_DT - , CD.RGTR - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.RGTR) AS RGTR_NM - , CD.MDFCN_DT - , CD.MDFR - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.MDFR) AS MDFR_NM - , CD.DEL_DT - , CD.DLTR - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.DLTR) AS DLTR_NM - , CD.DEL_RSN + SELECT CD.CVLCPT_DSCSN_ID + , CD.SGG_CD + , CD.TASK_SE_CD + , CD.CVLCPT_RCPT_SE_CD + , CD.CRDN_ID + , CD.VHRNO + , CD.RTPYR_NO + , CD.DSCSN_YMD + , CD.WEEK_NM + , CD.CVLPR_NM + , CD.CVLPR_CTTPC + , CD.DSCSN_CN + , CD.DEL_YN + , CD.REG_DT + , CD.RGTR + , CD.MDFCN_DT + , CD.MDFR + , CD.DEL_DT + , CD.DLTR + , CD.DEL_RSN + , (SELECT GET_CODE_NM('FIM065', CD.CVLCPT_RCPT_SE_CD) FROM DUAL) AS CVLCPT_RCPT_SE_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.RGTR) AS RGTR_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.MDFR) AS MDFR_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CD.DLTR) AS DLTR_NM FROM TB_CVLCPT_DSCSN CD @@ -89,32 +89,49 @@ - AND CD.CVLCPT_DSCSN_ID = #{cvlcptDscsnId} + AND CD.CVLCPT_DSCSN_ID = #{cvlcptDscsnId} - AND (CD.CRDN_ID = #{crdnId} OR CD.VHRNO = #{vhrno} OR CD.RTPYR_NO = #{rtpyrNo}) + AND (CD.CRDN_ID = #{crdnId} OR CD.VHRNO = #{vhrno} OR CD.RTPYR_NO = #{rtpyrNo}) - AND (CD.CRDN_ID = #{crdnId} OR CD.VHRNO = #{vhrno}) + AND (CD.CRDN_ID = #{crdnId} OR CD.VHRNO = #{vhrno}) - AND CD.CRDN_ID = #{crdnId} + AND CD.CRDN_ID = #{crdnId} - AND CD.VHRNO = #{vhrno} + AND CD.VHRNO = #{vhrno} - AND CD.RTPYR_NO = #{rtpyrNo} + AND CD.RTPYR_NO = #{rtpyrNo} - AND CD.DEL_YN = 'N' + AND CD.DEL_YN = 'N' + + /* 민원 상담 내용 등록(cvlcptDscsnMapper.insertCvlcptDscsn) */ SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CVLCPT_DSCSN_ID, 5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID @@ -123,45 +140,45 @@ INSERT INTO TB_CVLCPT_DSCSN ( - CVLCPT_DSCSN_ID - , SGG_CD - , TASK_SE_CD - , CVLCPT_RCPT_SE_CD - , CRDN_ID - , VHRNO - , RTPYR_NO - , DSCSN_YMD - , WEEK_NM - , CVLPR_NM - , CVLPR_CTTPC - , DSCSN_CN - , DEL_YN - , REG_DT - , RGTR - , MDFCN_DT - , MDFR + CVLCPT_DSCSN_ID + , SGG_CD + , TASK_SE_CD + , CVLCPT_RCPT_SE_CD + , CRDN_ID + , VHRNO + , RTPYR_NO + , DSCSN_YMD + , WEEK_NM + , CVLPR_NM + , CVLPR_CTTPC + , DSCSN_CN + , DEL_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR ) VALUES ( - #{cvlcptDscsn.cvlcptDscsnId} - , #{cvlcptDscsn.sggCd} - , #{cvlcptDscsn.taskSeCd} - , #{cvlcptDscsn.cvlcptRcptSeCd} - , #{cvlcptDscsn.crdnId} + #{cvlcptDscsn.cvlcptDscsnId} + , #{cvlcptDscsn.sggCd} + , #{cvlcptDscsn.taskSeCd} + , #{cvlcptDscsn.cvlcptRcptSeCd} + , #{cvlcptDscsn.crdnId} - , #{cvlcptDscsn.vhrno} - , NULL + , #{cvlcptDscsn.vhrno} + , NULL - , NULL - , #{cvlcptDscsn.rtpyrNo} + , NULL + , #{cvlcptDscsn.rtpyrNo} - , NULL - , NULL + , NULL + , NULL - , + , , ( CASE DAYOFWEEK(NOW()) WHEN '1' THEN '일' WHEN '2' THEN '월' @@ -170,55 +187,55 @@ WHEN '5' THEN '목' WHEN '6' THEN '금' WHEN '7' THEN '토' - END ) - , #{cvlcptDscsn.cvlprNm} - , #{cvlcptDscsn.cvlprCttpc} - , #{cvlcptDscsn.dscsnCn} - , 'N' - , - , #{cvlcptDscsn.createdBy} - , - , #{cvlcptDscsn.modifiedBy} + END ) + , #{cvlcptDscsn.cvlprNm} + , #{cvlcptDscsn.cvlprCttpc} + , #{cvlcptDscsn.dscsnCn} + , 'N' + , + , #{cvlcptDscsn.createdBy} + , + , #{cvlcptDscsn.modifiedBy} ) /* 민원 상담 내용 수정(cvlcptDscsnMapper.updateCvlcptDscsn) */ UPDATE TB_CVLCPT_DSCSN - SET CVLPR_NM = #{cvlcptDscsn.cvlprNm} - , CVLPR_CTTPC = #{cvlcptDscsn.cvlprCttpc} - , DSCSN_CN = #{cvlcptDscsn.dscsnCn} - , MDFCN_DT = - , MDFR = #{cvlcptDscsn.modifiedBy} - WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} - AND DEL_YN = 'N' + SET CVLPR_NM = #{cvlcptDscsn.cvlprNm} + , CVLPR_CTTPC = #{cvlcptDscsn.cvlprCttpc} + , DSCSN_CN = #{cvlcptDscsn.dscsnCn} + , MDFCN_DT = + , MDFR = #{cvlcptDscsn.modifiedBy} + WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} + AND DEL_YN = 'N' /* 민원 상담 내용 삭제(cvlcptDscsnMapper.deleteCvlcptDscsn) */ UPDATE TB_CVLCPT_DSCSN - SET DEL_YN = 'Y' - , DEL_DT = - , DLTR = #{cvlcptDscsn.modifiedBy} - , DEL_RSN = #{cvlcptDscsn.delRsn} - WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} - AND DEL_YN = 'N' + SET DEL_YN = 'Y' + , DEL_DT = + , DLTR = #{cvlcptDscsn.modifiedBy} + , DEL_RSN = #{cvlcptDscsn.delRsn} + WHERE CVLCPT_DSCSN_ID = #{cvlcptDscsn.cvlcptDscsnId} + AND DEL_YN = 'N'