把之前的任务下发限制到只下发小组服务团队任务

This commit is contained in:
chenbo 2023-09-21 09:28:05 +08:00
parent 81a66bd398
commit ac8a6e7621

@ -20,7 +20,7 @@ class TaskCron extends Task
// $this->everyMinute();//每分钟
}
/**
* 执行任务
* 小组服务公司执行任务下发
* @return mixed
*/
protected function execute()
@ -29,7 +29,8 @@ class TaskCron extends Task
// $time=strtotime(date('Y-m-d',strtotime('-1 day')));
$time = strtotime(date('Y-m-d'));
// $tiem_end=$time+86399;
$plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->with('company_info')->select()->toArray();
// 查询系统目前小组公司的任务安排
$plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 18)->with('company_info')->select()->toArray();
$plan_ids = [];
foreach ($plan_all as $k => $v) {
$all = TaskTemplate::where('status', 1)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray();