Ejemplo n.º 1
0
        public static void CreateInventoryDetail(OrderEntity order, OrderDetailEntity orderDetail)
        {
            InventoryDetailRepository mrDetail   = new InventoryDetailRepository();
            InventoryDetailInfo       infoDetail = new InventoryDetailInfo();

            if (order != null)
            {
                infoDetail.InventoryID   = orderDetail.InventoryID;
                infoDetail.OrderID       = order.OrderID;
                infoDetail.OrderNo       = order.OrderNo;
                infoDetail.OrderType     = order.OrderType;
                infoDetail.GoodsID       = orderDetail.GoodsID;
                infoDetail.StorageID     = order.SendStorageID;
                infoDetail.Quantity      = orderDetail.Quantity;
                infoDetail.CustomerID    = order.CustomerID;
                infoDetail.InventoryType = Common.InventoryType.入库.ToString();
                infoDetail.BatchNumber   = orderDetail.BatchNumber;
                infoDetail.ProductDate   = orderDetail.ProductDate;
                infoDetail.InventoryDate = DateTime.Now;
                infoDetail.UnitPrice     = 0;
                infoDetail.Remark        = "订单删除-库存回位";
                infoDetail.OperatorID    = order.OperatorID;
                infoDetail.CreateDate    = DateTime.Now;
                infoDetail.ChangeDate    = DateTime.Now;
                mrDetail.CreateNew(infoDetail);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 库存明细入库
        /// </summary>
        /// <param name="entity">库存明细</param>
        /// <param name="StorageID"></param>
        /// <param name="inventoryDate"></param>
        /// <param name="OperatorID"></param>
        public static void CreateInventoryDetail(InventoryInfo entity, InventoryExecOrder orderExec, int StorageID, DateTime inventoryDate, long OperatorID)
        {
            InventoryDetailRepository mrDetail   = new InventoryDetailRepository();
            InventoryDetailInfo       infoDetail = new InventoryDetailInfo();

            if (entity != null)
            {
                infoDetail.InventoryID   = entity.InventoryID;
                infoDetail.OrderType     = OrderType.RKD.ToString();
                infoDetail.OrderNo       = orderExec.OrderNo;
                infoDetail.OrderID       = orderExec.OrderID;
                infoDetail.GoodsID       = entity.GoodsID;
                infoDetail.StorageID     = StorageID;
                infoDetail.Quantity      = entity.Quantity;
                infoDetail.CustomerID    = entity.CustomerID;
                infoDetail.InventoryType = entity.InventoryType;
                infoDetail.BatchNumber   = entity.BatchNumber;
                infoDetail.ProductDate   = entity.ProductDate;
                infoDetail.InventoryDate = inventoryDate;
                infoDetail.UnitPrice     = entity.UnitPrice;
                infoDetail.Remark        = entity.Remark;
                infoDetail.OperatorID    = OperatorID;
                infoDetail.CreateDate    = DateTime.Now;
                infoDetail.ChangeDate    = DateTime.Now;
                mrDetail.CreateNew(infoDetail);
            }
        }
Ejemplo n.º 3
0
        public static List <InventoryDetailEntity> GetInventoryDetailInfoPager(PagerInfo pager)
        {
            List <InventoryDetailEntity> all    = new List <InventoryDetailEntity>();
            InventoryDetailRepository    mr     = new InventoryDetailRepository();
            List <InventoryDetailInfo>   miList = mr.GetAllInventoryDetailInfoPager(pager);

            if (!miList.IsEmpty())
            {
                foreach (InventoryDetailInfo mInfo in miList)
                {
                    InventoryDetailEntity carEntity = TranslateInventoryDetailEntity(mInfo);
                    all.Add(carEntity);
                }
            }
            return(all);
        }
Ejemplo n.º 4
0
        public static List <InventoryDetailEntity> GetInventoryDetailInfoByRule(string name, string inventoryType, int StorageID, int customerID, string inventoryDate, string orderType, PagerInfo pager)
        {
            List <InventoryDetailEntity> all    = new List <InventoryDetailEntity>();
            InventoryDetailRepository    mr     = new InventoryDetailRepository();
            List <InventoryDetailInfo>   miList = mr.GetInventoryDetailInfoByRule(name, inventoryType, StorageID, customerID, inventoryDate, orderType, pager);

            if (!miList.IsEmpty())
            {
                foreach (InventoryDetailInfo mInfo in miList)
                {
                    InventoryDetailEntity storeEntity = TranslateInventoryDetailEntity(mInfo);
                    all.Add(storeEntity);
                }
            }

            return(all);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 库存明细更新
        /// </summary>
        /// <param name="detail"></param>
        /// <param name="orderEntity"></param>
        /// <param name="inventory"></param>
        private static void createInventoryDetail(OrderDetailEntity detail, OrderEntity orderEntity, int storageID, int Quantity)
        {
            InventoryDetailRepository mrDetail   = new InventoryDetailRepository();
            InventoryDetailInfo       infoDetail = new InventoryDetailInfo();

            infoDetail.InventoryID   = detail.InventoryID;
            infoDetail.OrderID       = orderEntity.OrderID;
            infoDetail.OrderNo       = orderEntity.OrderNo;
            infoDetail.OrderType     = orderEntity.OrderType;//订单类型
            infoDetail.GoodsID       = detail.GoodsID;
            infoDetail.StorageID     = storageID;
            infoDetail.Quantity      = Quantity;
            infoDetail.CustomerID    = orderEntity.CustomerID;
            infoDetail.InventoryType = InventoryType.出库.ToString();//出库/入库
            infoDetail.BatchNumber   = detail.BatchNumber;
            infoDetail.ProductDate   = detail.ProductDate;
            infoDetail.InventoryDate = DateTime.Now;
            infoDetail.UnitPrice     = 0;
            infoDetail.Remark        = orderEntity.OrderType;
            infoDetail.OperatorID    = orderEntity.OperatorID;
            infoDetail.CreateDate    = DateTime.Now;
            infoDetail.ChangeDate    = DateTime.Now;
            mrDetail.CreateNew(infoDetail);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 库存明细更新
        /// </summary>
        /// <param name="detail"></param>
        /// <param name="orderEntity"></param>
        /// <param name="inventory"></param>
        private static void createInventoryDetail(InventoryEntity entity, GoodsEntity orderEntity, long UserID)
        {
            InventoryDetailRepository mrDetail   = new InventoryDetailRepository();
            InventoryDetailInfo       infoDetail = new InventoryDetailInfo();

            infoDetail.InventoryID   = entity.InventoryID;
            infoDetail.OrderID       = 0;
            infoDetail.OrderNo       = "";
            infoDetail.OrderType     = "";//订单类型
            infoDetail.GoodsID       = entity.GoodsID;
            infoDetail.StorageID     = entity.StorageID;
            infoDetail.Quantity      = entity.Quantity;
            infoDetail.CustomerID    = orderEntity.CustomerID;
            infoDetail.InventoryType = InventoryType.出库.ToString();//出库/入库
            infoDetail.BatchNumber   = entity.BatchNumber;
            infoDetail.ProductDate   = entity.ProductDate;
            infoDetail.InventoryDate = DateTime.Now;
            infoDetail.UnitPrice     = 0;
            infoDetail.Remark        = "PDA出库操作";
            infoDetail.OperatorID    = UserID;
            infoDetail.CreateDate    = DateTime.Now;
            infoDetail.ChangeDate    = DateTime.Now;
            mrDetail.CreateNew(infoDetail);
        }