Browse Source

设备信息,监视点名称是空就用设备名

jwy
review512jwy@163.com 4 weeks ago
parent
commit
8f5ca1371b
  1. 18
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java

18
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java

@ -260,6 +260,10 @@ public class DeviceServiceImpl implements IDeviceService {
deviceInfo.setCreatedTimestamp(new Date());
deviceInfo.setUpdatedBy(userId);
deviceInfo.setWsclientId(deviceAddParams.getWsclientId());
// 20260129需求:监视点名称是空就用设备名
if (StringUtils.isBlank(deviceInfo.getMonitoringPointName())) {
deviceInfo.setMonitoringPointName(deviceInfo.getDeviceName());
}
if (Objects.nonNull(deviceAddParams.getTypeId())) {
deviceInfo.setTypeId(deviceAddParams.getTypeId().intValue());
@ -353,6 +357,12 @@ public class DeviceServiceImpl implements IDeviceService {
if (StringUtils.isBlank(deviceUpdateParams.getDataMapping())) {
deviceInfo.setDataMapping("{}");
}
// 20260129需求:监视点名称是空就用设备名
if (StringUtils.isBlank(deviceInfo.getMonitoringPointName())) {
deviceInfo.setMonitoringPointName(deviceInfo.getDeviceName());
}
this.deviceInfoMapperExt.updateByPrimaryKeySelective(deviceInfo);
DeviceGroupRelationExample example = new DeviceGroupRelationExample();
@ -968,6 +978,10 @@ public class DeviceServiceImpl implements IDeviceService {
} else {
deviceInfo.setDataMapping(deviceInfoExcel.getDataMapping());
}
// 20260129需求:监视点名称是空就用设备名
if (StringUtils.isBlank(deviceInfo.getMonitoringPointName())) {
deviceInfo.setMonitoringPointName(deviceInfo.getDeviceName());
}
// if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointCategory())) {
// deviceInfo.setMonitoringPointCategoryId(monitoringPointCategoryMapping.get(deviceInfoExcel.getMonitoringPointCategory()).getId());
// }
@ -1002,6 +1016,10 @@ public class DeviceServiceImpl implements IDeviceService {
if (StringUtils.isNotBlank(deviceInfoExcel.getDataProvider())) {
deviceInfo.setDataProviderId(dataProviderMapping.get(deviceInfoExcel.getDataProvider()).getId());
}
// 20260129需求:监视点名称是空就用设备名
if (StringUtils.isBlank(deviceInfo.getMonitoringPointName())) {
deviceInfo.setMonitoringPointName(deviceInfo.getDeviceName());
}
// if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointCategory())) {
// deviceInfo.setMonitoringPointCategoryId(monitoringPointCategoryMapping.get(deviceInfoExcel.getMonitoringPointCategory()).getId());
// }

Loading…
Cancel
Save