fix: 电流上报值为0的时候,没有更新,bug修复。
This commit is contained in:
@@ -78,6 +78,22 @@ public interface AquWarnCallNoticeMapper extends BaseMapper<AquWarnCallNotice> {
|
||||
@Param("title") String title,
|
||||
@Param("periodStart") LocalDateTime periodStart);
|
||||
|
||||
/**
|
||||
* 查询指定设备、时间范围内「活跃通知批次」的数量(不区分 title)
|
||||
* 对应 C# CreateNoticeCall 中检查 _listNoticeWaitHandle / _listInsertWarnCallNotice 的去重逻辑
|
||||
* 用于故障码告警创建时判断该设备是否已有进行中的通知批次,避免重复创建
|
||||
*
|
||||
* @param deviceId 设备ID
|
||||
* @param afterTime 起始时间
|
||||
* @return 满足条件的通知数量
|
||||
*/
|
||||
@Select("SELECT COUNT(1) FROM aqu_call_notice " +
|
||||
"WHERE device_id = #{deviceId} " +
|
||||
"AND call_status IN (0, 1, 2) " +
|
||||
"AND call_time >= #{afterTime}")
|
||||
long countActiveByDeviceAfter(@Param("deviceId") Long deviceId,
|
||||
@Param("afterTime") LocalDateTime afterTime);
|
||||
|
||||
/**
|
||||
* 查询 callStatus=0 且 callTime <= now 的到期待发记录
|
||||
* 用于定时任务扫描并触发语音通知
|
||||
|
||||
Reference in New Issue
Block a user