납부자 수정.

main
jjh 10 months ago
parent f8d3456a5b
commit d3d2e3e9fe

@ -102,6 +102,19 @@ public class PayerBean extends AbstractComponent {
* </ul> * </ul>
*/ */
public boolean update(Payer payer) { public boolean update(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"));
payer.setStdgCd(info.string("STDG_CD"));
payer.setDongCd(info.string("DONG_CD"));
}
return payerMapper.update(payer); return payerMapper.update(payer);
} }
@ -149,11 +162,10 @@ public class PayerBean extends AbstractComponent {
payer.setRtpyrTelno(basicInfo.getTelno()); payer.setRtpyrTelno(basicInfo.getTelno());
payer.setRoadNmCd(basicInfo.getUse_strnghld_road_nm_code()); payer.setRoadNmCd(basicInfo.getUse_strnghld_road_nm_code());
String str = basicInfo.getUsgsrhld_undgrnd_buld_se_code(); String str = basicInfo.getUsgsrhld_undgrnd_buld_se_code();
if (str.equals("")) { if (str.equals(""))
payer.setUdgdSeCd("0"); payer.setUdgdSeCd("0");
} else { else
payer.setUdgdSeCd(basicInfo.getUsgsrhld_undgrnd_buld_se_code()); payer.setUdgdSeCd(basicInfo.getUsgsrhld_undgrnd_buld_se_code());
}
str = basicInfo.getUse_strnghld_buld_main_no(); str = basicInfo.getUse_strnghld_buld_main_no();
if (!isEmpty(str)) if (!isEmpty(str))
payer.setBmno(toInt(str)); payer.setBmno(toInt(str));
@ -173,7 +185,15 @@ public class PayerBean extends AbstractComponent {
payer.setDtlAddr(basicInfo.getUse_strnghld_adres_nm()); payer.setDtlAddr(basicInfo.getUse_strnghld_adres_nm());
payer.setWholAddr(basicInfo.getRoad_nm_adres() + ", " + basicInfo.getUse_strnghld_adres_nm()); payer.setWholAddr(basicInfo.getRoad_nm_adres() + ", " + basicInfo.getUse_strnghld_adres_nm());
Payer result = create(payer) ? payer : getPayer(vhrno, rtpyrNo); // Payer result = create(payer) ? payer : getPayer(vhrno, rtpyrNo);
Payer result = getPayer(vhrno, rtpyrNo);
if (isEmpty(result)) {
create(payer); // 등록
} else {
update(payer); // 수정
}
result = getPayer(vhrno, rtpyrNo);
if (result != null) if (result != null)
result.setVehicleInfo(basicInfo); result.setVehicleInfo(basicInfo);
@ -193,7 +213,7 @@ public class PayerBean extends AbstractComponent {
* @return * @return
*/ */
public DataObject getCrdnInfo(PayerQuery req) { public DataObject getCrdnInfo(PayerQuery req) {
DataObject dataCrdn = payerMapper.selectCrdn(req); // 단속 조회 DataObject dataCrdn = payerMapper.selectCrdn(req); // 단속 조회
return dataCrdn; return dataCrdn;
} }

@ -223,7 +223,7 @@ INSERT INTO TB_PAYER_HSTRY (
) VALUES ( ) VALUES (
#{payer.rtpyrId} <!-- 납부자 ID --> #{payer.rtpyrId} <!-- 납부자 ID -->
, #{historySeq} <!-- 이력 일련번호 --> , #{historySeq} <!-- 이력 일련번호 -->
, '41480' <!-- #{payer.sggCd} 시군구 코드 --> , #{payer.sggCd} <!-- 시군구 코드 -->
, #{payer.vhrno} <!-- 차량번호 --> , #{payer.vhrno} <!-- 차량번호 -->
, #{payer.rtpyrInptSeCd} <!-- 납부자 입력 구분 코드 --> , #{payer.rtpyrInptSeCd} <!-- 납부자 입력 구분 코드 -->
, #{payer.rtpyrSeCd} <!-- 납부자 구분 코드 --> , #{payer.rtpyrSeCd} <!-- 납부자 구분 코드 -->

Loading…
Cancel
Save