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
1cfbcff5
Commit
1cfbcff5
authored
Mar 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
e0b1fe2b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
446 additions
and
26 deletions
+446
-26
RB_Student_Practice.cs
Edu.Model/Entity/Exam/RB_Student_Practice.cs
+82
-0
RB_Student_Practice_Extend.cs
Edu.Model/ViewModel/Exam/RB_Student_Practice_Extend.cs
+14
-0
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+160
-7
RB_Student_PracticeRepository.cs
Edu.Repository/Exam/RB_Student_PracticeRepository.cs
+80
-0
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+41
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+69
-19
No files found.
Edu.Model/Entity/Exam/RB_Student_Practice.cs
0 → 100644
View file @
1cfbcff5
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Question
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Exam
{
/// <summary>
/// 学员练习实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Practice
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StudentId
{
get
;
set
;
}
/// <summary>
/// 分类
/// </summary>
public
QuestionCategoryEnum
Category
{
get
;
set
;
}
/// <summary>
/// 考级程度(N1,N2...)
/// </summary>
public
LevelTypeEnum
LevelType
{
get
;
set
;
}
/// <summary>
/// 问题编号
/// </summary>
public
int
QuestionId
{
get
;
set
;
}
/// <summary>
/// 问题名称(题干)
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 问题内容
/// </summary>
public
string
QuestionContent
{
get
;
set
;
}
/// <summary>
/// 问题类型编号
/// </summary>
public
int
?
QuestionTypeId
{
get
;
set
;
}
/// <summary>
/// 问题类型Key
/// </summary>
public
string
QuestionTypeKey
{
get
;
set
;
}
/// <summary>
/// 问题答案
/// </summary>
public
string
Answer
{
get
;
set
;
}
/// <summary>
/// 答案解析
/// </summary>
public
string
AnswerParse
{
get
;
set
;
}
/// <summary>
/// 是否作答(1-是)
/// </summary>
public
int
IsAnswer
{
get
;
set
;
}
/// <summary>
/// 是否作答错误(1-是)
/// </summary>
public
int
IsWrong
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Student_Practice_Extend.cs
0 → 100644
View file @
1cfbcff5
using
Edu.Model.Entity.Exam
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Exam
{
/// <summary>
/// 学员练习扩展实体类
/// </summary>
public
class
RB_Student_Practice_Extend
:
RB_Student_Practice
{
}
}
Edu.Module.Exam/CourseExamModule.cs
View file @
1cfbcff5
This diff is collapsed.
Click to expand it.
Edu.Repository/Exam/RB_Student_PracticeRepository.cs
0 → 100644
View file @
1cfbcff5
using
Edu.Model.Entity.Exam
;
using
Edu.Model.ViewModel.Exam
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Exam
{
/// <summary>
/// 学员练习仓储层对象
/// </summary>
public
class
RB_Student_PracticeRepository
:
BaseRepository
<
RB_Student_Practice
>
{
/// <summary>
/// 获取学生练习列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Practice_Extend
>
GetStudentPracticeListRepository
(
RB_Student_Practice_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Practice AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
StudentId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
StudentId
),
query
.
StudentId
);
}
if
(
query
.
Category
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
Category
),
query
.
Category
);
}
if
(
query
.
LevelType
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
LevelType
),
(
int
)
query
.
LevelType
);
}
}
return
Get
<
RB_Student_Practice_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取学员练习分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Practice_Extend
>
GetStudentPracticePageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Practice_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Practice AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
StudentId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
StudentId
),
query
.
StudentId
);
}
if
(
query
.
Category
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
Category
),
query
.
Category
);
}
if
(
query
.
LevelType
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
LevelType
),
(
int
)
query
.
LevelType
);
}
}
return
GetPage
<
RB_Student_Practice_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
1cfbcff5
...
@@ -92,6 +92,47 @@ WHERE 1=1 AND B.Status=0 AND A.Status=0
...
@@ -92,6 +92,47 @@ WHERE 1=1 AND B.Status=0 AND A.Status=0
}
}
}
}
/// <summary>
/// 问题分类统计
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Question_ViewModel
>
GetQuestionCategoryListRepository
(
RB_Question_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.Category,Count(A.QuestionId) AS QuestionCount
FROM RB_Question AS A INNER JOIN rb_question_bank AS B ON A.BankId=B.BankId
WHERE 1=1 AND B.Status=0 AND A.Status=0
"
);
if
(
query
==
null
)
{
return
new
List
<
RB_Question_ViewModel
>();
}
else
{
if
(!
string
.
IsNullOrEmpty
(
query
.
QBankIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Question_ViewModel
.
BankId
),
query
.
QBankIds
);
}
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Question_ViewModel
.
CourseId
),
query
.
CourseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Q_QuestionTypeIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Question_ViewModel
.
QuestionTypeId
),
query
.
Q_QuestionTypeIds
);
}
if
(
query
.
BankType
>
0
)
{
builder
.
AppendFormat
(
" AND B.{0}={1} "
,
nameof
(
RB_Question_ViewModel
.
BankType
),
(
int
)
query
.
BankType
);
}
builder
.
AppendFormat
(
" GROUP BY A.Category "
);
return
Get
<
RB_Question_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// <summary>
/// 获取问题分页列表
/// 获取问题分页列表
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
1cfbcff5
...
@@ -65,9 +65,9 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -65,9 +65,9 @@ namespace Edu.WebApi.Controllers.Exam
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
QPaperIds
=
base
.
ParmJObj
.
GetStringValue
(
"QPaperIds"
),
QPaperIds
=
base
.
ParmJObj
.
GetStringValue
(
"QPaperIds"
),
QStartTime
=
base
.
ParmJObj
.
GetStringValue
(
"QStartTime"
),
QStartTime
=
base
.
ParmJObj
.
GetStringValue
(
"QStartTime"
),
QEndTime
=
base
.
ParmJObj
.
GetStringValue
(
"QEndTime"
),
QEndTime
=
base
.
ParmJObj
.
GetStringValue
(
"QEndTime"
),
QExamineStatus
=
-
1
,
QExamineStatus
=
-
1
,
QCreateBy
=
base
.
ParmJObj
.
GetInt
(
"QCreateBy"
),
QCreateBy
=
base
.
ParmJObj
.
GetInt
(
"QCreateBy"
),
};
};
if
(!
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"QExamineStatus"
)))
if
(!
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"QExamineStatus"
)))
{
{
...
@@ -141,8 +141,8 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -141,8 +141,8 @@ namespace Edu.WebApi.Controllers.Exam
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
GroupType
=
(
ExamGroupTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"GroupType"
),
GroupType
=
(
ExamGroupTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"GroupType"
),
PaperScore
=
base
.
ParmJObj
.
GetDecimal
(
"PaperScore"
),
PaperScore
=
base
.
ParmJObj
.
GetDecimal
(
"PaperScore"
),
};
};
if
(
string
.
IsNullOrEmpty
(
extModel
.
PaperName
))
if
(
string
.
IsNullOrEmpty
(
extModel
.
PaperName
))
{
{
...
@@ -167,7 +167,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -167,7 +167,7 @@ namespace Edu.WebApi.Controllers.Exam
GSortNum
=
gSortNum
,
GSortNum
=
gSortNum
,
GScore
=
jobj
.
GetDecimal
(
"GScore"
),
GScore
=
jobj
.
GetDecimal
(
"GScore"
),
DetailsList
=
new
List
<
RB_Examination_Details_ViewModel
>(),
DetailsList
=
new
List
<
RB_Examination_Details_ViewModel
>(),
GroupType
=
extModel
.
GroupType
,
GroupType
=
extModel
.
GroupType
,
};
};
if
(
extModel
.
GroupType
==
ExamGroupTypeEnum
.
QuestionType
)
if
(
extModel
.
GroupType
==
ExamGroupTypeEnum
.
QuestionType
)
{
{
...
@@ -263,7 +263,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -263,7 +263,7 @@ namespace Edu.WebApi.Controllers.Exam
IsSaveTemplate
=
base
.
ParmJObj
.
GetBoolValue
(
"IsSaveTemplate"
),
IsSaveTemplate
=
base
.
ParmJObj
.
GetBoolValue
(
"IsSaveTemplate"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
GroupType
=
(
ExamGroupTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"GroupType"
),
GroupType
=
(
ExamGroupTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"GroupType"
),
};
};
string
TemplateData
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateData"
);
string
TemplateData
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateData"
);
if
(!
string
.
IsNullOrEmpty
(
TemplateData
))
if
(!
string
.
IsNullOrEmpty
(
TemplateData
))
...
@@ -335,7 +335,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -335,7 +335,7 @@ namespace Edu.WebApi.Controllers.Exam
item
.
TemplateBankIds
,
item
.
TemplateBankIds
,
QuestionStructure
=
QuestionStructure
.
TrimStart
(
';'
),
QuestionStructure
=
QuestionStructure
.
TrimStart
(
';'
),
item
.
GroupType
,
item
.
GroupType
,
GroupTypeName
=
item
.
GroupType
.
ToName
(),
GroupTypeName
=
item
.
GroupType
.
ToName
(),
});
});
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
...
@@ -529,7 +529,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -529,7 +529,7 @@ namespace Edu.WebApi.Controllers.Exam
FillInIsSubject
=
base
.
ParmJObj
.
GetInt
(
"FillInIsSubject"
),
FillInIsSubject
=
base
.
ParmJObj
.
GetInt
(
"FillInIsSubject"
),
FillInIsIgnore
=
base
.
ParmJObj
.
GetInt
(
"FillInIsIgnore"
),
FillInIsIgnore
=
base
.
ParmJObj
.
GetInt
(
"FillInIsIgnore"
),
IsHalfScore
=
base
.
ParmJObj
.
GetInt
(
"IsHalfScore"
),
IsHalfScore
=
base
.
ParmJObj
.
GetInt
(
"IsHalfScore"
),
PublishPic
=
base
.
ParmJObj
.
GetStringValue
(
"PublishPic"
),
PublishPic
=
base
.
ParmJObj
.
GetStringValue
(
"PublishPic"
),
};
};
var
studentStr
=
base
.
ParmJObj
.
GetStringValue
(
"StudentList"
);
var
studentStr
=
base
.
ParmJObj
.
GetStringValue
(
"StudentList"
);
if
(!
string
.
IsNullOrEmpty
(
studentStr
))
if
(!
string
.
IsNullOrEmpty
(
studentStr
))
...
@@ -552,7 +552,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -552,7 +552,7 @@ namespace Edu.WebApi.Controllers.Exam
{
{
return
ApiResult
.
ParamIsNull
(
"考试开始时间不能大于结束时间!"
);
return
ApiResult
.
ParamIsNull
(
"考试开始时间不能大于结束时间!"
);
}
}
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
@@ -586,10 +586,10 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -586,10 +586,10 @@ namespace Edu.WebApi.Controllers.Exam
{
{
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
),
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
),
PaperName
=
base
.
ParmJObj
.
GetStringValue
(
"PaperName"
),
PaperName
=
base
.
ParmJObj
.
GetStringValue
(
"PaperName"
),
IsQueryAll
=
base
.
ParmJObj
.
GetInt
(
"IsQueryAll"
),
IsQueryAll
=
base
.
ParmJObj
.
GetInt
(
"IsQueryAll"
),
QTestStatus
=
base
.
ParmJObj
.
GetInt
(
"QTestStatus"
),
QTestStatus
=
base
.
ParmJObj
.
GetInt
(
"QTestStatus"
),
QStartTime
=
base
.
ParmJObj
.
GetStringValue
(
"QStartTime"
),
QStartTime
=
base
.
ParmJObj
.
GetStringValue
(
"QStartTime"
),
QEndTime
=
base
.
ParmJObj
.
GetStringValue
(
"QEndTime"
),
QEndTime
=
base
.
ParmJObj
.
GetStringValue
(
"QEndTime"
),
};
};
if
(
query
.
IsQueryAll
!=
1
)
if
(
query
.
IsQueryAll
!=
1
)
{
{
...
@@ -893,7 +893,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -893,7 +893,7 @@ namespace Edu.WebApi.Controllers.Exam
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
ExamStatus
,
item
.
ExamStatus
,
ExamStatusName
=
item
.
ExamStatus
.
ToName
(),
ExamStatusName
=
item
.
ExamStatus
.
ToName
(),
ExamStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamStartTime
),
ExamStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamStartTime
),
ExamEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamEndTime
),
ExamEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamEndTime
),
PaperStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperStartTime
),
PaperStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperStartTime
),
PaperEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperEndTime
),
PaperEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperEndTime
),
...
@@ -936,7 +936,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -936,7 +936,7 @@ namespace Edu.WebApi.Controllers.Exam
{
{
JObject
sObj
=
JObject
.
Parse
(
sItem
.
ToString
());
JObject
sObj
=
JObject
.
Parse
(
sItem
.
ToString
());
var
qKey
=
sObj
.
GetStringValue
(
"QuestionTypeKey"
);
var
qKey
=
sObj
.
GetStringValue
(
"QuestionTypeKey"
);
string
answer
=
sObj
.
GetStringValue
(
"AnswerList"
);
string
answer
=
sObj
.
GetStringValue
(
"AnswerList"
);
List
<
SubAnswerItem
>
subList
=
new
List
<
SubAnswerItem
>();
List
<
SubAnswerItem
>
subList
=
new
List
<
SubAnswerItem
>();
if
(
qKey
==
"reading-comprehensio"
||
qKey
==
"listening"
||
qKey
==
"cloze"
)
if
(
qKey
==
"reading-comprehensio"
||
qKey
==
"listening"
||
qKey
==
"cloze"
)
{
{
...
@@ -945,13 +945,13 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -945,13 +945,13 @@ namespace Edu.WebApi.Controllers.Exam
subList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
answer
);
subList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
answer
);
}
}
}
}
var
detailModel
=
new
RB_Examination_Details_ViewModel
()
var
detailModel
=
new
RB_Examination_Details_ViewModel
()
{
{
Id
=
sObj
.
GetInt
(
"PaperDetailsId"
),
Id
=
sObj
.
GetInt
(
"PaperDetailsId"
),
StundetDetailsId
=
sObj
.
GetInt
(
"StundetDetailsId"
),
StundetDetailsId
=
sObj
.
GetInt
(
"StundetDetailsId"
),
StudentScore
=
sObj
.
GetDecimal
(
"StudentScore"
),
StudentScore
=
sObj
.
GetDecimal
(
"StudentScore"
),
SubList
=
subList
,
SubList
=
subList
,
};
};
paperDetailsList
.
Add
(
detailModel
);
paperDetailsList
.
Add
(
detailModel
);
}
}
...
@@ -963,6 +963,20 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -963,6 +963,20 @@ namespace Edu.WebApi.Controllers.Exam
return
result
?
ApiResult
.
Success
(
"阅卷成功!"
)
:
ApiResult
.
Failed
(
"阅卷失败!"
);
return
result
?
ApiResult
.
Success
(
"阅卷成功!"
)
:
ApiResult
.
Failed
(
"阅卷失败!"
);
}
}
/// <summary>
/// 获取题目类型统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppQuestionStaticModule
()
{
var
query
=
new
RB_Question_ViewModel
()
{
BankType
=
(
BankTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
};
var
obj
=
courseExamModule
.
GetAppQuestionStaticModule
(
query
);
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <summary>
/// <summary>
/// 甲小鹤小程序获取题库单词训练
/// 甲小鹤小程序获取题库单词训练
...
@@ -1034,7 +1048,43 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -1034,7 +1048,43 @@ namespace Edu.WebApi.Controllers.Exam
BankType
=
(
BankTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
BankType
=
(
BankTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
ReadingChoose
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
ReadingChoose
),
};
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取考级题库分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppBankPage
()
{
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Question_Bank_ViewModel
()
{
BankType
=
(
BankTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
};
var
list
=
courseExamModule
.
GetAppBankPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取考级题库详情分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppBankDetails
()
{
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Question_ViewModel
()
{
BankId
=
base
.
ParmJObj
.
GetInt
(
"BankId"
),
};
var
list
=
courseExamModule
.
GetAppBankDetailsPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
...
...
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