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
e1bd5bd9
Commit
e1bd5bd9
authored
Mar 08, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
78033567
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
281 additions
and
0 deletions
+281
-0
RB_Student_Exam.cs
Edu.Model/Entity/Exam/RB_Student_Exam.cs
+60
-0
RB_Student_ExamDetails.cs
Edu.Model/Entity/Exam/RB_Student_ExamDetails.cs
+70
-0
RB_Student_ExamDetails_Extend.cs
Edu.Model/ViewModel/Exam/RB_Student_ExamDetails_Extend.cs
+18
-0
RB_Student_Exam_Extend.cs
Edu.Model/ViewModel/Exam/RB_Student_Exam_Extend.cs
+18
-0
RB_Student_ExamDetailsRepository.cs
Edu.Repository/Exam/RB_Student_ExamDetailsRepository.cs
+42
-0
RB_Student_ExamRepository.cs
Edu.Repository/Exam/RB_Student_ExamRepository.cs
+73
-0
No files found.
Edu.Model/Entity/Exam/RB_Student_Exam.cs
0 → 100644
View file @
e1bd5bd9
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_Exam
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 题库编号
/// </summary>
public
int
BankId
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StudentId
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
DateTime
StartTime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
/// <summary>
/// 得分
/// </summary>
public
decimal
Score
{
get
;
set
;
}
/// <summary>
/// 测评次数
/// </summary>
public
int
Times
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
GroupId
{
get
;
set
;
}
}
}
Edu.Model/Entity/Exam/RB_Student_ExamDetails.cs
0 → 100644
View file @
e1bd5bd9
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_ExamDetails
{
/// <summary>
/// 主键编号
/// </summary>
public
int
DetailId
{
get
;
set
;
}
/// <summary>
/// 考试编号
/// </summary>
public
int
ExamId
{
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_ExamDetails_Extend.cs
0 → 100644
View file @
e1bd5bd9
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_ExamDetails_Extend
:
RB_Student_ExamDetails
{
/// <summary>
/// 考试编号【查询使用】
/// </summary>
public
string
QExamIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Student_Exam_Extend.cs
0 → 100644
View file @
e1bd5bd9
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_Exam_Extend
:
RB_Student_Exam
{
/// <summary>
/// 学员考试详情列表
/// </summary>
public
List
<
RB_Student_ExamDetails_Extend
>
ExamDetailsList
{
get
;
set
;
}
}
}
Edu.Repository/Exam/RB_Student_ExamDetailsRepository.cs
0 → 100644
View file @
e1bd5bd9
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_ExamDetailsRepository
:
BaseRepository
<
RB_Student_ExamDetails
>
{
/// <summary>
/// 获取学员练习考试详情列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_ExamDetails_Extend
>
GetStudentExamDetailsListRepository
(
RB_Student_ExamDetails_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_ExamDetails AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ExamId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Student_ExamDetails_Extend
.
ExamId
),
query
.
ExamId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QExamIds
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN ({1}) "
,
nameof
(
RB_Student_ExamDetails_Extend
.
ExamId
),
query
.
QExamIds
);
}
}
return
Get
<
RB_Student_ExamDetails_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Exam/RB_Student_ExamRepository.cs
0 → 100644
View file @
e1bd5bd9
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_ExamRepository
:
BaseRepository
<
RB_Student_Exam
>
{
/// <summary>
/// 获取学员练习考试分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Exam_Extend
>
GetStudentExamPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Exam_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Exam AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
GroupId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Student_Exam_Extend
.
GroupId
),
query
.
GroupId
);
}
if
(
query
.
StudentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Student_Exam_Extend
.
StudentId
),
query
.
StudentId
);
}
}
return
GetPage
<
RB_Student_Exam_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取学员练习考试列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Exam_Extend
>
GetStudentExamListRepository
(
RB_Student_Exam_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Exam AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
GroupId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Student_Exam_Extend
.
GroupId
),
query
.
GroupId
);
}
if
(
query
.
StudentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Student_Exam_Extend
.
StudentId
),
query
.
StudentId
);
}
}
return
Get
<
RB_Student_Exam_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
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