From 05529db202c7ab850c13c53abae95ccef64a9a0f Mon Sep 17 00:00:00 2001 From: gcd Date: Thu, 8 May 2025 20:52:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E5=8D=95=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E9=97=A8=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/services/OrderDispatchService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/services/OrderDispatchService.php b/application/services/OrderDispatchService.php index 13f5286..cfcd84e 100644 --- a/application/services/OrderDispatchService.php +++ b/application/services/OrderDispatchService.php @@ -267,12 +267,16 @@ class OrderDispatchService extends BaseService public function updatePlanTime(int $workerId, int $orderDispatchId, string $planTime) { $orderDispatch = $this->getOrderDispatchInfo($workerId, $orderDispatchId); + if ($orderDispatch->status !== OrderDispatch::STATUS_PLANIT) { + $this->apiError('该单不支持修改上门时间'); + } + $orderDispatch->plan_time = $planTime; $orderDispatch->save(); $orderDispatchChangeParams = [ 'dispatch' => $orderDispatch, - 'remark' => `师傅已修改上门时间,旧的时间:${$orderDispatch->plan_time},新的时间:${$planTime}` + 'remark' => "师傅修改上门时间,旧的时间:{$orderDispatch->plan_time},新的时间:$planTime" ]; Hook::listen('order_dispatch_change', $orderDispatchChangeParams);