This commit is contained in:
wangjinlei
2024-11-19 09:48:27 +08:00
parent 0563c1217b
commit 79de1c784a
2 changed files with 18 additions and 14 deletions

View File

@@ -1187,17 +1187,17 @@ class Article extends Base
//判断文章的h指数是否添加
$authors = $this->article_author_obj->where('article_id', $data['articleId'])->where('is_report', 1)->select();
$h_check = false;
foreach ($authors as $v) {
$cache_report = $this->user_obj->where('email', $v['email'])->find();
if ($cache_report == null || $article_info['state'] != 0 || $cache_report['google_time'] != 0 ||$cache_report['g_author']!=""|| $cache_report['google_index'] != 0 || $data['state'] == 3) {
$h_check = true;
break;
}
}
if ($article_info['state'] == 0 && $authors && $h_check == false) {
return jsonError('Please complete the H-index before proceeding');
}
// $h_check = false;
// foreach ($authors as $v) {
// $cache_report = $this->user_obj->where('email', $v['email'])->find();
// if ($cache_report == null || $article_info['state'] != 0 || $cache_report['google_time'] != 0 ||$cache_report['g_author']!=""|| $cache_report['google_index'] != 0 || $data['state'] == 3) {
// $h_check = true;
// break;
// }
// }
// if ($article_info['state'] == 0 && $authors && $h_check == false) {
// return jsonError('Please complete the H-index before proceeding');
// }
//初审分数不够,自动拒稿
if ($article_info['state'] == 0 && $article_info['type'] != 'N' && $article_info['type'] != 'T') {
@@ -1494,6 +1494,7 @@ class Article extends Base
$tt .= "(2)All information of references are available, such as year, volume, page and URL.<br/>";
$tt .= "(3)All reference has written in the standard format, for example, <br/>";
$tt .= "1.Beurel E, Toups M, Nemeroff CB. The Bidirectional Relationship of Depression and Inflammation: Double Trouble. Neuron 2020;107(2):234256. Available at:<br/>http://doi.org/10.1016/j.neuron.2020.06.002<br/>";
$tt .= "(4)Please ensure that every reference includes a DOI. Promptly remove or replace any references that lack a DOI.<br/><br/>";
} else if ($data['state'] == 6) { //终审
// $tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
// $tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.';

View File

@@ -631,7 +631,7 @@ class User extends Base
$this->user_obj->update($user_info);
}else{//google
if(isset($data['g_author'])&&$data['g_author']!=null&&$data['g_author']!=""){
$this->googleBindAuthorNew($data['user_id'],$data['g_author']);
$this->googleBindAuthorNew($data['user_id'],$data['g_author'],$editor_info['realname']);
}else{
$user_info['google_index'] = $data['index'];
$user_info['google_time'] = time();
@@ -639,7 +639,9 @@ class User extends Base
$this->user_obj->update($user_info);
}
}
return jsonSuccess($user_info);
$new_user = $this->user_obj->where("user_id",$user_info['user_id'])->find();
return jsonSuccess($new_user);
}
/**
@@ -1628,7 +1630,7 @@ class User extends Base
return jsonSuccess($organic_results);
}
private function googleBindAuthorNew($user_id,$g_author){
private function googleBindAuthorNew($user_id,$g_author,$editor_name){
$this->user_obj->where('user_id',$user_id)->update(['g_author'=>trim($g_author)]);
//绑定完成后自动获取指数
Loader::import("google.google-search-results");
@@ -1647,6 +1649,7 @@ class User extends Base
$updata['google_index'] = $h_index;
$updata['google_time'] = time();
$updata['google_editor'] = $editor_name;
$this->user_obj->where('user_id',$user_id)->update($updata);
}