|
@@ -255,16 +255,22 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
InsApiLog apiLog = httpPost(xmlMapper, m, YcBuildData.API_MODEL);
|
|
InsApiLog apiLog = httpPost(xmlMapper, m, YcBuildData.API_MODEL);
|
|
|
String responseData = apiLog.getResponseData();
|
|
String responseData = apiLog.getResponseData();
|
|
|
log.info("===永诚--车型查询接口请求结束--"+carInfo.getLicenseNo()+"===");
|
|
log.info("===永诚--车型查询接口请求结束--"+carInfo.getLicenseNo()+"===");
|
|
|
|
|
+ ModelsQueryResponse rd = null;
|
|
|
try {
|
|
try {
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
- ModelsQueryResponse rd = xmlMapper.readValue(cleanStr, ModelsQueryResponse.class);
|
|
|
|
|
|
|
+ rd = xmlMapper.readValue(cleanStr, ModelsQueryResponse.class);
|
|
|
// List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd);
|
|
// List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd);
|
|
|
|
|
|
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
|
+ throw new SystemException("车型查询接口异常,请联系管理。");
|
|
|
|
|
+ }
|
|
|
BigDecimal matchNum = BigDecimal.ZERO;
|
|
BigDecimal matchNum = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
//获取上市年份大于等于注册日期的车辆信息
|
|
//获取上市年份大于等于注册日期的车辆信息
|
|
|
List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd).stream().filter(a ->DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(),a.getVehicleYear())).collect(Collectors.toList());
|
|
List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd).stream().filter(a ->DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(),a.getVehicleYear())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
+ if(null == vehicleInfoList && vehicleInfoList.size()<1)throw new SystemException("车型年款匹配失败");
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//匹配车辆信息
|
|
//匹配车辆信息
|
|
|
vehicleInfoList.stream().forEach(a ->{
|
|
vehicleInfoList.stream().forEach(a ->{
|
|
@@ -295,9 +301,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
- } catch (IOException e) {
|
|
|
|
|
- throw new SystemException("车型查询接口异常,请联系管理。");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|