|
@@ -82,18 +82,18 @@ public class WorkerController {
|
|
|
return new Result(ErrCodeEnum.BAD_PARAM.getCode(), ErrCodeEnum.BAD_PARAM.getMessage());
|
|
return new Result(ErrCodeEnum.BAD_PARAM.getCode(), ErrCodeEnum.BAD_PARAM.getMessage());
|
|
|
}
|
|
}
|
|
|
WorkOrderVO vo = new WorkOrderVO();
|
|
WorkOrderVO vo = new WorkOrderVO();
|
|
|
- WorkOrder workOrder1 = workOrderService.getById(workOrderParam.getId());
|
|
|
|
|
- if (workOrder1 != null) {
|
|
|
|
|
- BeanUtils.copyProperties(workOrder1, vo);
|
|
|
|
|
|
|
+ WorkOrder workOrder = workOrderService.getById(workOrderParam.getId());
|
|
|
|
|
+ if (workOrder != null) {
|
|
|
|
|
+ BeanUtils.copyProperties(workOrder, vo);
|
|
|
|
|
|
|
|
//取ExecuteTime第一条GPS上报时间作为开始运单时间,累计用时
|
|
//取ExecuteTime第一条GPS上报时间作为开始运单时间,累计用时
|
|
|
- LocationVO locationVO = commonService.getLocationByDate(workOrder1.getTruckId(), workOrder1.getExecuteTime());
|
|
|
|
|
|
|
+ LocationVO locationVO = commonService.getLocationByDate(workOrder.getTruckId(), workOrder.getExecuteTime());
|
|
|
if (locationVO != null) {
|
|
if (locationVO != null) {
|
|
|
vo.setTime(DateUtils.betweenTime(locationVO.getDate(), LocalDateTime.now()));
|
|
vo.setTime(DateUtils.betweenTime(locationVO.getDate(), LocalDateTime.now()));
|
|
|
vo.setLatitude(locationVO.getLatitude());
|
|
vo.setLatitude(locationVO.getLatitude());
|
|
|
vo.setLongitude(locationVO.getLongitude());
|
|
vo.setLongitude(locationVO.getLongitude());
|
|
|
}
|
|
}
|
|
|
- List<String> routeGps = commonService.getLocationtrip(workOrderParam.getTruckId(), workOrder1.getGotoSpotTime(), LocalDateTime.now());
|
|
|
|
|
|
|
+ List<String> routeGps = commonService.getLocationtrip(workOrder.getTruckId(), workOrder.getGotoSpotTime(), LocalDateTime.now());
|
|
|
vo.setRouteGps(routeGps);
|
|
vo.setRouteGps(routeGps);
|
|
|
}
|
|
}
|
|
|
|
|
|