This commit is contained in:
wangjinlei
2022-11-08 18:23:20 +08:00
parent 45532ef702
commit 4d176060f4
7 changed files with 102 additions and 9 deletions

View File

@@ -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
*/