Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
chenbo 2023-09-08 20:51:07 +08:00
commit 8aeec78739

View File

@ -55,14 +55,20 @@ class TaskInformationJob
if($shang_date_total_price['arr']['total_price']>$shang_date_total_price['arr']['day_money']){
$day_money=bcsub($shang_date_total_price['arr']['total_price'],$shang_date_total_price['arr']['day_money'],2);//当天还剩多少
$shang_date_total_price['arr']['supplement']=$day_money;
$transaction_pool=bcadd($transaction_pool,$day_money,2);
}else{
$shang_date_total_price['arr']['supplement']=0;
$shang_date_total_price['arr']['after_transaction_pool']=0;
$day_money=0;
$transaction_pool=bcadd($transaction_pool,$shang_date_total_price['arr']['total_price'],2);
$transaction_pool=bcsub($transaction_pool,$shang_date_total_price['arr']['day_money'],2);
if($transaction_pool<0){
$transaction_pool=0;
}
}
$shang_date_total_price['arr']['before_transaction_pool']=$day_money;
Task::where('id', $data['task_id'])->update(['status' => 3,'extend'=>json_encode($shang_date_total_price)]);
TaskTemplate::where('id',$data['template_info']['id'])->update(['transaction_pool'=>bcadd($transaction_pool,$day_money,2)]);
TaskTemplate::where('id',$data['template_info']['id'])->update(['transaction_pool'=>$transaction_pool]);
$shang_date_total_price['arr']['status']=1;
}
$name = $shang_date_total_price['name'];
@ -94,7 +100,14 @@ class TaskInformationJob
$arr['company_account_type'] = 2;
}else{
if($data['template_info']['day_count']<=$day){
Task::where('id', $data['task_id'])->update(['create_time' => $task_35['start_time']+86400,'update_time' =>time(),'start_time'=>$task_35['start_time']+86400,'end_time'=> strtotime($task_35['end_time']) + 86400]);
try{
Task::where('id', $data['task_id'])->update(['create_time' => $task_35['start_time']+86400,'update_time' =>time(),'start_time'=>$task_35['start_time']+86400,'end_time'=>$task_35['start_time']+86400+86399]);
}catch(\Exception $e){
$start_time = strtotime(date('Y-m-d'));
Task::where('id', $data['task_id'])->update(['create_time' => $start_time+86400,'update_time' =>time(),'start_time'=>$start_time+86400,'end_time'=> $start_time + 86400+86399]);
}
return false;
}
if($data['template_info']['day_count']>$day){