예제 #1
0
        /// <summary>
        /// 库存操作
        /// </summary>
        /// <param name="orderInfo"></param>
        private static void InInventoryProcess(OrderEntity orderInfo)
        {
            List <OrderDetailEntity> orderDetailList = orderInfo.orderDetailList;

            if (orderDetailList != null && orderDetailList.Count > 0)
            {
                foreach (OrderDetailEntity entity in orderDetailList)
                {
                    //同商品+批次号+客户
                    List <InventoryEntity> inventoryList = InventoryService.GetInventoryByRule(entity.GoodsID, orderInfo.ReceiverStorageID, entity.BatchNumber, orderInfo.CustomerID, true);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 库存处理
        /// </summary>
        /// <param name="orderInfo"></param>
        private static void OutInventoryProcess(OrderEntity orderInfo)
        {
            List <OrderDetailEntity> orderDetailList = orderInfo.orderDetailList;

            if (orderDetailList != null && orderDetailList.Count > 0)
            {
                foreach (OrderDetailEntity entity in orderDetailList)
                {
                    List <InventoryEntity> inventoryList = new List <InventoryEntity>();
                    if (entity.InventoryID > 0)
                    {
                        inventoryList.Add(InventoryService.GetInventoryEntityById(entity.InventoryID));
                    }
                    //同商品+批次号+客户
                    else
                    {
                        inventoryList = InventoryService.GetInventoryByRule(entity.GoodsID, -1, entity.BatchNumber.Trim(), orderInfo.CustomerID, true);
                    }

                    inventoryInfoProcess(entity, inventoryList, orderInfo);
                }
            }
        }