diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryBean.java
index 138203f4..69dc1e56 100644
--- a/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryBean.java
+++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryBean.java
@@ -56,7 +56,7 @@ public class CrdnPayerHstryBean extends AbstractBean {
return crdnPayerHstryMapper.insertCrdnPayerHstry(crdnPayerHstry);
}
- /**단속 납부자 이력 정보를 등록한다.
+ /**단속 납부자 주소 이력 정보를 등록한다.
* @param crdnPayerHstry 단속 납부자 이력
* @return 저장 여부
*
- 저장됐으면 true
diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java
index bfcf4888..6c481aa2 100644
--- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java
+++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java
@@ -196,6 +196,13 @@ public class CrdnCvlcptSubBean extends AbstractBean {
nonQueryRequest.put("changePayerYn","N");
}
+ //납부자 주소 변경
+ if(!crdnInfo.string("ADDR_SN").equals(crdn.getAddrSn())) {
+ nonQueryRequest.put("changePayerAddrYn","Y");
+ } else {
+ nonQueryRequest.put("changePayerAddrYn","N");
+ }
+
//단속상태값 변경
nonQueryRequest.put("changeStatusYn","Y");
@@ -250,6 +257,20 @@ public class CrdnCvlcptSubBean extends AbstractBean {
}
}
+ //단속 납부자 주소 변경 이력 등록
+ if(((String)nonQueryRequest.get("changePayerAddrYn")).equals("Y")) {
+ CrdnPayerHstry crdnPayerHstry = new CrdnPayerHstry();
+
+ crdnPayerHstry.setCrdnId(crdn.getCrdnId());
+ crdnPayerHstry.setRtpyrId(crdn.getRtpyrId());
+ crdnPayerHstry.setAddrSn(crdn.getAddrSn());
+
+ boolean retSuccess = crdnPayerHstryMapper.insertCrdnPayerAddrHstry(crdnPayerHstry);
+ if(!retSuccess) {
+ throw new RuntimeException("단속민원답변 수정 중 단속납부자변경 이력 등록에 실패하였습니다.");
+ }
+ }
+
//단속상태 변경 이력 등록
if(((String)nonQueryRequest.get("changeStatusYn")).equals("Y")) {
CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry();
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 52340acb..d13245ef 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
@@ -214,15 +214,11 @@ public class PayerBean extends AbstractBean {
// 등록된 최종 주소를 확인하여 주소+상세주소가 다르다면 주소를 신규 등록한다.
if (result.getAddr().equals(basicInfo.getRoad_nm_adres()) && result.getDtlAddr().equals(basicInfo.getUse_strnghld_adres_nm())) {
- payer.setRtpyrId(result.getRtpyrId()); // 납부자 ID
// 납부자 주소의 최중 수정일자를 수정
- updatePayerAddr(payer);
+ updatePayerAddr(result);
} else {
- payer.setRtpyrId(result.getRtpyrId()); // 납부자 ID
// 납부자 주소를 신규 등록
- createPayerAddr(payer);
-
- result.setAddrSn(payer.getAddrSn()); // 주소 일련번호
+ createPayerAddr(result);
}
if (result != null)
diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml
index 38f5c708..671b8544 100644
--- a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml
@@ -137,6 +137,7 @@
, CA.OVTIME_YN
, CA.OVTIME_PRTTN_YN
, P.RTPYR_ID
+ , PA.ADDR_SN
, CC.CVLCPT_LINK_ID
, CC.CVLCPT_TRSM_CD
, CC.CVLCPT_PRCS_CD
@@ -148,6 +149,7 @@
INNER JOIN TB_VLTN V ON (C.VLTN_ID = V.VLTN_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
+ LEFT OUTER JOIN TB_PAYER_ADDR PA ON (C.RTPYR_ID = PA.RTPYR_ID AND C.ADDR_SN = PA.ADDR_SN)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N')
WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
index 42915221..441679fb 100644
--- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
@@ -347,9 +347,10 @@ SELECT C.CRDN_ID
, P.RTPYR_NM
, P.RTPYR_SE_CD
, P.RTPYR_NO
- , PA.ADDR
- , PA.DTL_ADDR
- , PA.ZIP
+ , PA.ADDR_SN
+ , PA.ZIP
+ , PA.ADDR
+ , PA.DTL_ADDR
FROM TB_CRDN C
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
@@ -582,8 +583,9 @@ SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */
/* 단속정보 수정(crdnCvlcptMapper.updateCrdn) */
UPDATE TB_CRDN
SET MDFCN_DT = /* 수정일시 */
- , MDFR = #{currentUser.id} /* 수정자 */
+ , MDFR = #{currentUser.id} /* 수정자 */
, RTPYR_ID = #{crdn.rtpyrId} /* 납부자 ID */
+ , ADDR_SN = #{crdn.addrSn} /* 주소 일련번호 */
, CRDN_YMD = #{crdn.crdnYmd} /* 단속 일자 */
, CRDN_TM = #{crdn.crdnTm} /* 단속 시각 */
, VHRNO = #{crdn.vhrno} /* 차량번호 */
@@ -608,7 +610,7 @@ SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */
, CRDN_STTS_CD = #{crdn.crdnSttsCd} /* 단속 상태 코드 */
, CRDN_STTS_CHG_DT = /* 단속 상태 변경 일시 */
- WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */
+ WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */
diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp
index 14ac52e2..4529f7d6 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp
@@ -6,6 +6,7 @@