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
Show 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
...
@@ -55,17 +55,17 @@ namespace Edu.Model.Entity.User
/// <summary>
/// <summary>
/// 单词得分
/// 单词得分
/// </summary>
/// </summary>
public
decimal
Words
{
get
;
set
;
}
public
string
Words
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 练习题得分
/// 练习题得分
/// </summary>
/// </summary>
public
decimal
Practice
{
get
;
set
;
}
public
string
Practice
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 朗读背诵得分
/// 朗读背诵得分
/// </summary>
/// </summary>
public
decimal
ReadingAloud
{
get
;
set
;
}
public
string
ReadingAloud
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 其他得分(JSON格式)
/// 其他得分(JSON格式)
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
7c8605d3
...
@@ -3799,10 +3799,10 @@ namespace Edu.Module.Course
...
@@ -3799,10 +3799,10 @@ namespace Edu.Module.Course
Rlist
.
Add
(
new
Rlist
.
Add
(
new
{
{
StudyID
=
studentStudyModel
?.
ID
??
0
,
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Words
=
studentStudyModel
?.
Words
??
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
Practice
=
studentStudyModel
?.
Practice
??
""
,
ReadingAloud
=
((
studentStudyModel
?.
ReadingAloud
??
0
)
>
0
)
?
studentStudyModel
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
studentStudyModel
?.
ReadingAloud
??
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
studentStudyModel
?.
Other
??
""
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
studentStudyModel
?.
Other
)
:
new
List
<
StudyOther
>()
,
Other
=
studentStudyModel
?.
Other
??
""
,
x
.
ChapterNo
,
x
.
ChapterNo
,
x
.
ChapterName
,
x
.
ChapterName
,
x
.
CourseRate
,
x
.
CourseRate
,
...
@@ -3820,7 +3820,6 @@ namespace Edu.Module.Course
...
@@ -3820,7 +3820,6 @@ namespace Edu.Module.Course
else
else
{
{
//跟班
//跟班
cList
.
ForEach
(
x
=>
{
x
.
SortNum
=
Convert
.
ToDouble
(
x
.
ChapterNo
);
});
cList
.
ForEach
(
x
=>
{
x
.
SortNum
=
Convert
.
ToDouble
(
x
.
ChapterNo
);
});
cList
.
OrderBy
(
x
=>
x
.
SortNum
).
ToList
().
ForEach
(
x
=>
cList
.
OrderBy
(
x
=>
x
.
SortNum
).
ToList
().
ForEach
(
x
=>
{
{
...
@@ -3828,10 +3827,10 @@ namespace Edu.Module.Course
...
@@ -3828,10 +3827,10 @@ namespace Edu.Module.Course
Rlist
.
Add
(
new
Rlist
.
Add
(
new
{
{
StudyID
=
studentStudyModel
?.
ID
??
0
,
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Words
=
studentStudyModel
?.
Words
??
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
Practice
=
studentStudyModel
?.
Practice
??
""
,
ReadingAloud
=
((
studentStudyModel
?.
ReadingAloud
??
0
)
>
0
)
?
studentStudyModel
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
studentStudyModel
?.
ReadingAloud
??
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
studentStudyModel
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
studentStudyModel
?.
Other
)
:
new
List
<
StudyOther
>()
,
Other
=
studentStudyModel
?.
Other
??
""
,
x
.
ChapterNo
,
x
.
ChapterNo
,
x
.
ChapterName
,
x
.
ChapterName
,
x
.
CourseRate
,
x
.
CourseRate
,
...
@@ -3847,21 +3846,18 @@ namespace Edu.Module.Course
...
@@ -3847,21 +3846,18 @@ namespace Edu.Module.Course
});
});
}
}
}
}
if
(
studyList
!=
null
&&
studyList
.
Any
(
x
=>
x
.
StudyType
==
2
))
if
(
studyList
!=
null
&&
studyList
.
Any
(
x
=>
x
.
StudyType
==
2
))
{
{
var
kaoshiList
=
studyList
.
Where
(
x
=>
x
.
StudyType
==
2
).
ToList
();
var
kaoshiList
=
studyList
.
Where
(
x
=>
x
.
StudyType
==
2
).
ToList
();
Rlist
.
AddRange
(
kaoshiList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
Rlist
.
AddRange
(
kaoshiList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
{
{
CourseRateName
=
(
courseModel
?.
CourseId
??
0
)
>
0
?
courseModel
?.
CourseRate
.
ToName
()
:
""
,
CourseRateName
=
(
courseModel
?.
CourseId
??
0
)
>
0
?
courseModel
?.
CourseRate
.
ToName
()
:
""
,
StudyID
=
x
?.
ID
??
0
,
StudyID
=
x
?.
ID
??
0
,
StudyType
=
x
.
StudyType
,
StudyType
=
x
.
StudyType
,
Words
=
((
x
?.
Words
??
0
)
>
0
)
?
x
?.
Words
.
ToString
(
"F2"
)
:
""
,
Words
=
x
?.
Words
??
""
,
Practice
=
((
x
?.
Practice
??
0
)
>
0
)
?
x
?.
Practice
.
ToString
(
"F2"
)
:
""
,
Practice
=
x
?.
Practice
??
""
,
ReadingAloud
=
((
x
?.
ReadingAloud
??
0
)
>
0
)
?
x
?.
ReadingAloud
.
ToString
(
"F2"
)
:
""
,
ReadingAloud
=
x
?.
ReadingAloud
??
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
x
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
x
?.
Other
)
:
new
List
<
StudyOther
>()
,
Other
=
x
?.
Other
??
""
,
ChapterNo
=
""
,
ChapterNo
=
""
,
ChapterName
=
""
,
ChapterName
=
""
,
CourseRate
=
""
,
CourseRate
=
""
,
...
@@ -3875,8 +3871,6 @@ namespace Edu.Module.Course
...
@@ -3875,8 +3871,6 @@ namespace Edu.Module.Course
return
Rlist
;
return
Rlist
;
}
}
/// <summary>
/// <summary>
/// 获取学员学习情况
/// 获取学员学习情况
/// </summary>
/// </summary>
...
@@ -3891,11 +3885,11 @@ namespace Edu.Module.Course
...
@@ -3891,11 +3885,11 @@ namespace Edu.Module.Course
Rlist
.
AddRange
(
studyList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
Rlist
.
AddRange
(
studyList
.
OrderBy
(
x
=>
x
.
CreateTime
).
Select
(
x
=>
new
{
{
StudyID
=
x
?.
ID
??
0
,
StudyID
=
x
?.
ID
??
0
,
StudyType
=
x
.
StudyType
,
x
.
StudyType
,
Words
=
0
,
Words
=
""
,
Practice
=
0
,
Practice
=
""
,
ReadingAloud
=
0
,
ReadingAloud
=
""
,
Other
=
!
string
.
IsNullOrWhiteSpace
(
x
?.
Other
)
?
JsonHelper
.
DeserializeObject
<
List
<
StudyOther
>>(
x
?.
Other
)
:
new
List
<
StudyOther
>()
,
Other
=
x
?.
Other
??
""
,
ChapterNo
=
""
,
ChapterNo
=
""
,
ChapterName
=
""
,
ChapterName
=
""
,
CourseRate
=
""
,
CourseRate
=
""
,
...
@@ -3936,10 +3930,7 @@ namespace Edu.Module.Course
...
@@ -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
});
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
});
SkipList
=
scroll_SkipCourseRepository
.
GetList
(
new
RB_Scroll_SkipCourse_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
CourseId
=
demodel
.
CourseId
,
StuId
=
demodel
.
StuId
});
}
}
return
ogList
;
return
ogList
;
}
}
...
@@ -4108,7 +4099,6 @@ namespace Edu.Module.Course
...
@@ -4108,7 +4099,6 @@ namespace Edu.Module.Course
});
});
}
}
}
}
return
Rlist
;
return
Rlist
;
}
}
#
endregion
#
endregion
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
7c8605d3
...
@@ -1271,52 +1271,53 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1271,52 +1271,53 @@ namespace Edu.WebApi.Controllers.Course
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
,
0
),
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
,
0
),
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
,
0
),
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
,
0
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
),
Words
=
base
.
ParmJObj
.
GetDecimal
(
"Words"
),
Words
=
base
.
ParmJObj
.
GetStringValue
(
"Words"
),
Practice
=
base
.
ParmJObj
.
GetDecimal
(
"Practice"
),
Practice
=
base
.
ParmJObj
.
GetStringValue
(
"Practice"
),
ReadingAloud
=
base
.
ParmJObj
.
GetDecimal
(
"ReadingAloud"
),
ReadingAloud
=
base
.
ParmJObj
.
GetStringValue
(
"ReadingAloud"
),
Other
=
base
.
ParmJObj
.
GetStringValue
(
"Other"
),
StudyValue
=
base
.
ParmJObj
.
GetStringValue
(
"StudyValue"
),
StudyValue
=
base
.
ParmJObj
.
GetStringValue
(
"StudyValue"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
),
};
};
string
other
=
base
.
ParmJObj
.
GetStringValue
(
"Other"
);
//
string other = base.ParmJObj.GetStringValue("Other");
List
<
StudyOther
>
otherList
=
new
List
<
StudyOther
>();
//
List<StudyOther> otherList = new List<StudyOther>();
if
(!
string
.
IsNullOrWhiteSpace
(
other
))
//
if (!string.IsNullOrWhiteSpace(other))
{
//
{
JArray
otherListArray
=
JArray
.
Parse
(
other
);
//
JArray otherListArray = JArray.Parse(other);
if
(
otherListArray
!=
null
&&
otherListArray
.
Count
>
0
)
//
if (otherListArray != null && otherListArray.Count > 0)
{
//
{
foreach
(
var
jItem
in
otherListArray
)
//
foreach (var jItem in otherListArray)
{
//
{
JObject
jobj
=
JObject
.
Parse
(
JsonHelper
.
Serialize
(
jItem
));
//
JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem));
string
score
=
jobj
.
GetStringValue
(
"Score"
);
//
string score = jobj.GetStringValue("Score");
string
name
=
jobj
.
GetStringValue
(
"Name"
);
//
string name = jobj.GetStringValue("Name");
if
(!
string
.
IsNullOrWhiteSpace
(
name
)
||
!
string
.
IsNullOrWhiteSpace
(
score
))
//
if (!string.IsNullOrWhiteSpace(name) || !string.IsNullOrWhiteSpace(score))
{
//
{
decimal
rScore
=
0
;
//
decimal rScore = 0;
try
//
try
{
//
{
rScore
=
!
string
.
IsNullOrWhiteSpace
(
score
)
?
Convert
.
ToDecimal
(
score
)
:
0
;
//
rScore = !string.IsNullOrWhiteSpace(score) ? Convert.ToDecimal(score) : 0;
}
//
}
catch
(
Exception
ex
)
//
catch (Exception ex)
{
//
{
rScore
=
0
;
//
rScore = 0;
}
//
}
otherList
.
Add
(
new
StudyOther
//
otherList.Add(new StudyOther
{
//
{
Name
=
name
,
//
Name = name,
Score
=
rScore
,
//
Score = rScore,
});
//
});
}
//
}
}
//
}
}
//
}
}
//
}
if
(
otherList
!=
null
&&
otherList
.
Any
())
//
if (otherList != null && otherList.Any())
{
//
{
demodel
.
Other
=
JsonHelper
.
Serialize
(
otherList
);
//
demodel.Other = JsonHelper.Serialize(otherList);
}
//
}
else
//
else
{
//
{
demodel
.
Other
=
""
;
//
demodel.Other = "";
}
//
}
if
(
demodel
.
ID
==
0
)
if
(
demodel
.
ID
==
0
)
{
{
demodel
.
CreateTime
=
DateTime
.
Now
;
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