27 lines
804 B
C#
27 lines
804 B
C#
using InSituLaboratory.Entities;
|
|
using InSituLaboratory.IService.History;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace InSituLaboratory.Service.History
|
|
{
|
|
/// <summary>
|
|
/// 电池电量服务层
|
|
/// </summary>
|
|
public class CavityBatteryLevelService : BaseService, ICavityBatteryLevelService
|
|
{
|
|
public CavityBatteryLevelService(DbContext context) : base(context) { }
|
|
|
|
public IEnumerable<cavitybatterylevel> GetCavityBatteryLevel(string key)
|
|
{
|
|
return Set<cavitybatterylevel>().OrderByDescending(p => p.RecordTime)
|
|
.Where(m => string.IsNullOrEmpty(key) || m.RecordTime.ToString().Contains(key));
|
|
}
|
|
|
|
}
|
|
}
|