WHITEFANG 1 год назад
Родитель
Сommit
2c0188e5f2
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      app/api/logic/ServiceOrderLogic.php

+ 2 - 1
app/api/logic/ServiceOrderLogic.php

@@ -793,7 +793,6 @@ class ServiceOrderLogic extends BaseLogic
             if($work->isEmpty()){
                 throw new Exception('工单不存在');
             }
-            $work->appointment_time = strtotime($params['appointment_time']);
 
             //更新工单未确认上门的状态
             $work->work_status = 3;
@@ -804,6 +803,8 @@ class ServiceOrderLogic extends BaseLogic
                 'last_appointment_time'=>$work->appointment_time,
                 'this_appointment_time'=>strtotime($params['appointment_time']),
             ]);
+
+            $work->appointment_time = strtotime($params['appointment_time']);
             $work->save();
             Db::commit();
         }