作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

@@ -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
@@ -53,11 +53,10 @@ class RouteMap extends Base @@ -53,11 +53,10 @@ class RouteMap extends Base
53 * @date 2023/4/17 53 * @date 2023/4/17
54 */ 54 */
55 public static function generateRoute($title, $source, $source_id, $project_id){ 55 public static function generateRoute($title, $source, $source_id, $project_id){
56 - if(preg_match('/^[\x{0400}-\x{04FF}]+$/u', $title)){  
57 - $title = Translate::tran($title, 'en');  
58 - }  
59 if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){ 56 if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){
60 $title = Translate::tran($title, 'en'); 57 $title = Translate::tran($title, 'en');
  58 + }elseif(preg_match('/^[\x{0400}-\x{04FF}]+$/u', $title)){
  59 + $title = Translate::tran($title, 'en');
61 } 60 }
62 $i=1; 61 $i=1;
63 $sign = generateRoute($title); 62 $sign = generateRoute($title);