From a4047b6048ebfe09e66a765b58ea12b5bd0e2e6e Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 28 十一月 2022 16:18:10 +0800
Subject: [PATCH] 店铺管理优化

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java |  104 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
index 4a83fe3..e31be53 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
@@ -1,16 +1,23 @@
 package com.ycl.controller.cockpit.statisticsEvents;
 
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ycl.api.CommonResult;
+import com.ycl.entity.cockpitManage.TeamConstruction;
+import com.ycl.entity.cockpitManage.TeamIndex;
+import com.ycl.service.cockpitManage.ITeamConstructionService;
+import com.ycl.service.video.impl.IVideoPointService;
 import com.ycl.util.CheckApiUtil;
 import com.ycl.vo.cockpit.CockpitVO;
 import com.ycl.vo.cockpit.statisticsEvents.StatisticsEventsVO;
+import com.ycl.vo.equipment.VideoPointVo;
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -30,6 +37,20 @@
 public class StatisticsEventsController {
     @Resource
     private CheckApiUtil checkApiUtil;
+
+    private IVideoPointService videoPointService;
+
+    private ITeamConstructionService teamConstructionService;
+
+    @Autowired
+    public void setTeamConstructionService(ITeamConstructionService teamConstructionService) {
+        this.teamConstructionService = teamConstructionService;
+    }
+
+    @Autowired
+    public void setVideoPointService(IVideoPointService videoPointService) {
+        this.videoPointService = videoPointService;
+    }
 
     @ApiOperation(value = "鎵ф硶浜嬩欢")
     @GetMapping("/law_enforcement_event")
@@ -112,4 +133,83 @@
         indexSignsVO.setEvaluationData(10);
         return CommonResult.success(indexSignsVO);
     }
+
+
+    @ApiOperation(value = "top10")
+    @GetMapping("/top10")
+    public CommonResult<List<StatisticsEventsVO.Top10VO>> top10(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+        List<StatisticsEventsVO.Top10VO> ls = new ArrayList<>();
+        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 100.0));
+        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 90.0));
+        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 80.0));
+        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 70.0));
+        return CommonResult.success(ls);
+    }
+
+
+    @ApiOperation(value = "AI绠楁硶")
+    @GetMapping("/arithmetic_event")
+    public CommonResult<List<StatisticsEventsVO.ArithmeticVO>> arithmeticEvent(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+        List<StatisticsEventsVO.ArithmeticVO> ls = new ArrayList<>();
+        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 10, 0.1));
+        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 20, 0.2));
+        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 30, 0.3));
+        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 40, 0.4));
+        return CommonResult.success(ls);
+    }
+
+
+    @ApiOperation(value = "鍩庡競浣撳緛鐪嬫澘")
+    @GetMapping("/city_panel")
+    public CommonResult<StatisticsEventsVO.CityPanelVo> cityPanel(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+
+        StatisticsEventsVO.CityPanelVo vo = new StatisticsEventsVO.CityPanelVo(92, true, 22, false, 12, true,
+                22, false, 34, true, 99, false, 9, true,
+                34, false, 6, true);
+
+        return CommonResult.success(vo);
+    }
+
+
+    @ApiOperation(value = "鐐逛綅")
+    @GetMapping("/video_point")
+    public CommonResult<List<VideoPointVo>> videoPoint(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+        IPage<VideoPointVo> page = videoPointService.getList(null, null, 1, 500);
+        return CommonResult.success(page.getRecords());
+    }
+
+
+    @ApiOperation(value = "闃熶紞寤鸿")
+    @GetMapping("/team_construction")
+    public CommonResult<List<TeamConstruction>> teamConstruction(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+        LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0);
+        List<TeamConstruction> list = teamConstructionService.list(queryWrapper);
+
+        return CommonResult.success(list);
+    }
+
+
+    @ApiOperation(value = "涓槦鎸囨暟浣撳緛")
+    @GetMapping("/team_index")
+    public CommonResult<List<TeamIndex>> teamIndex(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+        LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0);
+        List<TeamConstruction> list = teamConstructionService.list(queryWrapper);
+        List<TeamIndex> teamIndexList = BeanUtil.copyToList(list, TeamIndex.class);
+        teamIndexList.forEach(o -> {
+            o.setStepTimely(0.6);
+            o.setStepDelayed(0.3);
+            o.setStepOvertime(0.1);
+            o.setHandleTimely(0.6);
+            o.setHandleDelayed(0.2);
+            o.setHandleOvertime(0.1);
+            o.setNoHandle(0.1);
+        });
+        return CommonResult.success(teamIndexList);
+    }
 }

--
Gitblit v1.8.0