This commit is contained in:
wangjinlei
2021-01-27 17:07:48 +08:00
parent 0a5067daf6
commit 110fe0f086
5 changed files with 99 additions and 7 deletions

View File

@@ -80,7 +80,11 @@ class Article extends Controller {
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
if($journal_info['journal_id']==22){
$cite = $article_info['abbr'] . '. ' . $article_info['title'] . '[J]. ' . $journal_info['jabbr'] . ',' . $stage_info['stage_year'] . ',' . $stage_info['stage_vol'] . $no . $article_info['npp'] . '. doi:' . $article_info['doi'];
}else{
$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(',', '&nbsp;&nbsp;&nbsp;&nbsp;', $article_info['keywords']);

View File

@@ -263,7 +263,14 @@ class Journal extends Controller {
foreach ($list as $k => $v) {
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
if($journal_info['journal_id']==22){
$cite = $v['abbr'] . '. ' . $v['title'] . '[J]. ' . $journal_info['jabbr'] . ',' . $stage_info['stage_year'] . ',' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
}else{
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
}
// $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);
}
@@ -348,7 +355,7 @@ class Journal extends Controller {
->where('j_article.journal_stage_id', 'in', $stages)
->where('j_article.state', 0)
->where('j_article.type', ['like', 'News'], ['like', 'Comment'], 'or')
->order('j_article.article_id')
->order('j_journal_stage.journal_stage_id desc')
->select();
//获取作者
foreach ($list as $k => $v) {

View File

@@ -104,6 +104,43 @@ class Special extends Controller {
}
}
/**
* @title 客座期刊特邀编辑(添加)
* @description 客座期刊特邀编辑(添加)
* @author wangjinlei
* @url /api/Special/addEditor
* @method POST
*
* @param name:journal_id type:int require:1 desc:期刊id
* @param name:journal_special_id type:int require:1 desc:客座期刊id
* @param name:email type:string require:1 desc:邮箱
* @param name:first_name type:string require:1 desc:名字
* @param name:last_name type:string require:1 desc:名字
* @param name:address type:string require:1 desc:地址
* @param name:interests type:string require:0 desc:兴趣
* @param name:website type:string require:0 desc:编辑主页
* @param name:orcid type:string require:0 desc:orcid
*
*/
public function addEditor(){
$data = $this->request->post();
$insert_editor['journal_id'] = $data['journal_id'];
$insert_editor['email'] = $data['email'];
$insert_editor['first_name'] = $data['first_name'];
$insert_editor['last_name'] = $data['last_name'];
$insert_editor['address'] = $data['address'];
$insert_editor['interests'] = $data['interests'];
$insert_editor['website'] = $data['website'];
$insert_editor['orcid'] = $data['orcid'];
$uid = $this->journal_special_editor_obj->insertGetId($insert_editor);
$insert_to['journal_special_editor_id'] = $uid;
$insert_to['journal_special_id'] = $data['journal_special_id'];
$insert_to['journal_id'] = $data['journal_id'];
$insert_to['state'] = 2;
$this->journal_special_to_editor_obj->insert($insert_to);
return jsonSuccess([]);
}
/**
* @title 客座期刊(获取首页列表)
* @description 客座期刊(获取首页列表)

View File

@@ -1131,7 +1131,7 @@ class Journal extends Controller {
$data = $this->request->post();
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
$rearr = $journal_info['relate']==''?[]:explode(',',$journal_info['relate']);
if(count($rearr)>3){
if(count($rearr)>4){
return jsonError('No more than four');
}
$rearr[] = $data['relat_id'];

View File

@@ -94,6 +94,13 @@ class Special extends Controller {
$frag = $frag == ''?$val['first_name'].' '.$val['last_name']:','.$val['first_name'].' '.$val['last_name'];
}
$list[$k]['editor'] = $frag;
$sq = $this->journal_special_to_editor_obj->where('journal_special_id',$v['journal_special_id'])->where('state',2)->select();
if(count($sq)>0){
$list[$k]['has_sq'] = 1;
}else{
$list[$k]['has_sq'] = 0;
}
}
$count = $this->journal_special_obj->where($where)->count();
@@ -130,6 +137,7 @@ class Special extends Controller {
*
* @return special:客座期刊信息
* @return editors:作者array#
* @return applys:申请array#
*/
public function getSpecialDetail(){
$data = $this->request->post();
@@ -139,9 +147,15 @@ class Special extends Controller {
->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id'])
->where('j_journal_special_to_editor.state',0)
->select();
$applys = $this->journal_special_to_editor_obj->field('j_journal_special_to_editor.journal_special_to_editor_id,j_journal_special_editor.*')
->join('j_journal_special_editor','j_journal_special_editor.journal_special_editor_id = j_journal_special_to_editor.journal_special_editor_id','LEFT')
->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id'])
->where('j_journal_special_to_editor.state',2)
->select();
$re['special'] = $special_info;
$re['editors'] = $editor_list;
$re['applys'] = $applys;
return jsonSuccess($re);
}
@@ -252,7 +266,7 @@ class Special extends Controller {
$data = $this->request->post();
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
$cids = $this->journal_special_to_editor_obj->where('journal_special_id',$data['journal_special_id'])->where('state',0)->column('journal_special_editor_id');
$cids = $this->journal_special_to_editor_obj->where('journal_special_id',$data['journal_special_id'])->where('state','<>',1)->column('journal_special_editor_id');
$list = $this->journal_special_editor_obj->where('journal_special_editor_id','not in',$cids)->where('state',0)->limit($limit_start,$data['pageSize'])->select();
$count = $this->journal_special_editor_obj->where('journal_special_editor_id','not in',$cids)->where('state',0)->count();
@@ -301,4 +315,34 @@ class Special extends Controller {
->update(['state'=>1]);
return jsonSuccess([]);
}
/**
* @title 客座期刊编辑(通过申请)
* @description 客座期刊编辑(通过申请)
* @author wangjinlei
* @url /master/Special/adoptEditor
* @method POST
*
* @param name:journal_special_to_editor_id type:int require:1 desc:期刊编辑链接id
*/
public function adoptEditor(){
$data = $this->request->post();
$this->journal_special_to_editor_obj->where('journal_special_to_editor_id',$data['journal_special_to_editor_id'])->update(['state'=>0]);
return jsonSuccess([]);
}
/**
* @title 客座期刊编辑(拒绝申请)
* @description 客座期刊编辑(拒绝申请)
* @author wangjinlei
* @url /master/Special/refuseEditor
* @method POST
*
* @param name:journal_special_to_editor_id type:int require:1 desc:期刊编辑链接id
*/
public function refuseEditor(){
$data = $this->request->post();
$this->journal_special_to_editor_obj->where('journal_special_to_editor_id',$data['journal_special_to_editor_id'])->update(['state'=>1]);
return jsonSuccess([]);
}
}