update:小组服务公司管理员可查看公司所有任务

This commit is contained in:
chenbo 2023-10-20 15:41:52 +08:00
parent 60defd526b
commit 85cc16a8cd

View File

@ -34,10 +34,11 @@ class TaskController extends BaseApiController
$is_captain = User::where('id', $this->userId)->value('is_captain'); $is_captain = User::where('id', $this->userId)->value('is_captain');
if ($is_captain == 1) { if ($is_captain == 1) {
$where[] = ['type', 'in', [31,33]]; $where[] = ['type', 'in', [31,33]];
} else {
$where[] = ['type', '=', 33];
$where[] = ['director_uid', '=', $this->userId];
} }
// else {
// $where[] = ['type', '=', 33];
// $where[] = ['director_uid', '=', $this->userId];
// }
// $where[] = ['company_id', '=', $this->userInfo['company_id']]; // $where[] = ['company_id', '=', $this->userInfo['company_id']];
} }