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 파라미터
+ *
- roadNmCd - 도로명 코드
+ * - udgdSeCd - 지하 구분코드
+ * - bmno - 건물본번
+ * - bsno - 건물부번
+ *
+ * @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'