From 54d00a4b41b8d3baa5a6b8f58001135216a88bb4 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 03 四月 2023 11:22:17 +0800
Subject: [PATCH] 排序
---
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
index db89209..1b63181 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -1,6 +1,7 @@
package com.ycl.controller.cockpit.enforcementEvents;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ycl.api.CommonResult;
import com.ycl.dto.trend.TrendAnalysisParam;
import com.ycl.entity.caseHandler.BaseCase;
@@ -11,6 +12,7 @@
import com.ycl.util.CheckApiUtil;
import com.ycl.vo.cockpit.CockpitVO;
import com.ycl.vo.cockpit.enforcementEvents.EnforcementEventsVO;
+import com.ycl.vo.cockpit.enforcementEvents.EventVO;
import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -75,7 +77,7 @@
VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO();
videoAndAreaVO.setName(item.getName());
videoAndAreaVO.setCount(item.getCount());
- videoAndAreaVO.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(2, BigDecimal.ROUND_HALF_UP));
+ videoAndAreaVO.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP));
return videoAndAreaVO;
}).collect(Collectors.toList());
return CommonResult.success(collect);
@@ -92,12 +94,12 @@
EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO();
VideoAndAreaVO al = new VideoAndAreaVO();
al.setName("瑙嗛宸℃煡");
- al.setRatio(new BigDecimal(alCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP));
+ al.setRatio(new BigDecimal(alCount * 1.0 / allCount).setScale(4, BigDecimal.ROUND_HALF_UP));
al.setCount(alCount);
typeVO1s.add(al);
VideoAndAreaVO hand = new VideoAndAreaVO();
hand.setName("缃戞牸宸℃煡");
- hand.setRatio(new BigDecimal(handCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP));
+ hand.setRatio(new BigDecimal(handCount * 1.0 / allCount).setScale(4, BigDecimal.ROUND_HALF_UP));
hand.setCount(handCount);
typeVO1s.add(hand);
typeVO.setAll(allCount);
@@ -128,7 +130,9 @@
infoVO.setWeek(iBaseCaseService.weekCount());
infoVO.setDispatch(iBaseCaseService.dispatchCount());
infoVO.setIdentification(iBaseCaseService.alCount());
- infoVO.setEvent(iBaseCaseService.selectEventList(params.getBeginTime(), params.getEndTime()));
+ IPage<EventVO> page = iBaseCaseService.selectEventList(params.getBeginTime(), params.getEndTime(),params.getPageIndex(),params.getPageSize());
+ infoVO.setEvent(page.getRecords());
+ infoVO.setTotal(page.getTotal());
return CommonResult.success(infoVO);
}
}
\ No newline at end of file
--
Gitblit v1.8.0