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
7c8605d3
Commit
7c8605d3
authored
Jun 20, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学员学习字段调整
parent
6345e542
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
74 deletions
+65
-74
RB_Student_Study.cs
Edu.Model/Entity/User/RB_Student_Study.cs
+3
-3
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+18
-28
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+44
-43
No files found.
Edu.Model/Entity/User/RB_Student_Study.cs
View file @
7c8605d3
...
...
@@ -55,17 +55,17 @@ namespace Edu.Model.Entity.User
/// <summary>
/// 单词得分
/// </summary>
public
decimal
Words
{
get
;
set
;
}
public
string
Words
{
get
;
set
;
}
/// <summary>
/// 练习题得分
/// </summary>
public
decimal
Practice
{
get
;
set
;
}
public
string
Practice
{
get
;
set
;
}
/// <summary>
/// 朗读背诵得分
/// </summary>
public
decimal
ReadingAloud
{
get
;
set
;
}
public
string
ReadingAloud
{
get
;
set
;
}
/// <summary>
/// 其他得分(JSON格式)
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
7c8605d3
...
...
@@ -3799,10 +3799,10 @@ namespace Edu.Module.Course
Rlist
.
Add
(
new
{
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
((
studentStudyModel
?.
ReadingAloud
??
0
)
>
0
)
?
studentStudyModel
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
studentStudyModel
?.
Other
??
""
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
studentStudyModel
?.
Other
)
:
new
List
<
StudyOther
>()
,
Words
=
studentStudyModel
?.
Words
??
""
,
Practice
=
studentStudyModel
?.
Practice
??
""
,
ReadingAloud
=
studentStudyModel
?.
ReadingAloud
??
""
,
Other
=
studentStudyModel
?.
Other
??
""
,
x
.
ChapterNo
,
x
.
ChapterName
,
x
.
CourseRate
,
...
...
@@ -3820,7 +3820,6 @@ namespace Edu.Module.Course
else
{
//跟班
cList
.
ForEach
(
x
=>
{
x
.
SortNum
=
Convert
.
ToDouble
(
x
.
ChapterNo
);
});
cList
.
OrderBy
(
x
=>
x
.
SortNum
).
ToList
().
ForEach
(
x
=>
{
...
...
@@ -3828,10 +3827,10 @@ namespace Edu.Module.Course
Rlist
.
Add
(
new
{
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
((
studentStudyModel
?.
ReadingAloud
??
0
)
>
0
)
?
studentStudyModel
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
studentStudyModel
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
studentStudyModel
?.
Other
)
:
new
List
<
StudyOther
>()
,
Words
=
studentStudyModel
?.
Words
??
""
,
Practice
=
studentStudyModel
?.
Practice
??
""
,
ReadingAloud
=
studentStudyModel
?.
ReadingAloud
??
""
,
Other
=
studentStudyModel
?.
Other
??
""
,
x
.
ChapterNo
,
x
.
ChapterName
,
x
.
CourseRate
,
...
...
@@ -3847,21 +3846,18 @@ namespace Edu.Module.Course
});
}
}
if
(
studyList
!=
null
&&
studyList
.
Any
(
x
=>
x
.
StudyType
==
2
))
{
var
kaoshiList
=
studyList
.
Where
(
x
=>
x
.
StudyType
==
2
).
ToList
();
Rlist
.
AddRange
(
kaoshiList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
{
CourseRateName
=
(
courseModel
?.
CourseId
??
0
)
>
0
?
courseModel
?.
CourseRate
.
ToName
()
:
""
,
StudyID
=
x
?.
ID
??
0
,
StudyType
=
x
.
StudyType
,
Words
=
((
x
?.
Words
??
0
)
>
0
)
?
x
?.
Words
.
ToString
(
"F2"
)
:
""
,
Practice
=
((
x
?.
Practice
??
0
)
>
0
)
?
x
?.
Practice
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
((
x
?.
ReadingAloud
??
0
)
>
0
)
?
x
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
x
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
x
?.
Other
)
:
new
List
<
StudyOther
>()
,
Words
=
x
?.
Words
??
""
,
Practice
=
x
?.
Practice
??
""
,
ReadingAloud
=
x
?.
ReadingAloud
??
""
,
Other
=
x
?.
Other
??
""
,
ChapterNo
=
""
,
ChapterName
=
""
,
CourseRate
=
""
,
...
...
@@ -3875,8 +3871,6 @@ namespace Edu.Module.Course
return
Rlist
;
}
/// <summary>
/// 获取学员学习情况
/// </summary>
...
...
@@ -3891,11 +3885,11 @@ namespace Edu.Module.Course
Rlist
.
AddRange
(
studyList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
{
StudyID
=
x
?.
ID
??
0
,
StudyType
=
x
.
StudyType
,
Words
=
0
,
Practice
=
0
,
ReadingAloud
=
0
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
x
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
x
?.
Other
)
:
new
List
<
StudyOther
>()
,
x
.
StudyType
,
Words
=
""
,
Practice
=
""
,
ReadingAloud
=
""
,
Other
=
x
?.
Other
??
""
,
ChapterNo
=
""
,
ChapterName
=
""
,
CourseRate
=
""
,
...
...
@@ -3936,10 +3930,7 @@ namespace Edu.Module.Course
AppointList
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
CourseId
=
demodel
.
CourseId
,
StuId
=
demodel
.
StuId
});
//查询所有的 补课记录
SkipList
=
scroll_SkipCourseRepository
.
GetList
(
new
RB_Scroll_SkipCourse_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
CourseId
=
demodel
.
CourseId
,
StuId
=
demodel
.
StuId
});
}
return
ogList
;
}
...
...
@@ -4108,9 +4099,8 @@ namespace Edu.Module.Course
});
}
}
return
Rlist
;
}
#
endregion
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
7c8605d3
...
...
@@ -1271,52 +1271,53 @@ namespace Edu.WebApi.Controllers.Course
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
,
0
),
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
,
0
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
),
Words
=
base
.
ParmJObj
.
GetDecimal
(
"Words"
),
Practice
=
base
.
ParmJObj
.
GetDecimal
(
"Practice"
),
ReadingAloud
=
base
.
ParmJObj
.
GetDecimal
(
"ReadingAloud"
),
Words
=
base
.
ParmJObj
.
GetStringValue
(
"Words"
),
Practice
=
base
.
ParmJObj
.
GetStringValue
(
"Practice"
),
ReadingAloud
=
base
.
ParmJObj
.
GetStringValue
(
"ReadingAloud"
),
Other
=
base
.
ParmJObj
.
GetStringValue
(
"Other"
),
StudyValue
=
base
.
ParmJObj
.
GetStringValue
(
"StudyValue"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
),
};
string
other
=
base
.
ParmJObj
.
GetStringValue
(
"Other"
);
List
<
StudyOther
>
otherList
=
new
List
<
StudyOther
>();
if
(!
string
.
IsNullOrWhiteSpace
(
other
))
{
JArray
otherListArray
=
JArray
.
Parse
(
other
);
if
(
otherListArray
!=
null
&&
otherListArray
.
Count
>
0
)
{
foreach
(
var
jItem
in
otherListArray
)
{
JObject
jobj
=
JObject
.
Parse
(
JsonHelper
.
Serialize
(
jItem
));
string
score
=
jobj
.
GetStringValue
(
"Score"
);
string
name
=
jobj
.
GetStringValue
(
"Name"
);
if
(!
string
.
IsNullOrWhiteSpace
(
name
)
||
!
string
.
IsNullOrWhiteSpace
(
score
))
{
decimal
rScore
=
0
;
try
{
rScore
=
!
string
.
IsNullOrWhiteSpace
(
score
)
?
Convert
.
ToDecimal
(
score
)
:
0
;
}
catch
(
Exception
ex
)
{
rScore
=
0
;
}
otherList
.
Add
(
new
StudyOther
{
Name
=
name
,
Score
=
rScore
,
});
}
}
}
}
if
(
otherList
!=
null
&&
otherList
.
Any
())
{
demodel
.
Other
=
JsonHelper
.
Serialize
(
otherList
);
}
else
{
demodel
.
Other
=
""
;
}
//
string other = base.ParmJObj.GetStringValue("Other");
//
List<StudyOther> otherList = new List<StudyOther>();
//
if (!string.IsNullOrWhiteSpace(other))
//
{
//
JArray otherListArray = JArray.Parse(other);
//
if (otherListArray != null && otherListArray.Count > 0)
//
{
//
foreach (var jItem in otherListArray)
//
{
//
JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem));
//
string score = jobj.GetStringValue("Score");
//
string name = jobj.GetStringValue("Name");
//
if (!string.IsNullOrWhiteSpace(name) || !string.IsNullOrWhiteSpace(score))
//
{
//
decimal rScore = 0;
//
try
//
{
//
rScore = !string.IsNullOrWhiteSpace(score) ? Convert.ToDecimal(score) : 0;
//
}
//
catch (Exception ex)
//
{
//
rScore = 0;
//
}
//
otherList.Add(new StudyOther
//
{
//
Name = name,
//
Score = rScore,
//
});
//
}
//
}
//
}
//
}
//
if (otherList != null && otherList.Any())
//
{
//
demodel.Other = JsonHelper.Serialize(otherList);
//
}
//
else
//
{
//
demodel.Other = "";
//
}
if
(
demodel
.
ID
==
0
)
{
demodel
.
CreateTime
=
DateTime
.
Now
;
...
...
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