陈勇
2026-04-06 9de6c7c6d835ba5161d64114d154bfc7676244a1
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageTaskServices/AutoTask/WhiteCarAutoOutJob.cs
@@ -41,14 +41,14 @@
            {
                //涂装不生产  åˆ™åœæ­¢æ‹‰åŠ¨å‡ºåº“
                var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == "2");
                if (area.AreaStatus != 1l) { return Task.CompletedTask; }
                if (area.AreaStatus != 1) { return Task.CompletedTask; }
                var stockInfo = _palletStockInfoRepository.Db.Queryable<Dt_PalletStockInfo>()
                    //.Where(x => x.LockStatue == 0)
                    .Includes(x => x.CarBodyInfo)
                    .Where(x => x.CarBodyInfo.CarType == 1 && x.TaskStatus == 0)
                    .Where(x => x.CarBodyInfo.CarType == 1 && x.LockOrder == 0 && x.StayStatus == 0 && x.StockStatus == 0)  // && x.TaskStatus == 0
                    .OrderBy(x => x.CreateDate) // æŽ’序
                    .ToList(); // èŽ·å–ç¬¬ä¸€ä¸ªå…ƒç´ 
                    .ToList();
                if (stockInfo.Where(x => x.TaskStatus == 1).Count() > 10) return Task.CompletedTask;
                if (stockInfo.Count == 0) return Task.CompletedTask;
@@ -73,7 +73,7 @@
                var location = _locationRepository.QueryFirst(x => x.LocationCode == stock.LocationCode);
                location.LocationStatus = (int)LocationEnum.InStockDisable;
                lockStock.TaskStatus = 1;
                if (stationLists == null || stationLists.Count == 0) throw new Exception("出库站台未配置或未启用");
                if (!stationLists.Any()) throw new Exception("出库站台未配置或未启用");
                Dt_StationManager Outstation = null;
@@ -92,7 +92,7 @@
                // åˆ›å»ºå¹¶æ·»åŠ ä»»åŠ¡åˆ°æ•°æ®åº“
                hasTask = new Dt_Task
                {
                    Grade = 1,
                    Grade = 3,
                    Roadway = Outstation.Roadway,
                    TargetAddress = Outstation.stationChildCode,
                    Dispatchertime = DateTime.Now,
@@ -109,6 +109,7 @@
                    CreateDate = DateTime.Now,
                    TaskId = 0,
                    CarType = stock.CarType,
                    RoadwayNo = stock.RoadwayNo
                };
                // åˆ›å»ºä»»åŠ¡ä¼ è¾“ç”¨çš„DTO对象