安灯大屏

This commit is contained in:
quowingwang 2026-01-06 14:35:42 +08:00
parent 832d5944d5
commit b99fbd477f

View File

@ -138,8 +138,17 @@ namespace ZR.Service.mes.andon
DateTime startTime = new DateTime(now.Year, now.Month, 1).Date; // 截断时分秒为00:00:00
var predicate = Expressionable.Create<AndonAlarmRecord>();
predicate.And(a => a.CreatedTime >= startTime && a.CreatedTime <= endTime);
return null;
var queryList = Queryable()
.Where(predicate.ToExpression())
.GroupBy(a => a.AlarmType)
.Having(a => a.AlarmType != null)
.Select(a => new SelectOption
{
label = a.AlarmType,
value = SqlFunc.AggregateCount(1).ToString()
})
.ToList();
return new ApiResult(200,"",queryList);
}
public PagedInfo<AndonAlarmRecordDto> GetListToday(AndonAlarmRecordQueryDto parm)