更新 app/api/controller/TaskController.php
补丁
This commit is contained in:
parent
18d8f28a90
commit
7e4931803e
@ -45,7 +45,6 @@ class TaskController extends BaseApiController
|
||||
$param['end_time']=date('Y-m-d H:i:s',$end);
|
||||
$where[] = ['start_time', 'between', [$time, $end]];
|
||||
}
|
||||
|
||||
}
|
||||
if (isset($param['status']) && $param['status'] > 0) {
|
||||
$where[] = ['status', '=', $param['status']];
|
||||
@ -58,16 +57,18 @@ class TaskController extends BaseApiController
|
||||
foreach ($res as $k => $item) {
|
||||
if ($item['type'] == 33) {
|
||||
$company = Company::where('id', $item['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade,responsible_area')->find(); // 可能要判断预存金是否满足
|
||||
$find = App(RemoteController::class)->shang_date_total_price($company,1,$param,$item['template_id']);
|
||||
$find = App(RemoteController::class)->shang_date_total_price($company,$param,$item['template_id']);
|
||||
if ($find != false) {
|
||||
$transaction_pool=TaskTemplate::where('id',$item['template_id'])->value('transaction_pool');
|
||||
if($transaction_pool==0){
|
||||
$find['transaction_pool']=0;
|
||||
}else{
|
||||
$find['transaction_pool']=$transaction_pool;
|
||||
if($time<time()){
|
||||
$transaction_pool=TaskTemplate::where('id',$item['template_id'])->value('transaction_pool');
|
||||
if($transaction_pool==0){
|
||||
$find['transaction_pool']=0;
|
||||
}else{
|
||||
$find['transaction_pool']=$transaction_pool;
|
||||
}
|
||||
$res[$k]['extend']['transaction'] = $find;
|
||||
}
|
||||
$res[$k]['extend']['transaction'] = $find;
|
||||
Task::where('id',$item['id'])->update(['extend'=>json_encode(['transaction'=>$find],true)]);
|
||||
// Task::where('id',$item['id'])->update(['extend'=>json_encode(['transaction'=>$find],true)]);
|
||||
} else {
|
||||
$res[$k]['extend']['transaction'] = '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user