1
HuBingJie
2025-11-22 51af2794f47d5b68496edbc09d0ccb168347f02b
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -102,7 +102,8 @@
                    WarehouseId = warehouse.WarehouseId,
                    //PalletType = GetPalletType(warehouse, palletCode),//GetPalletType(warehouse, palletCode)
                    Creater = "WCS",
                    CreateDate = DateTime.Now
                    CreateDate = DateTime.Now,
                    Depth = locationInfo.Depth,
                };
                _unitOfWorkManage.BeginTran();
@@ -155,13 +156,23 @@
                        Dt_LocationInfo location = null;
                        if (palletInfo.locationCode == null || palletInfo.locationCode == "")
                        {
                            location = _basicService.LocationInfoService.GetLocationInfo();//获取到新库位
                            if (inboundTask.NodeCode == "1001" || inboundTask.NodeCode == "1005" || 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);
                            }
                            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();
@@ -176,7 +187,7 @@
                                StockStatus = (int)StockStatusEmun.组盘暂存,
                                Creater = "WMS",
                                CreateDate = DateTime.Now,
                                MESsubPalletCode = palletInfo.palletCode,
                                MESsubPalletCode = palletInfo.subPalletCode,
                            };
                            Adddtstockt.Add(dt_Stock);
                        }