1
This commit is contained in:
@@ -147,6 +147,35 @@ class Journal extends Controller
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['joutaglist' => $frag]]);
|
||||
}
|
||||
|
||||
|
||||
public function getArticleCountForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"issn"=>"require",
|
||||
"year"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal = $this->journal_obj->where("issn",$data['issn'])->find();
|
||||
$stages = $this->journal_stage_obj->where("journal_id",$journal['journal_id'])->where("stage_year",$data['year'])->where("state",0)->select();
|
||||
foreach ($stages as $k=>$v){
|
||||
$articles = $this->article_obj
|
||||
->field("article_id,title,related")
|
||||
->where("journal_stage_id",$v['journal_stage_id'])
|
||||
->where("state",0)
|
||||
->select();
|
||||
foreach ($articles as $key=>$val){
|
||||
$l = $this->article_cite_obj->where("article_id",$val['article_id'])->where("state",1)->where("is_wos",1)->count();
|
||||
$articles[$key]['cites'] = $l;
|
||||
$articles[$key]['relations'] = count(object_to_array(json_decode($val['related'])));
|
||||
}
|
||||
$stages[$k]['articles'] = $articles;
|
||||
}
|
||||
$re['stages'] = $stages;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取所有期刊
|
||||
* @description 获取所有期刊
|
||||
@@ -288,6 +317,35 @@ class Journal extends Controller
|
||||
return jsonSuccess($journals);
|
||||
}
|
||||
|
||||
public function getArticleCountCiteForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$list = $this->article_cite_obj->where("article_id",$data['article_id'])->where("state",1)->where("is_wos",1)->select();
|
||||
$re['cites'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
public function getArticleCountRelatedForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$article_info = $this->article_obj->where("article_id",$data['article_id'])->find();
|
||||
$list = object_to_array(json_decode($article_info['related']));
|
||||
$as = $this->article_obj->whereIn("article_id",$list)->select();
|
||||
$re['list'] = $as;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加期刊
|
||||
* @description 添加期刊
|
||||
|
||||
Reference in New Issue
Block a user