| | |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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(); |
| | |
| | | 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) |
| | | { |