helongyang
2 天以前 753361f589444455fe1b20476c658201ccd92c38
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs
@@ -100,10 +100,12 @@
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                        taskOut.BatchNo = BatchNo;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -181,10 +183,12 @@
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                        taskOut.BatchNo = BatchNo;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -264,10 +268,12 @@
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                        taskOut.BatchNo = BatchNo;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -333,10 +339,12 @@
                };
                string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                if (MaterielCode != null && Quantity != null && BatchNo != null)
                {
                    taskIn.MaterielCode = MaterielCode;
                    taskIn.Quantity = Quantity;
                    taskIn.BatchNo = BatchNo;
                }
                //更改库存状态
                stockInfo.StockStatus = StockStatusEmun.退库.ObjToInt();
@@ -1059,10 +1067,12 @@
                };
                string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                if (MaterielCode != null && Quantity != null && BatchNo != null)
                {
                    newTask.MaterielCode = MaterielCode;
                    newTask.Quantity = Quantity;
                    newTask.BatchNo = BatchNo;
                }
                LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                _unitOfWorkManage.BeginTran();