diff --git a/app/api/controller/TaskController.php b/app/api/controller/TaskController.php index 30c5a46bb..5bd01dda5 100644 --- a/app/api/controller/TaskController.php +++ b/app/api/controller/TaskController.php @@ -28,9 +28,7 @@ class TaskController extends BaseApiController $time = strtotime(date('Y-m-d')); $userCompanyInfo = Company::where('id', $this->userInfo['company_id'])->find(); $where = []; - if ($this->userInfo['admin_id'] != 0) { - $where[] = ['company_id', '=', $this->userInfo['company_id']]; - } + if ($userCompanyInfo['company_type'] == 18) { $is_captain = User::where('id', $this->userId)->value('is_captain'); if ($is_captain == 1) { @@ -51,6 +49,9 @@ class TaskController extends BaseApiController $where[] = ['director_uid', '=', $this->userId]; // $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'] != '') { $time = strtotime($param['date_time']); $param['start_time']=date('Y-m-d H:i:s',$time); diff --git a/app/common/logic/CompanyLogic.php b/app/common/logic/CompanyLogic.php index 915cb2152..eef977e2e 100644 --- a/app/common/logic/CompanyLogic.php +++ b/app/common/logic/CompanyLogic.php @@ -297,7 +297,7 @@ class CompanyLogic extends BaseLogic if($params['company_type']==16){ $adminRoleId = 3; - $userGroupId = 4; + $userGroupId = 15; } elseif ($params['company_type']==17){ $adminRoleId = 4; $userGroupId = 3; @@ -306,7 +306,7 @@ class CompanyLogic extends BaseLogic $userGroupId = 5; } elseif ($params['company_type']==41) { $adminRoleId = 7; //后台角色 - $userGroupId = 15; // 前台角色 + $userGroupId = 4; // 前台角色 } // 更新后台账户角色