|
|
@@ -215,7 +215,8 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<CarModelDTO> modelsQuery(CarModel_Req carModelReq) {
|
|
|
+ public List<ModelsQueryResponse.VehicleInfo> modelsQuery(CarModel_Req carModelReq) {
|
|
|
+// public List<CarModelDTO> modelsQuery(CarModel_Req carModelReq) {
|
|
|
// 获取协议配置信息
|
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(carModelReq.getAgreementId());
|
|
|
|
|
|
@@ -254,15 +255,15 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
try {
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
ModelsQueryResponse rd = xmlMapper.readValue(cleanStr, ModelsQueryResponse.class);
|
|
|
- List<CarModelDTO> dtoList = buildCarModel(rd);
|
|
|
+ List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd);
|
|
|
|
|
|
- long count = dtoList.stream().filter(x -> x.getModelCode().equals(carInfo.getModelCode())).count();
|
|
|
+ long count = vehicleInfoList.stream().filter(x -> x.getModelCode().equals(carInfo.getModelCode())).count();
|
|
|
|
|
|
if(count < 1 ){
|
|
|
//匹配车辆信息
|
|
|
- dtoList.stream().forEach(a ->{
|
|
|
+ vehicleInfoList.stream().forEach(a ->{
|
|
|
//购置价匹配
|
|
|
- if(a.getReplacementValue().equals(carInfo.getPurchasePrice())){
|
|
|
+ if(a.getVehiclePrice().equals(carInfo.getPurchasePrice())){
|
|
|
carInfo.setModelCode(a.getModelCode());
|
|
|
}
|
|
|
});
|
|
|
@@ -1061,17 +1062,20 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
* @author: lig
|
|
|
* @date: 2023年02月07日 0007
|
|
|
*/
|
|
|
- private List<CarModelDTO> buildCarModel(ModelsQueryResponse modelsQueryResponse) {
|
|
|
+ private List<ModelsQueryResponse.VehicleInfo> buildCarModel(ModelsQueryResponse modelsQueryResponse) {
|
|
|
+// private List<CarModelDTO> buildCarModel(ModelsQueryResponse modelsQueryResponse) {
|
|
|
|
|
|
List<ModelsQueryResponse.VehicleInfo> vList = modelsQueryResponse.getVehicleInfoList();
|
|
|
- List<CarModelDTO> carModelList = new ArrayList<>();
|
|
|
|
|
|
- vList.stream().forEach(a -> {
|
|
|
- CarModelDTO dto = new CarModelDTO();
|
|
|
- BeanUtils.copyProperties(a, dto);
|
|
|
- carModelList.add(dto);
|
|
|
- });
|
|
|
- return carModelList;
|
|
|
+ return vList;
|
|
|
+// List<CarModelDTO> carModelList = new ArrayList<>();
|
|
|
+//
|
|
|
+// vList.stream().forEach(a -> {
|
|
|
+// CarModelDTO dto = new CarModelDTO();
|
|
|
+// BeanUtils.copyProperties(a, dto);
|
|
|
+// carModelList.add(dto);
|
|
|
+// });
|
|
|
+// return carModelList;
|
|
|
}
|
|
|
|
|
|
|