|
|
|
@ -18,7 +18,11 @@ import cokr.xit.fims.payer.dao.PayerAddrMapper;
|
|
|
|
|
import cokr.xit.fims.payer.dao.PayerMapper;
|
|
|
|
|
import cokr.xit.foundation.component.AbstractBean;
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
import cokr.xit.interfaces.lvis.dao.VehicleInfoMapper;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.bean.VehicleInfoBean;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse.ExtInfo;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest;
|
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse;
|
|
|
|
|
|
|
|
|
@ -47,6 +51,9 @@ public class PayerBean extends AbstractBean {
|
|
|
|
|
@Resource(name = "vehicleInfoBean")
|
|
|
|
|
private VehicleInfoBean vehicleInfoBean;
|
|
|
|
|
|
|
|
|
|
@Resource(name = "vehicleInfoMapper")
|
|
|
|
|
private VehicleInfoMapper vehicleInfoMapper;
|
|
|
|
|
|
|
|
|
|
/** 단속 상태 이력 정보 Bean */
|
|
|
|
|
@Resource(name = "crdnSttsHstryBean")
|
|
|
|
|
private CrdnSttsHstryBean crdnSttsHstryBean;
|
|
|
|
@ -215,6 +222,33 @@ public class PayerBean extends AbstractBean {
|
|
|
|
|
.toList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Payer> getVehicleOwners(BasicInfoExtRequest req) {
|
|
|
|
|
Payer payper = null;
|
|
|
|
|
|
|
|
|
|
//차적조회
|
|
|
|
|
BasicInfoExtResponse bier = vehicleInfoBean.getBasicInfo(req);
|
|
|
|
|
|
|
|
|
|
if(bier.getRecord() != null && !bier.getRecord().isEmpty()
|
|
|
|
|
&& bier.getRecord().get(0) != null) {
|
|
|
|
|
//시군구코드 세팅
|
|
|
|
|
bier.getRecord().get(0).setSggCd(req.getSigungu_code());
|
|
|
|
|
//주소 세팅
|
|
|
|
|
DataObject roadNameInfo = vehicleInfoMapper.selectRoadNmAdres(
|
|
|
|
|
bier.getRecord().get(0).getUse_strnghld_road_nm_code(),
|
|
|
|
|
bier.getRecord().get(0).getUse_strnghld_buld_main_no(),
|
|
|
|
|
bier.getRecord().get(0).getUse_strnghld_buld_sub_no());
|
|
|
|
|
if(!isEmpty(roadNameInfo)) {
|
|
|
|
|
bier.getRecord().get(0).setRoad_nm_adres(roadNameInfo.string("ROAD_NM_ADRES"));
|
|
|
|
|
bier.getRecord().get(0).setZip_code(roadNameInfo.string("ZIP"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//납부자조회
|
|
|
|
|
payper = getPayer(bier.getRecord().get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return List.of(payper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**시군구 코드와 차량 기본정보에서 납부자 정보를 생성하거나, 등록정보에서 조회하여 반환한다.(차량번호 / 납부자 번호 / 시군구 기준)
|
|
|
|
|
* @param basicInfo 차량 기본정보
|
|
|
|
|
* @return 납부자 정보
|
|
|
|
@ -272,7 +306,71 @@ public class PayerBean extends AbstractBean {
|
|
|
|
|
Payer result = create(payer) ? payer : getPayerAddrInfo(payer);
|
|
|
|
|
|
|
|
|
|
if (result != null)
|
|
|
|
|
result.setVehicleInfo(basicInfo);
|
|
|
|
|
result.setVehicleInfo((ExtInfo) basicInfo);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**시군구 코드와 차량 기본정보에서 납부자 정보를 생성하거나, 등록정보에서 조회하여 반환한다.(차량번호 / 납부자 번호 / 시군구 기준)
|
|
|
|
|
* @param extInfo 차량 기본정보
|
|
|
|
|
* @return 납부자 정보
|
|
|
|
|
*/
|
|
|
|
|
private Payer getPayer(BasicInfoExtResponse.ExtInfo extInfo) {
|
|
|
|
|
|
|
|
|
|
Payer payer = new Payer();
|
|
|
|
|
|
|
|
|
|
payer.setSggCd(extInfo.getSggCd());
|
|
|
|
|
payer.setVhrno(extInfo.getVhrno());
|
|
|
|
|
payer.setRtpyrInptSeCd("02");
|
|
|
|
|
payer.setAddrInptSeCd("02");
|
|
|
|
|
payer.setRtpyrSeCd(
|
|
|
|
|
Map.of(
|
|
|
|
|
"11", "01",
|
|
|
|
|
"12", "02",
|
|
|
|
|
"13", "03",
|
|
|
|
|
"14", "04",
|
|
|
|
|
"15", "05"
|
|
|
|
|
).getOrDefault(extInfo.getMber_se_code(), "05")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
String rtpyrNo = extInfo.getMber_se_no();
|
|
|
|
|
payer.setRtpyrNo(rtpyrNo);
|
|
|
|
|
payer.setRtpyrNm(extInfo.getMber_nm());
|
|
|
|
|
payer.setRtpyrTelno(extInfo.getTelno());
|
|
|
|
|
payer.setRoadNmCd(extInfo.getUse_strnghld_road_nm_code());
|
|
|
|
|
String str = extInfo.getUsgsrhld_undgrnd_buld_se_code();
|
|
|
|
|
if (str.equals(""))
|
|
|
|
|
payer.setUdgdSeCd("0");
|
|
|
|
|
else
|
|
|
|
|
payer.setUdgdSeCd(extInfo.getUsgsrhld_undgrnd_buld_se_code());
|
|
|
|
|
str = extInfo.getUse_strnghld_buld_main_no();
|
|
|
|
|
if (!isEmpty(str))
|
|
|
|
|
payer.setBmno(toInt(str));
|
|
|
|
|
str = extInfo.getUse_strnghld_buld_sub_no();
|
|
|
|
|
if (!isEmpty(str))
|
|
|
|
|
payer.setBsno(toInt(str));
|
|
|
|
|
payer.setStdgCd(extInfo.getUse_strnghld_legaldong_code());
|
|
|
|
|
payer.setDongCd(extInfo.getUse_strnghld_adstrd_code());
|
|
|
|
|
payer.setMtnSeCd(extInfo.getUse_strnghld_mntn());
|
|
|
|
|
str = extInfo.getUse_strnghld_lnbr();
|
|
|
|
|
if (!isEmpty(str))
|
|
|
|
|
payer.setMno(toInt(str));
|
|
|
|
|
str = extInfo.getUse_strnghld_ho();
|
|
|
|
|
if (!isEmpty(str))
|
|
|
|
|
payer.setSno(toInt(str));
|
|
|
|
|
payer.setAddr(extInfo.getRoad_nm_adres());
|
|
|
|
|
payer.setDtlAddr(extInfo.getUse_strnghld_adres_nm());
|
|
|
|
|
// 전체 주소
|
|
|
|
|
str = extInfo.getUse_strnghld_adres_nm();
|
|
|
|
|
if (!isEmpty(str))
|
|
|
|
|
payer.setWholAddr(extInfo.getRoad_nm_adres() + ", " + extInfo.getUse_strnghld_adres_nm());
|
|
|
|
|
else
|
|
|
|
|
payer.setWholAddr(extInfo.getRoad_nm_adres());
|
|
|
|
|
|
|
|
|
|
Payer result = create(payer) ? payer : getPayerAddrInfo(payer);
|
|
|
|
|
|
|
|
|
|
if (result != null)
|
|
|
|
|
result.setVehicleInfo(extInfo);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -406,4 +504,5 @@ public class PayerBean extends AbstractBean {
|
|
|
|
|
return payerAddrMapper.selectPayerAddrHstrys(req);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|