|
@@ -59,6 +59,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.google.common.collect.ImmutableList;
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
|
+import com.xingyuv.captcha.util.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@@ -320,7 +321,7 @@ public class IotDeviceServiceImpl implements IotDeviceService {
|
|
|
IotTreeDO iotTreeDO = new IotTreeDO();
|
|
|
iotTreeDO.setType("device");
|
|
|
iotTreeDO.setOriginId(iotDevice.getId());
|
|
|
- iotTreeDO.setName(iotDevice.getDeviceName());
|
|
|
+ iotTreeDO.setName(StringUtils.isNotBlank(iotDevice.getYfDeviceCode())?iotDevice.getYfDeviceCode():iotDevice.getDeviceCode()+iotDevice.getDeviceName());
|
|
|
iotTreeDO.setDeptId(iotDevice.getDeptId());
|
|
|
List<IotTreeDO> iotTreeDOS = iotTreeMapper.selectListByOriginId(iotDevice.getDeptId(),"dept");
|
|
|
if (CollUtil.isNotEmpty(iotTreeDOS)) {
|
|
@@ -365,7 +366,7 @@ public class IotDeviceServiceImpl implements IotDeviceService {
|
|
|
throw new ServiceException(ErrorCodeConstants.DEPT_NOT_FOUND.getCode(),"无资料库信息");
|
|
|
}
|
|
|
IotTreeDO iotTreeDO = iotTreeDOS.get(0);
|
|
|
- iotTreeDO.setName(updateObj.getDeviceName());
|
|
|
+ iotTreeDO.setName(StringUtils.isNotBlank(updateObj.getYfDeviceCode())?updateObj.getYfDeviceCode():updateObj.getDeviceCode() +updateObj.getDeviceName());
|
|
|
iotTreeDO.setDeptId(updateObj.getDeptId());
|
|
|
iotTreeMapper.updateById(iotTreeDO);
|
|
|
}
|