차적조회(행정정보공동이용센터) 추가

main
이범준 2 months ago
parent ff70dbec8d
commit e1e8ae6eab

@ -1,7 +1,7 @@
package cokr.xit.fims.payer; package cokr.xit.fims.payer;
import cokr.xit.foundation.AbstractEntity; import cokr.xit.foundation.AbstractEntity;
import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse.ExtInfo;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -173,8 +173,8 @@ public class Payer extends AbstractEntity {
*/ */
private String wholAddr; private String wholAddr;
/** 차량 기본정보 */ /** 차량 정보 */
private BasicInfoResponse.BasicInfo vehicleInfo; private ExtInfo vehicleInfo;
/**"차량번호-납부자번호" . /**"차량번호-납부자번호" .
* @return "차량번호-납부자번호" * @return "차량번호-납부자번호"

@ -18,7 +18,11 @@ import cokr.xit.fims.payer.dao.PayerAddrMapper;
import cokr.xit.fims.payer.dao.PayerMapper; import cokr.xit.fims.payer.dao.PayerMapper;
import cokr.xit.foundation.component.AbstractBean; import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject; 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.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.BasicInfoRequest;
import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse;
@ -47,6 +51,9 @@ public class PayerBean extends AbstractBean {
@Resource(name = "vehicleInfoBean") @Resource(name = "vehicleInfoBean")
private VehicleInfoBean vehicleInfoBean; private VehicleInfoBean vehicleInfoBean;
@Resource(name = "vehicleInfoMapper")
private VehicleInfoMapper vehicleInfoMapper;
/** 단속 상태 이력 정보 Bean */ /** 단속 상태 이력 정보 Bean */
@Resource(name = "crdnSttsHstryBean") @Resource(name = "crdnSttsHstryBean")
private CrdnSttsHstryBean crdnSttsHstryBean; private CrdnSttsHstryBean crdnSttsHstryBean;
@ -215,6 +222,33 @@ public class PayerBean extends AbstractBean {
.toList(); .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 * @param basicInfo
* @return * @return
@ -272,7 +306,71 @@ public class PayerBean extends AbstractBean {
Payer result = create(payer) ? payer : getPayerAddrInfo(payer); Payer result = create(payer) ? payer : getPayerAddrInfo(payer);
if (result != null) 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; return result;
} }
@ -406,4 +504,5 @@ public class PayerBean extends AbstractBean {
return payerAddrMapper.selectPayerAddrHstrys(req); return payerAddrMapper.selectPayerAddrHstrys(req);
} }
} }

Loading…
Cancel
Save