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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using System.Linq.Expressions ;
using Entity.DbModel.Station ;
using HybirdFrameworkCore.Autofac.Attribute ;
using SqlSugar ;
namespace Repository.Station ;
[Scope]
public class EquipAlarmDefineRepository : BaseRepository < EquipAlarmDefine >
{
public EquipAlarmDefineRepository ( ISqlSugarClient sqlSugar ) : base ( sqlSugar )
{
}
/// <summary>
///
/// </summary>
/// <param name="equipTypeCode">0-充电机;1-电表; 2-水冷; 3-plc; </param>
/// <param name="equipCode"></param>
/// <param name="errorCode"></param>
/// <returns></returns>
public EquipAlarmDefine ? SelectByEquipCodeAndErrorCode ( int equipTypeCode , string equipCode , string errorCode )
{
return this . QueryByClause ( it = > it . EquipTypeCode = = equipTypeCode & &
it . EquipCode = = equipCode & & it . ErrorCode = = errorCode ) ;
}
/// <summary>
/// 查询需要导出换电订单
/// </summary>
/// <param name="predicate"></param>
/// <returns></returns>
public async Task < List < EquipAlarmDefine > > QueryEquipAlarmDefineList ( Expression < Func < EquipAlarmDefine , bool > > predicate )
{
if ( predicate = = null )
{
return await QueryAsync ( ) ;
}
List < EquipAlarmDefine > resultList = await DbBaseClient
. Queryable < EquipAlarmDefine > ( )
. Where ( predicate )
. WithNoLockOrNot ( false )
. ToListAsync ( ) ;
return resultList ;
}
}