예제 #1
0
 /// <summary>
 /// 用于判断该订单是否已经正在出库
 /// </summary>
 /// <returns></returns>
 public ReturnOrderEntity CheckOrder(string orderNum)
 {
     ReturnDetailEntity entity = new ReturnDetailEntity() { ContractOrder = orderNum };
     ReturnOrderEntity order = new ReturnOrderEntity();
     order.Where(a => a.Status == (int)EAudite.Wait);
     order.IncludeAll();
     entity.Left<ReturnOrderEntity>(order, new Params<string, string>() { Item1 = "OrderNum", Item2 = "OrderNum" });
     order = this.ReturnOrder.GetSingle(order);
     return order;
 }
예제 #2
0
 /// <summary>
 /// 查询单据分页
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="pageInfo"></param>
 /// <returns></returns>
 public List<ReturnOrderEntity> GetList(ReturnOrderEntity entity, ref PageInfo pageInfo)
 {
     entity.IncludeAll();
     entity.Where(a => a.IsDelete == (int)EIsDelete.NotDelete);
     entity.And("Status", ECondition.Eth, (int)EAudite.Pass);
     entity.OrderBy(a => a.ID, EOrderBy.DESC);
     ReturnDetailEntity detail = new ReturnDetailEntity();
     detail.Include(a => new { ProductName = a.ProductName, BarCode = a.BarCode, ProductNum = a.ProductNum });
     entity.Left<ReturnDetailEntity>(detail, new Params<string, string>() { Item1 = "OrderNum", Item2 = "OrderNum" });
     int rowCount = 0;
     List<ReturnOrderEntity> listResult = this.ReturnOrder.GetList(entity, pageInfo.PageSize, pageInfo.PageIndex, out rowCount);
     int allNum = GetAllNum();
     if (!listResult.IsNullOrEmpty())
     {
         foreach (ReturnOrderEntity item in listResult)
         {
             item.NumPCT = ((float)item.Num * 100.00f) / allNum;
         }
     }
     pageInfo.RowCount = rowCount;
     return listResult;
 }