...
|
...
|
@@ -392,4 +392,68 @@ class IndexController extends RestBaseController |
|
|
$this->error('请求方式错误!');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @title 获取甲方员工列表
|
|
|
* @description 接口说明
|
|
|
* @author 开发者
|
|
|
* @url /api/home/index/getStaffListA
|
|
|
* @method GET
|
|
|
*
|
|
|
* @header name:token require:1 default: desc:header
|
|
|
*
|
|
|
* @param name:project_id type:inter require:1 default: other desc:项目id
|
|
|
*
|
|
|
* @return data:数据@
|
|
|
* @data id:负责人id user_login:负责人姓名 position:职位
|
|
|
*/
|
|
|
public function getStaffListA(){
|
|
|
if($this->request->isGet()){
|
|
|
$project_id = $this->request->get('project_id');
|
|
|
$rule = config('site.project_id');
|
|
|
$validate = new Validate($rule['rule'],$rule['msg']);
|
|
|
if (!$validate->check(['project_id'=>$project_id])) {
|
|
|
$this->error($validate->getError());
|
|
|
}
|
|
|
|
|
|
$common = new CommonController();
|
|
|
//根据项目id获取甲方uid
|
|
|
$users = $common->getUserByProject($project_id,'id,a_sid');
|
|
|
$this->success('成功',['data'=>$users]);
|
|
|
}else{
|
|
|
$this->error('请求方式错误!');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @title 获取乙方员工列表
|
|
|
* @description 接口说明
|
|
|
* @author 开发者
|
|
|
* @url /api/home/index/getStaffListB
|
|
|
* @method GET
|
|
|
*
|
|
|
* @header name:token require:1 default: desc:header
|
|
|
*
|
|
|
* @param name:project_id type:inter require:1 default: other desc:项目id
|
|
|
*
|
|
|
* @return data:数据@
|
|
|
* @data id:负责人id user_login:负责人姓名 position:职位
|
|
|
*/
|
|
|
public function getStaffListB(){
|
|
|
if($this->request->isGet()){
|
|
|
$project_id = $this->request->get('project_id');
|
|
|
$rule = config('site.project_id');
|
|
|
$validate = new Validate($rule['rule'],$rule['msg']);
|
|
|
if (!$validate->check(['project_id'=>$project_id])) {
|
|
|
$this->error($validate->getError());
|
|
|
}
|
|
|
|
|
|
$common = new CommonController();
|
|
|
//根据项目id获取甲方uid
|
|
|
$users = $common->getUserByProjectId($project_id,'id,b_sid',1);
|
|
|
$this->success('成功',['data'=>$users]);
|
|
|
}else{
|
|
|
$this->error('请求方式错误!');
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|