|
@@ -1,6 +1,7 @@
|
|
package cn.iocoder.yudao.module.pms.controller.admin;
|
|
package cn.iocoder.yudao.module.pms.controller.admin;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
@@ -442,7 +443,9 @@ public class IotDeviceController {
|
|
});
|
|
});
|
|
// 2. 拼接数据
|
|
// 2. 拼接数据
|
|
return BeanUtils.toBean(devices, IotDeviceSimpleRespVO.class, (deviceVO) -> {
|
|
return BeanUtils.toBean(devices, IotDeviceSimpleRespVO.class, (deviceVO) -> {
|
|
- deviceVO.setDeviceStatusName(IotDeviceStatusEnum.nameOf(deviceVO.getDeviceStatus()).getMsg());
|
|
|
|
|
|
+ if (StrUtil.isNotBlank(deviceVO.getDeviceStatus())) {
|
|
|
|
+ deviceVO.setDeviceStatusName(IotDeviceStatusEnum.nameOf(deviceVO.getDeviceStatus()).getMsg());
|
|
|
|
+ }
|
|
// 2.1 拼接部门信息
|
|
// 2.1 拼接部门信息
|
|
findAndThen(deptMap.get(), deviceVO.getDeptId(), dept -> deviceVO.setDeptName(dept.getName()));
|
|
findAndThen(deptMap.get(), deviceVO.getDeptId(), dept -> deviceVO.setDeptName(dept.getName()));
|
|
// 2.2 设备关联的负责人姓名
|
|
// 2.2 设备关联的负责人姓名
|