|
@@ -211,7 +211,6 @@ namespace Hotline.Application.Exam.Service.ExamManages
|
|
var expression = tagQuestionRequest.GetExpression();
|
|
var expression = tagQuestionRequest.GetExpression();
|
|
var questionTagTable = new ExamRepository<ExamQuestionTag>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable().Where(expression);
|
|
var questionTagTable = new ExamRepository<ExamQuestionTag>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable().Where(expression);
|
|
var questionTable = new ExamRepository<ExamQuestion>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable();
|
|
var questionTable = new ExamRepository<ExamQuestion>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable();
|
|
-
|
|
|
|
var queryable = questionTagTable.LeftJoin(questionTable, (t, q) => t.QuestionId == q.Id)
|
|
var queryable = questionTagTable.LeftJoin(questionTable, (t, q) => t.QuestionId == q.Id)
|
|
.GroupBy((t, q) => new { t.TagId, q.QuestionType })
|
|
.GroupBy((t, q) => new { t.TagId, q.QuestionType })
|
|
.OrderBy((t, q) => t.TagId)
|
|
.OrderBy((t, q) => t.TagId)
|
|
@@ -219,11 +218,7 @@ namespace Hotline.Application.Exam.Service.ExamManages
|
|
{
|
|
{
|
|
TagId = t.TagId,
|
|
TagId = t.TagId,
|
|
QuestionType = q.QuestionType,
|
|
QuestionType = q.QuestionType,
|
|
- TotalCount = SqlFunc.AggregateCount(new
|
|
|
|
- {
|
|
|
|
- TagId = t.TagId,
|
|
|
|
- QuestionType = q.QuestionType,
|
|
|
|
- })
|
|
|
|
|
|
+ TotalCount = SqlFunc.AggregateCount(q.Id!=null)
|
|
});
|
|
});
|
|
|
|
|
|
return await queryable.ToListAsync();
|
|
return await queryable.ToListAsync();
|