update:镇农科任务分角色查看自己的任务列表
This commit is contained in:
parent
a57282c551
commit
141b8c2cd8
@ -25,6 +25,8 @@ class TaskController extends BaseApiController
|
||||
$param = Request()->param();
|
||||
[$page, $limit] = $this->getPage();
|
||||
$time = strtotime(date('Y-m-d'));
|
||||
$userCompanyInfo = Company::where('id', $this->userInfo['company_id'])->find();
|
||||
if ($userCompanyInfo['company_type'] == 18) {
|
||||
if ($this->userInfo['admin_id'] != 0) {
|
||||
$where[] = ['company_id', '=', $this->userInfo['company_id']];
|
||||
} else {
|
||||
@ -38,6 +40,12 @@ class TaskController extends BaseApiController
|
||||
}
|
||||
$where[] = ['company_id', '=', $this->userInfo['company_id']];
|
||||
}
|
||||
}
|
||||
|
||||
if ($userCompanyInfo['company_type'] == 41) {
|
||||
$where[] = ['director_uid', '=', $this->userId];
|
||||
$where[] = ['company_id', '=', $this->userInfo['company_id']];
|
||||
}
|
||||
if (isset($param['date_time']) && $param['date_time'] != '') {
|
||||
$time = strtotime($param['date_time']);
|
||||
$param['start_time']=date('Y-m-d H:i:s',$time);
|
||||
|
Loading…
x
Reference in New Issue
Block a user