1
This commit is contained in:
@@ -178,7 +178,6 @@ class Article extends Base
|
|||||||
$user_info = $this->user_obj->where('user_id',$article_info['user_id'])->find();
|
$user_info = $this->user_obj->where('user_id',$article_info['user_id'])->find();
|
||||||
$editor_info = $this->user_obj->where('user_id',$article_info['editor_id'])->find();
|
$editor_info = $this->user_obj->where('user_id',$article_info['editor_id'])->find();
|
||||||
//接收后为用户增加积分
|
//接收后为用户增加积分
|
||||||
if ($data['state'] == 5) {
|
|
||||||
if ($journal_info['level'] == 'A') {
|
if ($journal_info['level'] == 'A') {
|
||||||
$score = 1;
|
$score = 1;
|
||||||
} elseif ($journal_info['level'] == 'B') {
|
} elseif ($journal_info['level'] == 'B') {
|
||||||
@@ -188,7 +187,6 @@ class Article extends Base
|
|||||||
}
|
}
|
||||||
addUserScoreLog($user_info['user_id'], $score, "add score " . $score . " for submit article :" . $article_info['accept_sn'], time());
|
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);
|
$this->user_obj->where('user_id', $user_info['user_id'])->setInc('score', $score);
|
||||||
}
|
|
||||||
//添加文章状态信息(如果状态未更新可做通话用,并结束操作)
|
//添加文章状态信息(如果状态未更新可做通话用,并结束操作)
|
||||||
$insert_data['article_id'] = $data['article_id'];
|
$insert_data['article_id'] = $data['article_id'];
|
||||||
$insert_data['state_from'] = $article_info['state'];
|
$insert_data['state_from'] = $article_info['state'];
|
||||||
@@ -204,7 +202,7 @@ class Article extends Base
|
|||||||
//拒稿或者录用 - 发送审稿意见
|
//拒稿或者录用 - 发送审稿意见
|
||||||
$this->sendEmailToReviewer($data['article_id'], 5);
|
$this->sendEmailToReviewer($data['article_id'], 5);
|
||||||
|
|
||||||
$this->article_obj->where('article_id', $article_info['article_id'])->update(['rtime' => time()]);
|
// $this->article_obj->where('article_id', $article_info['article_id'])->update(['rtime' => time()]);
|
||||||
|
|
||||||
$tt = 'Manuscript ID: ' . $article_info['accept_sn'] . '<br>';
|
$tt = 'Manuscript ID: ' . $article_info['accept_sn'] . '<br>';
|
||||||
$tt .= 'Manuscript Title: ' . $article_info['title'] . '<br>';
|
$tt .= 'Manuscript Title: ' . $article_info['title'] . '<br>';
|
||||||
@@ -1272,6 +1270,10 @@ class Article extends Base
|
|||||||
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
|
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
|
||||||
$tt .= "We are delighted to inform you that your manuscript titled ".$article_info['title']." has been pre-accepted for publication in ".$journal_info['title'].". Congratulations!<br/><br/>";
|
$tt .= "We are delighted to inform you that your manuscript titled ".$article_info['title']." has been pre-accepted for publication in ".$journal_info['title'].". Congratulations!<br/><br/>";
|
||||||
$tt .= 'As per our publication requirements, as well as to ensure a smooth publication process, we kindly request you to log in to the "<a href="https://submission.tmrjournals.com">Author Center</a>" and follow the instructions provided to complete the necessary information for your manuscript.<br/><br/>';
|
$tt .= 'As per our publication requirements, as well as to ensure a smooth publication process, we kindly request you to log in to the "<a href="https://submission.tmrjournals.com">Author Center</a>" and follow the instructions provided to complete the necessary information for your manuscript.<br/><br/>';
|
||||||
|
$tt .= "Please find below the steps to access your pre-accepted manuscript:<br/><br/>";
|
||||||
|
$tt .= "1. Please log in using your credentials at <a href='https://submission.tmrjournals.com'>https://submission.tmrjournals.com</a>.<br/>";
|
||||||
|
$tt .= "2. Please find your pre-accepted manuscript list in the menu “My Manuscript” on the left.<br/>";
|
||||||
|
$tt .= "3. Please click on the “Enter Pre-accept Process” to proceed.<br/><br/>";
|
||||||
$tt .= "If you encounter any difficulties or have any questions, please do not hesitate to contact our editorial team at ".$journal_info['title'].". Welcome your new excellent work!<br/><br/>";
|
$tt .= "If you encounter any difficulties or have any questions, please do not hesitate to contact our editorial team at ".$journal_info['title'].". Welcome your new excellent work!<br/><br/>";
|
||||||
} else {
|
} else {
|
||||||
$tt = '"' . $article_info['title'] . '"<br>';
|
$tt = '"' . $article_info['title'] . '"<br>';
|
||||||
|
|||||||
@@ -91,29 +91,67 @@ class Web extends Base
|
|||||||
$r = explode("/",$data['doi']);
|
$r = explode("/",$data['doi']);
|
||||||
$p_info = $this->production_article_obj->where('doi',$r[1])->where("state",2)->find();
|
$p_info = $this->production_article_obj->where('doi',$r[1])->where("state",2)->find();
|
||||||
if(!$p_info){
|
if(!$p_info){
|
||||||
return jsonError("");
|
return jsonError("production error");
|
||||||
}
|
}
|
||||||
$article_info = $this->article_obj->where('article_id',$p_info['article_id'])->find();
|
$article_info = $this->article_obj->where('article_id',$p_info['article_id'])->find();
|
||||||
|
//只显示2023年5。1之后的文章流程
|
||||||
|
if($article_info['rtime']<1682870400){
|
||||||
|
return jsonError("time error");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$msgs = $this->article_msg_obj->where('article_id',$article_info['article_id'])->select();
|
$msgs = $this->article_msg_obj->where('article_id',$article_info['article_id'])->select();
|
||||||
|
$reviewers = $this->article_reviewer_obj
|
||||||
|
->field("t_article_reviewer.*,t_article_reviewer_question.ctime qtime,t_article_reviewer_question.rated,t_article_reviewer_question.is_anonymous")
|
||||||
|
->join("t_article_reviewer_question","t_article_reviewer_question.art_rev_id = t_article_reviewer.art_rev_id","left")
|
||||||
|
->where('t_article_reviewer.article_id',$p_info['article_id'])
|
||||||
|
->where('t_article_reviewer.state','in',[1,2,3])
|
||||||
|
->select();
|
||||||
|
foreach ($reviewers as $k => $v){
|
||||||
|
if($v['is_anonymous']==0){
|
||||||
|
$u_info = $this->user_obj->where('user_id',$v['reviewer_id'])->find();
|
||||||
|
$reviewers[$k]['reviewer_name'] = $u_info['realname'];
|
||||||
|
}else{
|
||||||
|
$reviewers[$k]['reviewer_name'] = "anonymous";
|
||||||
|
}
|
||||||
|
}
|
||||||
$begin['type'] = 0;
|
$begin['type'] = 0;
|
||||||
$begin['time'] = $article_info['ctime'];
|
$begin['time'] = $article_info['ctime'];
|
||||||
$frag[] = $begin;
|
$frag[] = $begin;
|
||||||
|
$reviewer_has = false;
|
||||||
foreach ($msgs as $v){
|
foreach ($msgs as $v){
|
||||||
|
if($v['state_to']==2&&!$reviewer_has){
|
||||||
|
$reviewer_has = true;
|
||||||
|
$frag[] = [
|
||||||
|
"type"=>$v['state_to'],
|
||||||
|
"reviewers"=>$reviewers,
|
||||||
|
"time"=>$v['ctime']
|
||||||
|
];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$frag[] = [
|
$frag[] = [
|
||||||
"type"=>$v['state_to'],
|
"type"=>$v['state_to'],
|
||||||
"time"=>$v['ctime']
|
"time"=>$v['ctime']
|
||||||
];
|
];
|
||||||
// switch ($v['state_to']){
|
}
|
||||||
// case 1:
|
//如果没有审稿状态,添加
|
||||||
// $frag[] = [
|
if(!$reviewer_has&&count($reviewers)>0){
|
||||||
// "type"=>1,
|
$frag[] = [
|
||||||
// "time"=>$v['ctime']
|
"type"=>2,
|
||||||
// ];
|
"reviewers"=>$reviewers,
|
||||||
// break;
|
"time"=>$reviewers[0]['ctime']
|
||||||
// case 2:
|
];
|
||||||
// $frag[] = [];
|
}
|
||||||
// break
|
|
||||||
// }
|
//冒泡排序法
|
||||||
|
for ($i = 0; $i < count($frag) -1; $i++) {//循环对比的轮数
|
||||||
|
for ($j = 0; $j < count($frag) - $i - 1; $j++) {//当前轮相邻元素循环对比
|
||||||
|
if ($frag[$j]["time"] > $frag[$j + 1]["time"]) {//如果前边的大于后边的
|
||||||
|
$tmp = $frag[$j];//交换数据
|
||||||
|
$frag[$j] = $frag[$j + 1];
|
||||||
|
$frag[$j + 1] = $tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$re['msgs'] = $frag;
|
$re['msgs'] = $frag;
|
||||||
|
|||||||
Reference in New Issue
Block a user