1
This commit is contained in:
@@ -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['wos_index']>$c_user['scopus_index']){//采用wos
|
||||
if($g_index<$c_user['wos_index']){
|
||||
$g_index = $c_user['wos_index'];
|
||||
}
|
||||
if ($c_user['google_index'] >= $g_index) {
|
||||
$user_id = $c_user['user_id'];
|
||||
}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++;
|
||||
}
|
||||
$user_info = $this->user_obj->where('user_id', $user_id)->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'];
|
||||
// }
|
||||
}
|
||||
// $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) {
|
||||
|
||||
@@ -587,22 +587,25 @@ class Production extends Base
|
||||
}
|
||||
$this->refuseReferIndex($data['p_article_id']);
|
||||
$list = $this->production_article_refer_obj
|
||||
->field("*,
|
||||
CASE
|
||||
WHEN refer_doi != ''
|
||||
AND refer_doi IS NOT NULL
|
||||
AND refer_doi IN (
|
||||
SELECT refer_doi
|
||||
FROM t_production_article_refer
|
||||
WHERE p_article_id = ".$data['p_article_id']."
|
||||
AND state = 0
|
||||
GROUP BY refer_doi
|
||||
HAVING COUNT(*) > 1
|
||||
) THEN 1
|
||||
ELSE 0
|
||||
END AS repeat
|
||||
")
|
||||
// ->field("*,
|
||||
// CASE
|
||||
// WHEN refer_doi != ''
|
||||
// AND refer_doi IS NOT NULL
|
||||
// AND refer_doi IN (
|
||||
// SELECT refer_doi
|
||||
// FROM t_production_article_refer
|
||||
// WHERE p_article_id = ".$data['p_article_id']."
|
||||
// AND state = 0
|
||||
// GROUP BY refer_doi
|
||||
// HAVING COUNT(*) > 1
|
||||
// ) THEN 1
|
||||
// ELSE 0
|
||||
// END AS repeat
|
||||
// ")
|
||||
->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select();
|
||||
|
||||
|
||||
// echo $this->production_article_refer_obj->getLastSql();
|
||||
$re['refers'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
@@ -581,6 +581,15 @@ class Reviewer extends Base
|
||||
return json(['data' => $file_list]);
|
||||
}
|
||||
|
||||
|
||||
public function getCFilelistByID()
|
||||
{
|
||||
$rev_id = $this->request->post('revid');
|
||||
$article_rev_info = $this->article_reviewer_obj->where('art_rev_id', $rev_id)->find();
|
||||
$file_list = $this->article_file_obj->where('article_id', $article_rev_info['article_id'])->where('type_name', 'supplementary')->order('file_id desc')->limit(1)->select();
|
||||
return json(['data' => $file_list]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 审稿人详情页--获取文章审稿实例详情(审稿人,编辑)
|
||||
* @description 审稿人详情页--获取文章审稿实例详情(审稿人,编辑)
|
||||
|
||||
@@ -579,23 +579,21 @@ class User extends Base
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'user_id'=>'require',
|
||||
'realname'=>'require',
|
||||
'wos_index'=>'require',
|
||||
'google_index'=>'require'
|
||||
'realname'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
|
||||
$updata = [];
|
||||
if($data['wos_index']!=$user_info['wos_index']){
|
||||
$updata['wos_index'] = $data['wos_index'];
|
||||
$updata['wos_time'] = time();
|
||||
}
|
||||
if($data['google_index']!=$user_info['google_index']){
|
||||
$updata['google_index'] = $data['google_index'];
|
||||
$updata['google_time'] = time();
|
||||
}
|
||||
// if($data['wos_index']!=$user_info['wos_index']){
|
||||
// $updata['wos_index'] = $data['wos_index'];
|
||||
// $updata['wos_time'] = time();
|
||||
// }
|
||||
// if($data['google_index']!=$user_info['google_index']){
|
||||
// $updata['google_index'] = $data['google_index'];
|
||||
// $updata['google_time'] = time();
|
||||
// }
|
||||
$updata['realname'] = trim($data['realname']);
|
||||
$updata['localname'] = trim($data['localname']);
|
||||
if(count($updata)>0){
|
||||
@@ -604,6 +602,42 @@ class User extends Base
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
|
||||
/**修改用户scopus的H指数
|
||||
* @return void
|
||||
*/
|
||||
public function editUserIndex(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"type"=>"require",
|
||||
"user_id"=>"require",
|
||||
"editor_id"=>"require",
|
||||
"index"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$user_info = $this->user_obj->where("user_id",$data['user_id'])->find();
|
||||
$editor_info = $this->user_obj->where("user_id",$data['editor_id'])->find();
|
||||
if($data['type']==0){//wos
|
||||
$user_info['wos_index'] = $data['index'];
|
||||
$user_info['wos_time'] = time();
|
||||
}elseif ($data['type']==1){//scopus
|
||||
$user_info['scopus_index'] = $data['index'];
|
||||
$user_info['scopus_time'] = time();
|
||||
$user_info['scopus_website'] = $data['website'];
|
||||
$user_info['scopus_editor'] = $editor_info['realname'];
|
||||
}else{//google
|
||||
$user_info['google_index'] = $data['index'];
|
||||
$user_info['google_time'] = time();
|
||||
$user_info['g_author'] = $data['g_author'];
|
||||
$user_info['g_website'] = $data['website'];
|
||||
$user_info['google_editor'] = $editor_info['realname'];
|
||||
}
|
||||
$this->user_obj->update($user_info);
|
||||
return jsonSuccess($user_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑灰库人员信息
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user