This commit is contained in:
lin fan
2024-11-04 22:43:13 +08:00
parent 713b6acd59
commit 8466fe42ca
+12 -6
View File
@@ -235,7 +235,8 @@ class Score extends Wxapp
$where_max["biz_id in ($biz_id_arr)"] = null;
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$series_value[] = $this->customers_model->count($where);
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 10 ? round($value / $max, 1) : 0.1;
$max_total = $max_total + $max;
//跟进能力
@@ -246,7 +247,8 @@ class Score extends Wxapp
$where_max["biz_id in ($biz_id_arr)"] = null;
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$series_value[] = $this->customers_model->count($where);
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 10 ? round($value / $max, 1) : 0.1;
$max_total = $max_total + $max;
//邀约能力
@@ -258,7 +260,8 @@ class Score extends Wxapp
$where_max["biz_id in ($biz_id_arr)"] = null;
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$series_value[] = $this->customers_model->count($where);
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 10 ? round($value / $max, 1) : 0.1;
$max_total = $max_total + $max;
//成交能力
@@ -270,7 +273,8 @@ class Score extends Wxapp
$where_max["biz_id in ($biz_id_arr)"] = null;
$max = $this->orders_model->count($where_max);
$where["biz_id"] = $this->biz_id;
$series_value[] = $this->orders_model->count($where);
$value = $this->orders_model->count($where);
$series_value[] = $value > $max / 10 ? round($value / $max, 1) : 0.1;
$max_total = $max_total + $max;
//交付能力
@@ -282,11 +286,13 @@ class Score extends Wxapp
$where_max["biz_id in ($biz_id_arr)"] = null;
$max = $this->orders_model->count($where_max);
$where["biz_id"] = $this->biz_id;
$series_value[] = $this->orders_model->count($where);
$value = $this->orders_model->count($where);
$series_value[] = $value > $max / 10 ? round($value / $max, 1) : 0.1;
$max_total = $max_total + $max;
foreach ($names as $value) {
foreach ($names as $key => $value) {
$indicator[] = array('name' => $value, 'max' => $max_total/5);
$series_value[$key] = ($max_total/5) * $series_value[$key];
}
$data = [