48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using InSituLaboratory.Entities;
|
|
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 SysSequentialService : BaseService, ISysSequentialService
|
|
{
|
|
public SysSequentialService(DbContext context) : base(context) { }
|
|
|
|
/// <summary>
|
|
/// 获取时序母表数据
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <returns></returns>
|
|
public IEnumerable<SysSequential> GetSequentials(string key)
|
|
{
|
|
return this.Set<SysSequential>().Where(m => m.Sequential == key && m.IsDelete == 0).OrderByDescending(n => n.CreateTime);
|
|
}
|
|
/// <summary>
|
|
/// 获取时序子表数据
|
|
/// </summary>
|
|
/// <param name="key">母表ID</param>
|
|
/// <returns></returns>
|
|
|
|
public IEnumerable<SysSequentialDetails> GetSequentialDetails(int key)
|
|
{
|
|
return this.Set<SysSequentialDetails>().Where(m => m.SysSquentialID == key && m.IsDelete == 0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取时序子表数据
|
|
/// </summary>
|
|
/// <param name="key">子表ID</param>
|
|
/// <returns></returns>
|
|
|
|
public IEnumerable<SysSequentialDetails> GetSequentialDetailList(int key)
|
|
{
|
|
return this.Set<SysSequentialDetails>().Where(m => m.Number == key && m.IsDelete == 0);
|
|
}
|
|
}
|
|
}
|