Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EduSpider
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
viitto
EduSpider
Commits
fb5f91ea
Commit
fb5f91ea
authored
Aug 31, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
32f95555
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
ExamService.cs
EduSpider.Services/ExamService.cs
+7
-2
No files found.
EduSpider.Services/ExamService.cs
View file @
fb5f91ea
...
...
@@ -672,8 +672,13 @@ namespace EduSpider.Services
int
eNum
=
examList
.
Count
();
//考试数量
List
<
RB_Exam_Score_Extend
>
TRankList
=
new
List
<
RB_Exam_Score_Extend
>();
//统计排名
foreach
(
var
stuId
in
StuIdList
)
{
decimal
TScore
=
Math
.
Round
(
scoreList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
Sum
(
x
=>
x
.
TScore
)
/
eNum
,
2
,
MidpointRounding
.
AwayFromZero
);
// 平均几次考试 得到总分
decimal
ExamScore
=
Math
.
Round
(
scoreList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
Sum
(
x
=>
x
.
ExamScore
)
/
eNum
,
2
,
MidpointRounding
.
AwayFromZero
);
eNum
=
scoreList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
Select
(
x
=>
x
.
ExamId
).
Distinct
().
Count
();
//学生参与考试的数量
decimal
TScore
=
0
,
ExamScore
=
0
;
if
(
eNum
>
0
)
{
TScore
=
Math
.
Floor
(
scoreList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
Sum
(
x
=>
x
.
TScore
)
/
eNum
);
// 平均几次考试 得到总分
ExamScore
=
Math
.
Round
(
scoreList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
Sum
(
x
=>
x
.
ExamScore
)
/
eNum
,
2
,
MidpointRounding
.
AwayFromZero
);
}
TRankList
.
Add
(
new
RB_Exam_Score_Extend
()
{
...
...
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