1
This commit is contained in:
@@ -1110,6 +1110,7 @@ class Article extends Controller
|
||||
}
|
||||
$cm = $this->article_main_obj->where('article_id',$v['article_id'])->where('state',0)->find();
|
||||
$article_list[$k]['mains'] = $cm?1:0;
|
||||
$article_list[$k]["cite_num"] = $this->article_cite_obj->where("article_id",$v['article_id'])->where("state",1)->select();
|
||||
}
|
||||
$count = $this->article_obj
|
||||
->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'], ['j_journal', 'j_journal.journal_id=j_article.journal_id', 'LEFT']))
|
||||
@@ -1131,6 +1132,60 @@ class Article extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function refreshCiteForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
grabCiteFromCrossref($data['article_id'],"sx");
|
||||
}
|
||||
|
||||
public function addArticleCiteNew(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id" => "require",
|
||||
"journal_id" => "require",
|
||||
"doi" => "require",
|
||||
"journal_name" => "require",
|
||||
"article_name" => "require",
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$entity["article_id"] = $data['article_id'];
|
||||
$entity['journal_id'] = $data['journal_id'];
|
||||
$entity['doi'] = trim($data['doi']);
|
||||
$entity['journal_name'] = $data['journal_name'];
|
||||
$entity['article_name'] = $data['article_name'];
|
||||
$entity['ctime'] = time();
|
||||
$entity['state'] = 1;
|
||||
$entity['factor'] = isset($data['factor'])?$data['factor']:0;
|
||||
$entity['is_china'] = isset($data['is_china'])?$data['is_china']:0;
|
||||
$entity['is_wos'] = isset($data['is_wos'])?$data['is_wos']:0;
|
||||
$this->article_cite_obj->insert($entity);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function editArticleCite(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_cite_id"=>"require",
|
||||
"factor"=>"require",
|
||||
"is_china"=>"require",
|
||||
"is_wos"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->article_cite_obj->where("article_id",$data['article_id'])->update($data);
|
||||
return jsonSuccess([]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getArticleMainsForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
|
||||
Reference in New Issue
Block a user