1
huanghongfeng
2024-12-02 e2a5657e3a0b8615bcd78a3149e5ba9ce5579bb8
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -238,6 +238,7 @@
                                CreateDate = DateTime.Now,
                                MaterialType = (int)InventoryMaterialType.空托,
                                Materialweight = 0,
                                Wlstatus = (int)InventoryMaterialStatus.空托,
                            };
                            _stockService.StockInfoService.Repository.AddData(dt_Stock);
                        }
@@ -398,10 +399,12 @@
                {
                    Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.OrderName == targetCodes[0]);
                    if(dt_Inbound != null)
                    {
                    Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode);
                    if (dt_Inbound.OrderType == (int)InventoryMaterialType.原材料)   //0为原材料编码
                    {
                        List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo == "2" && x.LocationStatus == (int)LocationStatusEnum.Free && x.Depth == 1 && x.EnableStatus== (int)EnableStatusEnum.Normal);
                            List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo == "2" && x.LocationStatus == (int)LocationStatusEnum.Free && x.Depth == 1 && x.EnableStatus == (int)EnableStatusEnum.Normal && x.LocationType == (int)LocationTypeEnum.MaterialsCube);
                        
                        if (dt_StockInfo == null)
                        {
@@ -414,6 +417,7 @@
                                CreateDate = DateTime.Now,
                                MaterialType = (int)InventoryMaterialType.原材料,
                                Materialweight = decimal.Parse(targetCodes[3]),
                                    Wlstatus = (int)InventoryMaterialStatus.待检,
                            };
                            _unitOfWorkManage.BeginTran();
                            _stockService.StockInfoService.Repository.AddData(dt_Stock);
@@ -467,9 +471,6 @@
                            }
                            
                        }
                    }
                    else if (dt_Inbound.OrderType == (int)InventoryMaterialType.成品)
                    {
@@ -484,6 +485,7 @@
                                CreateDate = DateTime.Now,
                                MaterialType = (int)InventoryMaterialType.成品,
                                Materialweight = decimal.Parse(targetCodes[3]),
                                    Wlstatus = (int)InventoryMaterialStatus.待检,
                            };
                            _unitOfWorkManage.BeginTran();
                            _stockService.StockInfoService.Repository.AddData(dt_Stock);
@@ -523,6 +525,12 @@
                    {
                        return content = WebResponseContent.Instance.Error($"未找到条码解析,条码信息:{generate.PalletCode}");
                    }
                    }
                    else
                    {
                        return content = WebResponseContent.Instance.Error($"未找到入库单,条码信息:{generate.PalletCode}");
                    }
                }
                else
                {
@@ -689,7 +697,7 @@
        {
            WebResponseContent content = new WebResponseContent();
            List<Dt_LocationInfo> locationinfoData = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo=="2" && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() 
            && x.LocationType == (int)LocationTypeEnum.EmptyCube);
            && x.LocationType == (int)LocationTypeEnum.MaterialsCube && x.EnableStatus == (int)EnableStatusEnum.Normal);
            if (locationinfoData.Count < 20)
            {
                return content = WebResponseContent.Instance.OK(data: 1);