Explorar el Código

后端代码提交

mashengyi hace 3 años
padre
commit
95fda89cf9

+ 14 - 0
src/main/java/com/jkcredit/invoice/service/lowerService/impl/NoCarServiceImpl.java

@@ -97,6 +97,20 @@ public class NoCarServiceImpl implements NoCarService{
                     res.append("#客户:"+customerCarRec.getCustomerName()+"企业:"+customerCarRec.getCompanyName()+"车辆:"+customerCarRec.getCarNum()+"业务类型错误");
                     continue;
                 }
+                //先查询上游是否是已经备案
+                VehicleQueryRequest vehicleQueryRequest = new VehicleQueryRequest();
+                vehicleQueryRequest.setCompanyNum(customerRec.getCompanyNum());
+                vehicleQueryRequest.setPlateColor(Integer.parseInt(customerCarRec.getCarColor()));
+                vehicleQueryRequest.setPlateNum(customerCarRec.getCarNum());
+                vehicleQueryRequest.setWaybillSource(1);
+                RespR<VehicleQueryResponse> respRB = noCarInterface.vehicleQuery(vehicleQueryRequest);
+                if(respRB.getCode()!=1 && respRB.getData().getResult()!=null && respRB.getData().getResult().size()>0){
+                    customerCarRec.setRecStatus(CommonConstants.REC_STATUS_SUC);
+                    customerCarRec.setSuccTime(DateUtil.getCurrentDateStr());
+                    //根据车牌号查询是新增还是更新
+                    updateCustomerCarRec(customerCarRec);
+                    continue;
+                }
                 //如果业务类型是无车
                 VehicleRegisterRequest vehicleRegisterRequest = new VehicleRegisterRequest();
                 if("0".equals(customerCarRec.getCarColor())){