From 2d1d03a0d5c8abbe721524d39f7772633064577b Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 20 三月 2023 15:58:08 +0800
Subject: [PATCH] 屏蔽打印

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java |   50 +++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 37 insertions(+), 13 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 8413ef5..4f247dc 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
@@ -3,32 +3,30 @@
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ycl.api.CommonResult;
 import com.ycl.entity.cockpitManage.TeamConstruction;
 import com.ycl.entity.cockpitManage.TeamIndex;
-import com.ycl.entity.video.VideoPoint;
+import com.ycl.service.apidata.IApiDataService;
 import com.ycl.service.cockpitManage.ITeamConstructionService;
+import com.ycl.service.equipment.IOrgGridService;
 import com.ycl.service.video.impl.IVideoPointService;
 import com.ycl.util.CheckApiUtil;
 import com.ycl.vo.cockpit.CockpitVO;
+import com.ycl.vo.cockpit.statisticsEvents.GridMapVO;
 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;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -47,6 +45,16 @@
 
     private ITeamConstructionService teamConstructionService;
 
+    private IOrgGridService orgGridService;
+
+
+    private IApiDataService iApiDataService;
+
+    @Autowired
+    public void setIApiDataService(IApiDataService apiDataService){
+        this.iApiDataService = apiDataService;
+    }
+
     @Autowired
     public void setTeamConstructionService(ITeamConstructionService teamConstructionService) {
         this.teamConstructionService = teamConstructionService;
@@ -55,6 +63,11 @@
     @Autowired
     public void setVideoPointService(IVideoPointService videoPointService) {
         this.videoPointService = videoPointService;
+    }
+
+    @Autowired
+    public void setOrgGridService(IOrgGridService orgGridService) {
+        this.orgGridService = orgGridService;
     }
 
     @ApiOperation(value = "鎵ф硶浜嬩欢")
@@ -143,13 +156,17 @@
     @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);
+//        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);
+        String beginTime = params.getBeginTime();
+        String endTime = params.getEndTime();
+        List<StatisticsEventsVO.Top10VO> res = iApiDataService.listTop10(beginTime, endTime);
+        return CommonResult.success(res);
     }
 
 
@@ -187,6 +204,14 @@
         return CommonResult.success(page.getRecords());
     }
 
+    @ApiOperation(value = "缃戞牸鍦板浘")
+    @GetMapping("/grid_map")
+    public CommonResult<List<GridMapVO>> gridMap(@Validated CockpitVO params) {
+        checkApiUtil.cockpit(params);
+
+        List<GridMapVO> list = orgGridService.statisticsGridMap(params.getBeginTime(), params.getEndTime());
+        return CommonResult.success(list);
+    }
 
     @ApiOperation(value = "闃熶紞寤鸿")
     @GetMapping("/team_construction")
@@ -194,7 +219,6 @@
         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);
     }
 

--
Gitblit v1.8.0