From 27959bda9a29da214f92d2cbe12d2de1a287121c Mon Sep 17 00:00:00 2001 From: xman <1946321327@qq.com> Date: Mon, 2 Jun 2025 19:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8D=95=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/command/CheckOrdeRecordCommand.php | 3 +- .../command/CheckOrderDispatchCommand.php | 42 ------------------- .../common/command/CheckTTSPlantCommand.php | 1 - 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 application/common/command/CheckOrderDispatchCommand.php diff --git a/application/common/command/CheckOrdeRecordCommand.php b/application/common/command/CheckOrdeRecordCommand.php index 8a678d1..70ad812 100644 --- a/application/common/command/CheckOrdeRecordCommand.php +++ b/application/common/command/CheckOrdeRecordCommand.php @@ -22,9 +22,8 @@ class CheckOrdeRecordCommand extends Command protected function execute(Input $input, Output $output){ $Model = new OrderDispatchRecord(); - $now = date('Y-m-d H:i:s'); //创建三十分名以上未接的任务 + $now = date('Y-m-d H:i:s'); - //$Model->where('need_notice',1) $Model->where('notice_time','<=',$now) ->where('status',0) ->chunk(100, function ($list) { diff --git a/application/common/command/CheckOrderDispatchCommand.php b/application/common/command/CheckOrderDispatchCommand.php deleted file mode 100644 index 702ba8d..0000000 --- a/application/common/command/CheckOrderDispatchCommand.php +++ /dev/null @@ -1,42 +0,0 @@ -setName('check:dispatch-overtime') - ->setDescription('检测dispatch表超时任务,每分钟检测一次'); - } - - protected function execute(Input $input, Output $output){ - - $Model = new OrderDispatch(); - - $now = date('Y-m-d H:i:s'); - - $Model->where('status',OrderDispatch::STATUS_PLANIT) - ->where('plan_time','<=',$now) - ->chunk(100, function ($list) { - foreach ($list as $item) { - //1修改为超时 - $item->status = OrderDispatch::STATUS_OVERTIME; - $item->save(); - $params = ['dispatch'=>$item,'remark'=>'系统自动检测,任务超时']; - Hook::listen('order_dispatch_change',$params); - } - }); - - - $output->info('OVER'); - } - - -} \ No newline at end of file diff --git a/application/common/command/CheckTTSPlantCommand.php b/application/common/command/CheckTTSPlantCommand.php index 15c09c7..2d40e2d 100644 --- a/application/common/command/CheckTTSPlantCommand.php +++ b/application/common/command/CheckTTSPlantCommand.php @@ -25,7 +25,6 @@ class CheckTTSPlantCommand extends Command $now = date('Y-m-d H:i:s'); //两小时通知 $afterTwoHours = date('Y-m-d H:i:s', strtotime('+1 hours')); - //$Model->where('need_notice',1) $Model->where('status','=',OrderDispatch::STATUS_PLANIT) ->where('plan_time','between',[$now,$afterTwoHours]) ->where('tts_notice','<',2)