|
...
|
...
|
@@ -10,19 +10,6 @@ use App\Models\User\ViewDeptUser; |
|
|
|
|
|
|
|
class DeptUserController extends BaseController
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param ViewDeptUser $viewDeptUser
|
|
|
|
* @name :(部门获取成员列表)lists
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/17 17:27
|
|
|
|
*/
|
|
|
|
public function lists(ViewDeptUser $viewDeptUser){
|
|
|
|
$this->param['project_id'] = $this->user['project_id'];
|
|
|
|
$lists = $viewDeptUser->lists($this->map,$this->page,$this->row,$this->order);
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ViewDeptUser $viewDeptUser
|
|
...
|
...
|
@@ -42,12 +29,12 @@ class DeptUserController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(部门添加用户)add
|
|
|
|
* @name :(部门添加与更新用户)add
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/17 17:36
|
|
|
|
*/
|
|
|
|
public function add(DeptUserLogic $deptUserLogic){
|
|
|
|
public function save(DeptUserLogic $deptUserLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'dept_id'=>['required'],
|
|
|
|
'user_id'=>['required']
|
|
...
|
...
|
@@ -55,25 +42,7 @@ class DeptUserController extends BaseController |
|
|
|
'dept_id.required' => '组织架构id不能为空',
|
|
|
|
'user_id.required' => '用户id不能为空',
|
|
|
|
]);
|
|
|
|
$deptUserLogic->dept_user_add();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(编辑成员)edit
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/18 9:19
|
|
|
|
*/
|
|
|
|
public function edit(DeptUserLogic $deptUserLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>['required'],
|
|
|
|
'dept_id'=>['required'],
|
|
|
|
],[
|
|
|
|
'id.required' => 'id不能为空',
|
|
|
|
'dept_id.required' => '组织架构id不能为空',
|
|
|
|
]);
|
|
|
|
$deptUserLogic->dept_user_edit();
|
|
|
|
$deptUserLogic->dept_user_save();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|