接口修改获取期刊住编辑信息调整/修改获取近三年的期刊数据不包括当前年
This commit is contained in:
@@ -544,9 +544,32 @@ class Journal extends Controller
|
|||||||
->select();
|
->select();
|
||||||
$list = $journals;
|
$list = $journals;
|
||||||
}
|
}
|
||||||
|
//获取期刊主编辑 chengxiaoling start 20251210
|
||||||
|
if(!empty($list) && is_array($list)){
|
||||||
|
$aIssn = array_unique(array_column($list, 'issn'));
|
||||||
|
if (!empty($aIssn)) {
|
||||||
|
$sIssn = implode(',',$aIssn);
|
||||||
|
$aBoard = $this->getJournalBoard(['issn' => $sIssn, 'type' => 0]);
|
||||||
|
$aBoard = empty($aBoard['data']) ? [] : $aBoard['data'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取期刊主编辑 chengxiaoling end 20251210
|
||||||
foreach ($list as $k => $v) {
|
foreach ($list as $k => $v) {
|
||||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->order('sort')->limit(4)->select();
|
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->order('sort')->limit(4)->select();
|
||||||
$list[$k]['abs'] = $abs;
|
$list[$k]['abs'] = $abs;
|
||||||
|
//获取期刊主编辑 chengxiaoling start 20251210
|
||||||
|
$sIssn = empty($v['issn']) ? '' : $v['issn'];
|
||||||
|
$sBoard = '';
|
||||||
|
if(!empty($sIssn) && !empty($aBoard[$sIssn])){
|
||||||
|
if(is_array($aBoard[$sIssn])){
|
||||||
|
$sBoard = implode("<br>", array_unique($aBoard[$sIssn]));
|
||||||
|
}elseif(is_string($aBoard[$sIssn])){
|
||||||
|
$sBoard = $aBoard[$sIssn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$editorinchief = empty($v['editorinchief']) ? '' : $v['editorinchief'];
|
||||||
|
$list[$k]['editorinchief'] = empty($sBoard) ? $editorinchief : $sBoard;
|
||||||
|
//获取期刊主编辑 chengxiaoling end 20251210
|
||||||
}
|
}
|
||||||
$re['journals'] = $list;
|
$re['journals'] = $list;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
@@ -682,7 +705,12 @@ class Journal extends Controller
|
|||||||
public function getAuthorFB()
|
public function getAuthorFB()
|
||||||
{
|
{
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
$stages = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', '>', (intval(date('Y')) - 3))->where('state', 0)->column('journal_stage_id');
|
//修改获取近三年的期刊数据不包括当前年 20260106 start
|
||||||
|
// $stages = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', '>', (intval(date('Y')) - 3))->where('state', 0)->column('journal_stage_id');
|
||||||
|
$iNowYear = date('Y');//当前年份
|
||||||
|
$iThreeYear = intval($iNowYear - 3);//过去三年
|
||||||
|
$stages = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', '>=', $iThreeYear)->where('stage_year', '<', $iNowYear)->where('state', 0)->column('journal_stage_id');
|
||||||
|
//修改获取近三年的期刊数据不包括当前年 20260106 end
|
||||||
$articles = $this->article_obj->where('journal_id', $data['journal_id'])->where('journal_stage_id', 'in', $stages)->where('state', 0)->column('article_id');
|
$articles = $this->article_obj->where('journal_id', $data['journal_id'])->where('journal_stage_id', 'in', $stages)->where('state', 0)->column('article_id');
|
||||||
$list = $this->article_author_obj->where('article_id', 'in', $articles)->where('state', 0)->select();
|
$list = $this->article_author_obj->where('article_id', 'in', $articles)->where('state', 0)->select();
|
||||||
$frag = [];
|
$frag = [];
|
||||||
@@ -773,13 +801,13 @@ class Journal extends Controller
|
|||||||
// ->where('j_article.state', 0)
|
// ->where('j_article.state', 0)
|
||||||
// ->where('j_article.is_public',1)
|
// ->where('j_article.is_public',1)
|
||||||
// ->order('j_journal_stage.stage_year desc,j_article.sort desc')
|
// ->order('j_journal_stage.stage_year desc,j_article.sort desc')
|
||||||
// ->limit($limit_start, $data['pageSize'])->select();
|
// ->limit($limit_start, $data['pageSize'])->select();
|
||||||
// $count = $this->article_obj
|
// $count = $this->article_obj
|
||||||
// ->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
// ->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||||
// ->where('j_article.journal_stage_id', 'in', $stages)
|
// ->where('j_article.journal_stage_id', 'in', $stages)
|
||||||
// ->where('j_article.state', 0)
|
// ->where('j_article.state', 0)
|
||||||
// ->where('j_article.is_public',1)
|
// ->where('j_article.is_public',1)
|
||||||
// ->count();
|
// ->count();
|
||||||
$list = $this->article_obj
|
$list = $this->article_obj
|
||||||
->field('j_article.*,j_journal_stage.*')
|
->field('j_article.*,j_journal_stage.*')
|
||||||
// ->field("j_article.article_id,j_article.journal_id,j_article.npp,j_article.type,j_article.abstract,j_article.abs_num,j_article.html_num,j_article.doi,j_article.journal_stage_id,j_article.title,j_article.icon,j_article.abbr,j_journal_stage.stage_year")
|
// ->field("j_article.article_id,j_article.journal_id,j_article.npp,j_article.type,j_article.abstract,j_article.abs_num,j_article.html_num,j_article.doi,j_article.journal_stage_id,j_article.title,j_article.icon,j_article.abbr,j_journal_stage.stage_year")
|
||||||
|
|||||||
Reference in New Issue
Block a user