|
|
|
|
using Entity.Api.Req;
|
|
|
|
|
using Entity.Api.Resp;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
|
|
|
|
|
namespace Service.Station;
|
|
|
|
|
|
|
|
|
|
[Scope("SingleInstance")]
|
|
|
|
|
public class EquipAlarmLevelService : BaseServices<EquipAlarmLevel>
|
|
|
|
|
{
|
|
|
|
|
EquipAlarmLevelRepository _equipAlarmLevelRepository;
|
|
|
|
|
public EquipAlarmLevelService(EquipAlarmLevelRepository dal)
|
|
|
|
|
{
|
|
|
|
|
_equipAlarmLevelRepository = dal;
|
|
|
|
|
BaseDal = dal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ϵȼ<CFB5><C8BC><EFBFBD>Ϣ<EFBFBD><CFA2>ҳ
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="equipAlarmLevel"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public PageResult<EquipAlarmLevelResp> QueryEqmFaultInfo(QueryEquipAlarmLevelReq equipAlarmLevel)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>յı<D5B5><C4B1><EFBFBD>ʽ<EFBFBD><CABD>
|
|
|
|
|
Expression<Func<EquipAlarmLevel, bool>> where = null;
|
|
|
|
|
//// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
ParameterExpression parameter = Expression.Parameter(typeof(EquipAlarmLevel), "u");
|
|
|
|
|
|
|
|
|
|
//TODO ȱ<><C8B1><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
//if (!string.IsNullOrEmpty(quipAlarmLevel.Level))
|
|
|
|
|
//{
|
|
|
|
|
// Expression<Func<EquipAlarmLevel, bool>> condition1Expr = u => u.Level == quipAlarmLevel.Level;
|
|
|
|
|
// where = condition1Expr;
|
|
|
|
|
//}
|
|
|
|
|
//// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
|
|
|
|
|
//if (!string.IsNullOrEmpty(quipAlarmLevel.LevelName))
|
|
|
|
|
//{
|
|
|
|
|
// Expression<Func<EquipAlarmLevel, bool>> condition2Expr = u => u.LevelName == quipAlarmLevel.LevelName;
|
|
|
|
|
// where = where == null ? condition2Expr : Expression.Lambda<Func<EquipAlarmLevel, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
//}
|
|
|
|
|
//<2F><>ѯ
|
|
|
|
|
return PageResult<EquipAlarmLevelResp>.ConvertPage(_equipAlarmLevelRepository.QueryIPageByCause(equipAlarmLevel, where));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|