更新
This commit is contained in:
parent
1223a858ed
commit
42e20bc12f
@ -18,7 +18,7 @@ class CeshiController extends BaseApiController
|
||||
{
|
||||
// $all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||
// halt($all);
|
||||
$all=TaskSchedulingPlan::where('id',411)->with(['template_info','scheduling'])->select()->toArray();
|
||||
$all=TaskSchedulingPlan::whereDay('end_time')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||
foreach($all as $k=>$v){
|
||||
queue(TaskInformationJob::class,$v);
|
||||
}
|
||||
|
@ -42,11 +42,22 @@ class TaskTemplateLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
$moeny=TaskTemplate::where('company_id', $params['company_id'])->sum('money');
|
||||
$money_two=TaskTemplate::where('company_id', $params['company_id'])->sum('money_two');
|
||||
$money_three=TaskTemplate::where('company_id', $params['company_id'])->sum('money_three');
|
||||
$SchedulingMoney=TaskScheduling::where('company_id', $params['company_id'])->value('money');
|
||||
|
||||
if($moeny+$params['money']>$SchedulingMoney){
|
||||
self::setError('任务模板合计金额不能大于任务调度金额');
|
||||
return false;
|
||||
}
|
||||
if($money_two+$params['money']>$SchedulingMoney){
|
||||
self::setError('任务模板合计金额不能大于任务调度金额');
|
||||
return false;
|
||||
}
|
||||
if($money_three+$params['money']>$SchedulingMoney){
|
||||
self::setError('任务模板合计金额不能大于任务调度金额');
|
||||
return false;
|
||||
}
|
||||
TaskTemplate::create([
|
||||
'title' => $params['title'],
|
||||
'admin_id' => $params['admin_id'],
|
||||
|
@ -13,8 +13,8 @@ class TaskCron extends Task{
|
||||
|
||||
public function configure()
|
||||
{
|
||||
// $this->daily(); //设置任务的周期,每天执行一次,更多的方法可以查看源代码,都有注释
|
||||
$this->everyMinute();
|
||||
$this->daily(); //设置任务的周期,每天执行一次,更多的方法可以查看源代码,都有注释
|
||||
// $this->everyMinute();
|
||||
}
|
||||
/**
|
||||
* 执行任务
|
||||
|
@ -11,8 +11,8 @@ class TaskSettlementCron extends Task{
|
||||
|
||||
public function configure()
|
||||
{
|
||||
// $this->daily(); //设置任务的周期,每天执行一次,更多的方法可以查看源代码,都有注释
|
||||
$this->everyMinute();
|
||||
$this->daily(); //设置任务的周期,每天执行一次,更多的方法可以查看源代码,都有注释
|
||||
// $this->everyMinute();
|
||||
}
|
||||
/**
|
||||
* 任务结算
|
||||
|
Loading…
x
Reference in New Issue
Block a user