From 64853e5ffe5d1176ce5532f1ac75b75a01d62d19 Mon Sep 17 00:00:00 2001 From: yanghongwei Date: Thu, 26 Jun 2025 23:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/AlarmService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Service/AlarmService.cs b/Service/AlarmService.cs index 25cf39d..630431a 100644 --- a/Service/AlarmService.cs +++ b/Service/AlarmService.cs @@ -163,13 +163,13 @@ namespace LY.App.Service var has = entity.startTime <= DateTime.Now && DateTime.Now <= entity.endTime; return new Tuple(has, has ? entity.Id : 0); } - - } + } } - } + } + } return new Tuple(false, 0); ; } @@ -374,7 +374,7 @@ namespace LY.App.Service RefAsync total = 0; var items = await _db.Queryable().SplitTable() .WhereIF(input.positionId.HasValue, st => st.positionId == input.positionId.Value) - .WhereIF(input.Frequency.HasValue, st => st.freq == input.Frequency.Value) + // .WhereIF(input.Frequency.HasValue, st => st.freq == input.Frequency.Value) .WhereIF(!string.IsNullOrEmpty(input.sn), s => s.serial_number.Contains(input.sn)) .WhereIF(!string.IsNullOrEmpty(input.model), st => st.device_type == input.model) .WhereIF(input.strartDate.HasValue, st => st.CreateTime >= input.strartDate.Value) @@ -387,7 +387,7 @@ namespace LY.App.Service startTime = SqlFunc.AggregateMin(st.CreateTime), endTime = SqlFunc.AggregateMax(st.CreateTime), sn = st.serial_number, - Frequency = st.freq, + Frequency = SqlFunc.AggregateMax(st.freq), duration = (SqlFunc.AggregateMax(st.CreateTime) - SqlFunc.AggregateMin(st.CreateTime)).TotalSeconds, model = st.device_type, positionId = st.positionId,