Changes
This commit is contained in:
@@ -6640,30 +6640,37 @@ class Article extends Base
|
||||
return jsonError($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function referenceCheckEnqueueArticleMain(){
|
||||
$data = $this->request->post();
|
||||
$amId = 127448;
|
||||
$svc = new ReferenceCheckService();
|
||||
$main = Db::name('article_main')
|
||||
->field('am_id,content,article_id')
|
||||
->where('am_id', $amId)
|
||||
->whereIn('state', [0, 2])
|
||||
->find();
|
||||
$result = $svc->enqueueByArticleMain($main);
|
||||
return jsonSuccess($result);
|
||||
}
|
||||
public function referenceCheckEnqueueArticle(){
|
||||
$data = $this->request->get();
|
||||
$articleId = intval(isset($data['article_id']) ? $data['article_id'] : 0);
|
||||
var_dump($articleId);
|
||||
if ($articleId <= 0) {
|
||||
return jsonError('article_id is required');
|
||||
}
|
||||
$mainsList = Db::name('article_main')
|
||||
->field('am_id,content,article_id')
|
||||
->where('article_id', $articleId)
|
||||
->whereIn('state', [0, 2])
|
||||
->order('sort asc')
|
||||
->select();
|
||||
|
||||
$svc = new ReferenceCheckService();
|
||||
foreach ($mainsList as $mainInfo ){
|
||||
$svc->enqueueByArticleMain($mainInfo);
|
||||
try {
|
||||
$svc = new ReferenceCheckService();
|
||||
$result = $svc->enqueueByArticle($articleId);
|
||||
return jsonSuccess($result);
|
||||
} catch (\Exception $e) {
|
||||
return jsonError($e->getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 按文章批量入队:从 article_main 提取 blue 引用与文献号
|
||||
* POST: article_id, clear_previous=1(默认清空该文旧明细后重检)
|
||||
*/
|
||||
public function referenceCheckEnqueueArticle()
|
||||
public function referenceCheckEnqueueArticle2()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$articleId = intval(isset($data['article_id']) ? $data['article_id'] : 0);
|
||||
|
||||
Reference in New Issue
Block a user