1
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user