浏览代码

PC车辆统计

LIVE_YE 3 月之前
父节点
当前提交
3cccaab51f

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/statistics/StatisticsController.java

@@ -61,4 +61,15 @@ public class StatisticsController {
     {
         return statisticsService.vehicleControl();
     }
+
+
+    /**
+     * todo PC车辆进出统计
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:statistics:num:car')")
+    @GetMapping("/num/car")
+    public AjaxResult numCar()
+    {
+        return statisticsService.numCar();
+    }
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStatisticsService.java

@@ -17,6 +17,8 @@ public interface IStatisticsService {
      */
     AjaxResult numApp();
 
+    AjaxResult numCar();
+
     /**
      * APP首页红点统计
      */

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StatisticsServiceImpl.java

@@ -394,4 +394,19 @@ public class StatisticsServiceImpl implements IStatisticsService {
         }
         return String.format("%.2f%%", percentageChange);
     }
+
+    @Override
+    public AjaxResult numCar() {
+        Map<String,Object> map = new HashMap<>();
+        //总数
+        int zs = 1237;
+        //外来
+        int wl = 396;
+        //内部
+        int nb = 841;
+        map.put("zs",zs);
+        map.put("wl",wl);
+        map.put("nb",nb);
+        return AjaxResult.success(map);
+    }
 }