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
0b61890a
Commit
0b61890a
authored
May 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ab3d4a2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+13
-8
No files found.
Edu.Module.Course/ScrollClassModule.cs
View file @
0b61890a
...
...
@@ -3371,8 +3371,9 @@ namespace Edu.Module.Course
var
cList
=
course_ChapterRepository
.
GetChapterListRepository
(
new
RB_Course_Chapter_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
CourseId
=
item
.
CourseId
});
if
(
item
.
ClassScrollType
==
2
)
{
var
achildList
=
AppointList
.
Where
(
x
=>
x
.
GuestId
==
ogModel
.
GuestId
).
ToList
();
//当前课程的
//预约课
int
CourseChapterNo
=
AppointList
.
Any
()
?
Appoint
List
.
Max
(
x
=>
x
.
ChapterNo
)
:
0
;
int
CourseChapterNo
=
achildList
.
Any
()
?
achild
List
.
Max
(
x
=>
x
.
ChapterNo
)
:
0
;
int
CourseChapterNo2
=
SkipList
.
Any
()?
SkipList
.
Max
(
x
=>
x
.
ChapterNo
)
:
0
;
CourseChapterNo
=
CourseChapterNo
<
CourseChapterNo2
?
CourseChapterNo2
:
CourseChapterNo
;
cList
.
ForEach
(
x
=>
...
...
@@ -3381,13 +3382,15 @@ namespace Edu.Module.Course
});
cList
.
Where
(
x
=>
x
.
SortNum
<=
CourseChapterNo
).
OrderByDescending
(
x
=>
x
.
SortNum
).
ToList
().
ForEach
(
x
=>
{
var
AppointModel
=
Appoint
List
.
Where
(
y
=>
y
.
ChapterNo
==
x
.
SortNum
&&
y
.
AppointType
!=
3
&&
y
.
LearnCourseId
==
item
.
CourseId
).
FirstOrDefault
();
var
AppointModel
=
achild
List
.
Where
(
y
=>
y
.
ChapterNo
==
x
.
SortNum
&&
y
.
AppointType
!=
3
&&
y
.
LearnCourseId
==
item
.
CourseId
).
FirstOrDefault
();
var
SkipModel
=
SkipList
.
Where
(
y
=>
y
.
ChapterNo
==
x
.
SortNum
&&
y
.
CourseId
==
item
.
CourseId
).
FirstOrDefault
();
int
AgainNum
=
Appoint
List
.
Where
(
y
=>
y
.
ChapterNo
==
x
.
SortNum
&&
y
.
AppointType
==
3
&&
y
.
LearnCourseId
==
item
.
CourseId
).
Count
();
int
AgainNum
=
achild
List
.
Where
(
y
=>
y
.
ChapterNo
==
x
.
SortNum
&&
y
.
AppointType
==
3
&&
y
.
LearnCourseId
==
item
.
CourseId
).
Count
();
int
State
=
3
;
int
AppointState
=
0
;
string
ClassDate
=
""
;
if
(
AppointModel
!=
null
)
{
ClassDate
=
AppointModel
.
Date
.
ToString
(
"yyyy-MM-dd HH:mm"
);
//正常约课
if
(
AppointModel
.
AppointType
==
1
)
{
...
...
@@ -3412,7 +3415,8 @@ namespace Edu.Module.Course
x
.
ChapterGradeNo
,
State
,
AppointState
,
AgainNum
AgainNum
,
ClassDate
});
});
}
...
...
@@ -3420,7 +3424,7 @@ namespace Edu.Module.Course
//跟班
int
CourseChapterNo
=
oguestModel
?.
CourseChapterNo
??
0
;
cList
.
ForEach
(
x
=>
{
x
.
SortNum
=
Convert
.
ToDouble
(
x
.
ChapterNo
);
});
ChapterList
.
AddRange
(
cList
.
Where
(
x
=>
x
.
SortNum
<=
CourseChapterNo
).
OrderByDescending
(
x
=>
x
.
SortNum
).
Select
(
x
=>
new
ChapterList
.
AddRange
(
cList
.
Where
(
x
=>
x
.
SortNum
<=
CourseChapterNo
).
OrderByDescending
(
x
=>
x
.
SortNum
).
Select
(
x
=>
new
{
x
.
ChapterNo
,
x
.
ChapterName
,
...
...
@@ -3429,7 +3433,8 @@ namespace Edu.Module.Course
x
.
ChapterGradeNo
,
State
=
1
,
AppointState
=
3
,
AgainNum
=
0
AgainNum
=
0
,
ClassDate
=
""
}));
}
Rlist
.
Add
(
new
...
...
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