From ea8ce1e498bfedb1badb8c86c60f321bbfa29d3b Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 31 Aug 2023 15:25:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=88=EC=98=AC=EC=9A=94=EC=B2=AD=EC=9E=90?= =?UTF-8?q?=EB=A3=8C=20=EB=93=B1=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=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/cvlc/CrdnCvlcpt.java | 15 ++ .../cvlc/dao/SaCvlcptIndviDmndMapper.java | 7 + .../fims/cvlc/service/CrdnCvlcptService.java | 8 +- .../cvlc/service/bean/CrdnCvlcptMainBean.java | 12 + .../service/bean/CrdnCvlcptServiceBean.java | 5 + .../xit/fims/cvlc/web/Cvlc04Controller.java | 25 +- .../cokr/xit/fims/task/web/BpvController.java | 6 + .../cokr/xit/fims/task/web/DpvController.java | 6 + .../cokr/xit/fims/task/web/EcaController.java | 6 + .../cokr/xit/fims/task/web/PvsController.java | 6 + .../fims/cvlc/saCvlcptIndviDmnd-mapper.xml | 56 ++++- .../WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp | 226 ++++++++++-------- 12 files changed, 263 insertions(+), 115 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java b/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java index de8b7931..acff5da6 100644 --- a/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java +++ b/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java @@ -203,4 +203,19 @@ public class CrdnCvlcpt extends AbstractEntity { */ private java.lang.String mailCn; + /** + * 개별 ID + */ + private java.lang.String indivId; + + /** + * 요청 일자 + */ + private java.lang.String rcptYmd; + + /** + * 게시물 번호 + */ + private java.lang.String pstNo; + } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/cvlc/dao/SaCvlcptIndviDmndMapper.java b/src/main/java/cokr/xit/fims/cvlc/dao/SaCvlcptIndviDmndMapper.java index ce6921fd..1da66e29 100644 --- a/src/main/java/cokr/xit/fims/cvlc/dao/SaCvlcptIndviDmndMapper.java +++ b/src/main/java/cokr/xit/fims/cvlc/dao/SaCvlcptIndviDmndMapper.java @@ -5,6 +5,7 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; @@ -20,4 +21,10 @@ public interface SaCvlcptIndviDmndMapper extends AbstractMapper { */ List selectDmndDataList(CrdnQuery query); + /** 새올 요청자료를 등록한다. + * @param crdnCvlcpt 새올 요청자료 정보 + * @return 저장된 정보 수 + */ + int insertDmndDataInfo(CrdnCvlcpt crdnCvlcpt); + } 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 5241ad67..fa0c6edf 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java @@ -83,7 +83,7 @@ public interface CrdnCvlcptService { *
  • nonlevyCaseList:
  • * */ - Map getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery); + Map getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery); /** 민원답변 문구 설정 정보를 저장한다. * @param saveData 저장 자료 구분, crdnCvlcpt 민원 답변 문구 설정 @@ -115,4 +115,10 @@ public interface CrdnCvlcptService { */ List getDmndDataList(CrdnQuery query); + /** 새올 요청자료를 생성한다. + * @param crdnCvlcpt 새올요청자료 정보 + * @return 저장여부 + */ + boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt); + } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptMainBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptMainBean.java index 7804c61d..cc50acb8 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptMainBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptMainBean.java @@ -327,7 +327,19 @@ public class CrdnCvlcptMainBean extends AbstractComponent { * @return 새올 요청 자료 목록 */ public List selectDmndDataList(CrdnQuery query) { + query.setOrderBy("INDIV_ID"); return saCvlcptIndviDmndMapper.selectDmndDataList(query); } + /**새올 요청 자료를 생성한다. + * @param crdnCvlcpt 새올요청자료 정보 + * @return 저장 여부 + *
    • 저장됐으면 true
    • + *
    • 그렇지 않으면 false
    • + *
    + */ + public boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return saCvlcptIndviDmndMapper.insertDmndDataInfo(crdnCvlcpt) == 1 ? true : false; + } + } 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 ceda5a3b..77c26bc2 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 @@ -732,4 +732,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv return crdnCvlcptMainBean.selectDmndDataList(query); } + @Override + public boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return crdnCvlcptMainBean.createDmndDataInfo(crdnCvlcpt); + } + } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc04Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc04Controller.java index ef3418fb..dc2f1eab 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc04Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc04Controller.java @@ -12,6 +12,7 @@ import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.service.CrdnService; +import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.service.CrdnCvlcptService; /**민원 개별 등록 서비스 웹 컨트롤러.
    @@ -24,7 +25,9 @@ public class Cvlc04Controller extends ApplicationController { public class METHOD_URL { public static final String - getDmndDataList = "/010/list.do"; + getDmndDataList = "/010/list.do", + createDmndDataInfo = "/010/create.do" + ; } @Resource(name="crdnService") @@ -65,4 +68,24 @@ public class Cvlc04Controller extends ApplicationController { } + /** 새올 요청자료를 생성한다. + * {@link CrdnCvlcService#createDmndDataInfo(crdnCvlcpt)} 참고 + * @param crdnCvlcpt 새올요청자료 정보 + * @return jsonView + *
     {
    +	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
    +	 * }
    + */ + public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + + crdnCvlcpt.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); + + boolean saved = false; + + saved = crdnCvlcptService.createDmndDataInfo(crdnCvlcpt); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + + } } diff --git a/src/main/java/cokr/xit/fims/task/web/BpvController.java b/src/main/java/cokr/xit/fims/task/web/BpvController.java index 6f9aa2e6..f26a95d7 100644 --- a/src/main/java/cokr/xit/fims/task/web/BpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/BpvController.java @@ -124,6 +124,12 @@ public class BpvController { return super.getDmndDataList(query); } + @Override + @RequestMapping(name="전용차로과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo) + public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return super.createDmndDataInfo(crdnCvlcpt); + } + } @Controller 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 ff9c67f1..ae071f70 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -126,6 +126,12 @@ public class DpvController { return super.getDmndDataList(query); } + @Override + @RequestMapping(name="장애인과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo) + public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return super.createDmndDataInfo(crdnCvlcpt); + } + } @Controller diff --git a/src/main/java/cokr/xit/fims/task/web/EcaController.java b/src/main/java/cokr/xit/fims/task/web/EcaController.java index eae18aba..f32a2756 100644 --- a/src/main/java/cokr/xit/fims/task/web/EcaController.java +++ b/src/main/java/cokr/xit/fims/task/web/EcaController.java @@ -124,6 +124,12 @@ public class EcaController { return super.getDmndDataList(query); } + @Override + @RequestMapping(name="전기차과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo) + public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return super.createDmndDataInfo(crdnCvlcpt); + } + } @Controller 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 3a9500e8..040427a4 100644 --- a/src/main/java/cokr/xit/fims/task/web/PvsController.java +++ b/src/main/java/cokr/xit/fims/task/web/PvsController.java @@ -129,6 +129,12 @@ public class PvsController { return super.getDmndDataList(query); } + @Override + @RequestMapping(name="주정차과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo) + public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) { + return super.createDmndDataInfo(crdnCvlcpt); + } + } @Controller diff --git a/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml index 6ddcb0fe..ba26575b 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml @@ -5,18 +5,19 @@ + + +SELECT + CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0')) + AS NEW_ID +FROM TB_SA_CVLCPT_INDIV_DMND + +/* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */ +INSERT + INTO TB_SA_CVLCPT_INDIV_DMND ( + INDIV_ID + , SGG_CD + , RCPT_YMD + , PST_NO + , DMND_YMD + , DMND_SE_CD + , STTS_CD + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + ) + VALUES ( + #{indivId} + , #{sggCd} + , REPLACE(#{rcptYmd},'-','') + , LPAD(#{pstNo}, 6, '0') + , + , '1' + , '0' + , + , #{modifiedBy} + , + , #{modifiedBy} + ) + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 20f6ef55..67d60156 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -51,13 +51,13 @@
    - -
      +
    - @@ -73,7 +73,7 @@ style="overflow-x: scroll;height:550px;overflow-y: scroll;"> - + @@ -86,8 +86,8 @@ - -