From 8b023aa8ff96f144c43e27858a841c80ce26a0da Mon Sep 17 00:00:00 2001 From: lin fan Date: Thu, 21 Nov 2024 15:52:40 +0800 Subject: [PATCH] 1 --- api/controllers/wxapp/licheb/Score.php | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/api/controllers/wxapp/licheb/Score.php b/api/controllers/wxapp/licheb/Score.php index 97d5c294..806fd5d7 100644 --- a/api/controllers/wxapp/licheb/Score.php +++ b/api/controllers/wxapp/licheb/Score.php @@ -245,8 +245,8 @@ class Score extends Wxapp $max = $this->customers_model->count($where_max); $where['biz_id'] = $this->biz_id; $value = $this->customers_model->count($where); - $series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2; - $max_total = $max_total + $max; + $series_value[] = $value; + $max_total[] = $max; //跟进能力 $where_max = $where = [ @@ -257,8 +257,8 @@ class Score extends Wxapp $max = $this->customers_model->count($where_max); $where['biz_id'] = $this->biz_id; $value = $this->customers_model->count($where); - $series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2; - $max_total = $max_total + $max; + $series_value[] = $value; + $max_total[] = $max; //邀约能力 $where_max = $where = [ @@ -270,8 +270,8 @@ class Score extends Wxapp $max = $this->customers_model->count($where_max); $where['biz_id'] = $this->biz_id; $value = $this->customers_model->count($where); - $series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2; - $max_total = $max_total + $max; + $series_value[] = $value; + $max_total[] = $max; //成交能力 $where_max = $where = [ @@ -283,8 +283,8 @@ class Score extends Wxapp $max = $this->orders_model->count($where_max); $where["biz_id"] = $this->biz_id; $value = $this->orders_model->count($where); - $series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2; - $max_total = $max_total + $max; + $series_value[] = $value; + $max_total[] = $max; //交付能力 $where_max = $where = [ @@ -296,21 +296,20 @@ class Score extends Wxapp $max = $this->orders_model->count($where_max); $where["biz_id"] = $this->biz_id; $value = $this->orders_model->count($where); - $series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2; - $max_total = $max_total + $max; + $series_value[] = $value; + $max_total[] = $max; foreach ($names as $key => $value) { - $indicator[] = array('name' => $value, 'max' => $max_total/5); - $series_value[$key] = ($max_total/5) * $series_value[$key]; + $indicator[] = array('name' => $value, 'max' => $max_total[$key]); } - $indicator = array( - array('name' => '拓客能力', 'max' => $max_total/5), - array('name' => '跟进能力', 'max' => $max_total/1), - array('name' => '邀约能力', 'max' => $max_total/2), - array('name' => '成交能力', 'max' => $max_total/3), - array('name' => '交付能力', 'max' => $max_total/4), - ); +// $indicator = array( +// array('name' => '拓客能力', 'max' => $max_total/5), +// array('name' => '跟进能力', 'max' => $max_total/1), +// array('name' => '邀约能力', 'max' => $max_total/2), +// array('name' => '成交能力', 'max' => $max_total/3), +// array('name' => '交付能力', 'max' => $max_total/4), +// ); $data = [ 'indicator' => $indicator,