From 2b309ced6477338c1dd7787f2712d7e2c2b74bc5 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 18 Dec 2023 10:18:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fixed=E5=90=8E=E5=8F=B0=E9=95=87=E5=90=88?= =?UTF-8?q?=E4=BC=99=E4=BA=BA=E7=AE=A1=E7=90=86=E5=91=98=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/CompanyLogic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; // 前台角色 } // 更新后台账户角色 From 9f8e86b9329d6bf3687d94124e5f4c15b0cb6909 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 18 Dec 2023 10:45:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fixed=E5=90=8E=E5=8F=B0=E9=95=87=E5=90=88?= =?UTF-8?q?=E4=BC=99=E4=BA=BA=E7=AE=A1=E7=90=86=E5=91=98=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/TaskController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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);