wangxinhui
9 天以前 834294889ab62bafaf034b1b87c2ead961c33476
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -370,9 +370,9 @@
            stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
            stockInfoOld.StockOutLength = 0;
            stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
            if (thickness < 800)
            if (thickness < 400)
            {
                throw new Exception($"RFID{stockInfoOld.RfidCode}条码{stockInfoOld.PalletCode}直径小于800mm");
                throw new Exception($"RFID{stockInfoOld.RfidCode}条码{stockInfoOld.PalletCode}直径小于400mm");
            }
            return stockInfoOld;
        }
@@ -416,9 +416,9 @@
                    {
                        throw new Exception($"未找到入库单号为{inboundOrder.UpperOrderNo}条码{palletCode}单据信息");
                    }
                    if (inboundOrderDetail.MaterialWide < 700)
                    if (inboundOrderDetail.MaterialWide < 690)
                    {
                        return content.Error("新厂物料幅宽限制为700-2700mm");
                        return content.Error("新厂物料幅宽限制为690-2700mm");
                    }
                    if (inboundOrderDetail.MaterialThick<=0)
                    {
@@ -707,7 +707,7 @@
                if (stockInfo.MaterielInvOrgId==MaterielInvOrgEnum.新厂.ObjToInt())
                {
                    //限制直径
                    if (stockInfo.MaterielThickness >= 300 && stockInfo.MaterielThickness <= 1300 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2700)
                    if (stockInfo.CheckThickness >= 300 && stockInfo.CheckThickness <= 1300 && stockInfo.MaterielWide >= 690 && stockInfo.MaterielWide <= 2700)
                    {
                        //获取分配
                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt(): x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
@@ -718,10 +718,10 @@
                else
                {
                    //限制
                    if ((stockInfo.MaterielThickness >= 800 || (stockInfo.CheckThickness >= 800 && stockInfo.StockStatus==StockStatusEmun.老厂退库.ObjToInt())) && stockInfo.MaterielThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
                    if (stockInfo.CheckThickness >= 800 && stockInfo.CheckThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
                    {
                        bool LayerLimit = false;
                        if (stockInfo.MaterielThickness>1300)
                        if (stockInfo.CheckThickness > 1300)
                        {
                            LayerLimit = true;
                        }
@@ -734,6 +734,13 @@
                        roadwayNo = HandleRoadway(locationCounts, warehouse);
                    }
                    else if (stockInfo.CheckThickness >= 400 && stockInfo.CheckThickness < 800 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
                    {
                        //获取分配
                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt() : x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
                        roadwayNo = HandleRoadway(locationCounts, warehouse);
                    }
                }
                
                return !string.IsNullOrEmpty(roadwayNo) ? (roadwayNo) : throw new Exception("未找到可分配巷道");