|
@@ -173,7 +173,14 @@ class Decision extends Api
|
|
|
|
|
|
|
|
// 处理数据
|
|
// 处理数据
|
|
|
$data = [];
|
|
$data = [];
|
|
|
|
|
+ // 获取唯一日期并排序
|
|
|
$data['head'] = array_unique(array_column($results, 'day'));
|
|
$data['head'] = array_unique(array_column($results, 'day'));
|
|
|
|
|
+
|
|
|
|
|
+ // 将日期转为时间戳以排序
|
|
|
|
|
+ usort($data['head'], function($a, $b) {
|
|
|
|
|
+ return strtotime($a) - strtotime($b);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
$total_by_machine = [];
|
|
$total_by_machine = [];
|
|
|
|
|
|
|
|
foreach ($results as $item) {
|
|
foreach ($results as $item) {
|