فهرست منبع

Merge remote-tracking branch 'origin/master'

zhangcl 1 روز پیش
والد
کامیت
6c6c245c02

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

@@ -53,7 +53,6 @@ import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -452,6 +451,8 @@ public class IotDeviceController {
         for (IotDeviceRespVO iotDeviceRespVO : result.getList()) {
             IotProductClassifyDO iotProductClassify = iotProductClassifyService.getIotProductClassify(iotDeviceRespVO.getAssetClass());
             iotDeviceRespVO.setAssetClassName(iotProductClassify.getName());
+            DeptRespDTO dept = deptApi.getDept(iotDeviceRespVO.getDeptId());
+            iotDeviceRespVO.setDeviceName(Objects.nonNull(dept)?dept.getName()+" "+iotDeviceRespVO.getDeviceName():iotDeviceRespVO.getDeviceName());
         }
 
         return success(result);