20201112
This commit is contained in:
@@ -70,10 +70,6 @@ class Article extends Controller {
|
||||
$atto = $this->article_author_to_organ_obj->where('article_id', $article_info['article_id'])->where('state', 0)->select();
|
||||
$author = $this->sys_author($authors, $organs, $atto);
|
||||
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $article_info['abbr'] . '. ' . $article_info['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $article_info['npp'] . '. doi:' . $article_info['doi'];
|
||||
|
||||
//标题斜体
|
||||
$caches = $this->article_ltai_obj->where('article_id',$article_info['article_id'])->where('state',0)->column('content');
|
||||
$cache_title = $article_info['title'];
|
||||
@@ -82,6 +78,10 @@ class Article extends Controller {
|
||||
}
|
||||
$article_info['title'] = $cache_title;
|
||||
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $article_info['abbr'] . '. ' . $article_info['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $article_info['npp'] . '. doi:' . $article_info['doi'];
|
||||
|
||||
//修改keywords
|
||||
$article_info['keywords'] = str_replace(',', ' ', $article_info['keywords']);
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ class Journal extends Controller {
|
||||
protected $journal_notices_obj = '';
|
||||
protected $journal_abs_obj = '';
|
||||
protected $journal_cfp_obj = '';
|
||||
protected $journal_line_obj = '';
|
||||
protected $article_to_topic_obj = '';
|
||||
protected $article_to_line_obj = '';
|
||||
protected $journal_paper_obj = '';
|
||||
protected $journal_paper_art_obj = '';
|
||||
|
||||
@@ -39,7 +41,9 @@ class Journal extends Controller {
|
||||
$this->journal_notices_obj = Db::name('journal_notices');
|
||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||
$this->journal_cfp_obj = Db::name('journal_cfp');
|
||||
$this->journal_line_obj = Db::name('journal_line');
|
||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||
$this->article_to_line_obj = Db::name('article_to_line');
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
}
|
||||
@@ -82,7 +86,7 @@ class Journal extends Controller {
|
||||
public function getJournal() {
|
||||
$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();
|
||||
$absList = $this->journal_abs_obj->where('journal_id', $data['journal_id'])->where('state', 0)->order('sort')->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]]);
|
||||
}
|
||||
@@ -128,6 +132,65 @@ class Journal extends Controller {
|
||||
}
|
||||
return $vv;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊line
|
||||
* @description 获取期刊line
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getJournalLine
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return lines:期刊line数组#
|
||||
*/
|
||||
public function getJournalLine(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->journal_line_obj->where('journal_id',$data['journal_id'])->where('state',0)->order('journal_line_id')->select();
|
||||
|
||||
$re['lines'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊line文章
|
||||
* @description 获取期刊line文章
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getJournalLineArt
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_line_id type:int require:1 desc:期刊lineid
|
||||
*
|
||||
* @return journalLine:期刊时间线信息#
|
||||
* @return articles:期刊line文章数组#
|
||||
*/
|
||||
public function getJournalLineArt(){
|
||||
$data = $this->request->post();
|
||||
$journalLine = $this->journal_line_obj->where('journal_line_id',$data['journal_line_id'])->find();
|
||||
$list = $this->article_to_line_obj->field('j_article.*,j_journal_stage.*')
|
||||
->join([['j_article','j_article_to_line.article_id = j_article.article_id','LEFT'],['j_journal_stage','j_journal_stage.journal_stage_id = j_article.journal_stage_id','LEFT']])
|
||||
->where('j_article_to_line.journal_line_id',$data['journal_line_id'])
|
||||
->where('j_article_to_line.state',0)
|
||||
->select();
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
|
||||
$re['journalLine'] = $journalLine;
|
||||
$re['articles'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊推广文章
|
||||
@@ -149,14 +212,6 @@ class Journal extends Controller {
|
||||
->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'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
@@ -166,6 +221,16 @@ class Journal extends Controller {
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $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]]);
|
||||
}
|
||||
private function getAuthor($article) {
|
||||
|
||||
@@ -352,7 +352,7 @@ class Article extends Controller {
|
||||
$list = scandir(ROOT_PATH.'public/articleHTML/'.$journal_info['sx']);
|
||||
$frag = [];
|
||||
foreach ($list as $k => $v){
|
||||
if($k>2){
|
||||
if($k>1){
|
||||
$frag[] = ['val'=>$v];
|
||||
}
|
||||
}
|
||||
@@ -366,13 +366,12 @@ class Article extends Controller {
|
||||
|
||||
public function getHtmlFiles(){
|
||||
$data = $this->request->post();
|
||||
// $data['article_id'] = 1;
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
|
||||
$list = scandir(ROOT_PATH.'public/articleHTML/'.$journal_info['sx']);
|
||||
$frag = [];
|
||||
foreach ($list as $k => $v){
|
||||
if($k>2){
|
||||
if($k>1){
|
||||
$frag[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,11 @@ class Journal extends Controller {
|
||||
protected $article_obj = '';
|
||||
protected $journal_topic_obj = '';
|
||||
protected $journal_stage_obj = '';
|
||||
protected $journal_line_obj = '';
|
||||
protected $journal_notices_obj = '';
|
||||
protected $journal_abs_obj = '';
|
||||
protected $article_to_topic_obj = '';
|
||||
protected $article_to_line_obj = '';
|
||||
protected $journal_cfp_obj = '';
|
||||
protected $journal_paper_obj = '';
|
||||
protected $journal_paper_art_obj = '';
|
||||
@@ -31,9 +33,11 @@ class Journal extends Controller {
|
||||
$this->article_obj = Db::name('article');
|
||||
$this->journal_topic_obj = Db::name('journal_topic');
|
||||
$this->journal_stage_obj = Db::name('journal_stage');
|
||||
$this->journal_line_obj = Db::name('journal_line');
|
||||
$this->journal_notices_obj = Db::name('journal_notices');
|
||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||
$this->article_to_line_obj = Db::name('article_to_line');
|
||||
$this->journal_cfp_obj = Db::name('journal_cfp');
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
@@ -1010,6 +1014,183 @@ class Journal extends Controller {
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加期刊line
|
||||
* @description 增加期刊line
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/addJournalLine
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:time type:string require:1 desc:时间
|
||||
* @param name:intro type:string require:1 desc:简介
|
||||
* @param name:dist type:int require:1 desc:距离
|
||||
*/
|
||||
public function addJournalLine(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_id'] = $data['journal_id'];
|
||||
$insert['title'] = $data['title'];
|
||||
$insert['time'] = $data['time'];
|
||||
$insert['intro'] = $data['intro'];
|
||||
$insert['dist'] = $data['dist'];
|
||||
$this->journal_line_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除期刊line
|
||||
* @description 删除期刊line
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/delJournalLine
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_line_id type:int require:1 desc:期刊时间轴id
|
||||
*/
|
||||
public function delJournalLine(){
|
||||
$data = $this->request->post();
|
||||
$this->journal_line_obj->where('journal_line_id',$data['journal_line_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑期刊line
|
||||
* @description 编辑期刊line
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/editJournalLine
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_line_id type:int require:1 desc:期刊时间轴id
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:time type:string require:1 desc:时间
|
||||
* @param name:intro type:string require:1 desc:简介
|
||||
* @param name:dist type:int require:1 desc:距离
|
||||
*/
|
||||
public function editJournalLine(){
|
||||
$data = $this->request->post();
|
||||
$update['title'] = $data['title'];
|
||||
$update['time'] = $data['time'];
|
||||
$update['intro'] = $data['intro'];
|
||||
$update['dist'] = $data['dist'];
|
||||
$this->journal_line_obj->where('journal_line_id',$data['journal_line_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊lines
|
||||
* @description 获取期刊lines
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getJournalLines
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return journal:期刊信息#
|
||||
* @return lines:array#
|
||||
*/
|
||||
public function getJournalLines(){
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$list = $this->journal_line_obj->where('journal_id',$data['journal_id'])->where('state',0)->order('journal_line_id')->select();
|
||||
|
||||
$re['journal'] = $journal_info;
|
||||
$re['lines'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加期刊line文章
|
||||
* @description 增加期刊line文章
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/addJournalLineArt
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_line_id type:int require:1 desc:期刊id
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
*/
|
||||
public function addJournalLineArt(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_line_id'] = $data['journal_line_id'];
|
||||
$insert['article_id'] = $data['article_id'];
|
||||
$this->article_to_line_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除期刊line文章
|
||||
* @description 删除期刊line文章
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/delJournalLineArt
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_to_line_id type:int require:1 desc:期刊id
|
||||
*
|
||||
*/
|
||||
public function delJournalLineArt(){
|
||||
$data = $this->request->post();
|
||||
$this->article_to_line_obj->where('article_to_line_id',$data['article_to_line_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊line文章
|
||||
* @description 获取期刊line文章
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getJournalLineArt
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_line_id type:int require:1 desc:期刊lineid
|
||||
*
|
||||
* @return journalLine:期刊line#
|
||||
* @return journal:期刊信息#
|
||||
* @return articles: 文章列表array#
|
||||
*
|
||||
*/
|
||||
public function getJournalLineArt(){
|
||||
$data = $this->request->post();
|
||||
$journal_line_info = $this->journal_line_obj->where('journal_line_id',$data['journal_line_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$journal_line_info['journal_id'])->find();
|
||||
$list = $this->article_to_line_obj->field('j_article.*')
|
||||
->join('j_article','j_article.article_id = j_article_to_line.article_id','LEFT')
|
||||
->where('j_article_to_line.journal_line_id',$data['journal_line_id'])
|
||||
->where('j_article_to_line.state',0)
|
||||
->select();
|
||||
|
||||
$re['journalLine'] = $journal_line_info;
|
||||
$re['journal'] = $journal_info;
|
||||
$re['articles'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章排除line
|
||||
* @description 获取文章排除line
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getArticleByLine
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:journal_line_id type:int require:1 desc:时间线id
|
||||
* @param name:pageIndex type:int require:1 desc:当前页码数
|
||||
* @param name:pageSize type:int require:1 desc:单页数据条数
|
||||
*
|
||||
* $return count:总数
|
||||
* @return dataList:array#
|
||||
*/
|
||||
public function getArticleByLine(){
|
||||
$data = $this->request->post();
|
||||
//排除line
|
||||
$ids = $this->article_to_line_obj->where('journal_line_id',$data['journal_line_id'])->where('state',0)->column('article_id');
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
$list = $this->article_obj->where('journal_id',$data['journal_id'])->where('state',0)->where('article_id','not in',$ids)->limit($limit_start,$data['pageSize'])->select();
|
||||
$count = $this->article_obj->where('journal_id',$data['journal_id'])->where('state',0)->where('article_id','not in',$ids)->count();
|
||||
|
||||
$re['count'] = $count;
|
||||
$re['dataList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊paper
|
||||
* @description 获取期刊paper
|
||||
|
||||
Reference in New Issue
Block a user