getPayers(PayerQuery req) {
+ return payerBean.getPayers(req);
+ }
+
+ @Override
+ public boolean create(Payer payer) {
+ return payerBean.create(payer);
+ }
+
+ @Override
+ public boolean update(Payer payer) {
+ return payerBean.update(payer);
+ }
+
+ @Override
+ public int remove(String... rtpyrIds) {
+ return payerBean.remove(rtpyrIds);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/cokr/xit/fims/payer/web/PayerController.java b/src/main/java/cokr/xit/fims/payer/web/PayerController.java
new file mode 100644
index 00000000..3d9630a9
--- /dev/null
+++ b/src/main/java/cokr/xit/fims/payer/web/PayerController.java
@@ -0,0 +1,103 @@
+package cokr.xit.fims.payer.web;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import cokr.xit.fims.payer.Payer;
+import cokr.xit.fims.payer.PayerQuery;
+import cokr.xit.fims.payer.service.PayerService;
+import cokr.xit.foundation.web.AbstractController;
+
+/**납부자 서비스의 웹 컨트롤러
+ *
+ * 상세 설명:
+ *
+ *
+ * ============ 변경 이력 ============
+ * 2023-08-18 mjkhan 최초 작성
+ * ================================
+ *
+ */
+@RequestMapping(name = "납부자", value = "/payer")
+public class PayerController extends AbstractController {
+ /**납부자 서비스*/
+ @Resource(name = "payerService")
+ private PayerService payerService;
+
+ /**납부자 관리 메인화면(payer/payer-main)을 연다.
+ * 조건없는 {@link #getPayerList(PayerQuery) 납부자 조회 결과}를 포함시킨다.
+ * @return /payer/payer-main
+ */
+ @RequestMapping(name = "납부자 메인", value = "/main.do")
+ public ModelAndView main() {
+ ModelAndView mav = getPayerList(new PayerQuery().setPageNum(1));
+ mav.setViewName("/payer/payer-main");
+ return mav.addObject("payerList", toJson(mav.getModel().get("payerList")));
+ }
+
+ /**납부자 목록을 조회하여 반환한다.
+ * {@link PayerService#getPayerList(PayerQuery)} 참고
+ * @param req 납부자 조회 조건
+ * @return jsonView
+ * {
+ * "payerList": [납부자 목록]
+ * "payerStart": 납부자 목록 시작 인덱스
+ * "payerFetch": 한 번에 가져오는 납부자 목록 수
+ * "payerTotal": 조회 결과 찾은 전체 납부자 수
+ * }
+ */
+ @RequestMapping(name = "납부자 조회", value = "/list.do")
+ public ModelAndView getPayerList(PayerQuery req) {
+ List> result = payerService.getPayerList(setFetchSize(req));
+ return setCollectionInfo(new ModelAndView("jsonView"), result, "payer");
+ }
+
+ /**납부자를 등록한다.
+ * @param payer 납부자 정보
+ * @return jsonView
+ * {
+ * "saved": 등록되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ @PostMapping(name = "납부자 등록", value = "/create.do")
+ public ModelAndView create(Payer payer) {
+ boolean saved = payerService.create(payer);
+ return new ModelAndView("jsonView")
+ .addObject("saved", saved);
+ }
+
+ /**납부자 정보를 수정한다.
+ * @param payer 납부자 정보
+ * @return jsonView
+ * {
+ * "saved": 수정되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ @PostMapping(name = "납부자 수정", value = "/update.do")
+ public ModelAndView update(Payer payer) {
+ boolean saved = payerService.update(payer);
+ return new ModelAndView("jsonView")
+ .addObject("saved", saved);
+ }
+
+ /**지정한 납부자를 제거한다.
+ * @param payerIDs 납부자 아이디
+ * @return jsonView
+ * {
+ * "affected": 저장된 정보수
+ * "saved": 저장되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ @PostMapping(name = "납부자 제거", value = "/remove.do")
+ public ModelAndView remove(String... rtpyrIds) {
+ int affected = payerService.remove(rtpyrIds);
+ return new ModelAndView("jsonView")
+ .addObject("affected", affected)
+ .addObject("saved", affected > 0);
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 223948e8..8b2fbdd9 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,5 +1,5 @@
server:
- #port: 18080
+# port: 18080
servlet:
context-path: /
@@ -52,6 +52,7 @@ propertyService:
- tempDir: C:\temp
- pageUnit: 10
- pageSize: 10
+ - permitAccess: /api/**/*.do,/interface/**/*.do
extFileName:
- encoding: UTF-8
filename: classpath*:intf-conf/xit-lvis.properties
diff --git a/src/main/resources/intf-conf/file-job.conf b/src/main/resources/intf-conf/file-job.conf
index b6736b39..53cebdbf 100644
--- a/src/main/resources/intf-conf/file-job.conf
+++ b/src/main/resources/intf-conf/file-job.conf
@@ -24,7 +24,7 @@
"name": "smg-receive",
"dirCode": "smg", /* <-- dirCodes */
"infoType": "010",
- "alert": "http://localhost:8080/api/smg/petition/receive.do" /* 업무 통보 url */
+ "alert": "http://localhost:8080/interface/smg/petition/receive.do" /* 업무 통보 url */
},
{ /* 국민신문고 전송 */
"name": "smg-send",
diff --git a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml
new file mode 100644
index 00000000..49512477
--- /dev/null
+++ b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/sql/mapper/fims/payer-mapper.xml b/src/main/resources/sql/mapper/fims/payer-mapper.xml
new file mode 100644
index 00000000..04bc5a0a
--- /dev/null
+++ b/src/main/resources/sql/mapper/fims/payer-mapper.xml
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+SELECT RTPYR_ID
+ , SGG_CD
+ , RTPYR_INPT_SE_CD
+ , RTPYR_SE_CD
+ , RTPYR_NO
+ , RTPYR_NM
+ , RTPYR_EML
+ , RTPYR_BRDT
+ , RTPYR_STTS_CD
+ , ADDR_SE_CD
+ , ZIP
+ , ROAD_NM_CD
+ , UDGD_SE_CD
+ , BMNO
+ , BSNO
+ , BLDG_MNG_NO
+ , STDG_CD
+ , DONG_CD
+ , MTN_SE_CD
+ , MNO
+ , SNO
+ , SPCL_DONG
+ , SPCL_HO
+ , SPCL_ADDR
+ , ADDR
+ , DTL_ADDR
+ , WHOL_ADDR
+ , REG_DT
+ , RGTR
+ , MDFCN_DT
+ , MDFR
+ , VHRNO
+ , RTPYR_TELNO
+ , RTPYR_MBL_TELNO
+ FROM TB_PAYER
+
+
+
+
+
+/* 납부자 대장 등록(payerMapper.insertPayer) */
+
+SELECT CONCAT(THIS_YEAR, LPAD(IFNULL(SUBSTR(MAX(RTPYR_ID), 5) + 1, 1), 16, '0')) NEW_ID
+ FROM TB_PAYER A
+ , (SELECT DATE_FORMAT(CURRENT_DATE, '%Y') THIS_YEAR) B
+ WHERE RTPYR_ID LIKE CONCAT(THIS_YEAR, '%')
+INSERT INTO TB_PAYER (
+ RTPYR_ID
+ , SGG_CD
+ , VHRNO
+ , RTPYR_INPT_SE_CD
+ , RTPYR_SE_CD
+ , RTPYR_NO
+ , RTPYR_NM
+ , RTPYR_TELNO
+ , RTPYR_MBL_TELNO
+ , RTPYR_EML
+ , RTPYR_BRDT
+ , RTPYR_STTS_CD
+ , ADDR_SE_CD
+ , ZIP
+ , ROAD_NM_CD
+ , UDGD_SE_CD
+ , BMNO
+ , BSNO
+ , BLDG_MNG_NO
+ , STDG_CD
+ , DONG_CD
+ , MTN_SE_CD
+ , MNO
+ , SNO
+ , SPCL_DONG
+ , SPCL_HO
+ , SPCL_ADDR
+ , ADDR
+ , DTL_ADDR
+ , WHOL_ADDR
+ , REG_DT
+ , RGTR
+ , MDFCN_DT
+ , MDFR
+)
+SELECT #{rtpyrId}
+ , '41480'
+ , #{vhrno}
+ , #{rtpyrInptSeCd}
+ , #{rtpyrSeCd}
+ , #{rtpyrNo}
+ , #{rtpyrNm}
+ , #{rtpyrTelno}
+ , #{rtpyrMblTelno}
+ , #{rtpyrEml}
+ , #{rtpyrBrdt}
+ , #{rtpyrSttsCd}
+ , #{addrSeCd}
+ , #{zip}
+ , #{roadNmCd}
+ , #{udgdSeCd}
+ , #{bmno}
+ , #{bsno}
+ , #{bldgMngNo}
+ , #{stdgCd}
+ , #{dongCd}
+ , #{mtnSeCd}
+ , #{mno}
+ , #{sno}
+ , #{spclDong}
+ , #{spclHo}
+ , #{spclAddr}
+ , #{addr}
+ , #{dtlAddr}
+ , #{wholAddr}
+ , #{createdAt}
+ , #{createdBy}
+ , #{lastModified}
+ , #{modifiedBy}
+ FROM DUAL
+ WHERE NOT EXISTS (
+ SELECT *
+ FROM TB_PAYER B
+ WHERE VHRNO = #{vhrno}
+ AND RTPYR_NO = #{rtpyrNo}
+ )
+
+/* 납부자 대장 등록(payerMapper.insertHistory) */
+
+SELECT IFNULL(MAX(HSTRY_SN) + 1, 1) NEW_ID
+ FROM TB_PAYER_HSTRY
+WHERE RTPYR_ID = #{payer.rtpyrId}
+INSERT INTO TB_PAYER_HSTRY (
+ RTPYR_ID
+ , HSTRY_SN
+ , SGG_CD
+ , VHRNO
+ , RTPYR_INPT_SE_CD
+ , RTPYR_SE_CD
+ , RTPYR_NO
+ , RTPYR_NM
+ , RTPYR_TELNO
+ , RTPYR_MBL_TELNO
+ , RTPYR_EML
+ , RTPYR_BRDT
+ , RTPYR_STTS_CD
+ , ADDR_SE_CD
+ , ZIP
+ , ROAD_NM_CD
+ , UDGD_SE_CD
+ , BMNO
+ , BSNO
+ , BLDG_MNG_NO
+ , STDG_CD
+ , DONG_CD
+ , MTN_SE_CD
+ , MNO
+ , SNO
+ , SPCL_DONG
+ , SPCL_HO
+ , SPCL_ADDR
+ , ADDR
+ , DTL_ADDR
+ , WHOL_ADDR
+ , REG_DT
+ , RGTR
+) VALUES (
+ #{payer.rtpyrId}
+ , #{historySeq}
+ , '41480'
+ , #{payer.vhrno}
+ , #{payer.rtpyrInptSeCd}
+ , #{payer.rtpyrSeCd}
+ , #{payer.rtpyrNo}
+ , #{payer.rtpyrNm}
+ , #{payer.rtpyrTelno}
+ , #{payer.rtpyrMblTelno}
+ , #{payer.rtpyrEml}
+ , #{payer.rtpyrBrdt}
+ , #{payer.rtpyrSttsCd}
+ , #{payer.addrSeCd}
+ , #{payer.zip}
+ , #{payer.roadNmCd}
+ , #{payer.udgdSeCd}
+ , #{payer.bmno}
+ , #{payer.bsno}
+ , #{payer.bldgMngNo}
+ , #{payer.stdgCd}
+ , #{payer.dongCd}
+ , #{payer.mtnSeCd}
+ , #{payer.mno}
+ , #{payer.sno}
+ , #{payer.spclDong}
+ , #{payer.spclHo}
+ , #{payer.spclAddr}
+ , #{payer.addr}
+ , #{payer.dtlAddr}
+ , #{payer.wholAddr}
+ ,
+ , #{currentUser.id}
+)
+
+/* 납부자 대장 수정(payerMapper.updatePayer) */
+UPDATE TB_PAYER SET
+ SGG_CD = #{sggCd}
+ , RTPYR_INPT_SE_CD = #{rtpyrInptSeCd}
+ , RTPYR_SE_CD = #{rtpyrSeCd}
+ , RTPYR_NO = #{rtpyrNo}
+ , RTPYR_NM = #{rtpyrNm}
+ , RTPYR_EML = #{rtpyrEml}
+ , RTPYR_BRDT = #{rtpyrBrdt}
+ , RTPYR_STTS_CD = #{rtpyrSttsCd}
+ , ADDR_SE_CD = #{addrSeCd}
+ , ZIP = #{zip}
+ , ROAD_NM_CD = #{roadNmCd}
+ , UDGD_SE_CD = #{udgdSeCd}
+ , BMNO = #{bmno}
+ , BSNO = #{bsno}
+ , BLDG_MNG_NO = #{bldgMngNo}
+ , STDG_CD = #{stdgCd}
+ , DONG_CD = #{dongCd}
+ , MTN_SE_CD = #{mtnSeCd}
+ , MNO = #{mno}
+ , SNO = #{sno}
+ , SPCL_DONG = #{spclDong}
+ , SPCL_HO = #{spclHo}
+ , SPCL_ADDR = #{spclAddr}
+ , ADDR = #{addr}
+ , DTL_ADDR = #{dtlAddr}
+ , WHOL_ADDR = #{wholAddr}
+ , VHRNO = #{vhrno}
+ , RTPYR_TELNO = #{rtpyrTelno}
+ , RTPYR_MBL_TELNO = #{rtpyrMblTelno}
+ , MDFCN_DT = #{lastModified}
+ , MDFR = #{modifiedBy}
+ WHERE RTPYR_ID = #{rtpyrId}
+
+/* 납부자 대장 삭제(payerMapper.deletePayer) */
+UPDATE TB_PAYER
+ SET USE_YN = 'N'
+ , MDFCN_DT =
+ , MDFR = #{currentUser.id}
+ WHERE RTPYR_ID IN (#{rtpyrId})
+
+
\ No newline at end of file