|
@@ -13,6 +13,7 @@ import com.aoyang.tms.mapper.WorkOrderMapper;
|
|
|
import com.aoyang.tms.service.*;
|
|
import com.aoyang.tms.service.*;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -327,4 +328,23 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
workOrderPageListVOIPage.setCurrent(records.getCurrent());
|
|
workOrderPageListVOIPage.setCurrent(records.getCurrent());
|
|
|
return workOrderPageListVOIPage;
|
|
return workOrderPageListVOIPage;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public WorkOrderDetail getOne(WorkOrder param) {
|
|
|
|
|
+ WorkOrderDetail workOrderDetail = new WorkOrderDetail();
|
|
|
|
|
+ WorkOrder workOrder = getById(param);
|
|
|
|
|
+ if (workOrder != null) {
|
|
|
|
|
+ workOrderDetail.setWorkOrder(workOrder);
|
|
|
|
|
+ List<String> routeGps = new ArrayList<>();
|
|
|
|
|
+ if (workOrder.getCompleteTime() != null) {
|
|
|
|
|
+ routeGps = commonService.getLocationtrip(workOrder.getTruckId(), workOrder.getExecuteTime(), workOrder.getCompleteTime());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ routeGps = commonService.getLocationtrip(workOrder.getTruckId(), workOrder.getExecuteTime(), LocalDateTime.now());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (routeGps != null) {
|
|
|
|
|
+ workOrderDetail.setRouteGps(routeGps);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return workOrderDetail;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|