瀏覽代碼

Merge branch 'master' of http://gogs.renlianiot.com:4000/zmcoding/smart-tool-api

tongshanglei 3 年之前
父節點
當前提交
160fa6e67a
共有 2 個文件被更改,包括 36 次插入2 次删除
  1. 33 0
      catch/report/controller/Report.php
  2. 3 2
      catch/report/route.php

+ 33 - 0
catch/report/controller/Report.php

@@ -203,6 +203,39 @@ class Report extends CatchController
         );
         return CatchResponse::success($data);
     }
+     /**
+     * 维保设备记录统计
+     * @param Request $request 
+     */
+    public function maintainCount(Request $request)
+    {
+        $list =array(
+            ['type'=>'液压泵','name'=>'电量告警','value'=>100],
+            ['type'=>'液压泵','name'=>'液压油偏低','value'=>120],
+            ['type'=>'液压泵','name'=>'液压油偏高','value'=>30],
+            ['type'=>'液压泵','name'=>'总数','value'=>250],
+
+          
+        );
+        $pump_bar=array(
+            'xData'=>['总数','电量告警','液压油偏低','液压油偏高'],
+            'yData'=>[250,100,120,30],
+        );
+        $pump_pie=array(
+            ['name'=>'电量告警','value'=>100],
+            ['name'=>'液压油偏低','value'=>120],
+            ['name'=>'液压油偏高','value'=>30],
+        );
+    
+
+        $data=array(
+            'list'=>$list,
+            'pump_bar'=>$pump_bar,
+            'pump_pie'=>$pump_pie,
+        );
+        return CatchResponse::success($data);
+    }
+
     
     
 }

+ 3 - 2
catch/report/route.php

@@ -20,7 +20,8 @@ $router->group('report', function () use ($router){
     $router->get('hydraulicCount','\catchAdmin\report\controller\Report@hydraulicCount'); 
     $router->get('windCount','\catchAdmin\report\controller\Report@windCount'); 
     $router->get('alarmDeviceCount','\catchAdmin\report\controller\Report@alarmDeviceCount'); 
-    $router->get('companyCount','\catchAdmin\report\controller\Report@companyCount'); 
-    
+    $router->get('companyCount','\catchAdmin\report\controller\Report@companyCount');
+    //维保记录 
+    $router->get('maintainCount','\catchAdmin\report\controller\Report@maintainCount'); 
     
 })->middleware('auth');