fixed后台镇合伙人管理员角色

This commit is contained in:
chenbo 2023-12-18 10:45:50 +08:00
parent baf70cbf46
commit 9f8e86b932

View File

@ -28,9 +28,7 @@ class TaskController extends BaseApiController
$time = strtotime(date('Y-m-d')); $time = strtotime(date('Y-m-d'));
$userCompanyInfo = Company::where('id', $this->userInfo['company_id'])->find(); $userCompanyInfo = Company::where('id', $this->userInfo['company_id'])->find();
$where = []; $where = [];
if ($this->userInfo['admin_id'] != 0) {
$where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if ($userCompanyInfo['company_type'] == 18) { if ($userCompanyInfo['company_type'] == 18) {
$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) {
@ -51,6 +49,9 @@ class TaskController extends BaseApiController
$where[] = ['director_uid', '=', $this->userId]; $where[] = ['director_uid', '=', $this->userId];
// $where[] = ['company_id', '=', $this->userInfo['company_id']]; // $where[] = ['company_id', '=', $this->userInfo['company_id']];
} }
if ($this->userInfo['admin_id'] != 0) {
$where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if (isset($param['date_time']) && $param['date_time'] != '') { if (isset($param['date_time']) && $param['date_time'] != '') {
$time = strtotime($param['date_time']); $time = strtotime($param['date_time']);
$param['start_time']=date('Y-m-d H:i:s',$time); $param['start_time']=date('Y-m-d H:i:s',$time);