|
@@ -215,11 +215,13 @@ public class DataStatisticController extends BaseController {
|
|
|
Integer pageSize = alarmStatisticResVo.getPageSize().intValue();
|
|
|
List<AlarmFreqArea> list = msgAlarmService.alarmTypeAreaCount(alarmStatisticResVo.getRailwayCode(), alarmStatisticResVo.getCurrentYear(),
|
|
|
alarmStatisticResVo.getCurrentMonth());
|
|
|
- list.forEach(l -> {
|
|
|
- if (!ObjectUtils.isEmpty(l.getAlarmMile())) {
|
|
|
- l.setAlarmMiles(AppendUtils.stringAppend(Integer.valueOf(l.getAlarmMile())));
|
|
|
- }
|
|
|
- });
|
|
|
+ if (!CollectionUtils.isEmpty(list) && Objects.nonNull(list.get(0))) {
|
|
|
+ list.forEach(l -> {
|
|
|
+ if (!ObjectUtils.isEmpty(l.getAlarmMile())) {
|
|
|
+ l.setAlarmMiles(AppendUtils.stringAppend(Integer.valueOf(l.getAlarmMile())));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
IPage page = msgAlarmService.listToPage(list, pageNum, pageSize);
|
|
|
if (!ObjectUtils.isEmpty(page) && !ObjectUtils.isEmpty(page.getRecords())) {
|
|
|
return AjaxResult.success(page);
|