From ddba364cca85a5085c101eeb2085ae0d89702b11 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Mon, 18 Mar 2024 10:57:59 +0800 Subject: [PATCH] 1 --- application/api/controller/Monitor.php | 58 +++++++++++++++++++++++++ application/api/controller/Reviewer.php | 23 +++++++--- 2 files changed, 76 insertions(+), 5 deletions(-) diff --git a/application/api/controller/Monitor.php b/application/api/controller/Monitor.php index e9f795c..5798b0a 100644 --- a/application/api/controller/Monitor.php +++ b/application/api/controller/Monitor.php @@ -84,6 +84,64 @@ class Monitor extends Base return jsonSuccess($re); } + /**获取文章数量通过年度分期刊 + * @return void + */ + public function getArticleNumByYearForJournal(){ + $journals = $this->journal_obj->where("state",0)->select(); + $flag = []; + foreach ($journals as $k => $v){ + $year = 2020; + $frag = []; + while ($year<=date("Y")){ + $s_time = strtotime($year."-1-1"); + $e_time = strtotime($year."-12-31"); + $n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr'])->count(); + $nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count(); +// $frag[$year."-".$month] = $n."/".$nj; +// $n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("journal_id",$v['journal_id'])->count(); + $frag[$year] = $n."/".$nj; + $year++; + } + $f['journal'] = $v; + $f['articles'] = $frag; + $flag[] = $f; + } + $re['data'] = $flag; + return jsonSuccess($re); + } + + /**获取文章数量通过月份分期刊 + * @return void + */ + public function getArticleNumByMonthForJournal(){ + $journals = $this->journal_obj->where("state",0)->select(); + $flag = []; + foreach ($journals as $v){ + $year = 2020; + $month = 8; + $frag = []; + while ($yeararticle_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr'])->count(); + $nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count(); + $frag[$year."-".$month] = $n."/".$nj; + if($month==12){ + $year++; + $month =1; + }else{ + $month++; + } + } + $f["journal"] = $v; + $f['articles'] = $frag; + $flag[] = $f; + } + $re['data'] = $flag; + return jsonSuccess($re); + } + /**获取期刊月投稿量 * @return bool diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php index 3c9026c..f86067f 100644 --- a/application/api/controller/Reviewer.php +++ b/application/api/controller/Reviewer.php @@ -796,13 +796,26 @@ class Reviewer extends Base //验证字数 $content = $data['qu9contents']." ".$data['qu10contents']." ".$data['qu11contents']." ".$data['qu12contents']." ".$data['qu13contents']." ".$data['qu14contents']." ".$data['qu15contents']." ".$data['comment']; if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $content)>0){//含有中文 - if(mb_strlen($content, 'UTF8')<60){ - return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words)."); + if($journal_info['journal_id']==1){ + if(mb_strlen($content, 'UTF8')<100){ + return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words)."); + } + }else{ + if(mb_strlen($content, 'UTF8')<70){ + return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 70 words)."); + } } }else{//不含中文 - $carray = explode(" ", $content); - if(count($carray)<60){ - return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words)."); + if($journal_info['journal_id']==1){ + $carray = explode(" ", $content); + if(count($carray)<100){ + return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words)."); + } + }else{ + $carray = explode(" ", $content); + if(count($carray)<70){ + return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 70 words)."); + } } }