1
This commit is contained in:
@@ -828,6 +828,32 @@ class Production extends Controller
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并到上个文献中
|
||||
*/
|
||||
public function referHB(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'p_refer_id' => 'require'
|
||||
]);
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
|
||||
$refer_rev_res = $this->production_article_refer_obj
|
||||
->where('p_article_id',$refer_info['p_article_id'])
|
||||
->where('state',0)
|
||||
->where('p_refer_id','<',$refer_info['p_refer_id'])
|
||||
->order('p_refer_id desc')
|
||||
->limit(1)->select();
|
||||
$refer_rev_info = $refer_rev_res[0];
|
||||
$updata['refer_frag'] = $refer_rev_info['refer_frag'].$refer_info['refer_frag'];
|
||||
$updata['cs'] = 0;
|
||||
$this->production_article_refer_obj->where('p_refer_id',$refer_rev_info['p_refer_id'])->update($updata);
|
||||
$this->production_article_refer_obj->where('p_refer_id',$refer_info['p_refer_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 参考文献识别doi
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user