wugg 9 months ago
parent
commit
2bc77c1a05
1 changed files with 5 additions and 2 deletions
  1. 5 2
      app/bug/controller/WorkRole.php

+ 5 - 2
app/bug/controller/WorkRole.php

@@ -206,11 +206,12 @@ class WorkRole extends Base{
 //	}
 //
 	public function WorkRoleList(){
-	    $param = $this->request->param(['companyNo'=>'','status'=>'','apply_id'=>'',
+	    $param = $this->request->param(['companyNo'=>'','status'=>'','level'=>'','apply_id'=>'',
 	    'belong'=>'','account_id'=>'','page'=>1,'size'=>15],'post','trim');
 		$where=[["is_del","=",0]];
 		$workWhere=[['work_user.status','=',1]];
 		if($param['companyNo']!='')$where[]=['companyNo','=',$param['companyNo']];
+		if($param['level']!='')$where[]=['level','=',$param['level']];
 		if($param['belong']!=''){
 			$workWhere[]=["belong","=",$param['belong']];
 		}
@@ -227,7 +228,9 @@ class WorkRole extends Base{
 		}
 		
 	
-		$list =AccountCompany::with(["accountInfo"=>["userInfo","accountItem"=>["itemName"]]])->where($where)->order('id asc')
+		$list =AccountCompany::with(["accountInfo"=>["userInfo","accountItem"=>["itemName"]]])
+		->withJoin(["account_info"],"left")
+		->where($where)->order('id asc')
 		->paginate(['list_rows'=>$param['size'],'page'=>$param['page']]);
 //		$uidArr = WorkUser::with(['workRole'])->where(['account_id'=>array_unique(array_column($list->items(),"account_id"))])
 //		->column("role_id,status,apply_name",'account_id');