| | |
| | | DateUtils.localDateTimeToDate(LocalDateTime.now().plusMinutes(arriveTime)), |
| | | endTripJobMaps |
| | | ); |
| | | |
| | | |
| | | // 添加车辆到达终点后限停时间到后驶离的定时任务 |
| | | //时间到后将车辆状态回滚到空闲、添加巡游订单,解绑用户和车辆关系,车辆驶离点位 |
| | | XpPoint point = xpPointClient.queryById(xpOrder.getEndPointId()).getData(); |
| | |
| | | .put("appid", appid) |
| | | .put("orderType", OrderType.USER_ORDER) |
| | | .build(); |
| | | QuartzManager.addJob( |
| | | AddCruiseMissionJob.class, |
| | | (AddCruiseMissionJob.name + xpOrder.getId()).toUpperCase(), |
| | | TimeJobType.ADD_CRUISE_MISSION, |
| | | DateUtils.localDateTimeToDate(LocalDateTime.now().plusMinutes(point.getParkingTimeLimit())), |
| | | jobMaps |
| | | ); |
| | | |
| | | Long id = redisService.getCacheObject(CacheConstants.nextOrder(xpOrder.getId().toString())); |
| | | if(id != null){ |
| | | XpOrder nextOrder = getById(id); |
| | | XpVehicle nextVehicle = xpVehicleClient.queryById(nextOrder.getVehicleId()).getData(); |
| | | PushOrderDto pushOrderDto = new PushOrderDto(); |
| | | pushOrderDto.setOrderId(nextOrder.getId().toString()); |
| | | pushOrderDto.setStartLatitude(nextOrder.getStartLat()); |
| | | pushOrderDto.setStartLongitude(nextOrder.getStartLon()); |
| | | pushOrderDto.setEndLatitude(nextOrder.getEndLat()); |
| | | pushOrderDto.setEndLongitude(nextOrder.getEndLon()); |
| | | pushOrderDto.setEndPoiName(nextOrder.getEndPointName()); |
| | | pushOrderDto.setOrderType(OrderType.USER_ORDER); |
| | | pushOrderDto.setStage(1); |
| | | pushOrderDto.setVin(nextVehicle.getVehicleVin()); |
| | | orderMissionClient.pushOrder(pushOrderDto); |
| | | QuartzManager.addJob( |
| | | AddCruiseMissionJob.class, |
| | | (AddCruiseMissionJob.name + nextOrder.getId()).toUpperCase(), |
| | | TimeJobType.ADD_CRUISE_MISSION, |
| | | DateUtils.localDateTimeToDate(LocalDateTime.now().plusMinutes(point.getParkingTimeLimit())), |
| | | jobMaps |
| | | ); |
| | | } else { |
| | | QuartzManager.addJob( |
| | | AddCruiseMissionJob.class, |
| | | (AddCruiseMissionJob.name + xpOrder.getId()).toUpperCase(), |
| | | TimeJobType.ADD_CRUISE_MISSION, |
| | | DateUtils.localDateTimeToDate(LocalDateTime.now().plusMinutes(point.getParkingTimeLimit())), |
| | | jobMaps |
| | | ); |
| | | } |
| | | break; |
| | | default: |
| | | break; |