dengjunjie
2025-06-12 9429653e8def2729014b45c7c75ec76e9aa6685b
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -35,11 +35,13 @@
            { nameof(Dt_LocationInfo.Row), OrderByType.Asc },
        };
        public virtual Dt_LocationInfo? AssignLocation(string stationCode, int inboundType)
        public virtual Dt_LocationInfo? AssignLocation(ref string stationCode, int inboundType)
        {
            try
            {
                Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("未找到该站台对应的巷道,请检查基础配置信息!");
                string StationCode = stationCode;
                Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == StationCode) ?? throw new Exception("未找到该站台对应的巷道,请检查基础配置信息!");
                stationCode = roadwayInfo.InSCStationCode;
                if (roadwayInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt() && roadwayInfo.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt())
                {
                    throw new Exception("该巷道不可入库,请检查巷道禁用信息!");
@@ -107,6 +109,7 @@
            locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free);
            if (locationGroups != null && locationGroups.Count > 0)
            {
                if (roadway.Contains("SC02")) locationGroups = locationGroups.OrderByDescending(x => x.Column).ToList();
                LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt());
                int id = locationGroup?.IdB ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);