commit
86da107c7e
@ -576,7 +576,7 @@ class VehicleController extends BaseApiController
|
||||
if($company['company_type'] != 16){
|
||||
return $this->fail('非镇街公司不能访问');
|
||||
}
|
||||
$data = VehicleContract::field('id,contract_no,contract_url,status,create_time,update_time')->where('contract_logistic_id','<>',0)->where('company_b_id',$company['id'])->select();
|
||||
$data = VehicleContract::field('id,contract_no,contract_url,status,create_time,update_time')->where('contract_logistic_id',0)->where('company_b_id',$company['id'])->select();
|
||||
return $this->success('请求成功',$data->toArray());
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,10 @@ class CompanyLogic extends BaseLogic
|
||||
//小组服务公司
|
||||
AdminLogic::insertRole($admin_id, [6]);
|
||||
$admin['group_id']=5;
|
||||
} elseif ($params['company_type']==41) {
|
||||
//镇管理公司 总负责人
|
||||
AdminLogic::insertRole($admin_id, [7]); //后台角色
|
||||
$admin['group_id']=15; // 前台角色
|
||||
}
|
||||
$userSn = User::createUserSn();
|
||||
$admin['admin_id']=$admin_id;
|
||||
|
@ -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();
|
||||
|
@ -21,9 +21,20 @@ class TaskSettlementCron extends Task{
|
||||
protected function execute()
|
||||
{
|
||||
//yesterday
|
||||
$all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'=>function($query){
|
||||
$query->where('company_type', 18);
|
||||
}])->select()->toArray();
|
||||
// $all=TaskSchedulingPlan::whereDay('end_time','yesterday')
|
||||
// ->where('is_pay',0)
|
||||
// ->with(['template_info','scheduling'=>function($query){
|
||||
// $query->where('company_type', 18);
|
||||
// }])
|
||||
// ->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){
|
||||
queue(TaskInformationJob::class,$v);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user