|
|
@@ -487,7 +487,8 @@ public class IotDeviceController {
|
|
|
}
|
|
|
//连油设备
|
|
|
devicePageReqVO.setProductId(649L);
|
|
|
- List<String> codes = yfDeviceService.getDevicePage(devicePageReqVO).getList().stream().map(YfDeviceDO::getSerialNumber).collect(Collectors.toList());
|
|
|
+ List<YfDeviceDO> list = yfDeviceService.getDevicePage(devicePageReqVO).getList();
|
|
|
+ List<String> codes = list.stream().map(YfDeviceDO::getSerialNumber).collect(Collectors.toList());
|
|
|
PageResult<IotDeviceDO> pageResult = iotDeviceService.getIotDeviceTdPage(pageReqVO, codes);
|
|
|
if (CollUtil.isEmpty(pageResult.getList())) {
|
|
|
return success(new PageResult<>(pageResult.getTotal()));
|
|
|
@@ -501,6 +502,9 @@ public class IotDeviceController {
|
|
|
iotDeviceRespVO.setAssetClassName(iotProductClassify.getName());
|
|
|
DeptRespDTO dept = deptApi.getDept(iotDeviceRespVO.getDeptId());
|
|
|
iotDeviceRespVO.setDeviceName(Objects.nonNull(dept)?dept.getName()+" "+iotDeviceRespVO.getDeviceName():iotDeviceRespVO.getDeviceName());
|
|
|
+ list.stream().filter(e -> e.getSerialNumber().equals(iotDeviceRespVO.getDeviceCode())).findFirst().ifPresent(e ->{
|
|
|
+ iotDeviceRespVO.setMqttUrl("/"+e.getProductId()+"/"+iotDeviceRespVO.getDeviceCode()+"/property/post");
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
return success(result);
|