|
@@ -152,17 +152,17 @@ public class IotDeviceController {
|
|
|
iotDeviceRespVO.setDeptName(Objects.nonNull(dept)?dept.getName():"");
|
|
|
IotProductClassifyDO iotProductClassify = iotProductClassifyService.getIotProductClassify(iotDevice.getAssetClass());
|
|
|
iotDeviceRespVO.setAssetClassName(Objects.nonNull(iotProductClassify)?iotProductClassify.getName():"");
|
|
|
- List<YfDeviceDO> allDevice = yfDeviceService.getAllDevice();
|
|
|
- allDevice.stream().filter(e -> e.getSerialNumber().equals(iotDevice.getDeviceCode())).findFirst().ifPresent(e -> {
|
|
|
- iotDeviceRespVO.setIfInline(e.getStatus());
|
|
|
- List<DeviceVO> deviceVOS = deviceMapper.selectNew(e.getSerialNumber());
|
|
|
- if (CollUtil.isNotEmpty(deviceVOS)) {
|
|
|
- Timestamp ts = deviceVOS.get(0).getTs();
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- String format = sdf.format(ts);
|
|
|
- iotDeviceRespVO.setLastInlineTime(format);
|
|
|
- }
|
|
|
- });
|
|
|
+// List<YfDeviceDO> allDevice = yfDeviceService.getAllDevice();
|
|
|
+// allDevice.stream().filter(e -> e.getSerialNumber().equals(iotDevice.getDeviceCode())).findFirst().ifPresent(e -> {
|
|
|
+// iotDeviceRespVO.setIfInline(e.getStatus());
|
|
|
+// List<DeviceVO> deviceVOS = deviceMapper.selectNew(e.getSerialNumber());
|
|
|
+// if (CollUtil.isNotEmpty(deviceVOS)) {
|
|
|
+// Timestamp ts = deviceVOS.get(0).getTs();
|
|
|
+// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+// String format = sdf.format(ts);
|
|
|
+// iotDeviceRespVO.setLastInlineTime(format);
|
|
|
+// }
|
|
|
+// });
|
|
|
Map<Long, String> iotDevicePerson = iotDevicePersonService.getIotDevicePerson(ImmutableList.of(id));
|
|
|
if (Objects.nonNull(iotDevicePerson)) {
|
|
|
iotDeviceRespVO.setResponsibleNames(iotDevicePerson.get(id));
|