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
84d3646c
Commit
84d3646c
authored
May 27, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
27f3b25e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
26 deletions
+7
-26
RB_Exam_Questions.cs
EduSpider.Model/Entity/RB_Exam_Questions.cs
+0
-5
RB_Exam_Score_Extend.cs
EduSpider.Model/Extend/RB_Exam_Score_Extend.cs
+0
-5
ExamService.cs
EduSpider.Services/ExamService.cs
+4
-7
StuExamScoreHelper.cs
EduSpider.Utility/Data/StuExamScoreHelper.cs
+2
-8
ExamController.cs
EduSpider.WebApi/Controllers/Student/ExamController.cs
+1
-1
No files found.
EduSpider.Model/Entity/RB_Exam_Questions.cs
View file @
84d3646c
...
@@ -39,11 +39,6 @@ namespace EduSpider.Model.Entity
...
@@ -39,11 +39,6 @@ namespace EduSpider.Model.Entity
/// </summary>
/// </summary>
public
string
KnowledgePoint
{
get
;
set
;
}
public
string
KnowledgePoint
{
get
;
set
;
}
/// <summary>
/// 归属模块
/// </summary>
public
string
Module
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 分数
/// 分数
/// </summary>
/// </summary>
...
...
EduSpider.Model/Extend/RB_Exam_Score_Extend.cs
View file @
84d3646c
...
@@ -52,11 +52,6 @@ namespace EduSpider.Model.Extend
...
@@ -52,11 +52,6 @@ namespace EduSpider.Model.Extend
/// </summary>
/// </summary>
public
string
KnowledgePoint
{
get
;
set
;
}
public
string
KnowledgePoint
{
get
;
set
;
}
/// <summary>
/// 归属模块
/// </summary>
public
string
Module
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 题目分数
/// 题目分数
/// </summary>
/// </summary>
...
...
EduSpider.Services/ExamService.cs
View file @
84d3646c
...
@@ -96,7 +96,6 @@ namespace EduSpider.Services
...
@@ -96,7 +96,6 @@ namespace EduSpider.Services
foreach
(
var
qitem
in
sExamModel
.
ScoreList
)
{
foreach
(
var
qitem
in
sExamModel
.
ScoreList
)
{
qitem
.
Difficulty
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
Difficulty
??
""
;
qitem
.
Difficulty
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
Difficulty
??
""
;
qitem
.
KnowledgePoint
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
KnowledgePoint
??
""
;
qitem
.
KnowledgePoint
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
KnowledgePoint
??
""
;
qitem
.
Module
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
Module
??
""
;
qitem
.
QScore
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
Score
??
0
;
qitem
.
QScore
=
qlist
.
Where
(
x
=>
x
.
Sort
==
qitem
.
Sort
).
FirstOrDefault
()?.
Score
??
0
;
}
}
}
}
...
@@ -120,12 +119,12 @@ namespace EduSpider.Services
...
@@ -120,12 +119,12 @@ namespace EduSpider.Services
x
.
QScore
,
x
.
QScore
,
x
.
Score
,
x
.
Score
,
ScoreRate
=
Math
.
Round
(
x
.
Score
/
x
.
QScore
,
2
,
MidpointRounding
.
AwayFromZero
),
ScoreRate
=
Math
.
Round
(
x
.
Score
/
x
.
QScore
,
2
,
MidpointRounding
.
AwayFromZero
),
x
.
AvgScore
,
AvgScore
=
Math
.
Round
(
x
.
AvgScore
,
6
,
MidpointRounding
.
AwayFromZero
)
,
AvgScoreRate
=
Math
.
Round
(
x
.
AvgScore
/
x
.
QScore
,
2
,
MidpointRounding
.
AwayFromZero
),
AvgScoreRate
=
Math
.
Round
(
x
.
AvgScore
/
x
.
QScore
,
2
,
MidpointRounding
.
AwayFromZero
),
}),
}),
ModuleList
=
sExamModel
?.
ScoreList
.
GroupBy
(
x
=>
new
{
x
.
Module
}).
Select
(
x
=>
new
ModuleList
=
sExamModel
?.
ScoreList
.
GroupBy
(
x
=>
new
{
x
.
KnowledgePoint
}).
Select
(
x
=>
new
{
{
x
.
Key
.
Module
,
Module
=
x
.
Key
.
KnowledgePoint
,
Score
=
x
.
Sum
(
y
=>
y
.
QScore
),
Score
=
x
.
Sum
(
y
=>
y
.
QScore
),
ScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
Score
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
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
),
AvgScoreRate
=
Math
.
Round
(
x
.
Sum
(
y
=>
y
.
AvgScore
)
/
x
.
Sum
(
y
=>
y
.
QScore
),
2
,
MidpointRounding
.
AwayFromZero
),
...
@@ -209,7 +208,6 @@ namespace EduSpider.Services
...
@@ -209,7 +208,6 @@ namespace EduSpider.Services
ExamId
=
ExamId
,
ExamId
=
ExamId
,
Difficulty
=
item
.
Difficulty
,
Difficulty
=
item
.
Difficulty
,
KnowledgePoint
=
item
.
KnowledgePoint
,
KnowledgePoint
=
item
.
KnowledgePoint
,
Module
=
item
.
Module
,
Score
=
item
.
Score
,
Score
=
item
.
Score
,
Sort
=
item
.
Id
Sort
=
item
.
Id
});
});
...
@@ -232,7 +230,7 @@ namespace EduSpider.Services
...
@@ -232,7 +230,7 @@ namespace EduSpider.Services
{
{
Sort
=
x
.
Id
,
Sort
=
x
.
Id
,
x
.
Score
,
x
.
Score
,
AvgScore
=
AvgList
.
Where
(
y
=>
y
.
Id
==
x
.
Id
).
FirstOrDefault
()?.
Score
??
0
AvgScore
=
Math
.
Round
(
AvgList
.
Where
(
y
=>
y
.
Id
==
x
.
Id
).
FirstOrDefault
()?.
Score
??
0
,
6
,
MidpointRounding
.
AwayFromZero
)
})),
})),
TScore
=
clist
.
Where
(
x
=>
x
.
Id
==
-
1
).
FirstOrDefault
()?.
Score
??
0
,
TScore
=
clist
.
Where
(
x
=>
x
.
Id
==
-
1
).
FirstOrDefault
()?.
Score
??
0
,
Rank
=
Convert
.
ToInt32
(
clist
.
Where
(
x
=>
x
.
Id
==
-
2
).
FirstOrDefault
()?.
Score
??
0
),
Rank
=
Convert
.
ToInt32
(
clist
.
Where
(
x
=>
x
.
Id
==
-
2
).
FirstOrDefault
()?.
Score
??
0
),
...
@@ -295,7 +293,6 @@ namespace EduSpider.Services
...
@@ -295,7 +293,6 @@ namespace EduSpider.Services
ExamId
=
ExamId
,
ExamId
=
ExamId
,
Difficulty
=
item
.
Difficulty
,
Difficulty
=
item
.
Difficulty
,
KnowledgePoint
=
item
.
KnowledgePoint
,
KnowledgePoint
=
item
.
KnowledgePoint
,
Module
=
item
.
Module
,
Score
=
item
.
Score
,
Score
=
item
.
Score
,
Sort
=
item
.
Id
Sort
=
item
.
Id
});
});
...
...
EduSpider.Utility/Data/StuExamScoreHelper.cs
View file @
84d3646c
...
@@ -34,8 +34,7 @@ namespace EduSpider.Utility.Data
...
@@ -34,8 +34,7 @@ namespace EduSpider.Utility.Data
Id
=
i
,
Id
=
i
,
Difficulty
=
dt
.
Rows
[
0
][
i
.
ToString
()].
ToString
(),
Difficulty
=
dt
.
Rows
[
0
][
i
.
ToString
()].
ToString
(),
KnowledgePoint
=
dt
.
Rows
[
1
][
i
.
ToString
()].
ToString
(),
KnowledgePoint
=
dt
.
Rows
[
1
][
i
.
ToString
()].
ToString
(),
Module
=
dt
.
Rows
[
2
][
i
.
ToString
()].
ToString
(),
Score
=
Convert
.
ToDecimal
(
dt
.
Rows
[
2
][
i
.
ToString
()].
ToString
())
Score
=
Convert
.
ToDecimal
(
dt
.
Rows
[
3
][
i
.
ToString
()].
ToString
())
});
});
}
}
else
else
...
@@ -47,7 +46,7 @@ namespace EduSpider.Utility.Data
...
@@ -47,7 +46,7 @@ namespace EduSpider.Utility.Data
{
{
int
totalCount
=
dt
.
Rows
.
Count
;
int
totalCount
=
dt
.
Rows
.
Count
;
//从第5行 开始 是学生
//从第5行 开始 是学生
for
(
var
i
=
4
;
i
<
totalCount
;
i
++)
for
(
var
i
=
3
;
i
<
totalCount
;
i
++)
{
{
foreach
(
var
item
in
EQList
)
foreach
(
var
item
in
EQList
)
{
{
...
@@ -107,11 +106,6 @@ namespace EduSpider.Utility.Data
...
@@ -107,11 +106,6 @@ namespace EduSpider.Utility.Data
/// </summary>
/// </summary>
public
string
KnowledgePoint
{
get
;
set
;
}
public
string
KnowledgePoint
{
get
;
set
;
}
/// <summary>
/// 归属模块
/// </summary>
public
string
Module
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 分数
/// 分数
/// </summary>
/// </summary>
...
...
EduSpider.WebApi/Controllers/Student/ExamController.cs
View file @
84d3646c
...
@@ -83,7 +83,7 @@ namespace EduSpider.WebApi.Controllers
...
@@ -83,7 +83,7 @@ namespace EduSpider.WebApi.Controllers
int
StuId
=
ReqParameters
.
GetInt
(
"StuId"
);
//学生id
int
StuId
=
ReqParameters
.
GetInt
(
"StuId"
);
//学生id
int
StuUId
=
ReqParameters
.
GetInt
(
"StuUId"
);
//学生Uid
int
StuUId
=
ReqParameters
.
GetInt
(
"StuUId"
);
//学生Uid
if
(
ExamId
<=
0
||
StuId
<=
0
||
StuUId
<=
0
)
if
(
ExamId
<=
0
||
(
StuId
<=
0
&&
StuUId
<=
0
)
)
{
{
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
();
}
}
...
...
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