Browse Source

#截取实时数据字段长度

zhongwei
yang_shj 5 months ago
parent
commit
edc2249686
  1. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java

@ -100,6 +100,9 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
alarm.setCreateDept(optional.get().getCreateDept());
alarm.setStationName(optional.get().getName());
alarm.setTenantId(optional.get().getTenantId());
if(StringUtil.isNotBlank(alarm.getAlarmValue()) && alarm.getAlarmValue().length() > 2048){
alarm.setAlarmValue(alarm.getAlarmValue().substring(0,2048));
}
alarm.setStatus(0);
// 步骤4.根据站点查询配置标识
AlarmHandleMarkVo mark = alarmConfigService.mark(alarm.getStationId(),alarm.getAlarmSource(),alarm.getAlarmType());

Loading…
Cancel
Save