1
HuBingJie
2025-11-13 d58196721475e968769d708d9c14f60dd8d5671f
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -156,13 +156,23 @@
                        Dt_LocationInfo location = null;
                        if (palletInfo.locationCode == null || palletInfo.locationCode == "")
                        {
                            location = _basicService.LocationInfoService.GetLocationInfo();//获取到新库位
                            if (inboundTask.NodeCode == "1001" || inboundTask.NodeCode == "3001"|| inboundTask.NodeCode == "4001"|| inboundTask.NodeCode == "5001" || inboundTask.NodeCode == "1005")
                            {
                                location = _basicService.LocationInfoService.GetLocationInfoSC("SC01");//获取到新库位
                            }else if (inboundTask.NodeCode == "2011")
                            {
                                location = _locationInfoRepository.QueryFirst(x => x.LocationStatus == (int)LocationStatusEnum.Free && x.EnableStatus == (int)EnableStatusEnum.Normal && x.Column > 1 && x.Layer > 6);
                            }
                            else
                            {
                                location = _basicService.LocationInfoService.GetLocationInfoSC("SC02");//获取到新库位
                            }
                        }
                        else
                        {
                            location = _locationInfoRepository.QueryFirst(x => x.LocationCode == palletInfo.locationCode);
                        }
                        if (location == null) return MESresponse($"未找到货位信息,条码:{palletInfo.palletCode}", false);
                        if (location == null) return MESresponse($"未找到货位信息,条码:{palletInfo.palletCode}", false,0);
                        if (location.LocationStatus != (int)LocationStatusEnum.Free) return MESresponse($"托盘条码:{palletInfo.palletCode},查找到的货位:{location.LocationCode},不为空货位!", false);
                        Dt_StockInfo dt_ = Stockdata.Where(x => x.PalletCode == palletInfo.palletCode).FirstOrDefault();
@@ -177,7 +187,7 @@
                                StockStatus = (int)StockStatusEmun.组盘暂存,
                                Creater = "WMS",
                                CreateDate = DateTime.Now,
                                MESsubPalletCode = palletInfo.palletCode,
                                MESsubPalletCode = palletInfo.subPalletCode,
                            };
                            Adddtstockt.Add(dt_Stock);
                        }