This commit is contained in:
mkm 2023-08-15 17:27:02 +08:00
parent 9122fa5e32
commit 3694306277
2 changed files with 10 additions and 6 deletions

View File

@ -15,6 +15,15 @@ class TaskController extends BaseApiController{
$where[]=['director_uid','=',$this->userId];
$where[]=['status','=',1];
}
if(isset($param['date_time']) && $param['date_time']!=''){
$time=strtotime($param['date_time']);
$end=$time+86399;
$where[]=['start_time','between',[$time,$end]];
}else{
$time=strtotime(date('Y-m-d'));
$end=$time+86399;
$where[]=['start_time','between',[$time,$end]];
}
$res=Task::where($where)
->field(['id', 'title','money','template_id','director_uid', 'company_id', 'start_time', 'end_time', 'director_uid', 'type', 'status', 'content','extend'])
->page($page,25)

View File

@ -41,7 +41,7 @@ class TaskInformationJob
return false;
}
}else{
$task_count = Task::where('id', $data['task_id'])->field('director_uid')->with('director_info')->find();
$task_count = Task::where('id', $data['task_id'])->field('director_uid')->where('status',3)->with('director_info')->find();
if (empty($task_count)) {
Log::error('任务结算失败任务id' . $data['task_id']);
return false;
@ -52,11 +52,6 @@ class TaskInformationJob
}
if ($data['template_info']['type'] == 32) {
$yesterday = date('Y-m-d', strtotime('-1 day', time()));
// "brigade_id" => "3",
// "city_code" => "510500",
// "district_code" => "510502",
// "street_code" => "510502106",
// "village_code" => "510502106201",
$parmas = [
"start_date" => $yesterday,
"end_date" => $yesterday