|
@@ -81,7 +81,14 @@ public class DeviceErrorsRecordServiceImpl extends ServiceImpl<DeviceErrorsRecor
|
|
if (Emptys.check(voPageBean.getRecords())) {
|
|
if (Emptys.check(voPageBean.getRecords())) {
|
|
List<Long> deviceIdList = voPageBean.getRecords().stream().map(DeviceErrorsRecordDto.Vo::getDeviceId).collect(Collectors.toList());
|
|
List<Long> deviceIdList = voPageBean.getRecords().stream().map(DeviceErrorsRecordDto.Vo::getDeviceId).collect(Collectors.toList());
|
|
Map<Long, String> deviceMap = deviceInfoService.getDeviceNameList(new DeviceInfoDto.DeviceIdDto().setDeviceId(deviceIdList)).getData();
|
|
Map<Long, String> deviceMap = deviceInfoService.getDeviceNameList(new DeviceInfoDto.DeviceIdDto().setDeviceId(deviceIdList)).getData();
|
|
- voPageBean.getRecords().forEach(i -> i.setDeviceName(deviceMap.get(i.getDeviceId())));
|
|
|
|
|
|
+ Map<String, SysCodeConfigureRedis> stringSysCodeConfigureRedisMap = SysCodeConfigureUtils.get(SysCodeConfigureEnum.D01.getCode());
|
|
|
|
+ voPageBean.getRecords().forEach(i -> {
|
|
|
|
+ i.setDeviceName(deviceMap.get(i.getDeviceId()));
|
|
|
|
+ SysCodeConfigureRedis sysCodeConfigureRedis = stringSysCodeConfigureRedisMap.get(i.getCode());
|
|
|
|
+ if (sysCodeConfigureRedis != null) {
|
|
|
|
+ i.setSysCodeConfigureRedis(sysCodeConfigureRedis);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
return R.ok(voPageBean);
|
|
return R.ok(voPageBean);
|
|
}
|
|
}
|
|
@@ -94,7 +101,15 @@ public class DeviceErrorsRecordServiceImpl extends ServiceImpl<DeviceErrorsRecor
|
|
.in(DeviceErrorsRecord::getDeviceId, selectList.getDeviceIds())
|
|
.in(DeviceErrorsRecord::getDeviceId, selectList.getDeviceIds())
|
|
.build();
|
|
.build();
|
|
List<DeviceErrorsRecord> list = list(lambdaQueryWrapper);
|
|
List<DeviceErrorsRecord> list = list(lambdaQueryWrapper);
|
|
- return R.ok(copy(DeviceErrorsRecordDto.Vo.class, list));
|
|
|
|
|
|
+ Map<String, SysCodeConfigureRedis> stringSysCodeConfigureRedisMap = SysCodeConfigureUtils.get(SysCodeConfigureEnum.D01.getCode());
|
|
|
|
+ List<DeviceErrorsRecordDto.Vo> vos = copy(DeviceErrorsRecordDto.Vo.class, list);
|
|
|
|
+ vos.forEach(vo -> {
|
|
|
|
+ SysCodeConfigureRedis sysCodeConfigureRedis = stringSysCodeConfigureRedisMap.get(vo.getCode());
|
|
|
|
+ if (sysCodeConfigureRedis != null) {
|
|
|
|
+ vo.setSysCodeConfigureRedis(sysCodeConfigureRedis);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return R.ok(vos);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|