From ee636374a5ce515b5dd25c2b7dd48a9d01743a25 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期二, 13 十二月 2022 11:02:46 +0800
Subject: [PATCH] fix: 趋势分析 和 驾驶舱接口

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
index a95b420..eb5d673 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -1,6 +1,11 @@
 package com.ycl.controller.cockpit.aiIot;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ycl.api.CommonResult;
+import com.ycl.entity.video.VideoPoint;
+import com.ycl.service.carManage.ICarSlagcarService;
+import com.ycl.service.equipment.IHandheldTerminalService;
+import com.ycl.service.equipment.ILoudspeakerService;
 import com.ycl.service.video.impl.IVideoPointService;
 import com.ycl.util.CheckApiUtil;
 import com.ycl.util.VideoUtil;
@@ -39,17 +44,24 @@
     private IVideoPointService iVideoPointService;
     @Autowired
     private VideoUtil videoUtil;
+    @Autowired
+    IHandheldTerminalService iHandheldTerminalService;
+    @Autowired
+    ILoudspeakerService loudspeakerService;
+    @Autowired
+    ICarSlagcarService iCarSlagcarService;
 
     @ApiOperation(value = "鐩戞祴鏁版嵁")
     @GetMapping("/detection")
     public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
         AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO();
-        detectionVO.setVideo(121);
-        detectionVO.setIndividual(20);
-        detectionVO.setLampblack(154);
-        detectionVO.setLoudspeaker(30);
-        detectionVO.setSlagCar(33);
+        detectionVO.setVideo(iVideoPointService.count());
+        detectionVO.setIndividual(iHandheldTerminalService.count());
+        detectionVO.setLampblack(154L);
+        /// TODO: 2022/12/13 缂哄皯娌圭儫鏈虹洃鎺ц〃
+        detectionVO.setLoudspeaker(loudspeakerService.count());
+        detectionVO.setSlagCar(iCarSlagcarService.count());
         return CommonResult.success(detectionVO);
     }
 
@@ -57,7 +69,7 @@
     @GetMapping("/video")
     public CommonResult video(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-        return CommonResult.success(iVideoPointService.list().stream().map(item -> {
+        return CommonResult.success(iVideoPointService.list(new LambdaQueryWrapper<VideoPoint>().eq(params.getStreetId()==null,VideoPoint::getStreetId,params.getStreetId())).stream().map(item -> {
             VideoVO videoVO = new VideoVO();
             videoVO.setName(item.getName());
             videoVO.setBrand(item.getEquipmentBrand());

--
Gitblit v1.8.0