From 3701dcb2483643ac40d4b81c021b3d8cdab62402 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期五, 06 九月 2024 21:50:18 +0800
Subject: [PATCH] 8.9

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
index cc9717b..796742e 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChangeDispatchController.java
@@ -18,6 +18,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -61,10 +62,10 @@
                 request.getPageSize()));
         for (ChangeDispatch record : page.getRecords()) {
             Order byId = orderService.getById(record.getOrderId());
-            if (byId!=null){
-                record.setType(byId.getType());
-
-            }
+//            if (byId!=null){
+//                record.setType(byId.getType());
+//
+//            }
         }
         return R.ok(page);
     }
@@ -244,9 +245,9 @@
                 .set(Order::getIsReinvest, Constants.ONE)
                 .set(Order::getAcceptTime, new Date())
                 .set(Order::getArriveTime, null)
-                .set(Order::getCompleteTime, null)
+                .set(Order::getCompleteTime, null).set(Order::getAcceptTime, LocalDateTime.now())
                 // 原订单状态改为 1:待上门,已选择师傅
-                .set(Order::getState, Constants.ONE)
+                .set(Order::getState, Constants.ONE).set(Order::getServerId, workerId).set(Order::getServerName, name).set(Order::getServerPhone, phone)
                 .eq(Order::getId, order.getId()).update();
         // 改派信息
         boolean update = changeDispatchService.lambdaUpdate().set(ChangeDispatch::getState, 1)

--
Gitblit v1.7.1