From 65572c6833c9b6c9b7f7b500e10cd86369b4067f Mon Sep 17 00:00:00 2001 From: mengff <1198151809@qq.com> Date: Thu, 1 Feb 2024 14:24:56 +0800 Subject: [PATCH] =?UTF-8?q?--=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/controller/StatusController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java index 35300a31..568f8a3a 100644 --- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java +++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java @@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.zc.business.domain.Status; import com.zc.business.service.impl.StatusService; @@ -125,6 +126,9 @@ public class StatusController extends BaseController { //根据时间分组 Map> map = listStatus.stream() .collect(Collectors.groupingBy(Status -> Status.getTime().getHour())); + if(StringUtils.isEmpty(map)){ + return AjaxResult.success("暂无数据"); + } Map> ipMap = new TreeMap<>(map); Integer lastKey = Collections.max(ipMap.keySet()); List lastEntry = ipMap.get(lastKey);