From 1510eb42cf3dee58c23d2928aa98a256f39a70fe Mon Sep 17 00:00:00 2001 From: zhangyue <82248909@qq.com> Date: Fri, 31 Jul 2026 15:00:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=A7=9F=E6=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IotCommonP2ServiceImpl.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 51f9455..f0f4132 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 @@ -470,10 +470,15 @@ public class IotCommonP2ServiceImpl { String newTimes = yesterMonth.format(monthdtf); voSurvIntegrateParam.setStartTime(newTimes); voSurvIntegrateParam.setEndTime(newTimes); - VOSurvIntegrateResult yesterData = commonService.survDataIntegrateStatistic(voSurvIntegrateParam); - LinkedHashMap> yesterResult = yesterData.getSurvResult(); - dataMap = processDataSub(yesterResult,nowItegrate.getSurvResult(),todayDataCounts,yesterDataCounts); - timeList.addAll(yesterData.getIndexs().subList(yesterDataCounts,yesterData.getIndexs().size())); + + int lastDayOfMonth = yesterMonth.with(TemporalAdjusters.lastDayOfMonth()).getDayOfMonth(); + + if(todayDataCounts < lastDayOfMonth) { + VOSurvIntegrateResult yesterData = commonService.survDataIntegrateStatistic(voSurvIntegrateParam); + LinkedHashMap> yesterResult = yesterData.getSurvResult(); + dataMap = processDataSub(yesterResult,nowItegrate.getSurvResult(),todayDataCounts,yesterDataCounts); + timeList.addAll(yesterData.getIndexs().subList(yesterDataCounts,yesterData.getIndexs().size())); + } } } else if (IotConstants.year_months.equals(screenSummaryVo.getSummrayMode())){//检查是否是本年 if(nowDay.format(yeardtf).equals(startTime)){//如果查询是本年,再查询一次去年,拼接为12个月