From 3249634bf5e7b702093e57fee59b8a347797caf8 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Wed, 21 Feb 2024 15:45:23 +0800 Subject: [PATCH] =?UTF-8?q?bug=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Impl/PwEventMonitorReportServiceImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwEventMonitorReportServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwEventMonitorReportServiceImpl.java index 2c1ae8d99..9dcca4222 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwEventMonitorReportServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwEventMonitorReportServiceImpl.java @@ -79,13 +79,15 @@ public class PwEventMonitorReportServiceImpl implements PwEventMonitorReportServ // Map eventStatisMapByCode = eventStatisList.stream().collect(Collectors.toMap(DictData::getCode, data -> data)); //查询暂态事件明细 - List detailList; - if (BizParamConstant.STAT_BIZ_MONTH.equals(type + "")) { //按月查 - detailList = rmpEventDetailMapper.getDetailsOfTransientEventsByMonth(monitorIdList, null, startTime, endTime); - } else { //按日查 - detailList = rmpEventDetailMapper.getDetailsOfTransientEvents(monitorIdList, null, startTime, endTime); + List detailList = new ArrayList<>(); + List> partition = ListUtils.partition(monitorIdList, 20000); + for (List list : partition) { + if (BizParamConstant.STAT_BIZ_MONTH.equals(type + "")) { //按月查 + detailList.addAll(rmpEventDetailMapper.getDetailsOfTransientEventsByMonth(list, null, startTime, endTime)); + } else { //按日查 + detailList.addAll( rmpEventDetailMapper.getDetailsOfTransientEvents(list, null, startTime, endTime)); + } } - if (CollUtil.isNotEmpty(detailList)) { //todo 获取监测点信息接口 pwPmsMonitorParam.setMonitorName(eventMonitorReportParam.getMonitorName());