作者 张关杰

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

... ... @@ -987,15 +987,18 @@ class ProjectController extends BaseController
]);
//查看当前用户是否存在
$hrModel = new ManageHr();
$hrInfo = $hrModel->read(['id'=>$this->param['old_id']]);
if($hrInfo === false){
$oldHrInfo = $hrModel->read(['id'=>$this->param['old_id']]);
if($oldHrInfo === false){
$this->response('当前用户不存在',Code::SYSTEM_ERROR);
}
$hrInfo = $hrModel->read(['id'=>$this->param['new_id'],'status'=>1]);
if($hrInfo === false){
$newHrInfo = $hrModel->read(['id'=>$this->param['new_id'],'status'=>1]);
if($newHrInfo === false){
$this->response('变更的用户不存在',Code::SYSTEM_ERROR);
}
$logic->getManagerFiled($hrInfo['entry_position'],$this->param['old_id'],$this->param['new_id'],$this->param['project_id'] ?? []);
if($oldHrInfo['entry_position'] != $newHrInfo['entry_position']){
$this->response('不同岗位不允许变更',Code::SYSTEM_ERROR);
}
$logic->getManagerFiled($newHrInfo['entry_position'],$this->param['old_id'],$this->param['new_id'],$this->param['project_id'] ?? []);
$this->response('success');
}
... ...
... ... @@ -53,11 +53,10 @@ class RouteMap extends Base
* @date 2023/4/17
*/
public static function generateRoute($title, $source, $source_id, $project_id){
if(preg_match('/^[\x{0400}-\x{04FF}]+$/u', $title)){
$title = Translate::tran($title, 'en');
}
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){
$title = Translate::tran($title, 'en');
}elseif(preg_match('/^[\x{0400}-\x{04FF}]+$/u', $title)){
$title = Translate::tran($title, 'en');
}
$i=1;
$sign = generateRoute($title);
... ...