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