作者 王智

修改

@@ -374,9 +374,9 @@ class Question extends Api @@ -374,9 +374,9 @@ class Question extends Api
374 } 374 }
375 foreach ($DayArray as $k => $v) { 375 foreach ($DayArray as $k => $v) {
376 $Day[$k]['date'] = $v[0]['date']; 376 $Day[$k]['date'] = $v[0]['date'];
377 - $Day[$k]['V'] = (array_sum(array_column($v, 'V')))/count($v);  
378 - $Day[$k]['P'] = (array_sum(array_column($v, 'P')))/count($v);  
379 - $Day[$k]['K'] = (array_sum(array_column($v, 'K')))/count($v); 377 + $Day[$k]['V'] = round((array_sum(array_column($v, 'V'))) / count($v), 1);
  378 + $Day[$k]['P'] = round((array_sum(array_column($v, 'P'))) / count($v), 1);
  379 + $Day[$k]['K'] = round((array_sum(array_column($v, 'K'))) / count($v), 1);
380 380
381 } 381 }
382 dump($Day); 382 dump($Day);