1
This commit is contained in:
@@ -43,6 +43,7 @@ class Article extends Controller
|
||||
protected $email_template_obj = '';
|
||||
protected $production_article_obj = '';
|
||||
protected $company_top_obj = '';
|
||||
protected $user_score_log_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
@@ -76,6 +77,7 @@ class Article extends Controller
|
||||
$this->email_template_obj = Db::name('email_template');
|
||||
$this->production_article_obj = Db::name('production_article');
|
||||
$this->company_top_obj = Db::name('company_top');
|
||||
$this->user_score_log_obj = Db::name('user_score_log');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -937,7 +939,7 @@ class Article extends Controller
|
||||
$h_check = false;
|
||||
foreach ($authors as $v) {
|
||||
$cache_report = $this->user_obj->where('email', $v['email'])->find();
|
||||
if ($article_info['state'] != 0 || $cache_report['google_time'] != 0 || $data['state'] == 3) {
|
||||
if ($article_info['state'] != 0 || $cache_report['google_time'] != 0|| $cache_report['google_index'] != 0 || $data['state'] == 3) {
|
||||
$h_check = true;
|
||||
break;
|
||||
}
|
||||
@@ -948,7 +950,7 @@ class Article extends Controller
|
||||
|
||||
//初审分数不够,自动拒稿
|
||||
if ($article_info['state'] == 0 && $article_info['type'] != 'N' && $article_info['type'] != 'T') {
|
||||
if (($journal_info['journal_id'] == 1 && $article_info['scoring'] < 4) || (($journal_info['journal_id'] == 10 || $journal_info['journal_id'] == 23) && $article_info['scoring'] < 3) || ($journal_info['journal_id'] == 21 && $article_info['scoring'] < 1) || ($journal_info['journal_id'] == 16 && $article_info['scoring'] < 2) || ($journal_info['journal_id'] != 1 && $journal_info['journal_id'] != 10 && $journal_info['journal_id'] != 21 && $journal_info['journal_id'] != 23 && $article_info['scoring'] < 1)) {
|
||||
if (($journal_info['journal_id'] == 1 && $article_info['scoring'] < 4) || (($journal_info['journal_id'] == 10 || $journal_info['journal_id'] == 23) && $article_info['scoring'] < 3) || ($journal_info['journal_id'] == 21 && $article_info['scoring'] < 0) || ($journal_info['journal_id'] == 16 && $article_info['scoring'] < 2) || ($journal_info['journal_id'] != 1 && $journal_info['journal_id'] != 10 && $journal_info['journal_id'] != 21 && $journal_info['journal_id'] != 23 && $article_info['scoring'] < 1)) {
|
||||
if (count($transfer_list) > 0) {
|
||||
//查询转投期刊信息
|
||||
$transfer_journal = $this->journal_obj->where('journal_id', $transfer_list[0]['journal_id'])->find();
|
||||
@@ -1120,6 +1122,19 @@ class Article extends Controller
|
||||
return jsonError("Submissions with a repetition rate greater than thirty percent will not be accepted");
|
||||
}
|
||||
|
||||
//接收后为用户增加积分
|
||||
if($data['state']==5){
|
||||
$score = 0;
|
||||
if($journal_info['level']=='A'){
|
||||
$score=1;
|
||||
}elseif($journal_info['level']=='B'){
|
||||
$score=0.5;
|
||||
}else{
|
||||
$score=0.3;
|
||||
}
|
||||
addUserScoreLog($user_info['user_id'],$score,"add score ".$score." for submit article :".$article_info['accept_sn'],time());
|
||||
$this->user_obj->where('user_id',$user_info['user_id'])->setInc('score',$score);
|
||||
}
|
||||
|
||||
|
||||
//添加文章状态信息(如果状态未更新可做通话用,并结束操作)
|
||||
@@ -2140,13 +2155,13 @@ class Article extends Controller
|
||||
//发送邮件给作者,表示感谢
|
||||
$tt_t = 'Dear Dr. ' . ($user_res['realname'] == '' ? $user_res['account'] : $user_res['realname']) . ',<br><br>';
|
||||
$tt1 = 'Thank you for submitting your manuscript entitled "' . $article_info['title'] . '". Your submission has been assigned the following tracking number:' . $article_info['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. Please quote the tracking number in any communication. This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in ' . $journal_info['title'] . ', you will be informed as soon as possible.<br><br><br>';
|
||||
if ($journal_info['journal_id'] == 9) { //life research 期刊发送收到文章邮件
|
||||
$tt1 .= 'Life Research applies the CC BY-NC 4.0 license. Full details of the policy can be found at https://www.tmrjournals.com/notice.html?J_num=14&footer_id=123. Authors should read Guide to Authors carefully before submitting.<br><br>';
|
||||
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact liferes@tmrjournals.com.<br><br>';
|
||||
$tt1 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
||||
$tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
||||
$tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
||||
} else { //其他期刊发送邮件
|
||||
// if ($journal_info['journal_id'] == 9) { //life research 期刊发送收到文章邮件
|
||||
// $tt1 .= 'Life Research applies the CC BY-NC 4.0 license. Full details of the policy can be found at https://www.tmrjournals.com/notice.html?J_num=14&footer_id=123. Authors should read Guide to Authors carefully before submitting.<br><br>';
|
||||
// $tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact liferes@tmrjournals.com.<br><br>';
|
||||
// $tt1 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
||||
// $tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
||||
// $tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
||||
// } else { //其他期刊发送邮件
|
||||
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact ' . $journal_info['email'] . '.<br><br>';
|
||||
$tt1 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
||||
$tt1 .= 'Sincerely,<br>Editorial Office<br>';
|
||||
@@ -2156,7 +2171,7 @@ class Article extends Controller
|
||||
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||
$tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
||||
$tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
||||
}
|
||||
// }
|
||||
|
||||
sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
||||
|
||||
|
||||
@@ -95,6 +95,12 @@ class Journal extends Controller {
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function getAllJournal(){
|
||||
$list = $this->journal_obj->where('state',0)->select();
|
||||
$re['journals'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取可申请审稿人的期刊
|
||||
|
||||
@@ -815,6 +815,18 @@ class Reviewer extends Controller
|
||||
$tt1 .= 'Contact us<br>TMR Publishing Group Address: 11 Cockle Bay Rd, Cockle Bay, Auckland 2014, New Zealand<br>Telephone: +64 02108293806<br>E-mail: publisher@tmrjournals.com';
|
||||
|
||||
|
||||
//为审稿人增加积分
|
||||
$score = 0;
|
||||
if($journal_info['level']=='A'){
|
||||
$score = 0.3;
|
||||
}elseif($journal_info['level']=="B"){
|
||||
$score = 0.2;
|
||||
}else{
|
||||
$score = 0.1;
|
||||
}
|
||||
addUserScoreLog($art_rev_info['reviewer_id'],$score,"add score ".$score." for submit article",time());
|
||||
$this->user_obj->where('user_id',$art_rev_info['reviewer_id'])->setInc('score',$score);
|
||||
|
||||
$sendReviewer = [
|
||||
'title' => 'Your contribution is greatly appreciated', // 邮件标题
|
||||
'content' => $tt1, //邮件内容
|
||||
|
||||
@@ -22,6 +22,8 @@ class Ucenter extends Controller{
|
||||
protected $user_cv_obj = '';
|
||||
protected $apply_board_obj = '';
|
||||
protected $apply_yboard_obj = '';
|
||||
protected $user_score_log_obj = '';
|
||||
protected $user_index_log_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
@@ -39,6 +41,8 @@ class Ucenter extends Controller{
|
||||
$this->user_cv_obj = Db::name('user_cv');
|
||||
$this->apply_board_obj = Db::name('apply_board');
|
||||
$this->apply_yboard_obj = Db::name('apply_yboard');
|
||||
$this->user_score_log_obj = Db::name('user_score_log');
|
||||
$this->user_index_log_obj = Db::name('user_index_log');
|
||||
}
|
||||
|
||||
|
||||
@@ -233,6 +237,7 @@ class Ucenter extends Controller{
|
||||
'major'=>$data['major'],
|
||||
'field'=>$data['field'],
|
||||
'introduction'=>$data['introduction'],
|
||||
'company'=>$data['company']
|
||||
];
|
||||
$this->user_reviewer_info_obj->where(['reviewer_id'=>$data['user_id']])->update($updata1);
|
||||
return jsonSuccess([]);
|
||||
@@ -352,10 +357,12 @@ class Ucenter extends Controller{
|
||||
->select();
|
||||
// 发表文章通过数
|
||||
$accept = $this->article_obj->where(['user_id'=>$userId,'state'=>5])->count();
|
||||
$indexs = $this->user_index_log_obj->where('user_id',$userId)->where('state',0)->count();
|
||||
$res = [
|
||||
'manuscriptNum'=>$manuscriptNum,
|
||||
'accept'=>$accept,
|
||||
'journal'=>$journal
|
||||
'journal'=>$journal,
|
||||
'index'=>$indexs
|
||||
];
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class User extends Controller
|
||||
|
||||
protected $user_obj = '';
|
||||
protected $captcha_obj = '';
|
||||
protected $article_obj = '';
|
||||
protected $user_act_obj = '';
|
||||
protected $admin_obj = '';
|
||||
protected $user_reviewer_obj = '';
|
||||
@@ -38,12 +39,16 @@ class User extends Controller
|
||||
protected $user_cert_obj = '';
|
||||
protected $apply_board_obj = '';
|
||||
protected $apply_yboard_obj = '';
|
||||
protected $user_score_log_obj = '';
|
||||
protected $user_index_log_obj = '';
|
||||
protected $article_reviewer_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->user_obj = Db::name('user');
|
||||
$this->captcha_obj = Db::name('captcha');
|
||||
$this->article_obj = Db::name('article');
|
||||
$this->user_act_obj = Db::name('user_act');
|
||||
$this->admin_obj = Db::name('admin');
|
||||
$this->user_reviewer_obj = Db::name('user_reviewer_apply');
|
||||
@@ -62,6 +67,9 @@ class User extends Controller
|
||||
$this->user_cert_obj = Db::name('user_cert');
|
||||
$this->apply_board_obj = Db::name('apply_board');
|
||||
$this->apply_yboard_obj = Db::name('apply_yboard');
|
||||
$this->user_score_log_obj = Db::name('user_score_log');
|
||||
$this->user_index_log_obj = Db::name('user_index_log');
|
||||
$this->article_reviewer_obj = Db::name('article_reviewer');
|
||||
}
|
||||
|
||||
public function pstest(){
|
||||
@@ -132,19 +140,145 @@ class User extends Controller
|
||||
/**
|
||||
* 用户评价
|
||||
*/
|
||||
public function userScore(){
|
||||
public function userScore1(){
|
||||
die();
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'user_id'=>'require'
|
||||
'num'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
|
||||
|
||||
// $user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
|
||||
// if(!$user_info){
|
||||
// return jsonError("user not has");
|
||||
// }
|
||||
$limit_start = ($data['num'] - 1) * 500;
|
||||
$list = $this->article_obj
|
||||
->field("t_article.*,t_journal.level")
|
||||
->join("t_journal","t_article.journal_id = t_journal.journal_id",'left')
|
||||
->where('t_article.state',5)
|
||||
->limit($limit_start,500)
|
||||
->select();
|
||||
foreach($list as $v){
|
||||
$check = $this->user_obj->where('user_id',$v['user_id'])->find();
|
||||
if(!$check){
|
||||
continue;
|
||||
}
|
||||
if($v['journal_id']==1&&$v['ctime']<1609430400){
|
||||
continue;
|
||||
}
|
||||
if(($v['journal_id']==12||$v['journal_id']==9||$v['journal_id']==7||$v['journal_id']==16)&&$v['ctime']<1672502400){
|
||||
continue;
|
||||
}
|
||||
if(($v['journal_id']==18||$v['journal_id']==21)&&$v['ctime']<1696089600){
|
||||
continue;
|
||||
}
|
||||
if($v['journal_id']!=1&&$v['journal_id']!=12&&$v['journal_id']!=9&&$v['journal_id']!=7&&$v['journal_id']!=16&&$v['journal_id']!=18&&$v['journal_id']!=21&&$v['ctime']<1659283200){
|
||||
continue;
|
||||
}
|
||||
$score = 0;
|
||||
if($v['level']=='A'){
|
||||
$score=1;
|
||||
}elseif($v['level']=='B'){
|
||||
$score=0.5;
|
||||
}else{
|
||||
$score=0.2;
|
||||
}
|
||||
addUserScoreLog($v['user_id'],$score,"add score ".$score." for submit article :".$v['accept_sn'],$v['ctime']);
|
||||
$this->user_obj->where('user_id',$v['user_id'])->setInc('score',$score);
|
||||
}
|
||||
dump($list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function userScore2(){
|
||||
die();
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'num'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
// $user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
|
||||
// if(!$user_info){
|
||||
// return jsonError("user not has");
|
||||
// }
|
||||
$limit_start = ($data['num'] - 1) * 500;
|
||||
$list = $this->article_reviewer_obj
|
||||
->field("t_article_reviewer.*,t_journal.level,t_journal.journal_id")
|
||||
->join('t_article','t_article.article_id = t_article_reviewer.article_id','left')
|
||||
->join('t_journal','t_journal.journal_id=t_article.journal_id','left')
|
||||
->where('t_article_reviewer.state','in',[1,2,3])
|
||||
->limit($limit_start,500)
|
||||
->select();
|
||||
|
||||
foreach($list as $v){
|
||||
$check = $this->user_obj->where('user_id',$v['reviewer_id'])->find();
|
||||
if(!$check){
|
||||
continue;
|
||||
}
|
||||
if($v['journal_id']==1&&$v['ctime']<1609430400){
|
||||
continue;
|
||||
}
|
||||
if(($v['journal_id']==12||$v['journal_id']==9||$v['journal_id']==7||$v['journal_id']==16)&&$v['ctime']<1672502400){
|
||||
continue;
|
||||
}
|
||||
if(($v['journal_id']==18||$v['journal_id']==21)&&$v['ctime']<1696089600){
|
||||
continue;
|
||||
}
|
||||
if($v['journal_id']!=1&&$v['journal_id']!=12&&$v['journal_id']!=9&&$v['journal_id']!=7&&$v['journal_id']!=16&&$v['journal_id']!=18&&$v['journal_id']!=21&&$v['ctime']<1659283200){
|
||||
continue;
|
||||
}
|
||||
$score = 0;
|
||||
if($v['level']=='A'){
|
||||
$score = 0.2;
|
||||
// }elseif($v['level']=="B"){
|
||||
// $score = 0.2;
|
||||
}else{
|
||||
$score = 0.1;
|
||||
}
|
||||
addUserScoreLog($v['reviewer_id'],$score,"add score ".$score." for submit article",$v['ctime']);
|
||||
$this->user_obj->where('user_id',$v['reviewer_id'])->setInc('score',$score);
|
||||
}
|
||||
dump($list);
|
||||
}
|
||||
|
||||
public function addIndexApply(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'user_id'=>'require',
|
||||
'journal_id'=>'require',
|
||||
'local_doi'=>'require',
|
||||
'pub_doi'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$insert['user_id'] = $data['user_id'];
|
||||
$insert['local_doi'] = $data['local_doi'];
|
||||
$insert['pub_doi'] = $data['pub_doi'];
|
||||
$insert['ctime'] = time();
|
||||
$this->user_index_log_obj->insert($insert);
|
||||
$score = 0;
|
||||
if($journal_info['level']=='A'){
|
||||
$score = 0.5;
|
||||
}elseif($journal_info['level']=="B"){
|
||||
$score = 0.2;
|
||||
}else{
|
||||
$score = 0.1;
|
||||
}
|
||||
addUserScoreLog($data['user_id'],$score,"add score ".$score." for cite a manuscript",time());
|
||||
$this->user_obj->where('user_id',$data['user_id'])->setInc('score',$score);
|
||||
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 为所有用户发送邮件
|
||||
*/
|
||||
@@ -781,6 +915,10 @@ class User extends Controller
|
||||
return jsonSuccess($organic_results);
|
||||
}
|
||||
|
||||
public function getUserScoreLog(){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 审稿系统登录功能
|
||||
* @description 审稿系统登录功能
|
||||
|
||||
@@ -322,6 +322,19 @@ function my_doiToFrag1($data){
|
||||
$p_refer_obj->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加用户积分log信息
|
||||
*/
|
||||
function addUserScoreLog($user_id,$score,$content,$ctime,$act='+'){
|
||||
$score_obj = Db::name('user_score_log');
|
||||
$insert['user_id'] = $user_id;
|
||||
$insert['content'] = trim($content);
|
||||
$insert['score'] = $score;
|
||||
$insert['act'] = $act;
|
||||
$insert['ctime'] = $ctime;
|
||||
$score_obj->insert($insert);
|
||||
}
|
||||
|
||||
|
||||
function my_doiToFrag2($data){
|
||||
$p_refer_obj = Db::name('production_article_refer');
|
||||
|
||||
Reference in New Issue
Block a user