| | |
| | | .OrderByDescending(x=>x.CreationTime) |
| | | .FirstOrDefaultAsync(t => t.MutableParam2 == dataIdentifier, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取任务列表 |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="sorting"></param> |
| | | /// <param name="includeDetails"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<WmsTask>> GetTaskListAsync(FunReturnResultModel<Expression<Func<WmsTask, bool>>> whereConditions, string sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderBy(x => x.TaskType) |
| | | .ThenBy(x=>x.TaskLevel) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | } |