guoyong il y a 4 ans
Parent
commit
4999e23cf4

+ 6 - 1
src/main/java/com/aoyang/tms/controller/WorkerController.java

@@ -84,8 +84,13 @@ public class WorkerController {
         WorkOrderVO vo = new WorkOrderVO();
         WorkOrder workOrder = workOrderService.getById(workOrderParam.getId());
         if (workOrder != null) {
-            BeanUtils.copyProperties(workOrder, vo);
 
+            BeanUtils.copyProperties(workOrder, vo);
+            //调度员联系电话
+            User user = commonService.findUser(workOrder.getCreater());
+            if (user!=null){
+                vo.setDispatcherPhone(user.getMobile());
+            }
             //取ExecuteTime第一条GPS上报时间作为开始运单时间,累计用时
             LocationVO locationVO = commonService.getLocationByDate(workOrder.getTruckId(), workOrder.getExecuteTime());
             if (locationVO != null) {

+ 4 - 0
src/main/java/com/aoyang/tms/controller/vo/WorkOrderVO.java

@@ -30,6 +30,10 @@ import java.util.List;
 @ApiModel(value = "WorkOrder对象", description = "运单运单表")
 public class WorkOrderVO extends WorkOrder implements Serializable {
 
+    @ApiModelProperty(value = "调度员电话")
+    private String dispatcherPhone;
+
+
     @ApiModelProperty(value = "已读未读状态,0未读,1已读")
     private Integer readFlag;