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
b73438b3
Commit
b73438b3
authored
May 10, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6e8e1554
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+0
-3
RB_Scroll_AppointmentRepository.cs
Edu.Repository/Scroll/RB_Scroll_AppointmentRepository.cs
+13
-4
No files found.
Edu.Module.Course/ScrollClassModule.cs
View file @
b73438b3
...
...
@@ -3784,7 +3784,6 @@ namespace Edu.Module.Course
}
Rlist
.
Add
(
new
{
CourseRateName
=
(
courseModel
?.
CourseId
??
0
)
>
0
?
courseModel
?.
CourseRate
.
ToName
()
:
""
,
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
...
...
@@ -3809,13 +3808,11 @@ namespace Edu.Module.Course
//跟班
cList
.
ForEach
(
x
=>
{
x
.
SortNum
=
Convert
.
ToDouble
(
x
.
ChapterNo
);
});
cList
.
OrderBy
(
x
=>
x
.
SortNum
).
ToList
().
ForEach
(
x
=>
{
var
studentStudyModel
=
studyList
?.
FirstOrDefault
(
z
=>
z
.
ChapterId
==
x
.
ChapterId
&&
z
.
StudyType
==
1
);
Rlist
.
Add
(
new
{
CourseRateName
=
(
courseModel
?.
CourseId
??
0
)
>
0
?
courseModel
?.
CourseRate
.
ToName
()
:
""
,
StudyID
=
studentStudyModel
?.
ID
??
0
,
Words
=
((
studentStudyModel
?.
Words
??
0
)
>
0
)
?
studentStudyModel
?.
Words
.
ToString
(
"F2"
)
:
""
,
Practice
=
((
studentStudyModel
?.
Practice
??
0
)
>
0
)
?
studentStudyModel
?.
Practice
.
ToString
(
"F2"
)
:
""
,
...
...
Edu.Repository/Scroll/RB_Scroll_AppointmentRepository.cs
View file @
b73438b3
...
...
@@ -303,15 +303,24 @@ ORDER BY r.Id desc ";
{
where
+=
$@" and sa.
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
StuId
)}
in(
{
demodel
.
StuIds
}
)"
;
}
string
sql
=
$@"
SELECT A.*,cc.ChapterName
string
sql
=
$@"
SELECT A.*,cc.ChapterName
FROM
(
SELECT
StuId,LearnCourseId,MAX(CourseGradeNo) AS CourseGradeNo
SELECT
sat.StuId,sat.LearnCourseId,sat.CourseGradeNo from RB_Scroll_Appointment as sat INNER JOIN (SELECT StuId,MAX(Date) as Date
FROM RB_Scroll_Appointment AS sa
WHERE 1=1
{
where
}
GROUP BY StuId
,LearnCourse
Id
GROUP BY StuId
) as t on t.Date=sat.Date and t.StuId=sat.Stu
Id
) AS A LEFT JOIN rb_course_chapter as cc ON A.LearnCourseId=cc.CourseId and CONCAT(A.CourseGradeNo,'')=cc.ChapterNo "
;
// string sql = $@"
//SELECT A.*,cc.ChapterName
//FROM
//(
//SELECT StuId,LearnCourseId,MAX(CourseGradeNo) AS CourseGradeNo
//FROM RB_Scroll_Appointment AS sa
//WHERE 1=1 {where}
//GROUP BY StuId,LearnCourseId
//) AS A LEFT JOIN rb_course_chapter as cc ON A.LearnCourseId=cc.CourseId and CONCAT(A.CourseGradeNo,'')=cc.ChapterNo ";
return
Get
<
RB_Scroll_Appointment_ViewModel
>(
sql
,
parameters
).
ToList
();
}
...
...
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