|
|
|
|
using Entity.DbModel;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Entity.Dto.Req;
|
|
|
|
|
|
|
|
|
|
namespace Repository.Station
|
|
|
|
|
{
|
|
|
|
|
[Scope("SingleInstance")]
|
|
|
|
|
public class EquipInfoRepository : BaseRepository<EquipInfo>
|
|
|
|
|
{
|
|
|
|
|
public EquipInfoRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<List<EquipInfo>> EquipInfoQueryPageAsync(
|
|
|
|
|
bool isWhere1, Expression<Func<EquipInfo, bool>> expression1,
|
|
|
|
|
bool isWhere2, Expression<Func<EquipInfo, bool>> expression2,
|
|
|
|
|
bool isWhere3, Expression<Func<EquipInfo, bool>> expression3,
|
|
|
|
|
int pageNumber, int pageSize, RefAsync<int> totalNumber,
|
|
|
|
|
PageEquipInfoReq input, bool blUseNoLock = false)
|
|
|
|
|
{
|
|
|
|
|
var page = await DbBaseClient
|
|
|
|
|
.Queryable<EquipInfo>()
|
|
|
|
|
.WhereIF(isWhere1, expression1)
|
|
|
|
|
.WhereIF(isWhere2, expression2)
|
|
|
|
|
.WhereIF(isWhere3, expression3)
|
|
|
|
|
.OrderBuilder(input)
|
|
|
|
|
.WithNoLockOrNot(blUseNoLock)
|
|
|
|
|
.ToPageListAsync(pageNumber, pageSize, totalNumber);
|
|
|
|
|
return page;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|