| | |
| | | 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 ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @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(); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | |
| | | |
| | | /** |
| | | * 获取服务中页面订单详情 |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, orderType); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |
| | |
| | | } |
| | | } |
| | | return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | //return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, 7); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |