This commit is contained in:
wangjinlei
2024-11-13 16:10:14 +08:00
parent ef91e9de61
commit 11560a503c
4 changed files with 108 additions and 47 deletions

View File

@@ -2835,37 +2835,52 @@ class Article extends Base
$g_index = 0;
$google_time = 0;
foreach ($authors as $v) {
//获取H指数的值wos为第一scopus为第二google为第三
$c_user = $this->user_obj->where('email', $v['email'])->find();
if ($google_time < $c_user['google_time']) {//应对h指数为0的用户文章先取是否填写过h指数为0的情况
$google_time = $c_user['google_time'];
}
if ($c_user['google_index'] >= $g_index) {
$user_id = $c_user['user_id'];
$g_index = $c_user['google_index'];
if($c_user['wos_index']>$c_user['scopus_index']){//采用wos
if($g_index<$c_user['wos_index']){
$g_index = $c_user['wos_index'];
}
}else{
if($c_user['scopus_index']>0){//采用scopus
if($g_index<$c_user['scopus_index']){
$g_index = $c_user['scopus_index'];
}
}else{//采用google或者为空
if($c_user['google_index']>0){
if($g_index<$c_user['google_index']){
$g_index = $c_user['google_index'];
}
}else{//全部为空
if ($c_user['google_time']>0||$c_user['wos_time']>0||$c_user['scopus_time']>0) {//应对h指数为0的用户文章先取是否填写过h指数为0的情况
$google_time++;
}
}
}
}
// if ($google_time < $c_user['google_time']) {//应对h指数为0的用户文章先取是否填写过h指数为0的情况
// $google_time = $c_user['google_time'];
// }
// if ($c_user['google_index'] >= $g_index) {
// $user_id = $c_user['user_id'];
// $g_index = $c_user['google_index'];
// }
}
$user_info = $this->user_obj->where('user_id', $user_id)->find();
// $user_info = $this->user_obj->where('user_id', $user_id)->find();
$fen = 0;
//h指数分数
$h_fen = 0;
if ($user_info['google_index'] >= 20) {
// $h_fen = 0;
if ($g_index >= 20) {
$h_fen = 4;
}elseif ($user_info['google_index'] >= 12){
}elseif ($g_index >= 12){
$h_fen = 3;
}elseif ($user_info['google_index'] >= 6) {
}elseif ($g_index >= 6) {
$h_fen = 2;
} elseif ($user_info['google_index'] >= 2) {
} elseif ($g_index >= 2) {
$h_fen = 1;
} else {
$h_fen = 0;
}
$fen += $h_fen;
//图表
@@ -2900,7 +2915,7 @@ class Article extends Base
}
//当h指数为0 并且是编辑填写的
if ($user_info['google_index'] == 0 && $google_time > 0) {
if ($h_fen == 0 && $google_time > 0) {
if ($all_num >= 8) {
$b_fen = 4;
} elseif ($all_num == 7) {