From 16f199a8de60118509bab025a91c9332874efcc1 Mon Sep 17 00:00:00 2001 From: zy <82248909@qq.com> Date: Tue, 25 Nov 2025 18:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=9C=B0=E5=9B=BE=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/appmana/service/impl/IotCommonP2ServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/service/impl/IotCommonP2ServiceImpl.java b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/service/impl/IotCommonP2ServiceImpl.java index f26a49b..4f2f5df 100644 --- a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/service/impl/IotCommonP2ServiceImpl.java +++ b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/service/impl/IotCommonP2ServiceImpl.java @@ -356,6 +356,8 @@ public class IotCommonP2ServiceImpl { }else if(IotConstants.month_days.equals(screenSummaryVo.getSummrayMode())){//月需要数据量 LocalDate curDateMark = LocalDate.parse(startTime+"-01",daydtf); todayDataCounts = curDateMark.with(TemporalAdjusters.lastDayOfMonth()).getDayOfMonth(); + } else if (IotConstants.year_months.equals(screenSummaryVo.getSummrayMode())) { + todayDataCounts = 12; } if(IotConstants.day_hours.equals(screenSummaryVo.getSummrayMode())){//检查是否是今天 @@ -407,6 +409,9 @@ public class IotCommonP2ServiceImpl { timeList.addAll(nowItegrate.getIndexs().subList(0,todayDataCounts)); + if(dataMap.isEmpty()){//如果非今日,传入第一次的统计 + dataMap.putAll(nowItegrate.getSurvResult()); + } voSurvIntegrateResult.setHeaders(nowItegrate.getHeaders()); voSurvIntegrateResult.setSurvResult(dataMap); voSurvIntegrateResult.setIndexs(timeList);