This commit is contained in:
wangjinlei
2023-06-30 14:46:38 +08:00
parent 504b1b9e06
commit b251027249
2 changed files with 46 additions and 5 deletions

View File

@@ -148,12 +148,14 @@ class Article extends Base
$production_info = $this->production_article_obj->where('article_id',$article_info['article_id'])->where('state',0)->find();
//refer状态获取
$refers = $this->production_article_refer_obj->where('p_article_id',$production_info['p_article_id'])->where('state',0)->select();
$refer_state = true;
$re_state = !(count($refers) == 0);
foreach ($refers as $v){
if($v['refer_doi']==""||$v['author']==""){
$refer_state = false;
$re_state = false;
}
}
$refer_state['state'] = $re_state;
$refer_state['num'] = count($refers);
$re['refer_state'] = $refer_state;
return jsonSuccess($re);
@@ -1264,8 +1266,13 @@ class Article extends Base
$tt .= "(3)All reference has written in the standard format, for example, <br/>";
$tt .= "1.Beurel E, Toups M, Nemeroff CB. The Bidirectional Relationship of Depression and Inflammation: Double Trouble. Neuron 2020;107(2):234256. Available at:<br/>http://doi.org/10.1016/j.neuron.2020.06.002<br/>";
} else if ($data['state'] == 6) { //终审
$tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
$tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.';
// $tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
// $tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.';
$tt = $article_info['accept_sn']."——".$article_info['title']."<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 .= '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 .= "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 {
$tt = '"' . $article_info['title'] . '"<br>';
$tt .= $article_info['accept_sn'] . '<br>';
@@ -2010,7 +2017,7 @@ class Article extends Base
$inset_data['journal_id'] = $data['journal'];
$inset_data['editor_id'] = $journal_info['editor_id'];
$inset_data['title'] = trim($data['title']);
$inser_data['abstrart'] = trim($data['abstrart']);
$inset_data['abstrart'] = trim($data['abstrart']);
$inset_data['keywords'] = isset($data['keyWords']) ? $data['keyWords'] : '';
$inset_data['fund'] = isset($data['fund']) ? trim($data['fund']) : '';
$inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);

View File

@@ -95,6 +95,40 @@ class Preaccept extends Base
}
}
/**非doi形式添加refer节点
* @return void
*/
public function addReferNotdoi(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>"require",
"pre_p_refer_id"=>"require",
"author"=>"require",
"title"=>"require",
"joura"=>"require",
"dateno"=>"require",
"doilink"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$p_info = $this->production_article_obj->where('article_id',$data['article_id'])->where('state',0)->find();
$pre_refer = $this->production_article_refer_obj->where('p_refer_id',$data['pre_p_refer_id'])->find();
$insert['p_article_id'] = $data['p_article_id'];
$insert['index'] = $pre_refer['index']+1;
$insert['author'] = trim($data['author']);
$insert['title'] = trim($data['title']);
$insert['joura'] = trim($data['joura']);
$insert['dateno'] = trim($data['dateno']);
$insert['doilink'] = trim($data['doilink']);
$insert['refer_doi'] = trim($data['doilink']);
$insert['is_web'] = 1;
$insert['cs'] = 1;
$adId = $this->production_article_refer_obj->insertGetId($insert);
$this->production_article_refer_obj->where('p_article_id',$p_info['p_article_id'])->where("p_refer_id","<>",$adId)->where("index",">",$pre_refer['index'])->where('state',0)->setInc('index');
return jsonSuccess([]);
}
// public function aaa(){
// $list = $this->production_article_refer_obj->where('p_article_id',423)->where('state',0)->where('index',">",0)->setInc('index');
// dump($list);