/// <summary> /// 获取待完成上架商品列表(通过总的上架单) /// </summary> /// <returns></returns> public List <ReplenishSubOrderdtlDto> GetReplenishOrderdtlDto(ReplenishSubOrderdtlApo pageDataApo, out int totalCount) { totalCount = 0; List <ReplenishSubOrderdtlDto> data; //查询语句 var queryable = Db.Queryable <ReplenishSubOrderdtl, ReplenishSubOrder>((rsod, rso) => new object[] { JoinType.Left, rsod.replenish_sub_orderid == rso.id }) .Where((rsod, rso) => rsod.status == (int)RPOStatusType.待完成 && rso.replenish_order_code == pageDataApo.replenish_order_code) .OrderBy(rsod => rsod.birth_date, OrderByType.Desc) .Select <ReplenishSubOrderdtlDto>(); //如果小于0,默认查全部 if (pageDataApo.PageSize > 0) { data = queryable.ToPageList(pageDataApo.PageIndex, pageDataApo.PageSize, ref totalCount); } else { data = queryable.ToList(); totalCount = data.Count(); } return(data); }
public List <ReplenishSubOrderdtlDto> GetReplenishSubOrderdtlDto(ReplenishSubOrderdtlApo pageDataApo, out int totalCount) { totalCount = 0; List <ReplenishSubOrderdtlDto> data; //查询语句 var queryable = Db.Queryable <ReplenishSubOrderdtl>() .Where(it => it.status == (int)RPOStatusType.待完成 && it.replenish_sub_orderid == pageDataApo.replenish_sub_orderid) .OrderBy(it => it.birth_date, OrderByType.Desc) .Select <ReplenishSubOrderdtlDto>(); //如果小于0,默认查全部 if (pageDataApo.PageSize > 0) { data = queryable.ToPageList(pageDataApo.PageIndex, pageDataApo.PageSize, ref totalCount); } else { data = queryable.ToList(); totalCount = data.Count(); } return(data); }