修复 Dt_TaskService.cs 中 locations 检查逻辑
在 `Dt_TaskService.cs` 文件中,新增对 `locations` 的 `null` 检查;若为 `null`,将重新查询满足条件的 `locations`。同时,移除了日志记录相关代码,仅保留异常抛出逻辑。
| | |
| | | else |
| | | { |
| | | locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Distribute && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1); |
| | | if (locations == null) |
| | | { |
| | | locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1); |
| | | } |
| | | } |
| | | |
| | | if (locations == null) |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | //LogFactory.GetLog("常温3出库至包装").Info(true, $"常温3出库至包装传入参数:" + JsonConvert.SerializeObject(json, Formatting.Indented)); |
| | | |
| | | Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position && x.stationType == 12 && x.stationArea == "Call"); |