正在显示
1 个修改的文件
包含
8 行增加
和
5 行删除
| @@ -987,15 +987,18 @@ class ProjectController extends BaseController | @@ -987,15 +987,18 @@ class ProjectController extends BaseController | ||
| 987 | ]); | 987 | ]); |
| 988 | //查看当前用户是否存在 | 988 | //查看当前用户是否存在 |
| 989 | $hrModel = new ManageHr(); | 989 | $hrModel = new ManageHr(); |
| 990 | - $hrInfo = $hrModel->read(['id'=>$this->param['old_id']]); | ||
| 991 | - if($hrInfo === false){ | 990 | + $oldHrInfo = $hrModel->read(['id'=>$this->param['old_id']]); |
| 991 | + if($oldHrInfo === false){ | ||
| 992 | $this->response('当前用户不存在',Code::SYSTEM_ERROR); | 992 | $this->response('当前用户不存在',Code::SYSTEM_ERROR); |
| 993 | } | 993 | } |
| 994 | - $hrInfo = $hrModel->read(['id'=>$this->param['new_id'],'status'=>1]); | ||
| 995 | - if($hrInfo === false){ | 994 | + $newHrInfo = $hrModel->read(['id'=>$this->param['new_id'],'status'=>1]); |
| 995 | + if($newHrInfo === false){ | ||
| 996 | $this->response('变更的用户不存在',Code::SYSTEM_ERROR); | 996 | $this->response('变更的用户不存在',Code::SYSTEM_ERROR); |
| 997 | } | 997 | } |
| 998 | - $logic->getManagerFiled($hrInfo['entry_position'],$this->param['old_id'],$this->param['new_id'],$this->param['project_id'] ?? []); | 998 | + if($oldHrInfo['entry_position'] != $newHrInfo['entry_position']){ |
| 999 | + $this->response('不同岗位不允许变更',Code::SYSTEM_ERROR); | ||
| 1000 | + } | ||
| 1001 | + $logic->getManagerFiled($newHrInfo['entry_position'],$this->param['old_id'],$this->param['new_id'],$this->param['project_id'] ?? []); | ||
| 999 | $this->response('success'); | 1002 | $this->response('success'); |
| 1000 | } | 1003 | } |
| 1001 | 1004 |
-
请 注册 或 登录 后发表评论