diff --git a/src/main/java/cokr/xit/fims/sndb/SndngDtl.java b/src/main/java/cokr/xit/fims/sndb/SndngDtl.java
index a6f9ec80..30c3c8ac 100644
--- a/src/main/java/cokr/xit/fims/sndb/SndngDtl.java
+++ b/src/main/java/cokr/xit/fims/sndb/SndngDtl.java
@@ -27,11 +27,6 @@ public class SndngDtl extends AbstractEntity {
*/
private String crdnId;
- /**
- * 부과 ID
- */
- private String levyId;
-
/**
* 공시송달 ID
*/
@@ -63,9 +58,9 @@ public class SndngDtl extends AbstractEntity {
private String rtpyrNm;
/**
- * 납부자 번호
+ * 납부자 생년월일
*/
- private String rtpyrNo;
+ private String rtpyrBrdt;
/**
* 납부자 주소
diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java
index 655cc003..d3b91610 100644
--- a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java
+++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java
@@ -273,12 +273,11 @@ public class SndngBean extends AbstractComponent {
sndngDtl.setSndngId(sndng.getSndngId()); // 발송 ID
sndngDtl.setCrdnId(crdnPayerInfo.string("CRDN_ID")); // 단속 ID
- sndngDtl.setLevyId(crdnPayerInfo.string("LEVY_ID")); // 부과 ID
sndngDtl.setSndngSeCd(sndng.getSndngSeCd()); // 발송 구분 코드
sndngDtl.setSndngYmd(sndng.getSndngYmd()); // 발송 일자
sndngDtl.setSndngEndYmd(sndng.getSndngEndYmd()); // 발송 종료 일자
sndngDtl.setRtpyrNm(crdnPayerInfo.string("RTPYR_NM")); // 납부자 명
- sndngDtl.setRtpyrNo(crdnPayerInfo.string("RTPYR_BRDT")); // 납부자 생년월일
+ sndngDtl.setRtpyrBrdt(crdnPayerInfo.string("RTPYR_BRDT")); // 납부자 생년월일
sndngDtl.setRtpyrAddr(crdnPayerInfo.string("ADDR")); // 납부자 주소
sndngDtl.setRtpyrDtlAddr(crdnPayerInfo.string("DTL_ADDR")); // 납부자 상세 주소
sndngDtl.setRtpyrZip(crdnPayerInfo.string("ZIP")); // 납부자 우편번호
@@ -799,10 +798,12 @@ public class SndngBean extends AbstractComponent {
// 위반동
epostRcptDtl.setRecevViolateDong(sndngDtlInfo.string("CRDN_STDG_NM"));
// 위반장소 - 80
- if (sndngDtlInfo.string("CRDN_PLC").length() > 80) {
- epostRcptDtl.setRecevViolatePlace(sndngDtlInfo.string("CRDN_PLC").substring(0, 80));
+ String crdnPlc = sndngDtlInfo.string("CRDN_PLC");
+ if (crdnPlc.length() > 80) {
+ crdnPlc = sndngDtlInfo.string("CRDN_PLC").substring(0, 80);
+ epostRcptDtl.setRecevViolatePlace(crdnPlc);
} else {
- epostRcptDtl.setRecevViolatePlace(sndngDtlInfo.string("CRDN_PLC"));
+ epostRcptDtl.setRecevViolatePlace(crdnPlc);
}
// 법조항
epostRcptDtl.setRecevLaws(vltnInfo.string("VLTN_LAW_NM") + " " + vltnInfo.string("VLTN_LAW1") + " " + vltnInfo.string("VLTN_LAW2"));
@@ -880,8 +881,8 @@ public class SndngBean extends AbstractComponent {
epostRcptDtl.setRecevCarOwnerDetailaddr(sndngDtlInfo.string("RTPYR_DTL_ADDR"));
// 소유자명
epostRcptDtl.setRecevCarOwnerNm(sndngDtlInfo.string("RTPYR_NM"));
- // 주민번호(생년월일)
- epostRcptDtl.setRecevCarOwnerSsn(sndngDtlInfo.string("RTPYR_NO"));
+ // 주민번호(납부자 생년월일)
+ epostRcptDtl.setRecevCarOwnerSsn(sndngDtlInfo.string("RTPYR_BRDT"));
// 증거번호
epostRcptDtl.setRecevEvidenceNumber(sndngDtlInfo.string("SNDNG_DTL_ID"));
// 사진장수
@@ -947,12 +948,56 @@ public class SndngBean extends AbstractComponent {
throw new RuntimeException("우편통합 발송 작업중 전자우편 상세 등록에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback
}
- // 전자우편 접수 상세 상태 코드 수정.
+ // 전자우편 접수 상세 상태 코드 수정
+ // 우편통합 발송에 사용되었던 최신 단속,부과,납부자 정보로 -> 발송상세 정보를 업데이트한다.
SndngDtl sndngDtl = new SndngDtl();
- sndngDtl.setConKey(conKey);
- sndngDtl.setRgNo(rgstNmbr);
- sndngDtl.setSndngDtlSttsCd("03");
+ sndngDtl.setConKey(conKey); // 외부연계식별키
+ sndngDtl.setRgNo(rgstNmbr); // 등기 번호
+ sndngDtl.setSndngDtlSttsCd("03"); // 발송 상세 상태 코드
+ sndngDtl.setRtpyrNm(sndngDtlInfo.string("RTPYR_NM")); // 납부자 명
+ sndngDtl.setRtpyrBrdt(sndngDtlInfo.string("RTPYR_BRDT")); // 납부자 생년월일
+ sndngDtl.setRtpyrAddr(sndngDtlInfo.string("RTPYR_ADDR")); // 납부자 주소
+ sndngDtl.setRtpyrDtlAddr(sndngDtlInfo.string("RTPYR_DTL_ADDR")); // 납부자 상세 주소
+ sndngDtl.setRtpyrZip(sndngDtlInfo.string("RTPYR_ZIP")); // 납부자 우편번호
+ sndngDtl.setCrdnDt(sndngDtlInfo.string("CRDN_YMD_TM_MASK")); // 단속 일시
+ sndngDtl.setVhrno(sndngDtlInfo.string("VHRNO")); // 차량번호
+ sndngDtl.setCrdnStdgNm(sndngDtlInfo.string("CRDN_STDG_NM")); // 단속 법정동
+ sndngDtl.setCrdnPlc(crdnPlc); // 단속 장소
+ sndngDtl.setFyr(sndngDtlInfo.string("FYR"));
+ sndngDtl.setLevyNo(sndngDtlInfo.string("LEVY_NO"));
+ sndngDtl.setLevyYmd(sndngDtlInfo.string("LEVY_YMD"));
+ sndngDtl.setDudtYmd(sndngDtlInfo.string("DUDT_YMD"));
+ sndngDtl.setDudtAftrYmd(sndngDtlInfo.string("DUDT_AFTR_YMD"));
+ sndngDtl.setFfnlgAmt(sndngDtlInfo.number("FFNLG_AMT").intValue());
+ sndngDtl.setPcptax(pcptax);
+ sndngDtl.setAdamt(adamt);
+ sndngDtl.setSumAmt(sumAmt);
+ sndngDtl.setDudtAftrAmt(afterSumAmt);
+ sndngDtl.setTaxNo(band1);
+ sndngDtl.setEpayno(sndngDtlInfo.string("EPAYNO"));
+ sndngDtl.setBankNm(sndngDtlInfo.string("BANK_NM"));
+ sndngDtl.setVrActno(sndngDtlInfo.string("VR_ACTNO"));
+ sndngDtl.setBankNm2(sndngDtlInfo.string("BANK_NM2"));
+ sndngDtl.setVrActno2(sndngDtlInfo.string("VR_ACTNO2"));
+ sndngDtl.setBankNm3(sndngDtlInfo.string("BANK_NM3"));
+ sndngDtl.setVrActno3(sndngDtlInfo.string("VR_ACTNO3"));
+ sndngDtl.setBankNm4(sndngDtlInfo.string("BANK_NM4"));
+ sndngDtl.setVrActno4(sndngDtlInfo.string("VR_ACTNO4"));
+ sndngDtl.setBankNm5(sndngDtlInfo.string("BANK_NM5"));
+ sndngDtl.setVrActno5(sndngDtlInfo.string("VR_ACTNO5"));
+ sndngDtl.setBankNm6(sndngDtlInfo.string("BANK_NM6"));
+ sndngDtl.setVrActno6(sndngDtlInfo.string("VR_ACTNO6"));
+ sndngDtl.setBankNm7(sndngDtlInfo.string("BANK_NM7"));
+ sndngDtl.setVrActno7(sndngDtlInfo.string("VR_ACTNO7"));
+ sndngDtl.setBankNm8(sndngDtlInfo.string("BANK_NM8"));
+ sndngDtl.setVrActno8(sndngDtlInfo.string("VR_ACTNO8"));
+ sndngDtl.setBankNm9(sndngDtlInfo.string("BANK_NM9"));
+ sndngDtl.setVrActno9(sndngDtlInfo.string("VR_ACTNO9"));
+ sndngDtl.setBankNm10(sndngDtlInfo.string("BANK_NM10"));
+ sndngDtl.setVrActno10(sndngDtlInfo.string("VR_ACTNO10"));
+ sndngDtl.setBankNm11(sndngDtlInfo.string("BANK_NM11"));
+ sndngDtl.setVrActno11(sndngDtlInfo.string("VR_ACTNO11"));
sndngDtl.setSndngDtlId(sndngDtlInfo.string("SNDNG_DTL_ID"));
retSuccess = sndngMapper.updateEPostSndngDtlSttsCd(sndngDtl);
diff --git a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml
index 7637ebad..1cffdbcb 100644
--- a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml
@@ -44,7 +44,6 @@
-
@@ -64,7 +63,7 @@
-
+
@@ -513,14 +512,13 @@
SELECT SD.SNDNG_DTL_ID
, SD.SVBTC_ID
, SD.CRDN_ID
- , SD.LEVY_ID
, SD.SVBTC_ID
, SD.MTCHG_ID
, SD.SNDNG_SE_CD
, SD.SNDNG_YMD
, SD.SNDNG_END_YMD
, SD.RTPYR_NM
- , SD.RTPYR_NO
+ , SD.RTPYR_BRDT
, SD.RTPYR_ADDR
, SD.RTPYR_DTL_ADDR
, SD.RTPYR_ZIP
@@ -973,36 +971,30 @@
SELECT SD.SNDNG_DTL_ID
, SD.SNDNG_ID
, SD.SVBTC_ID
- , SD.CRDN_ID
- , SD.LEVY_ID
, SD.SNDNG_YMD
, SD.SNDNG_END_YMD
- , SD.RTPYR_NM
- , SD.RTPYR_NO
- , SD.RTPYR_ADDR
- , SD.RTPYR_DTL_ADDR
- , SD.RTPYR_ZIP
, SD.CON_KEY
, SD.RG_NO
- , SD.DLVR_YMD
- , SD.DLVR_TM
- , SD.UNDLVR_RSN_NM
- , SD.RCPN_NM
- , SD.RCPN_REL_NM
, SD.SNDNG_DTL_STTS_CD
- , SD.BFR_DLVR_YMD
- , SD.BFR_DLVR_HR
, SD.SNDNG_RCVMT_CD
, SD.ADDR_CHG_CD
, (SELECT GET_CODE_NM('FIM050', SD.SNDNG_DTL_STTS_CD) FROM DUAL) AS SNDNG_DTL_STTS_NM
- , (SELECT GET_CODE_NM('FIM050', SD.BFR_SNDNG_DTL_STTS_CD) FROM DUAL) AS BFR_SNDNG_DTL_STTS_NM
, (SELECT GET_CODE_NM('FIM051', SD.SNDNG_RCVMT_CD) FROM DUAL) AS SNDNG_RCVMT_NM
+ , C.CRDN_ID
, C.VHRNO
, C.CRDN_PLC
, C.FFNLG_CRDN_AMT
, C.CRDN_STTS_CD
, GET_MASK_DATETIME(C.CRDN_YMD, '-', C.CRDN_TM, ':') AS CRDN_YMD_TM_MASK
, (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM
+ , P.RTPYR_ID
+ , P.RTPYR_NO
+ , P.RTPYR_NM
+ , P.RTPYR_BRDT
+ , P.RTPYR_ADDR
+ , P.RTPYR_DTL_ADDR
+ , P.RTPYR_ZIP
+ , L.LEVY_ID
, L.DEPT_CD
, L.FYR
, L.ACNTG_SE_CD
@@ -1054,20 +1046,20 @@
, L.LEVY_ADAMT - L.RCVMT_ADAMT - L.RDCAMT_ADAMT AS ADAMT
FROM TB_SNDNG_DTL SD
INNER JOIN TB_CRDN C ON (SD.CRDN_ID = C.CRDN_ID)
- INNER JOIN TB_LEVY L ON (SD.LEVY_ID = L.LEVY_ID AND L.DEL_YN = 'N')
+ INNER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
+ INNER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID AND L.DEL_YN = 'N')
WHERE SD.SNDNG_DTL_ID = #{sndngDtlId}