浏览代码

统计分析

wushaodong 4 年之前
父节点
当前提交
5b0342e9e3
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      apps/tenant/repair_order/views.py
  2. 1 1
      apps/wxapp/views.py

+ 3 - 3
apps/tenant/repair_order/views.py

@@ -208,7 +208,7 @@ class RepairOrderView(APIView):
             repair_counts.append(check_counts)
             finish_counts.append(finish_count)
         return response_ok({
-            'finish_counts': finish_counts,
-            'repair_counts': repair_counts,
-            'order_mouth': order_mouth,
+            'finish_counts': sorted(finish_counts),
+            'repair_counts': sorted(repair_counts),
+            'order_mouth': sorted(order_mouth),
         })

+ 1 - 1
apps/wxapp/views.py

@@ -171,7 +171,7 @@ class StatisticsRepairView(APIView):
                 }
                 data.append(item)
 
-        return response_ok(data)
+        return response_ok(sorted(data))
 
 class StatisticsEvaluateView(APIView):
     '''小程序评价统计数据'''