细节调整

This commit is contained in:
yanghongwei 2025-06-26 23:34:41 +08:00
parent 70ebc1868d
commit 64853e5ffe
1 changed files with 5 additions and 5 deletions

View File

@ -164,12 +164,12 @@ namespace LY.App.Service
return new Tuple<bool, long>(has, has ? entity.Id : 0);
}
}
}
}
}
}
}
return new Tuple<bool, long>(false, 0); ;
}
@ -374,7 +374,7 @@ namespace LY.App.Service
RefAsync<int> total = 0;
var items = await _db.Queryable<Alarm>().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,