...
|
...
|
@@ -385,7 +385,6 @@ class PersonController extends RestBaseController |
|
|
* @return is_update:姓名是否可以修改 0:允许,1:禁止
|
|
|
* @return is_work:上班状态 1:上班,2:下班
|
|
|
* @return position:职位
|
|
|
* @return project_name:项目名称(员工有此字段)
|
|
|
*/
|
|
|
public function info(){
|
|
|
if($this->request->isGet()){
|
...
|
...
|
@@ -393,7 +392,6 @@ class PersonController extends RestBaseController |
|
|
$info1 = $this->getIndexData();
|
|
|
$info['identity'] = $info1['identity'];
|
|
|
$info['company_name'] = isset($info1['company_name'])&&!empty($info1['company_name'])?$info1['company_name']:'';
|
|
|
$info['project_name'] = isset($info1['project_name'])&&!empty($info1['project_name'])?$info1['project_name']:'';
|
|
|
|
|
|
$host = config('site.host');
|
|
|
if(isset($info['avatar']) && !empty($info['avatar'])){
|
...
|
...
|
@@ -429,23 +427,9 @@ class PersonController extends RestBaseController |
|
|
if($res['pid'] != 0){
|
|
|
//甲方企业
|
|
|
$result['identity'] = config('site.a_staff');
|
|
|
$where = ['a_sid'=>['like','%,'.$this->userId.',%'],'a_cid'=>$res['c_id']];
|
|
|
$field = 'id,name project_name';
|
|
|
$res1 = $this->getProject($where,$field);
|
|
|
}else{
|
|
|
//乙方企业
|
|
|
$result['identity'] = config('site.b_staff');
|
|
|
$where = ['b_sid'=>['like','%,'.$this->userId.',%'],'b_cid'=>$res['c_id']];
|
|
|
$field = 'id,name project_name';
|
|
|
$res1 = $this->getProject($where,$field);
|
|
|
}
|
|
|
//查询所属项目
|
|
|
if($res1){
|
|
|
$result['project_id'] = $res1['id'];
|
|
|
$result['project_name'] = $res1['project_name'];
|
|
|
}else{
|
|
|
$result['project_id'] = 0;
|
|
|
$result['project_name'] = '';
|
|
|
}
|
|
|
}
|
|
|
}else if($identity == 1){
|
...
|
...
|
|