From 495c0e3f334f903ef337409bf9bb090f072be76f Mon Sep 17 00:00:00 2001 From: xman <1946321327@qq.com> Date: Fri, 6 Jun 2025 16:47:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/behavior/OrderDispatchLog.php | 2 +- application/common/command/CheckOrderDispatchGotCommand.php | 4 +++- application/common/command/CheckSmsPlantCommand.php | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/application/admin/behavior/OrderDispatchLog.php b/application/admin/behavior/OrderDispatchLog.php index e060994..110b5fc 100644 --- a/application/admin/behavior/OrderDispatchLog.php +++ b/application/admin/behavior/OrderDispatchLog.php @@ -44,7 +44,7 @@ class OrderDispatchLog 'dispatch_id' => $dispatch->id, 'type' => 1, 'outid' => md5(time().rand(1000,9999).rand(1000,9999)), - 'craate_time' => date('Y-m-d H:i:s'), + 'create_time' => date('Y-m-d H:i:s'), 'status' => $alibaba_dyvms['sync']?1:0 ]; $service = new NoticeLogic(); diff --git a/application/common/command/CheckOrderDispatchGotCommand.php b/application/common/command/CheckOrderDispatchGotCommand.php index 358c177..414c08c 100644 --- a/application/common/command/CheckOrderDispatchGotCommand.php +++ b/application/common/command/CheckOrderDispatchGotCommand.php @@ -69,8 +69,10 @@ class CheckOrderDispatchGotCommand extends Command //预约时间过了未上门检测 private function _toarrive(){ try { + + //自动派单,改为待跟进 $Model = new OrderDispatch(); - $now = date('Y-m-d H:i:s', time() - 5 * 60); //创建三十分名以上未接的任务 + $now = date('Y-m-d H:i:s'); $count = $Model->whereIn('status', [OrderDispatch::STATUS_PLANIT,OrderDispatch::STATUS_OVERTIME]) ->where('type', 2) ->where('follow', 1) diff --git a/application/common/command/CheckSmsPlantCommand.php b/application/common/command/CheckSmsPlantCommand.php index 6db9914..f8925a8 100644 --- a/application/common/command/CheckSmsPlantCommand.php +++ b/application/common/command/CheckSmsPlantCommand.php @@ -21,7 +21,7 @@ class CheckSmsPlantCommand extends Command protected function execute(Input $input, Output $output){ $Model = new OrderDispatch(); - $now = date('Y-m-d H:i:s'); //两小时通知 + $now = date('Y-m-d H:i:s'); //提前两小时通知 $afterTwoHours = date('Y-m-d H:i:s', strtotime('+2 hours')); $Model->whereIn('status',[OrderDispatch::STATUS_PLANIT,OrderDispatch::STATUS_OVERTIME]) ->where('plan_time','between',[$now,$afterTwoHours]) @@ -32,7 +32,7 @@ class CheckSmsPlantCommand extends Command $ids[] = $item->id; try { SendMailLogic::sendToWorker($item->worker_tel); - + echo '短信发送完成:'.$item->id.PHP_EOL; }catch (Exception $exception){ echo '短信发送失败:'.$exception->getMessage().PHP_EOL; @@ -43,7 +43,6 @@ class CheckSmsPlantCommand extends Command 'create_time' => date('Y-m-d H:i:s', time()) ]); } - echo '短信发送完成:'.$item->id.PHP_EOL; } if(!empty($ids)){ OrderDispatch::whereIn('id',$ids)->update(['notice_num'=>3,'notice_time'=>date('Y-m-d H:i:s')]);