小组服务公司定时任务接口-限制为只下发/结算小组服务公司任务
This commit is contained in:
parent
598bc8ec41
commit
cc90ca0130
@ -23,7 +23,14 @@ class CronController extends BaseApiController
|
|||||||
* 结算
|
* 结算
|
||||||
*/
|
*/
|
||||||
public function settlement(){
|
public function settlement(){
|
||||||
$all=TaskSchedulingPlan::where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
// $all=TaskSchedulingPlan::where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
|
$all = TaskSchedulingPlan::whereDay('end_time','yesterday')
|
||||||
|
->withJoin(['scheduling'], 'left')
|
||||||
|
->where('scheduling.company_type', 18)
|
||||||
|
->where('is_pay',0)
|
||||||
|
->with(['template_info'])
|
||||||
|
->select()
|
||||||
|
->toArray();
|
||||||
foreach($all as $k=>$v){
|
foreach($all as $k=>$v){
|
||||||
queue(TaskInformationJob::class,$v);
|
queue(TaskInformationJob::class,$v);
|
||||||
}
|
}
|
||||||
@ -37,7 +44,9 @@ class CronController extends BaseApiController
|
|||||||
// $time=strtotime(date('Y-m-d',strtotime('-1 day')));
|
// $time=strtotime(date('Y-m-d',strtotime('-1 day')));
|
||||||
$time = strtotime(date('Y-m-d'));
|
$time = strtotime(date('Y-m-d'));
|
||||||
// $tiem_end=$time+86399;
|
// $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)->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 = [];
|
$plan_ids = [];
|
||||||
foreach ($plan_all as $k => $v) {
|
foreach ($plan_all as $k => $v) {
|
||||||
$all = TaskTemplate::where('status', 1)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray();
|
$all = TaskTemplate::where('status', 1)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user