Ver Fonte

设备分类的处理

lipenghui há 5 horas atrás
pai
commit
ee5d9e9952

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/IotDeviceServiceImpl.java

@@ -325,7 +325,7 @@ public class IotDeviceServiceImpl implements IotDeviceService {
         IotTreeDO iotTreeDO = new IotTreeDO();
         iotTreeDO.setType("device");
         iotTreeDO.setOriginId(iotDevice.getId());
-        iotTreeDO.setName(StringUtils.isNotBlank(iotDevice.getYfDeviceCode())?iotDevice.getYfDeviceCode():iotDevice.getDeviceCode()+iotDevice.getDeviceName());
+        iotTreeDO.setName(StringUtils.isNotBlank(iotDevice.getYfDeviceCode())?iotDevice.getYfDeviceCode()+iotDevice.getDeviceName():iotDevice.getDeviceCode()+iotDevice.getDeviceName());
         iotTreeDO.setDeptId(iotDevice.getDeptId());
         List<IotTreeDO> iotTreeDOS = iotTreeMapper.selectListByOriginId(iotDevice.getDeptId(),"dept");
         if (CollUtil.isNotEmpty(iotTreeDOS)) {
@@ -370,7 +370,7 @@ public class IotDeviceServiceImpl implements IotDeviceService {
             throw new ServiceException(ErrorCodeConstants.DEPT_NOT_FOUND.getCode(),"无资料库信息");
         }
         IotTreeDO iotTreeDO = iotTreeDOS.get(0);
-        iotTreeDO.setName(StringUtils.isNotBlank(updateObj.getYfDeviceCode())?updateObj.getYfDeviceCode():updateObj.getDeviceCode() +updateObj.getDeviceName());
+        iotTreeDO.setName(StringUtils.isNotBlank(updateObj.getYfDeviceCode())?updateObj.getYfDeviceCode()+updateObj.getDeviceName():updateObj.getDeviceCode() +updateObj.getDeviceName());
         iotTreeDO.setDeptId(updateObj.getDeptId());
         iotTreeMapper.updateById(iotTreeDO);
     }