From 0d8e6410f5cb852ee87690caf939b34bfd8d922c Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Fri, 13 Sep 2024 14:00:45 +0800 Subject: [PATCH] 1 --- application/master/controller/Journal.php | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php index 563eeec..cc6eb6d 100644 --- a/application/master/controller/Journal.php +++ b/application/master/controller/Journal.php @@ -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 添加期刊