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