20201112
This commit is contained in:
@@ -22,6 +22,8 @@ class Journal extends Controller {
|
||||
protected $journal_abs_obj = '';
|
||||
protected $journal_cfp_obj = '';
|
||||
protected $article_to_topic_obj = '';
|
||||
protected $journal_paper_obj = '';
|
||||
protected $journal_paper_art_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -35,6 +37,8 @@ class Journal extends Controller {
|
||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||
$this->journal_cfp_obj = Db::name('journal_cfp');
|
||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,7 +80,7 @@ class Journal extends Controller {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$absList = $this->journal_abs_obj->where('journal_id',$data['journal_id'])->where('state',0)->order('journal_abstracting_id')->select();
|
||||
$stageList = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',1)->where('state',0)->order('journal_stage_id')->select();
|
||||
$stageList = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',1)->where('state',0)->order('journal_stage_id desc')->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['journal'=>$journal_info,'journalAbs'=>$absList,'journalStage'=>$stageList]]);
|
||||
}
|
||||
|
||||
@@ -138,11 +142,15 @@ class Journal extends Controller {
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$list = $this->article_obj->where('journal_stage_id',$journal_info['publish_stage_id'])
|
||||
->where('state',0)
|
||||
->order('article_id desc')
|
||||
->order('sort asc')
|
||||
->select();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$journal_info['publish_stage_id'])->find();
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no']==0?':':'('.$stage_info['stage_no'].'):';
|
||||
$cite = $v['abbr'].' '.$v['title'].' '.$journal_info['jabbr'].' '.$stage_info['stage_year'].';'.$stage_info['stage_vol'].$no.$v['npp'].'. doi:'.$v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['stage'=>$stage_info,'articleList'=>$list]]);
|
||||
@@ -311,4 +319,27 @@ class Journal extends Controller {
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊footer
|
||||
* @description 获取期刊footer
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getFooter
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return footers:footers#
|
||||
*/
|
||||
public function getFooter(){
|
||||
$data = $this->request->post();
|
||||
$papers = $this->journal_paper_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
|
||||
foreach ($papers as $k => $v){
|
||||
$cache_list = $this->journal_paper_art_obj->where('journal_paper_id',$v['journal_paper_id'])->where('state',0)->select();
|
||||
$papers[$k]['articles'] = $cache_list;
|
||||
}
|
||||
|
||||
$re['footers'] = $papers;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user