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
9ac13a06
Commit
9ac13a06
authored
Aug 22, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
92a18ae3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
ExamService.cs
EduSpider.Services/ExamService.cs
+17
-7
No files found.
EduSpider.Services/ExamService.cs
View file @
9ac13a06
...
...
@@ -129,22 +129,26 @@ namespace EduSpider.Services
AvgScore
=
Math
.
Round
(
x
.
AvgScore
,
6
,
MidpointRounding
.
AwayFromZero
),
AvgScoreRate
=
Math
.
Round
(
x
.
AvgScore
/
x
.
QScore
,
2
,
MidpointRounding
.
AwayFromZero
),
}),
ModuleList
=
sExamModel
?.
ScoreList
.
GroupBy
(
x
=>
new
{
x
.
KnowledgePoint
}).
Take
(
8
).
Select
(
x
=>
new
ModuleList
=
sExamModel
?.
ScoreList
.
GroupBy
(
x
=>
new
{
x
.
KnowledgePoint
}).
Select
(
x
=>
new
{
Module
=
x
.
Key
.
KnowledgePoint
.
Length
>
6
?
x
.
Key
.
KnowledgePoint
.
Substring
(
0
,
6
)
+
".."
:
x
.
Key
.
KnowledgePoint
,
Score
=
x
.
Sum
(
y
=>
y
.
QScore
),
ScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
Score
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
AvgScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
AvgScore
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
PScore
=
x
.
Sum
(
y
=>
y
.
Score
),
AvgScore
=
x
.
Sum
(
y
=>
y
.
AvgScore
)
}),
GroupModuleList
=
examModel
.
Type
==
2
?
sExamModel
?.
ScoreList
.
GroupBy
(
z
=>
new
{
z
.
GroupName
}).
Select
(
z
=>
new
{
GroupName
=
z
.
Key
,
GroupList
=
z
.
GroupBy
(
x
=>
new
{
x
.
KnowledgePoint
}).
Take
(
8
).
Select
(
x
=>
new
GroupList
=
z
.
GroupBy
(
x
=>
new
{
x
.
KnowledgePoint
}).
Select
(
x
=>
new
{
Module
=
x
.
Key
.
KnowledgePoint
.
Length
>
6
?
x
.
Key
.
KnowledgePoint
.
Substring
(
0
,
6
)
+
".."
:
x
.
Key
.
KnowledgePoint
,
Score
=
x
.
Sum
(
y
=>
y
.
QScore
),
ScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
Score
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
AvgScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
AvgScore
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
PScore
=
x
.
Sum
(
y
=>
y
.
Score
),
AvgScore
=
x
.
Sum
(
y
=>
y
.
AvgScore
)
})
})
:
null
,
DifficultyList
=
sExamModel
?.
ScoreList
.
GroupBy
(
x
=>
new
{
x
.
Difficulty
}).
Select
(
x
=>
new
...
...
@@ -554,6 +558,7 @@ namespace EduSpider.Services
ExamName
=
item
.
ExamName
,
GroupName
=
groupName
,
Score
=
esList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
FirstOrDefault
()?.
ARank
??
0
,
TScore
=
esList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
FirstOrDefault
()?.
AScore
??
0
,
GroupNum
=
groupNum
});
}
...
...
@@ -581,7 +586,8 @@ namespace EduSpider.Services
StuId
=
stuId
,
Sort
=
ExamNum
,
ExamName
=
item
.
ExamName
,
Score
=
esList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
FirstOrDefault
()?.
Rank
??
0
Score
=
esList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
FirstOrDefault
()?.
Rank
??
0
,
TScore
=
esList
.
Where
(
x
=>
x
.
StuId
==
stuId
).
FirstOrDefault
()?.
TScore
??
0
,
});
}
ExamNum
++;
...
...
@@ -686,13 +692,15 @@ namespace EduSpider.Services
y
.
GroupNum
,
y
.
Sort
,
y
.
ExamName
,
y
.
Score
y
.
Score
,
y
.
TScore
}),
TRankScoreList
=
statModel
.
TRankScoreList
.
Select
(
x
=>
new
{
x
.
Sort
,
x
.
ExamName
,
x
.
Score
x
.
Score
,
x
.
TScore
})
}),
TScore
=
rmodel
.
TScore
,
...
...
@@ -778,14 +786,16 @@ namespace EduSpider.Services
{
ExamNum
=
y
.
Sort
,
y
.
ExamName
,
Rank
=
y
.
Score
Rank
=
y
.
Score
,
y
.
TScore
})
}),
TRankScoreList
=
statList
.
TRankScoreList
.
Select
(
x
=>
new
{
ExamNum
=
x
.
Sort
,
x
.
ExamName
,
Rank
=
x
.
Score
Rank
=
x
.
Score
,
x
.
TScore
})
};
}
...
...
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