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
06f6b4c7
Commit
06f6b4c7
authored
Aug 17, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e758d8c1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
6 deletions
+36
-6
RB_Examination_Publish_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
+5
-0
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+6
-0
RB_Examination_PublishRepository.cs
Edu.Repository/Exam/RB_Examination_PublishRepository.cs
+9
-2
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+16
-4
No files found.
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
View file @
06f6b4c7
...
@@ -14,5 +14,10 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -14,5 +14,10 @@ namespace Edu.Model.ViewModel.Exam
/// 考试学员列表
/// 考试学员列表
/// </summary>
/// </summary>
public
List
<
RB_Examination_Student_ViewModel
>
StudentList
{
get
;
set
;
}
public
List
<
RB_Examination_Student_ViewModel
>
StudentList
{
get
;
set
;
}
/// <summary>
/// 试卷名称
/// </summary>
public
string
PaperName
{
get
;
set
;
}
}
}
}
}
Edu.Module.Exam/PaperModule.cs
View file @
06f6b4c7
...
@@ -740,8 +740,12 @@ namespace Edu.Module.Exam
...
@@ -740,8 +740,12 @@ namespace Edu.Module.Exam
{
{
foreach
(
var
item
in
model
.
StudentList
)
foreach
(
var
item
in
model
.
StudentList
)
{
{
item
.
CreateBy
=
model
.
CreateBy
;
item
.
CreateTime
=
DateTime
.
Now
;
item
.
PublishId
=
model
.
Id
;
item
.
PublishId
=
model
.
Id
;
item
.
PaperId
=
model
.
PaperId
;
item
.
PaperId
=
model
.
PaperId
;
item
.
Group_Id
=
model
.
Group_Id
;
item
.
School_Id
=
model
.
School_Id
;
examination_StudentRepository
.
Insert
(
item
);
examination_StudentRepository
.
Insert
(
item
);
}
}
}
}
...
@@ -764,6 +768,8 @@ namespace Edu.Module.Exam
...
@@ -764,6 +768,8 @@ namespace Edu.Module.Exam
}
}
foreach
(
var
dItem
in
model
.
StudentList
)
foreach
(
var
dItem
in
model
.
StudentList
)
{
{
dItem
.
CreateBy
=
model
.
CreateBy
;
dItem
.
CreateTime
=
DateTime
.
Now
;
dItem
.
PublishId
=
model
.
Id
;
dItem
.
PublishId
=
model
.
Id
;
dItem
.
PaperId
=
model
.
PaperId
;
dItem
.
PaperId
=
model
.
PaperId
;
dItem
.
Group_Id
=
model
.
Group_Id
;
dItem
.
Group_Id
=
model
.
Group_Id
;
...
...
Edu.Repository/Exam/RB_Examination_PublishRepository.cs
View file @
06f6b4c7
...
@@ -4,6 +4,7 @@ using System;
...
@@ -4,6 +4,7 @@ using System;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Exam
namespace
Edu.Repository.Exam
{
{
...
@@ -22,10 +23,11 @@ namespace Edu.Repository.Exam
...
@@ -22,10 +23,11 @@ namespace Edu.Repository.Exam
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Examination_Publish_ViewModel
>
GetExaminationPublishPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Examination_Publish_ViewModel
query
)
public
List
<
RB_Examination_Publish_ViewModel
>
GetExaminationPublishPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Examination_Publish_ViewModel
query
)
{
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
SELECT A.*
SELECT A.*
,IFNULL(B.PaperName,'') AS PaperName
FROM RB_Examination_Publish AS A
FROM RB_Examination_Publish AS A
LEFT JOIN rb_examination_paper AS B ON A.PaperId=B.PaperId
WHERE 1=1
WHERE 1=1
"
);
"
);
if
(
query
!=
null
)
if
(
query
!=
null
)
...
@@ -34,6 +36,11 @@ WHERE 1=1
...
@@ -34,6 +36,11 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Publish_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Publish_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
PaperName
))
{
builder
.
AppendFormat
(
" AND B.{0} LIKE @PaperName "
,
nameof
(
RB_Examination_Publish_ViewModel
.
PaperName
));
parameters
.
Add
(
"PaperName"
,
"%"
+
query
.
PaperName
.
Trim
()
+
"%"
);
}
}
}
return
GetPage
<
RB_Examination_Publish_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Examination_Publish_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
06f6b4c7
using
Edu.Common.API
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Question
;
using
Edu.Common.Enum.Question
;
using
Edu.Common.Plugin
;
using
Edu.Common.Plugin
;
...
@@ -366,7 +367,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -366,7 +367,7 @@ namespace Edu.WebApi.Controllers.Exam
CreateBy
=
UserInfo
.
Id
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsQueryFolder
=
1
,
IsQueryFolder
=
1
,
};
};
var
obj
=
paperModule
.
GetFolderTreeModule
(
extModel
);
var
obj
=
paperModule
.
GetFolderTreeModule
(
extModel
);
return
ApiResult
.
Success
(
data
:
obj
);
return
ApiResult
.
Success
(
data
:
obj
);
...
@@ -428,13 +429,24 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -428,13 +429,24 @@ namespace Edu.WebApi.Controllers.Exam
var
query
=
new
RB_Examination_Publish_ViewModel
()
var
query
=
new
RB_Examination_Publish_ViewModel
()
{
{
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
),
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
),
PaperName
=
base
.
ParmJObj
.
GetStringValue
(
"PaperName"
),
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
paperModule
.
GetExaminationPublishPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
paperModule
.
GetExaminationPublishPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
result
.
Add
(
item
);
var
obj
=
new
{
item
.
Id
,
item
.
PaperId
,
item
.
PaperName
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
StartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamStartTime
),
EndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamEndTime
),
item
.
ExamTimes
,
};
result
.
Add
(
obj
);
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
pageModel
.
PageData
=
result
;
...
...
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