This commit is contained in:
wangjinlei
2021-07-15 10:22:44 +08:00
parent 234745046d
commit 8ea54fdcc2
7 changed files with 12 additions and 176 deletions

View File

@@ -194,7 +194,7 @@ class Article extends Controller {
$editor_info = $this->user_obj->where('user_id',$journal_info['editor_id'])->find();
//更新文章状态
$this->article_obj->where('article_id',$data['article_id'])->update(['journal_id'=>$data['journal_id'],'editor_id'=>$journal_info['editor_id'],'state'=>1]);
$this->article_obj->where('article_id',$data['article_id'])->update(['journal_id'=>$data['journal_id'],'editor_id'=>$journal_info['editor_id'],'author_act'=>1,'state'=>1]);
//跟新转投表状态
$this->article_transfer_obj->where('transfer_id',$data['transfer_id'])->update(['state'=>1]);
@@ -225,52 +225,6 @@ class Article extends Controller {
//接受参数查询信息
$data = $this->request->post();
// return json($data);
// $data['abstrart'] = "dsadsadsadsa";
// $data['accept_sn'] = "20200811001";
// $data['articleId'] = 7;
// $data['authorList'] = [
// [
// 'address'=>"dsad",
// 'art_aut_id'=>5,
// 'company'=>"sads",
// 'country'=>"China",
// 'department'=>"adsa",
// 'email'=>"dsadsadsa",
// 'firstname'=>"dsadsa",
// 'isReport'=>'true',
// 'isSuper'=>"true",
// 'lastname'=>"dsadsa",
// 'title'=>"Ph.D."
// ],
// [
// 'address'=>"",
// 'art_aut_id'=>6,
// 'company'=>"dsadsa",
// 'country'=>"Angola",
// 'department'=>"dsa",
// 'email'=>"dsadsa",
// 'firstname'=>"dsad7",
// 'isReport'=>"false",
// 'isSuper'=>"true",
// 'lastname'=>"sada",
// 'title'=>"Associate Prof."
// ]
// ];
// $data['coverLetter']='';
// $data['ctime']="1597138197";
// $data['fund']="sadsadasd";
// $data['journal']="20";
// $data['journalname']="Infectious Diseases Research";
// $data['keyWords']="dsadsad";
// $data['manuscirpt']='';
// $data['picturesAndTables']='';
// $data['state']='4';
// $data['title']="dsadsadsa";
// $data['username']="wangjinlei";
$username = $data['username'];
$user_res = $this->user_obj->where(['account' => $username])->find();
$article_old_info = $this->article_obj->where('article_id',$data['articleId'])->find();
@@ -450,7 +404,7 @@ class Article extends Controller {
//查询转投期刊信息
$transfer_journal = $this->journal_obj->where('journal_id',$transfer_list[0]['journal_id'])->find();
//转投
$this->article_obj->where('article_id',$data['articleId'])->update(['state'=>1,'journal_id'=>$transfer_list[0]['journal_id'],'editor_id'=>$transfer_journal['editor_id']]);
$this->article_obj->where('article_id',$data['articleId'])->update(['state'=>1,'journal_id'=>$transfer_list[0]['journal_id'],'author_act'=>1,'editor_id'=>$transfer_journal['editor_id']]);
//转投信息表信息状态改变
$this->article_transfer_obj->where('transfer_id',$transfer_list[0]['transfer_id'])->update(['state'=>1]);
//查找转投journal信息
@@ -475,6 +429,7 @@ class Article extends Controller {
$tt .= 'Unfortunately the editors feel that '.$journal_info['title'].' is not the appropriate venue for your manuscript. I am writing just to follow up on the suggestion from the editor of Traditional Medicine Research that you might be interested in submitting your paper to '.$tran_journal['title'].' instead.<br><br>Yours sincerely,<br><br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$tran_journal['website'];
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
@@ -554,6 +509,7 @@ class Article extends Controller {
$tt .= 'Dear '.($user_info['realname']==''?'Authors':$user_info['realname']).',<br>Please check the new status of your manuscript online.<br><br>';
}
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$journal_info['website'];
if($data['state']!=5||$journal_info['journal_id']!=9){
@@ -694,6 +650,7 @@ class Article extends Controller {
$tt .= 'Your username:'.$reviewer_info['account'].'<br><br>';
$tt .= 'Your original password:123456qwe , if you have reset the password, please login with the new one or click the "<a href="https://submission.tmrjournals.com/retrieve">forgot password</a>".<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= $journal_info['title'].'<br>';
$tt .= 'Email:'.$journal_info['email'].'<br>';
$tt .= 'Website:'.$journal_info['website'];
@@ -708,7 +665,6 @@ class Article extends Controller {
//添加usermsg
add_usermsg($data['uid'], 'You have new manuscript to be approved', '/reviewerArticleDetail?id=' . $res);
return json(['code' => 0]);
}
@@ -766,32 +722,6 @@ class Article extends Controller {
public function addArticle() {
//接受参数,查询信息
$data = $this->request->post();
// return json($data);
// $data['abstrart'] = '大萨达撒多';
// $data['authorList'] = [
// [
// 'address'=>'dsadsa',
// 'company'=>'dasdsa',
// 'country'=>'china',
// 'department'=>'dsadsa',
// 'email'=>'6541654@qq.com',
// 'firstname'=>'dsadsa',
// 'isReport'=>'true',
// 'isSuper'=>'true',
// 'lastname'=>'dsadsa',
// 'title'=>'Ph.D.'
// ]
// ];
// $data['coverLetter'] = '';
// $data['fund'] = 'dsads';
// $data['journal'] = 1;
// $data['keyWords'] = 'dsads';
// $data['manuscirpt'] = "manuscirpt/20200727/cd67d8e8f944b5f1589cceb8e1aa967c.pdf";
// $data['picturesAndTables'] = [];
// $data['title'] = "大萨达撒多";
// $data['username'] = "wangjinlei";
$user_res = $this->user_obj->where('account', $data['username'])->find();
$journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
@@ -846,6 +776,7 @@ class Article extends Controller {
$transr = $transr?$this->article_transfer_obj->insert($trans_insert):false;
}
}
//增加articlefile表的信息
$res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
@@ -877,6 +808,7 @@ class Article extends Controller {
$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>';
$tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt1 .= $journal_info['title'].'<br>';
$tt1 .= 'Email: '.$journal_info['email'].'<br>';
$tt1 .= 'Website: '.$journal_info['website'];