This commit is contained in:
wangjinlei
2023-06-27 15:50:14 +08:00
parent f3c66fcd41
commit e4c4096f5b
3 changed files with 76 additions and 36 deletions

View File

@@ -107,19 +107,30 @@ class Article extends Base
}
/**
* 获取proof的详情
* 获取预接收文章详情
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
// public function getProofDetail(){
// $data = $this->request->post();
// $rule = new Validate([]);
// if(!$rule->check($data)){
// return jsonError($rule->getError());
// }
// }
public function getPreacceptArticleDetail(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
$production_info = $this->production_article_obj->where("article_id",$article_info['article_id'])->where("state",0)->find();
if(!$production_info){
return jsonSuccess("production error");
}
$refers = $this->production_article_refer_obj->where('p_article_id',$production_info['p_article_id'])->where('state',0)->select();
$re['production'] = $production_info;
$re['refers'] = $refers;
return jsonSuccess($re);
}
/**
* @title 获取文章列表(编辑)
@@ -199,7 +210,7 @@ class Article extends Base
->field("t_article_reviewer.*,t_article_reviewer_question.rated")
->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", $val['article_id'])
->where("t_article_reviewer.state", 'in', [0,1, 2, 3])
->where("t_article_reviewer.state", 'in', [0, 1, 2, 3])
->select();
$res[$key]['review'] = $cache_review;
@@ -1220,26 +1231,26 @@ class Article extends Base
// }
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 = 'Dear Dr. ' . ($v['realname'] == '' ? $v['account'] : $v['realname']) . ',<br><br>';
$tts .= 'The manuscript entitled “' . $article_info['title'] . '” has been peer-reviewed, revised and about to be published in ' . $journal_info['title'] . '.<br><br>';
$tts .= 'If you want to review this article, you could use it Submission System (<a href="https://submission.tmrjournals.com">Plese click here</a>).<br>';
$tts .= 'Your username: ' . $v['account'] . '<br>';
$tts .= 'Password: 123456qwe (Original password)<br><br>';
$tts .= 'If you are unable to review it now, you may provide your comments at a later time at your convenience. Then ,there is no need to reply to this email.<br><br>';
$tts .= 'Any comments you make will be valued by the editorial board. Please bring into our knowledge if there is any potential Conflict of Interest.<br><br><br><br>';
$tts .= 'Sincerely,<br>Editorial Office<br>' . $journal_info['title'] . '<br>';
$tts .= 'Email: ' . $journal_info['email'] . '<br>';
$tts .= 'Website:<a href="' . $journal_info['website'] . '">' . $journal_info['website'] . '</a>';
$sendUser['user_id'] = $v['user_id'];
$sendUser['email'] = $v['email'];
$sendUser['content'] = $tts;
// Queue::push('app\api\job\domail@fire',$sendUser,'domail');
sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tts, $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 = 'Dear Dr. ' . ($v['realname'] == '' ? $v['account'] : $v['realname']) . ',<br><br>';
// $tts .= 'The manuscript entitled “' . $article_info['title'] . '” has been peer-reviewed, revised and about to be published in ' . $journal_info['title'] . '.<br><br>';
// $tts .= 'If you want to review this article, you could use it Submission System (<a href="https://submission.tmrjournals.com">Plese click here</a>).<br>';
// $tts .= 'Your username: ' . $v['account'] . '<br>';
// $tts .= 'Password: 123456qwe (Original password)<br><br>';
// $tts .= 'If you are unable to review it now, you may provide your comments at a later time at your convenience. Then ,there is no need to reply to this email.<br><br>';
// $tts .= 'Any comments you make will be valued by the editorial board. Please bring into our knowledge if there is any potential Conflict of Interest.<br><br><br><br>';
// $tts .= 'Sincerely,<br>Editorial Office<br>' . $journal_info['title'] . '<br>';
// $tts .= 'Email: ' . $journal_info['email'] . '<br>';
// $tts .= 'Website:<a href="' . $journal_info['website'] . '">' . $journal_info['website'] . '</a>';
// $sendUser['user_id'] = $v['user_id'];
// $sendUser['email'] = $v['email'];
// $sendUser['content'] = $tts;
// // Queue::push('app\api\job\domail@fire',$sendUser,'domail');
// sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tts, $journal_info['email'], $journal_info['epassword']);
// }
// }
//转投操作
if ($data['trsjournal'] != 0) {
@@ -2546,7 +2557,7 @@ class Article extends Base
if ($uri == null) { //添加审稿人信息
$insert_reviewer_info['reviewer_id'] = $reviewer_info['user_id'];
$insert_reviewer_info['major'] = $reivewe['major'];
$insert_reviewer_info['cmajor'] = $reivewe['cmajor'];
// $insert_reviewer_info['cmajor'] = $reivewe['cmajor'];
$insert_reviewer_info['country'] = $reivewe['country'];
$res2 = $this->user_reviewer_info_obj->insert($insert_reviewer_info);
}