Пример #1
0
 /// <summary>
 /// return the sub-delivery order of pOrder, or null if failed.
 /// </summary>
 /// <param name="pOrder">object of sub-stockout order.</param>
 /// <returns></returns>
 public IMangoOrderBase GetSubDeliveryOrder(MangoSubStockoutOrder pOrder)
 {
     if (null == pOrder)
     {
         C_WMS.Data.Utility.MyLog.Instance.Warning("MangoSubStockoutOrderHandler.GetSubDeliveryOrder(), invalid null param.");
         return(null);
     }
     try
     {
         string errMsg = string.Empty;
         MangoSubDeliveryOrder        retOrder = null;
         List <MangoSubDeliveryOrder> sdList   = null;
         int err = MangoFactory.GetV_Order(NewFilter_GetDeliveryOrder(pOrder), out sdList, out errMsg);
         if (1 == err)
         {
             retOrder = sdList[0];
         }
         else
         {
             C_WMS.Data.Utility.MyLog.Instance.Warning("MangoSubStockoutOrderHandler.GetSubDeliveryOrder({0}), failed in retrieving sub-delivery order. err={1}, errMsg={2}", pOrder, err, errMsg);
         }
         if (null != sdList)
         {
             sdList.Clear();
         }
         return(retOrder);
     }
     catch (Exception ex)
     {
         C_WMS.Data.Utility.MyLog.Instance.Warning(ex, "Exception in MangoSubStockoutOrderHandler.GetSubDeliveryOrder({0})", pOrder);
         return(null);
     }
 }
Пример #2
0
        /// <summary>
        /// 获取与pOrder关联的商城主订单Id
        /// </summary>
        public IMangoOrderBase GetMallOrder(MangoSubStockoutOrder pOrder)
        {
            if (null == pOrder)
            {
                C_WMS.Data.Utility.MyLog.Instance.Warning("MangoSubStockoutOrderHandler.GetMallOrder(), invalid null param.");
                return(null);
            }

            try
            {
                var subOrder = GetSubMallOrder(pOrder);
                if (null == subOrder as MangoSubMallOrder)
                {
                    C_WMS.Data.Utility.MyLog.Instance.Warning("MangoSubStockoutOrderHandler.GetMallOrder({0}), COULDNOT retrieve sub-delivery order.", pOrder);
                    return(null);
                }
                else
                {
                    var misEntity = MangoFactory.NewOrder <Product_User_DingDan>((subOrder as MangoSubMallOrder).DingDanID.ToString());
                    return((null == misEntity) ? null : new MangoMallOrder(misEntity));
                }
            }
            catch (Exception ex)
            {
                C_WMS.Data.Utility.MyLog.Instance.Warning(ex, "Exception in MangoSubStockoutOrderHandler.GetMallOrder({0})", pOrder);
                return(null);
            }
        }
Пример #3
0
 /// <summary>
 /// init and return a list of filter for retrieving the sub-delivery order for pOrder.
 /// </summary>
 /// <param name="pOrder"></param>
 /// <returns></returns>
 public List <CommonFilterModel> NewFilter_GetDeliveryOrder(MangoSubStockoutOrder pOrder)
 {
     try
     {
         if (null == pOrder)
         {
             C_WMS.Data.Utility.MyLog.Instance.Warning("MangoSubStockoutOrderHandler.NewFilter_GetDeliveryOrder(), invalid null param.");
             return(null);
         }
         List <CommonFilterModel> filters = new List <CommonFilterModel>(2);
         filters.Add(new CommonFilterModel(Mis2014_SubDeliveryOrder_Column.ProductIOputId, "=", pOrder.ProductOutputId.Int().ToString()));
         filters.Add(new CommonFilterModel(Mis2014_SubDeliveryOrder_Column.IsDel, "=", TMis2014_IsDel.ENormal.Int().ToString()));
         return(filters);
     }
     catch (Exception ex)
     {
         C_WMS.Data.Utility.MyLog.Instance.Warning(ex, "Exception in MangoSubStockoutOrderHandler.NewFilter_GetDeliveryOrder(), pOrder={0}", pOrder);
         return(null);
     }
 }
Пример #4
0
        /// <summary>
        /// 应收商品数量
        /// </summary>
        public decimal GetPlanQuantity(MangoSubStockoutOrder pOrder)
        {
            var subMallOrder = GetSubMallOrder(pOrder) as MangoSubMallOrder;

            return((null != subMallOrder) ? subMallOrder.ProductCount.Decimal() : 0M);
        }
Пример #5
0
        /// <summary>
        /// 要求出库时间
        /// </summary>
        public string GetScheduleDate(MangoSubStockoutOrder pOrder)
        {
            var subMallOrder = GetSubMallOrder(pOrder) as MangoSubMallOrder;

            return((null != subMallOrder) ? subMallOrder.PeiSongTime.ToString() : DateTime.MaxValue.ToString());
        }