| | |
| | | if (stationManager.stationType != 7) throw new Exception("错误的调取"); |
| | | |
| | | // 从缓存中获取库存信息 |
| | | IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo); |
| | | List<DtStockInfo> stockInfoList = stockInfos.Values.ToList(); |
| | | //IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo); |
| | | //List<DtStockInfo> stockInfoList = stockInfos.Values.ToList(); |
| | | |
| | | var stockinfo1 = stockInfoList.OrderBy(x => x.CreateDate) |
| | | .ToList(); |
| | | var stockinfo = stockinfo1.Where(x => x.LocationInfo != null && !x.IsFull && x.LocationInfo.RoadwayNo == stationManager.Roadway) |
| | | .FirstOrDefault(); |
| | | //var stockinfo1 = stockInfoList.OrderBy(x => x.CreateDate) |
| | | // .ToList(); |
| | | //var strings = stationManager.Roadway.Split(","); |
| | | //var stockinfo = stockinfo1.Where(x => x.LocationInfo != null && !x.IsFull && strings.Contains(x.LocationInfo.RoadwayNo)) |
| | | // .FirstOrDefault(); |
| | | var stockInfo = await QueryStockInfoForEmptyTrayFRAsync("CWSC1", "10086", input.ProductionLine); |
| | | |
| | | if (stockinfo == null) return null; |
| | | if (stockInfo == null) return null; |
| | | |
| | | var task = new Dt_Task |
| | | { |
| | | CurrentAddress = input.Position, |
| | | Grade = 2, |
| | | Roadway = input.Roadways, |
| | | Roadway = stockInfo.LocationInfo.RoadwayNo, |
| | | TargetAddress = stationManager.stationLocation, |
| | | Dispatchertime = DateTime.Now, |
| | | MaterialNo = "", |
| | | NextAddress = input.Roadways, |
| | | NextAddress = input.Position, |
| | | OrderNo = null, |
| | | PalletCode = stockinfo.PalletCode, |
| | | SourceAddress = stockinfo.LocationCode, |
| | | PalletCode = stockInfo.PalletCode, |
| | | SourceAddress = stockInfo.LocationCode, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskType = (int)TaskOutboundTypeEnum.OutTray, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "System", |
| | | ProductionLine = stockinfo.ProductionLine, |
| | | ProductionLine = stockInfo.ProductionLine, |
| | | }; |
| | | _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { task.PalletCode }); |
| | | return task; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (stationManager.stationType == 15) throw new Exception(""); |
| | | //if (stationManager.stationType == 15) throw new Exception(""); |
| | | |
| | | // 创建一个TrayCellsStatusDto对象,并赋值 |
| | | TrayCellsStatusDto trayCells = new TrayCellsStatusDto() |