From 368de1f0bd924f2890cebfb6ce148c6e1e8d9eb6 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 22 Aug 2023 17:43:41 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A9=EB=B6=80=EC=9E=90=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=8B=9C=20=EC=9A=B0=ED=8E=B8=EB=B2=88=ED=98=B8,?= =?UTF-8?q?=20=EA=B1=B4=EB=AC=BC=EA=B4=80=EB=A6=AC=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/payer/dao/PayerMapper.java | 11 +++++++++++ .../cokr/xit/fims/payer/service/bean/PayerBean.java | 11 +++++++++++ src/main/resources/sql/mapper/fims/payer-mapper.xml | 9 +++++++++ 3 files changed, 31 insertions(+) diff --git a/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java b/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java index 2a12f103..75c08c5b 100644 --- a/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java +++ b/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java @@ -104,4 +104,15 @@ public interface PayerMapper extends AbstractMapper { default int delete(String... rtpyrIds) { return !isEmpty(rtpyrIds) ? deletePayer(params().set("rtpyrIds", rtpyrIds)) : 0; } + + /**납부자 도로명 주소의 우편번호, 건물관리번호를 조회한다. 도로망 주소 연계 구현 시 이동 + * @param params 파라미터 + * + * @return 납부자 도로명 주소의 우편번호, 건물관리번호 + */ + DataObject selectAddrInfo(Map params); } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java b/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java index 846b5801..f2f50061 100644 --- a/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java +++ b/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java @@ -65,6 +65,17 @@ public class PayerBean extends AbstractComponent { * */ public boolean create(Payer payer) { + DataObject params = new DataObject() + .set("roadNmCd", payer.getRoadNmCd()) + .set("udgdSeCd", payer.getUdgdSeCd()) + .set("bmno", payer.getBmno()) + .set("bsno", payer.getBsno()); + DataObject info = payerMapper.selectAddrInfo(params); + if (info != null) { + payer.setAddrSeCd("02"); + payer.setZip(info.string("ZIP")); + payer.setBldgMngNo(info.string("BLDG_MNG_NO")); + } return payerMapper.insert(payer); } diff --git a/src/main/resources/sql/mapper/fims/payer-mapper.xml b/src/main/resources/sql/mapper/fims/payer-mapper.xml index d6e5e041..ffe0f5ad 100644 --- a/src/main/resources/sql/mapper/fims/payer-mapper.xml +++ b/src/main/resources/sql/mapper/fims/payer-mapper.xml @@ -291,6 +291,15 @@ UPDATE TB_PAYER SET , MDFR = #{modifiedBy} WHERE RTPYR_ID = #{rtpyrId} + + /* 납부자 대장 삭제(payerMapper.deletePayer) */ UPDATE TB_PAYER SET USE_YN = 'N'