This commit is contained in:
wangjinlei
2023-07-14 15:41:27 +08:00
parent 87464357c2
commit 3f289cebec
7 changed files with 100 additions and 13 deletions

View File

@@ -61,6 +61,21 @@ class Preaccept extends Base
return jsonSuccess([]);
}
/**清空引用文献byp_article_id
* @return void
*/
public function discardRefersByParticleid(){
$data = $this->request->post();
$rule = new Validate([
"p_article_id"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$this->production_article_refer_obj->where('p_article_id',$data['p_article_id'])->update(["state"=>1]);
return jsonSuccess([]);
}
/**添加refer
* @return \think\response\Json
* @throws \think\Exception
@@ -84,6 +99,7 @@ class Preaccept extends Base
$insert['p_article_id'] = $p_info['p_article_id'];
$insert['index'] = $pre_refer['index'] + 1;
$insert['ctime'] = time();
$insert['is_change'] = 1;
$insert['refer_type'] = $data['refer_type'];
if($data['refer_type']=="journal"){
$insert['refer_doi'] = isset($data['doi'])?$data['doi']:'';
@@ -230,6 +246,7 @@ class Preaccept extends Base
}
$old_refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
$updata['refer_type'] = $data['refer_type'];
$updata['is_change'] = 1;
if($data['refer_type']=="journal"){
$updata['refer_doi'] = isset($data['doi'])?$data['doi']:'';
$updata['author'] = trim($data['author']);