fix:测试问题修复,ph值。

This commit is contained in:
tianyongbao
2026-04-09 00:03:15 +08:00
parent a50f9ee4c9
commit eeb9ca774e
3 changed files with 31 additions and 25 deletions

View File

@@ -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();
}
}