Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
a6d1e1e8
Commit
a6d1e1e8
authored
Mar 08, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4e220fb6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
10 deletions
+42
-10
RB_Question_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
+5
-0
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+29
-10
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+4
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+4
-0
No files found.
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
View file @
a6d1e1e8
...
...
@@ -129,5 +129,10 @@ namespace Edu.Model.ViewModel.Question
/// 题库类型(见枚举)
/// </summary>
public
LevelTypeEnum
BankType
{
get
;
set
;
}
/// <summary>
/// 开始问题编号
/// </summary>
public
int
StartId
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Exam/CourseExamModule.cs
View file @
a6d1e1e8
...
...
@@ -683,12 +683,16 @@ namespace Edu.Module.Exam
object
obj
=
new
object
();
int
readingTotalCount
=
0
;
int
readingFinishCount
=
0
;
int
readingStartId
=
0
;
int
listeningTotalCount
=
0
;
int
listeningFinishCount
=
0
;
int
listeningStartId
=
0
;
int
grammarTotalCount
=
0
;
int
grammarFinishCount
=
0
;
int
grammarStartId
=
0
;
int
wordsTotalCount
=
0
;
int
wordsFinishCount
=
0
;
int
wordsStartId
=
0
;
var
sQuery
=
new
RB_Student_Practice_Extend
()
{
StudentId
=
StudentId
,
...
...
@@ -697,14 +701,25 @@ namespace Edu.Module.Exam
var
finishList
=
student_PracticeRepository
.
GetStudentPracticeListRepository
(
sQuery
);
if
(
finishList
!=
null
&&
finishList
.
Count
>
0
)
{
readingFinishCount
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ReadingChoose
)?.
Count
()
??
0
;
listeningFinishCount
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
Listening
)?.
Count
()
??
0
;
grammarFinishCount
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseGrammarUse
)?.
Count
()
??
0
;
wordsFinishCount
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseMean
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWordUse
)?.
Count
()
??
0
;
var
tempReadingList
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ReadingChoose
)?.
ToList
();
readingFinishCount
=
tempReadingList
?.
Count
()
??
0
;
readingStartId
=
tempReadingList
!=
null
&&
tempReadingList
.
Count
>
0
?
(
tempReadingList
?.
Max
(
qitem
=>
qitem
.
QuestionId
)
??
0
)
:
0
;
var
tempListeningList
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
Listening
)?.
ToList
();
listeningFinishCount
=
tempListeningList
?.
Count
()
??
0
;
listeningStartId
=
tempListeningList
!=
null
&&
tempListeningList
.
Count
>
0
?(
tempListeningList
?.
Max
(
qitem
=>
qitem
.
QuestionId
)
??
0
):
0
;
var
tempGrammarList
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseGrammarUse
)?.
ToList
();
grammarFinishCount
=
tempGrammarList
?.
Count
()
??
0
;
grammarStartId
=
tempGrammarList
!=
null
&&
tempGrammarList
.
Count
>
0
?
(
tempGrammarList
?.
Max
(
qitem
=>
qitem
.
QuestionId
)
??
0
)
:
0
;
var
tempWordsList
=
finishList
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseMean
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWordUse
)?.
ToList
();
wordsFinishCount
=
tempWordsList
?.
Count
()
??
0
;
wordsStartId
=
tempWordsList
!=
null
&&
tempWordsList
.
Count
>
0
?
(
tempWordsList
?.
Max
(
qitem
=>
qitem
.
QuestionId
)
??
0
)
:
0
;
}
var
list
=
questionRepository
.
GetQuestionCategoryListRepository
(
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
...
...
@@ -713,7 +728,7 @@ namespace Edu.Module.Exam
listeningTotalCount
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
Listening
)?.
Sum
(
qitem
=>
qitem
.
QuestionCount
)
??
0
;
grammarTotalCount
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseGrammarUse
)?.
Sum
(
qitem
=>
qitem
.
QuestionCount
)
??
0
;
wordsTotalCount
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseMean
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWordUse
)?.
Sum
(
qitem
=>
qitem
.
QuestionCount
)
??
0
;
...
...
@@ -722,12 +737,16 @@ namespace Edu.Module.Exam
{
readingFinishCount
,
readingTotalCount
,
readingStartId
,
listeningFinishCount
,
listeningTotalCount
,
listeningStartId
,
grammarTotalCount
,
grammarFinishCount
,
grammarStartId
,
wordsTotalCount
,
wordsFinishCount
wordsFinishCount
,
wordsStartId
,
};
return
obj
;
}
...
...
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
a6d1e1e8
...
...
@@ -197,6 +197,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND C.{0}={1} "
,
nameof
(
RB_Question_ViewModel
.
BankType
),
(
int
)
query
.
BankType
);
}
if
(
query
.
StartId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}>{1} "
,
nameof
(
RB_Question_ViewModel
.
QuestionId
),
query
.
StartId
);
}
builder
.
AppendFormat
(
" ORDER BY A.{0} ASC "
,
nameof
(
RB_Question_ViewModel
.
SortNum
));
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
a6d1e1e8
...
...
@@ -991,6 +991,7 @@ namespace Edu.WebApi.Controllers.Exam
{
BankType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0},{1},{2}"
,
(
int
)
QuestionCategoryEnum
.
ChooseWord
,
(
int
)
QuestionCategoryEnum
.
ChooseMean
,
(
int
)
QuestionCategoryEnum
.
ChooseWordUse
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
...
...
@@ -1010,6 +1011,7 @@ namespace Edu.WebApi.Controllers.Exam
{
BankType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
ChooseGrammarUse
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
...
...
@@ -1029,6 +1031,7 @@ namespace Edu.WebApi.Controllers.Exam
{
BankType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
Listening
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
...
...
@@ -1048,6 +1051,7 @@ namespace Edu.WebApi.Controllers.Exam
{
BankType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
ReadingChoose
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment