参考文献列表接口调整
This commit is contained in:
@@ -37,14 +37,17 @@ class Preaccept extends Base
|
||||
}
|
||||
$dois = $this->production_article_refer_obj->where("p_article_id", $production_info['p_article_id'])->where("refer_doi","<>","")->where("state",0)->group("refer_doi")->having("count(*)>1")->column("refer_doi");
|
||||
$list = $this->production_article_refer_obj->where("p_article_id", $production_info['p_article_id'])->where('state', 0)->order("index")->select();
|
||||
$aRepeat = [];
|
||||
foreach ($list as $k => $v){
|
||||
if(in_array($v['refer_doi'],$dois)){
|
||||
$list[$k]['is_repeat'] = 1;
|
||||
$aRepeat[$v['refer_doi']][] = $v['index'];
|
||||
}else{
|
||||
$list[$k]['is_repeat'] = 0;
|
||||
}
|
||||
}
|
||||
$re["refers"] = $list;
|
||||
$re['repeat'] = empty($aRepeat) ? [] : $aRepeat;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user