fix:测试问题修复,ph值。
This commit is contained in:
@@ -254,16 +254,18 @@ public class WarnCallNoticeServiceImpl implements WarnCallNoticeService {
|
||||
int sentCount = 0;
|
||||
for (AquWarnCallNotice notice : pendingList) {
|
||||
try {
|
||||
// 查询关联的告警消息内容,用于构建 TTS 参数
|
||||
String rawMessage = warnCallNoticeMapper.selectWarnMessageByCallNoticeId(notice.getId());
|
||||
String warnMessageShort = parseWarnMessageShort(rawMessage);
|
||||
// 查询关联的告警标题(title),作为 TTS warnMessage 参数
|
||||
// 使用 title(如"设备离线"、"溶解氧")而非完整 message,避免长字符串被 TTS 逐字播报
|
||||
String warnTitle = warnCallNoticeMapper.selectWarnTitleByCallNoticeId(notice.getId());
|
||||
String warnMessageShort = (warnTitle != null && !warnTitle.isEmpty()) ? warnTitle : "异常";
|
||||
|
||||
// 通过 deviceId 查询设备名称
|
||||
// 注意:不使用 serialNum 作为 fallback,避免数字序列号被 TTS 逐位播报
|
||||
String deviceName = null;
|
||||
if (notice.getDeviceId() != null) {
|
||||
Device device = deviceMapper.selectById(notice.getDeviceId());
|
||||
if (device != null) {
|
||||
deviceName = device.getDeviceName() != null ? device.getDeviceName() : device.getSerialNum();
|
||||
if (device != null && device.getDeviceName() != null && !device.getDeviceName().isEmpty()) {
|
||||
deviceName = device.getDeviceName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user