This commit is contained in:
wangjinlei
2024-03-18 10:57:59 +08:00
parent f648752c16
commit ddba364cca
2 changed files with 76 additions and 5 deletions

View File

@@ -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 ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$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;
if($month==12){
$year++;
$month =1;
}else{
$month++;
}
}
$f["journal"] = $v;
$f['articles'] = $frag;
$flag[] = $f;
}
$re['data'] = $flag;
return jsonSuccess($re);
}
/**获取期刊月投稿量
* @return bool

View File

@@ -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).");
}
}
}