2024-04-22 10:19:09 +00:00
|
|
|
|
using InSituLaboratory.Entities;
|
|
|
|
|
|
using InSituLaboratory.Entities.ExperimentalStationEntities;
|
|
|
|
|
|
using InSituLaboratory.IService;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace InSituLaboratory.Service
|
|
|
|
|
|
{
|
|
|
|
|
|
public class SysStatusService : BaseService, ISysStatusService
|
|
|
|
|
|
{
|
|
|
|
|
|
public SysStatusService(DbContext context) : base(context) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-26 10:14:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取主腔体状态数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2024-04-22 10:19:09 +00:00
|
|
|
|
public IEnumerable<SysStatus> GetSysStauts()
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.Set<SysStatus>().OrderByDescending(n => n.CreateTime);
|
2024-04-26 10:14:28 +00:00
|
|
|
|
}
|
2024-04-22 10:19:09 +00:00
|
|
|
|
|
2024-04-26 10:14:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取当前工作设备数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public IEnumerable<CurrentWorkEquipment> GetCurrentWorkEquipment()
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.Set<CurrentWorkEquipment>().OrderByDescending(n => n.CreateTime);
|
2024-04-22 10:19:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-26 10:14:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取当前故障设备数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public IEnumerable<CurrentFaultyEquipment> GetCurrentFaultyEquipment()
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.Set<CurrentFaultyEquipment>().OrderByDescending(n => n.CreateTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-22 10:19:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|