1
dengjunjie
4 天以前 1f1b9ac010b7ef6a055bdf22c022868c9033712f
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs
@@ -257,7 +257,7 @@
                {
                    inventoryInfo = _inventoryInfoService.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.WarehouseCode == supplyTask.WarehouseCode);
                }
                inventoryInfo.SupplyQuantity = supplyTask.SupplyQuantity;
                inventoryInfo.SupplyQuantity = supplyTask.SupplyQuantity - inventoryInfo.StockQuantity;
                #endregion
                #region åˆ¤æ–­å½“前物料批次的盘点任务是否全部完成
@@ -269,27 +269,27 @@
                {
                    #region æŸ¥æ‰¾åº“å­˜
                    inventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.Id != inventoryInfo.Id);
                    var SupplyQuantitys = inventoryInfos.Sum(x => x.SupplyQuantity) + supplyTask.SupplyQuantity;
                    var SupplyQuantitys = inventoryInfos.Sum(x => x.SupplyQuantity) + inventoryInfo.SupplyQuantity;//计算盘点总数
                    #endregion
                    #region åº“存批次
                    inventory_Batch = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no);
                    //如果盘点数和批次总数对上了,盘点数赋值为0,赋值就添加盘点数
                    if (SupplyQuantitys == inventory_Batch.StockQuantity)
                    if (SupplyQuantitys == 0)
                    {
                        foreach (var item in inventoryInfos)
                        {
                            item.StockQuantity = item.SupplyQuantity;
                            item.StockQuantity += item.SupplyQuantity;
                            item.SupplyQuantity = 0;
                            item.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                        }
                        inventoryInfo.StockQuantity = supplyTask.SupplyQuantity;
                        inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                        inventoryInfo.SupplyQuantity = 0;
                        inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                    }
                    else
                    {
                        inventory_Batch.SupplyQuantity = SupplyQuantitys;
                        inventory_Batch.SupplyQuantity += SupplyQuantitys;
                    }
                    #endregion
                }