参考文献type

This commit is contained in:
wangjinlei
2026-07-09 15:42:55 +08:00
parent 4fd967b1d4
commit 4cf26ea682
4 changed files with 278 additions and 16 deletions

View File

@@ -54,7 +54,7 @@ class ProductionArticleRefer
return json_encode(['status' => 1,'msg' => 'Add to reference processing queue']);
}
/**
* 处理参考文献
* 处理参考文献(单个)
*
* @return void
*/
@@ -71,10 +71,17 @@ class ProductionArticleRefer
}
//查询未处理过的数据
$aWhere = ['p_refer_id' => $iPReferId,'p_article_id' => $iPArticleId,'state' => 0];
$aRefer = Db::name('production_article_refer')->field('refer_doi,refer_content')->where($aWhere)->find();
$aRefer = Db::name('production_article_refer')->field('refer_doi,refer_content,refer_type')->where($aWhere)->find();
if(empty($aRefer)){
return json_encode(array('status' => 2,'msg' => 'No reference records found'.json_encode($aParam)));
}
// 非期刊类型已在分流阶段处理,队列不再走期刊解析
$referType = strtolower(trim((string)($aRefer['refer_type'] ?? 'journal')));
if (in_array($referType, ['book', 'other'], true)) {
return json_encode(['status' => 1, 'msg' => 'Skipped non-journal reference']);
}
if(empty($aRefer['refer_doi'])){
return json_encode(['status' => 4,'msg' => 'Reference DOI is empty'.json_encode($aParam)]);
}