연계키별 발송상세 -> 단속ID별 발송상세

main
mjkhan21 3 months ago
parent 23619f8d57
commit 19029fe719

@ -370,12 +370,12 @@ public class SnisBean extends AbstractBean {
boolean bugwa = notices.stream() boolean bugwa = notices.stream()
.filter(notice -> "0".equals(notice.getBuStatusCd())) .filter(notice -> "0".equals(notice.getBuStatusCd()))
.count() > 0; .count() > 0;
// 세외수입 연계키별 발송상세 정보 // 단속ID별 발송상세 정보
List<SndngDtl> sndngDtls = !bugwa ? List<SndngDtl> sndngDtls = !bugwa ?
Collections.emptyList() : Collections.emptyList() :
sndngDtlMapper.selectSndngDetails(new SndbQuery().setCrdnIds(crdnIDs.toArray(new String[crdnIDs.size()]))); sndngDtlMapper.selectSndngDetails(new SndbQuery().setCrdnIds(crdnIDs.toArray(new String[crdnIDs.size()])));
Map<String, SndngDtl> sndngDetails = sndngDtls.stream().collect(Collectors.toMap( Map<String, SndngDtl> sndngDetails = sndngDtls.stream().collect(Collectors.toMap(
SndngDtl::getLinkMngKey, SndngDtl::getCrdnId,
sndngDtl -> sndngDtl sndngDtl -> sndngDtl
)); ));
@ -386,17 +386,9 @@ public class SnisBean extends AbstractBean {
int rcvmtAmt = (int)notice.totalAmt(); int rcvmtAmt = (int)notice.totalAmt();
log().debug("세외수입 연계키: {}, 상태: {}", linkMngKey, status); log().debug("세외수입 연계키: {}, 상태: {}", linkMngKey, status);
if (bugwa) {
SndngDtl sndngDtl = sndngDetails.get(linkMngKey);
update(notice, sndngDtl); // 발송상세에 적용
if (sndngDtl != null)
sndngDtlMapper.updateSndngDtl(sndngDtl);
}
Levy levy = levies.get(linkMngKey); Levy levy = levies.get(linkMngKey);
update(notice, levy); // 부과정보에 적용 update(notice, levy); // 부과정보에 적용
if (levy != null) levyMapper.updateLevy(levy);
levyMapper.updateLevy(levy);
if (paidFull) { if (paidFull) {
Rcvmt rcvmt = new Rcvmt(); // 수납등록 Rcvmt rcvmt = new Rcvmt(); // 수납등록
@ -405,7 +397,15 @@ public class SnisBean extends AbstractBean {
rcvmtBean.createRcvmt(rcvmt); rcvmtBean.createRcvmt(rcvmt);
} }
Crdn crdn = crdns.get(levy.getCrdnId()); String crdnId = levy.getCrdnId();
if (bugwa) {
SndngDtl sndngDtl = sndngDetails.get(crdnId);
update(notice, sndngDtl); // 발송상세에 적용
if (sndngDtl != null)
sndngDtlMapper.updateSndngDtl(sndngDtl);
}
Crdn crdn = crdns.get(crdnId);
if (crdn == null) continue; if (crdn == null) continue;
String crdnStatus = crdn.getCrdnSttsCd(); String crdnStatus = crdn.getCrdnSttsCd();

Loading…
Cancel
Save