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
c00dd070
Commit
c00dd070
authored
Aug 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
bc682a4f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
202 additions
and
9 deletions
+202
-9
RB_Examination_Template.cs
Edu.Model/Entity/Exam/RB_Examination_Template.cs
+1
-0
RB_Examination_Details_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Details_ViewModel.cs
+5
-0
RB_Examination_Template_ViewModel.cs
...Model/ViewModel/Exam/RB_Examination_Template_ViewModel.cs
+6
-1
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+158
-6
RB_Examination_DetailsRepository.cs
Edu.Repository/Exam/RB_Examination_DetailsRepository.cs
+30
-1
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+2
-1
No files found.
Edu.Model/Entity/Exam/RB_Examination_Template.cs
View file @
c00dd070
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Question
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
...
...
Edu.Model/ViewModel/Exam/RB_Examination_Details_ViewModel.cs
View file @
c00dd070
...
...
@@ -24,5 +24,10 @@ namespace Edu.Model.ViewModel.Exam
/// 选项
/// </summary>
public
object
QuestionContentObj
{
get
;
set
;
}
/// <summary>
/// 问题数量
/// </summary>
public
int
QuestionCount
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Examination_Template_ViewModel.cs
View file @
c00dd070
...
...
@@ -13,6 +13,11 @@ namespace Edu.Model.ViewModel.Exam
/// <summary>
/// 是否保存未组卷模板(1-是)
/// </summary>
public
int
IsSaveTemplate
{
get
;
set
;
}
public
bool
IsSaveTemplate
{
get
;
set
;
}
/// <summary>
/// 模板数据
/// </summary>
public
List
<
ExamTemplate
>
TempDataList
{
get
;
set
;
}
}
}
Edu.Module.Exam/PaperModule.cs
View file @
c00dd070
This diff is collapsed.
Click to expand it.
Edu.Repository/Exam/RB_Examination_DetailsRepository.cs
View file @
c00dd070
...
...
@@ -40,6 +40,35 @@ WHERE 1=1
}
return
Get
<
RB_Examination_Details_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取试卷题目列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Examination_Details_ViewModel
>
GetExaminationDetailsStaticListRepository
(
RB_Examination_Details_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.PaperId,COUNT(1) AS QuestionCount
FROM RB_Examination_Details AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Details_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
PaperId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Details_ViewModel
.
PaperId
),
query
.
PaperId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPaperIds
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Details_ViewModel
.
PaperId
),
query
.
QPaperIds
);
}
}
builder
.
Append
(
" GROUP BY A.PaperId "
);
return
Get
<
RB_Examination_Details_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
c00dd070
...
...
@@ -175,7 +175,7 @@ namespace Edu.WebApi.Controllers.Exam
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
UserInfo
.
School_Id
,
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
,
IsSaveTemplate
=
base
.
ParmJObj
.
Get
Int
(
"IsSaveTemplate"
),
IsSaveTemplate
=
base
.
ParmJObj
.
Get
BoolValue
(
"IsSaveTemplate"
),
};
string
TemplateData
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateData"
);
if
(!
string
.
IsNullOrEmpty
(
TemplateData
))
...
...
@@ -184,6 +184,7 @@ namespace Edu.WebApi.Controllers.Exam
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
extModel
.
TemplateData
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
list
);
extModel
.
TempDataList
=
list
;
}
}
bool
flag
=
paperModule
.
SetPaperTemplateModule
(
extModel
);
...
...
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