username@email.com
2024-12-24 a0d38325a97957b37dd755bf732b63f6f7e2a5ff
CY_ECommercePlatform/CY.BLL/OA/OA_OutOfStorageBLL.cs
@@ -93,7 +93,7 @@
            return outOfStorageDAL.getModelList(pa, FirmId, Operator, InfoType, SuppliersId, GoodsNameId, WarehouseId, beginTime, endTime, BrandName, SpeceicationName, PaperWeightName, GoodsTypeId);
        }
        public bool InsertModelList(string[] Keys, int? WarehouseId)
        public bool InsertModelList(string[] Keys, int? WarehouseId, string WarehouseName )
        {
            try
            {
@@ -102,6 +102,7 @@
                {
                    foreach (var Keyid in Keys)
                    {
                        OA_Procurement m_OA_Procurement = new OA_Procurement();
                        OA_Inventory m_OA_Inventory = new OA_Inventory();
                        OA_OutOfStorage m_OA_OutOfStorage = new OA_OutOfStorage();
@@ -113,40 +114,43 @@
                        m_OA_Procurement = _OA_ProcurementBLL.SelectSingleModel(Keyid);
                        m_OA_Procurement.PurchaseStatusId = 201;
                        m_OA_Procurement.Remark = m_OA_WarehouseInfo.WarehouseName;
                        if (!WarehouseName.Equals("上机使用"))
                        {
                            //库存表对象
                            m_OA_Inventory.CargoSpaceId = 0;
                            m_OA_Inventory.FirmId = m_OA_Procurement.FirmId;
                            m_OA_Inventory.GoodsId = m_OA_Procurement.GoodsId;
                            m_OA_Inventory.InventoryCount = m_OA_Procurement.Quantity;
                            m_OA_Inventory.LastUpdateTime = DateTime.Now;
                            m_OA_Inventory.Operator = m_OA_Procurement.Operator;
                            m_OA_Inventory.Remark = "";
                            m_OA_Inventory.WarehouseId = WarehouseId;
                            m_OA_Inventory.BrandId = m_OA_Procurement.BrandId;
                            m_OA_Inventory.SpecificationId = m_OA_Procurement.SpecificationId;
                            m_OA_Inventory.PaperWeightId = m_OA_Procurement.PaperWeightId;
                            m_OA_Inventory.UnitPrice = m_OA_Procurement.Price ?? 0;
                            m_OA_Inventory.TotalPrice = m_OA_Procurement.AllMoney ?? 0;
                        //库存表对象
                        m_OA_Inventory.CargoSpaceId = 0;
                        m_OA_Inventory.FirmId = m_OA_Procurement.FirmId;
                        m_OA_Inventory.GoodsId = m_OA_Procurement.GoodsId;
                        m_OA_Inventory.InventoryCount = m_OA_Procurement.Quantity;
                        m_OA_Inventory.LastUpdateTime = DateTime.Now;
                        m_OA_Inventory.Operator = m_OA_Procurement.Operator;
                        m_OA_Inventory.Remark = "";
                        m_OA_Inventory.WarehouseId = WarehouseId;
                        m_OA_Inventory.BrandId = m_OA_Procurement.BrandId;
                        m_OA_Inventory.SpecificationId = m_OA_Procurement.SpecificationId;
                        m_OA_Inventory.PaperWeightId = m_OA_Procurement.PaperWeightId;
                        m_OA_Inventory.UnitPrice = m_OA_Procurement.Price ?? 0;
                        m_OA_Inventory.TotalPrice = m_OA_Procurement.AllMoney ?? 0;
                        //出入库信息表对象
                        m_OA_OutOfStorage.FirmId = m_OA_Procurement.FirmId;
                        m_OA_OutOfStorage.GoodsId = m_OA_Procurement.GoodsId;
                        m_OA_OutOfStorage.CargoSpaceId = 0;
                        m_OA_OutOfStorage.LastUpdateTime = DateTime.Now;
                        m_OA_OutOfStorage.Operator = m_OA_Procurement.Operator;
                        m_OA_OutOfStorage.Remark = "";
                        m_OA_OutOfStorage.WarehouseId = WarehouseId;
                        m_OA_OutOfStorage.SuppliersId = m_OA_Procurement.SuppliersId;
                        m_OA_OutOfStorage.AllMoney = m_OA_Procurement.AllMoney;
                        m_OA_OutOfStorage.InfoType = "入库";
                        m_OA_OutOfStorage.Price = m_OA_Procurement.Price;
                        m_OA_OutOfStorage.Quantity = m_OA_Procurement.Quantity;
                        m_OA_OutOfStorage.BrandId = m_OA_Procurement.BrandId;
                        m_OA_OutOfStorage.SpecificationId = m_OA_Procurement.SpecificationId;
                        m_OA_OutOfStorage.PaperWeightId = m_OA_Procurement.PaperWeightId;
                        m_OA_OutOfStorage.TanPrice = m_OA_Procurement.TanPrice ?? 0;
                        isSuccess = InsertModel(m_OA_Inventory, m_OA_OutOfStorage);
                            //出入库信息表对象
                            m_OA_OutOfStorage.FirmId = m_OA_Procurement.FirmId;
                            m_OA_OutOfStorage.GoodsId = m_OA_Procurement.GoodsId;
                            m_OA_OutOfStorage.CargoSpaceId = 0;
                            m_OA_OutOfStorage.LastUpdateTime = DateTime.Now;
                            m_OA_OutOfStorage.Operator = m_OA_Procurement.Operator;
                            m_OA_OutOfStorage.Remark = "";
                            m_OA_OutOfStorage.WarehouseId = WarehouseId;
                            m_OA_OutOfStorage.SuppliersId = m_OA_Procurement.SuppliersId;
                            m_OA_OutOfStorage.AllMoney = m_OA_Procurement.AllMoney;
                            m_OA_OutOfStorage.InfoType = "入库";
                            m_OA_OutOfStorage.Price = m_OA_Procurement.Price;
                            m_OA_OutOfStorage.Quantity = m_OA_Procurement.Quantity;
                            m_OA_OutOfStorage.BrandId = m_OA_Procurement.BrandId;
                            m_OA_OutOfStorage.SpecificationId = m_OA_Procurement.SpecificationId;
                            m_OA_OutOfStorage.PaperWeightId = m_OA_Procurement.PaperWeightId;
                            m_OA_OutOfStorage.TanPrice = m_OA_Procurement.TanPrice ?? 0;
                            isSuccess = InsertModel(m_OA_Inventory, m_OA_OutOfStorage);
                        }
                        if (isSuccess)
                        {