|
|
@ -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<Integer, List<Status>> map = listStatus.stream() |
|
|
|
.collect(Collectors.groupingBy(Status -> Status.getTime().getHour())); |
|
|
|
if(StringUtils.isEmpty(map)){ |
|
|
|
return AjaxResult.success("暂无数据"); |
|
|
|
} |
|
|
|
Map<Integer, List<Status>> ipMap = new TreeMap<>(map); |
|
|
|
Integer lastKey = Collections.max(ipMap.keySet()); |
|
|
|
List<Status> lastEntry = ipMap.get(lastKey); |
|
|
|