| | |
| | | public class EnterprisesQueryHandler( |
| | | IRepository<Enterprise> rep, |
| | | IRepository<EnterpriseAuth> repEnterpriseAuth, |
| | | IRepository<DictionaryData> repDictionaryData |
| | | IRepository<DictionaryData> repDictionaryData, |
| | | IRepository<TaskInfo> repTaskInfo |
| | | ) : |
| | | IRequestHandler<GetEnterprisesQuery, PagedListQueryResult<GetEnterprisesQueryResultItem>>, |
| | | IRequestHandler<GetEnterpriseQuery, GetEnterpriseQueryResult>, |
| | |
| | | .Where(it => it.EnterpriseId == model.Id) |
| | | .Select(it => it.UserName) |
| | | .FirstOrDefaultAsync(cancellationToken); |
| | | model.TaskCount = await repTaskInfo.AsQueryable().AsNoTracking() |
| | | .Where(it => it.EnterpriseId == request.Id && it.ReleaseStatus == EnumTaskReleaseStatus.InProcess) |
| | | .CountAsync(); |
| | | return model; |
| | | } |
| | | |