Merge pull request 'preview' (#182) from preview into master

Reviewed-on: #182
This commit is contained in:
mkm 2023-12-18 10:47:22 +08:00
commit 319691ae73
2 changed files with 6 additions and 5 deletions

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);

View File

@ -297,7 +297,7 @@ class CompanyLogic extends BaseLogic
if($params['company_type']==16){ if($params['company_type']==16){
$adminRoleId = 3; $adminRoleId = 3;
$userGroupId = 4; $userGroupId = 15;
} elseif ($params['company_type']==17){ } elseif ($params['company_type']==17){
$adminRoleId = 4; $adminRoleId = 4;
$userGroupId = 3; $userGroupId = 3;
@ -306,7 +306,7 @@ class CompanyLogic extends BaseLogic
$userGroupId = 5; $userGroupId = 5;
} elseif ($params['company_type']==41) { } elseif ($params['company_type']==41) {
$adminRoleId = 7; //后台角色 $adminRoleId = 7; //后台角色
$userGroupId = 15; // 前台角色 $userGroupId = 4; // 前台角色
} }
// 更新后台账户角色 // 更新后台账户角色