From 4832d45e8717ed5ff1d069db0be1042ddc78f31c Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Thu, 19 Oct 2023 09:52:14 +0800 Subject: [PATCH] 1 --- application/api/controller/Monitor.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/application/api/controller/Monitor.php b/application/api/controller/Monitor.php index 9a1068e..1b74d28 100644 --- a/application/api/controller/Monitor.php +++ b/application/api/controller/Monitor.php @@ -127,7 +127,7 @@ class Monitor extends Base $journals[$k]['editor'] = $this->user_obj->where('user_id',$v['editor_id'])->find(); //当月点数 $aaa = $this->getDY($v['journal_id'],date("Y-m")); - $journals[$k]['DY'] = round($aaa['fen'],1) ; + $journals[$k]['DY'] = $aaa['fen']; $journals[$k]['mx'] = $aaa['mx']; //获取当月直投量 $are = $this->getZT($v['journal_id'],date("Y-m")); @@ -189,6 +189,7 @@ class Monitor extends Base $start = strtotime(date($ym.'-01 00:00:00')); $articles = $this->article_obj->where("journal_id",$journal_id)->where("rtime",">",$start)->where("state",5)->select(); $dy = 0; + $cy = 0; $mx = []; foreach ($articles as $k=>$v){ $revs = $this->article_reviewer_obj @@ -200,10 +201,11 @@ class Monitor extends Base } $articles[$k]['reviewer_fen'] = count($revs)==0?0:$num/count($revs); $last_fen = ($v['scoring']+$articles[$k]['reviewer_fen'])/2 ; - $mx[] = $v['accept_sn'].":".$last_fen; - $dy += $last_fen; + $mx[] = $v['accept_sn'].":".$v['scoring']."/".$last_fen; + $cy += round($v['scoring'],1); + $dy += round($last_fen,1); } - $re['fen'] = $dy; + $re['fen'] = $cy."/".$dy; $re['mx'] = $mx; return $re; }