| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.OrderCrossCityInfoWrapper; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.OrderWarpper; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.system.dao.DriverWorkMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverWork; |
| | | import com.stylefeng.guns.modular.system.model.Reassign; |
| | | import com.stylefeng.guns.modular.system.model.SysTimeoutMoney; |
| | | import com.stylefeng.guns.modular.system.model.TimeOutAppeal; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ChinaMobileUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | |
| | | |
| | | @Resource |
| | | private DriverWorkMapper driverWorkMapper; |
| | | |
| | | @Autowired |
| | | private ICarService carService; |
| | | |
| | | |
| | | |
| | |
| | | if(null == driverWork1){ |
| | | return ResultUtil.error("您已下班,无法接单"); |
| | | } |
| | | |
| | | Driver driver = driverService.selectById(uid); |
| | | |
| | | //判断车辆是否正在使用中 |
| | | Car car = carService.selectById(driver.getCarId()); |
| | | if(car.getUseDriverId() != null && !car.getUseDriverId().equals(uid)){ |
| | | return ResultUtil.error("当前绑定车辆正在使用中,请更换车辆"); |
| | | }else if(car.getUseDriverId()==null){ |
| | | car.setUseDriverId(uid); |
| | | carService.updateById(car); |
| | | } |
| | | |
| | | return orderService.grabOrder(orderId, orderType, uid); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |