| | |
| | | } |
| | | else |
| | | { |
| | | locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1); |
| | | locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.FreeDisable && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1); |
| | | } |
| | | |
| | | if (locations == null) |
| | |
| | | { |
| | | var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTO.Position); |
| | | var locations = _locationRepository.QueryData(x => x.RoadwayNo == station.Roadway && x.LocationStatus == (int)LocationEnum.Free && x.LocationType == 1); |
| | | ConsoleHelper.WriteSuccessLine(station.Roadway); |
| | | var taskRun = BaseDal.QueryData(x => x.TaskType == (int)TaskOutboundTypeEnum.OutTray && x.Roadway.Contains("CW")); |
| | | |
| | | |
| | | ConsoleHelper.WriteSuccessLine(locations.Count.ToString()); |
| | | |
| | | ConsoleHelper.WriteSuccessLine(taskRun.Count.ToString()); |
| | | var number = locations.Count - taskRun.Count; |
| | | ConsoleHelper.WriteSuccessLine(number.ToString()); |
| | | if (number > 10) |
| | | if (locations.Count > 10) |
| | | { |
| | | ConsoleHelper.WriteColorLine(number.ToString(), ConsoleColor.Blue); |
| | | ConsoleHelper.WriteColorLine(locations.Count.ToString(), ConsoleColor.Blue); |
| | | |
| | | var location = locations.OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault(); |
| | | |
| | | var stockInfo = await QueryStockInfoForEmptyTrayAsync("CWSC1", new List<string>()); |
| | | |
| | | |
| | |
| | | |
| | | // 更新库存位置状态为不可用 |
| | | stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable; |
| | | location.LocationStatus = (int)LocationEnum.FreeDisable; |
| | | await _unitOfWorkManage.UseTranAsync(async () => |
| | | { |
| | | await BaseDal.AddDataAsync(task); |
| | | await _locationRepository.UpdateDataAsync(stockInfo.LocationInfo); |
| | | await _locationRepository.UpdateDataAsync(location); |
| | | }); |
| | | |
| | | // 返回成功响应 |