wugg 10 ay önce
ebeveyn
işleme
2bc77c1a05
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  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(){
 	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');
 	    'belong'=>'','account_id'=>'','page'=>1,'size'=>15],'post','trim');
 		$where=[["is_del","=",0]];
 		$where=[["is_del","=",0]];
 		$workWhere=[['work_user.status','=',1]];
 		$workWhere=[['work_user.status','=',1]];
 		if($param['companyNo']!='')$where[]=['companyNo','=',$param['companyNo']];
 		if($param['companyNo']!='')$where[]=['companyNo','=',$param['companyNo']];
+		if($param['level']!='')$where[]=['level','=',$param['level']];
 		if($param['belong']!=''){
 		if($param['belong']!=''){
 			$workWhere[]=["belong","=",$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']]);
 		->paginate(['list_rows'=>$param['size'],'page'=>$param['page']]);
 //		$uidArr = WorkUser::with(['workRole'])->where(['account_id'=>array_unique(array_column($list->items(),"account_id"))])
 //		$uidArr = WorkUser::with(['workRole'])->where(['account_id'=>array_unique(array_column($list->items(),"account_id"))])
 //		->column("role_id,status,apply_name",'account_id');
 //		->column("role_id,status,apply_name",'account_id');