This commit is contained in:
wangjinlei
2021-08-24 14:58:13 +08:00
parent 3ae9be1e60
commit 5c5143166c
6 changed files with 1333 additions and 52 deletions

View File

@@ -20,6 +20,8 @@ class Article extends Controller {
protected $article_reviewer_obj = '';
protected $article_author_obj = '';
protected $article_transfer_obj = '';
protected $chief_to_journal_obj = '';
protected $login_auto_obj = '';
public function __construct(\think\Request $request = null) {
parent::__construct($request);
@@ -36,6 +38,7 @@ class Article extends Controller {
$this->article_reviewer_obj = Db::name('article_reviewer');
$this->article_author_obj = Db::name('article_author');
$this->article_transfer_obj = Db::name('article_transfer');
$this->chief_to_journal_obj = Db::name('chief_to_journal');
}
/**
@@ -90,7 +93,7 @@ class Article extends Controller {
$where['t_article.state'] = $data['state'];
}else{
if($data['act']==1){
$where['t_article.state'] = array('in',[0,1,2,4]);
$where['t_article.state'] = array('in',[0,1,2,4,6]);
}else if($data['act']==2){
$where['t_article.state'] = array('in',[3,5]);
}
@@ -502,6 +505,9 @@ class Article extends Controller {
$tt .= 'Please find the new comments in the "<a href="http://submission.tmrjournals.com/submission?journal='.$journal_info['alias'].'">AuthorCenter</a>", Please submit your revised manuscript within two weeks.<br><br>';
$tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
}else if($data['state']==6){//终审
$tt = 'Dear '.($user_info['realname']==''?'Authors':$user_info['realname']).'<br>';
$tt .= 'Manuscript status: Your manuscript "'.$article_info['title'].'" is under reviewing by editorial member team of '.$journal_info['title'].'.';
}else{
$tt = '"'.$article_info['title'].'"<br>';
$tt .= $article_info['accept_sn'].'<br>';
@@ -515,6 +521,30 @@ class Article extends Controller {
if($data['state']!=5||$journal_info['journal_id']!=9){
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
}
if($data['state']==6){//进入终审,通知主编邮件
$chiefs = $this->chief_to_journal_obj->join('t_user','t_user.user_id = t_chief_to_journal.user_id','left')->where('t_chief_to_journal.journal_id',$journal_info['journal_id'])->where('t_chief_to_journal.state',0)->select();
foreach ($chiefs as $v){
$tts = $article_info['accept_sn'].'<br>';
$tts .= 'Dear Editor-in-Chief '.($v['realname']==''?'':$v['realname']).'<br>';
$tts .= 'The manuscript entitled “'.$article_info['title'].'”is under fininal decision status of the journal '.$journal_info['title'].'.<br>';
$tts .= '(The manuscripit in fininal decision status has been peer-reviewed, and the authors had revised all review opinions.)<br>';
$tts .= 'The editorial office would be most grateful if you could offer an opinion regarding its suitability for publication in the journal Traditional Medicine Research. You can also invite 2-3 editorial board members to give their own '
. 'comments on the manuscript by submission system.<a href="'.$this->creatLoginUrlForChief($v,$article_info['article_id']).'">Plese click here</a><br>';
$tts .= 'Any comments and decisions you make will be valued by the editorial board and the editor in chief. If you choose not to make a decision on this article, you need not to reply and log in the submission system, we will refer to the opinions of other experts.<br>';
$tts .= 'Please bring into our knowledge if there is any potential Conflict of Interest.<br><br>';
$tts .= 'Thank you for your consideration.<br>';
$tts .= 'Look forward for your reply.<br>';
$tts .= 'ReviewerCenter<br>';
$tts .= 'Your username:'.$v['account'].'<br><br>';
$tts .= 'Sincerely,<br>';
$tts .= 'Editorial Office<br>';
$tts .= $journal_info['title'].'<br>';
$tts .= 'Email: '.$journal_info['email'].'<br>';
$tts .= 'Website: '.$journal_info['website'];
}
sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tts, $journal_info['email'], $journal_info['epassword']);
}
//转投操作
if($data['trsjournal']!=0){
$tran_data['article_id'] = $data['articleId'];
@@ -537,6 +567,17 @@ class Article extends Controller {
return json(['code' => 0]);
}
private function creatLoginUrlForChief($user){
$code = md5(time().rand(1000,9999).'thinkphp');
$insert['user_id'] = $user['user_id'];
$insert['code'] = $code;
$insert['ctime'] = time();
$this->login_auto_obj->insert($insert);
$url = 'https://submission.tmrjournals.com/man_text?Art_id=336&act='.$code;
return $url;
}
/**
* 编辑文章备注
*/