시군구코드 파라미터 추가

master
mjkhan21 1 year ago
parent 7d62ad18e3
commit fa31643fba

@ -49,15 +49,22 @@ public class VehicleInfoBean extends AbstractComponent {
@Resource(name = "vehicleInfoMapper")
private VehicleInfoMapper vehicleInfoMapper;
/** .
* @param req
* @return
*/
public BasicInfoResponse getBasicInfo(BasicInfoRequest req) {
try {
req.validate();
if (lvisHost.isLocal())
return getLocalBasicInfo(req);
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress()).findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress())
.findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
BasicInfoResponse result = BasicInfoResponse.getResult(resp);
boolean success = result.getBasicInfo().isSuccess();
if (success)
result.getBasicInfo().setSggCd(req.getSggCd());
log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다."));
boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false);
@ -82,24 +89,34 @@ public class VehicleInfoBean extends AbstractComponent {
List<BasicInfoResponse.BasicInfo> list = vehicleInfoMapper.selectBasicInfo(req);
boolean empty = list.isEmpty();
BasicInfoResponse.BasicInfo basicInfo = !empty ? list.get(0) : new BasicInfoResponse.BasicInfo();
if (!empty)
if (!empty) {
basicInfo.setProcess_imprty_resn_code("00");
basicInfo.setSggCd(req.getSggCd());
}
BasicInfoResponse response = new BasicInfoResponse();
response.setBasicInfo(basicInfo);
return response;
}
public Map<String, BasicInfoResponse> getBasicInfo(List<BasicInfoRequest> reqs) {
/** .
* @param reqs
* @return
*/
public List<BasicInfoResponse> getBasicInfo(List<BasicInfoRequest> reqs) {
return reqs.stream()
.map(this::getBasicInfo)
.filter(resp -> resp.getBasicInfo().isSuccess())
.collect(Collectors.toMap(
resp -> resp.getBasicInfo().getVhrno(),
resp -> resp
));
.collect(Collectors.groupingBy(resp -> resp.getBasicInfo().getKey()))
.entrySet().stream()
.map(entry -> entry.getValue().get(0))
.toList();
}
/** () .
* @param req ()
* @return ()
*/
public FrmrWlthReadngResponse getFrmrWlthReadng(FrmrWlthReadngRequest req) {
try {
req.validate();
@ -114,6 +131,10 @@ public class VehicleInfoBean extends AbstractComponent {
}
}
/** () .
* @param req ()
* @return ()
*/
public ScldgrReadngResponse getScldgrReadng(ScldgrReadngRequest req) {
try {
req.validate();
@ -128,6 +149,10 @@ public class VehicleInfoBean extends AbstractComponent {
}
}
/** .
* @param req
* @return
*/
public SeizureByVhrNoResponse getSeizureByVhrNo(SeizureByVhrNoRequest req) {
try {
req.validate();
@ -142,6 +167,10 @@ public class VehicleInfoBean extends AbstractComponent {
}
}
/** .
* @param req
* @return
*/
public SeizureByEttffResponse addAutoSeizureByEttff(SeizureByEttffRequest req) {
try {
req.validate();
@ -156,6 +185,10 @@ public class VehicleInfoBean extends AbstractComponent {
}
}
/** .
* @param req
* @return
*/
public AltrtvSeizureVhrnoResponse getAltrtvSeizureVhrno(AltrtvSeizureVhrnoRequest req) {
try {
req.validate();
@ -170,6 +203,10 @@ public class VehicleInfoBean extends AbstractComponent {
}
}
/** .
* @param req
* @return
*/
public CustodyTrgetResponse getCustodyTrget(CustodyTrgetRequest req) {
try {
req.validate();

@ -36,6 +36,8 @@ public class BasicInfoRequest extends LvisRequest {
private String inqire_se_code;
/** 부과기준일자 */
private String levy_stdde;
/** 시군구 코드 */
private String sggCd;
@Override
public String getServiceID() {

@ -302,6 +302,8 @@ public class BasicInfoResponse extends LvisResponse {
private String cbd_hg;
/** 최초최대적재량 */
private String frst_mxmm_ldg;
/** 시군구 코드 */
private String sggCd;
/** .
* @param resp
@ -398,5 +400,12 @@ public class BasicInfoResponse extends LvisResponse {
return this;
}
/**"차량번호-소유자 회원번호" .
* @return "차량번호-소유자 회원번호"
*/
public String getKey() {
return String.format("%s-%s", vhrno, mber_se_no);
}
}
}
Loading…
Cancel
Save