using System; namespace Zxd.Domain { public class OrderDomain { private readonly IBaseRepository _zxdRepository; private readonly IDeptmentDomain _deptmentDomain; public OrderDomain(IBaseRepository zxdRepository, IDeptmentDomain deptmentDomain) { _zxdRepository = zxdRepository; _deptmentDomain = deptmentDomain; } /*public async Task> GetOrderPage(SearchOrderDto dto) { var query = _zxdRepository.GetRepository().Query() .If(dto.Orderid != null, x => x.Where(x => x.SzzyOrderid == dto.Orderid)) .If(dto.OrderStatus != null, x => x.Where(x => x.OrderStatus == dto.OrderStatus)) .If(dto.RiskctrlStatus != null, x => x.Where(x => x.RiskctrlStatus == dto.RiskctrlStatus)) .If(dto.Deptid != null, x => x.Where(x => x.Deptid == dto.Deptid)) .If(dto.ProductSeriesId != null, x => x.Where(x => x.FinishedProduct.ProductSeriesId == dto.ProductSeriesId)) .If(dto.ProductTypeId != null, x => x.Where(x => x.FinishedProduct.ProductTypeId == dto.ProductTypeId)) .If(dto.Activity != null, x => x.Where(x => x.FinishedProductId == dto.Activity)) .If(!string.IsNullOrEmpty(dto.ProductName), x => x.Where(x => x.FinishedProduct.ProductName.Contains(dto.ProductName))) .If(!string.IsNullOrEmpty(dto.ProductCode), x => x.Where(x => x.FinishedProduct.ProductCode == dto.ProductCode)) .If(dto.SzzyOrderid != null, x => x.Where(x => x.SzzyOrderid == dto.SzzyOrderid)) .If(dto.OrderAmountMax != null, x => x.Where(x => x.NeedPay > dto.OrderAmountMax)) .If(dto.OrderTimeFrom != null, x => x.Where(x => x.Ctime >= dto.OrderTimeFrom)) .If(dto.OpenDateTo != null, x => x.Where(x => x.Ctime < dto.OrderTimeFrom.Value.AddDays(1))) .If(dto.AccountingDateFrom != null, x => x.Where(x => x.Arrivaltime >= dto.AccountingDateFrom)) .If(dto.AccountingDateTo != null, x => x.Where(x => x.Arrivaltime < dto.AccountingDateFrom.Value.AddDays(1))) .If(!dto.IncludeNotOpen, x => x.Where(x => x.Otime != null)) .Include(x => x.FinishedProduct); var total = await query.CountAsync(); var data = await query .Select(x => new OrderDto { }) .Skip((dto.PageIndex - 1) * dto.PageSize) .Take(dto.PageSize) .ToListAsync(); return new PageResult(dto.PageIndex, dto.PageSize, total, data); }*/ } }