You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

6 months ago
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkEntity.DbModel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HybirdFrameworkRepository.System
{
[Scope("SingleInstance")]
public class BsNetEqmParamInfoRepository : BaseRepository<BsNetEqmParamInfo>
{
private ISqlSugarClient DbBaseClient;
public BsNetEqmParamInfoRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
DbBaseClient = sqlSugar;
}
public List<BsNetEqmParamInfo> QueryListByFEqmTypeNo(List<int> fEqmTypeNo)
{
return DbBaseClient
.Queryable<BsNetEqmParamInfo>()
.In(t => t.EqmTypeNo, fEqmTypeNo)
.ToList();
}
public IEnumerable<IGrouping<int, BsNetEqmParamInfo>> QueryConnectParams(List<int> types)
{
List<BsNetEqmParamInfo> infos = this.QueryListByFEqmTypeNo(types);
return infos.GroupBy(i => i.EqmTypeNo).ToList();
}
}
}