| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.model.Car; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.ICarService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.ChinaMobileUtil; |
| | |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Autowired |
| | | private ICarService carService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取订单车牌信息 |
| | | * @param orderType |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryOrderLicensePlate(Integer orderType, Integer orderId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderType == 1){ |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | if(null != orderPrivateCar.getCarId()){ |
| | | Car car = carService.selectById(orderPrivateCar.getCarId()); |
| | | map.put("licensePlate", car.getCarLicensePlate()); |
| | | } |
| | | map.put("userName", orderPrivateCar.getPassengers()); |
| | | map.put("phone", orderPrivateCar.getPassengersPhone()); |
| | | } |
| | | if(orderType == 4){ |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | if(null != orderLogistics.getCarId()){ |
| | | Car car = carService.selectById(orderLogistics.getCarId()); |
| | | map.put("licensePlate", car.getCarLicensePlate()); |
| | | } |
| | | if(null != orderLogistics.getUserId()){ |
| | | UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId()); |
| | | map.put("userName", ToolUtil.isEmpty(userInfo.getFirstName()) ? userInfo.getNickName() : userInfo.getFirstName() + " " + userInfo.getLastName()); |
| | | map.put("phone", userInfo.getPhone()); |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | | } |