Forráskód Böngészése

设备台账分页添加资产类别

lipenghui 3 hete
szülő
commit
1e67e138ef

+ 4 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/IotDeviceController.java

@@ -223,6 +223,10 @@ public class IotDeviceController {
             if (Objects.nonNull(iotDevicePerson)) {
                 e.setChargeName(iotDevicePerson.get(e.getId()));
             }
+            if (Objects.nonNull(e.getAssetClass())) {
+                IotProductClassifyDO iotProductClassify = iotProductClassifyService.getIotProductClassify(e.getAssetClass());
+                e.setAssetClassName(Objects.nonNull(iotProductClassify)?iotProductClassify.getName():"");
+            }
         });
         return success(new PageResult<>(iotDeviceRespVOS,
                 pageResult.getTotal()));