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
13ea5b90
Commit
13ea5b90
authored
Sep 14, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约课调整
parent
7c389634
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
15 deletions
+48
-15
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+48
-15
No files found.
Edu.Module.Course/ClassModule.cs
View file @
13ea5b90
...
...
@@ -3929,8 +3929,8 @@ namespace Edu.Module.Course
//约课
appointList
.
Where
(
x
=>
x
.
Date
==
ClassDate
).
GroupBy
(
x
=>
new
{
x
.
Date
,
x
.
TeacherId
,
x
.
TeacherName
,
x
.
RoomId
,
x
.
RoomName
,
x
.
CourseName
,
x
.
CourseGradeNo
,
x
.
CourseGradeId
,
x
.
CourseSTime
}).
OrderBy
(
x
=>
x
.
Key
.
CourseSTime
).
ToList
().
ForEach
(
item
=>
{
//上课时段
string
STime
=
item
.
FirstOrDefault
().
CourseSTime
??
""
,
ETime
=
item
.
FirstOrDefault
().
CourseETime
??
""
;
//上课时段
string
STime
=
item
.
FirstOrDefault
().
CourseSTime
??
""
,
ETime
=
item
.
FirstOrDefault
().
CourseETime
??
""
;
var
currentDate
=
Common
.
ConvertHelper
.
FormatDate
(
ClassDate
)
+
" "
+
STime
;
subList
.
Add
(
new
...
...
@@ -4111,11 +4111,11 @@ namespace Edu.Module.Course
}
}
if
(
learnList
!=
null
&&
learnList
.
Count
>
0
)
if
(
learnList
!=
null
&&
learnList
.
Count
>
0
)
{
courseIdList
.
AddRange
(
learnList
);
}
if
(
tempCourseIdList
!=
null
&&
tempCourseIdList
.
Count
>
0
)
if
(
tempCourseIdList
!=
null
&&
tempCourseIdList
.
Count
>
0
)
{
courseIdList
.
AddRange
(
tempCourseIdList
);
}
...
...
@@ -4126,7 +4126,7 @@ namespace Edu.Module.Course
{
CourseIds
=
string
.
Join
(
","
,
courseIdList
.
Distinct
())
});
;
courseList
=
courseRepository
.
GetCourseListRepository
(
new
RB_Course_ViewModel
()
{
QCourseIds
=
string
.
Join
(
","
,
courseIdList
.
Distinct
())
});
courseList
=
courseRepository
.
GetCourseListRepository
(
new
RB_Course_ViewModel
()
{
QCourseIds
=
string
.
Join
(
","
,
courseIdList
.
Distinct
())
});
}
}
...
...
@@ -4210,7 +4210,6 @@ namespace Edu.Module.Course
x
.
CourseSTime
,
x
.
ChapterNo
,
x
.
State
,
//x.CourseGradeNo,
})
.
OrderBy
(
x
=>
x
.
Key
.
CourseSTime
).
ToList
();
foreach
(
var
item
in
tempAppointList
)
...
...
@@ -4219,7 +4218,7 @@ namespace Edu.Module.Course
string
STime
=
item
.
FirstOrDefault
().
CourseSTime
??
""
,
ETime
=
item
.
FirstOrDefault
().
CourseETime
??
""
;
var
subAppointList
=
appointList
.
Where
(
qitem
=>
qitem
.
Date
==
item
.
Key
.
Date
&&
qitem
.
AccountId
==
item
.
Key
.
AccountId
&&
qitem
.
AccountId
==
item
.
Key
.
AccountId
&&
qitem
.
TeacherId
==
item
.
Key
.
TeacherId
&&
qitem
.
TeacherName
==
item
.
Key
.
TeacherName
&&
qitem
.
RoomId
==
item
.
Key
.
RoomId
&&
...
...
@@ -4250,24 +4249,58 @@ namespace Edu.Module.Course
{
if
(
sItem
.
CourseChapterNo
>
0
)
{
FinishChapterNoName
=
string
.
Format
(
"
第{0}次课"
,
sItem
.
CourseChapterNo
);
FinishChapterNoName
=
string
.
Format
(
"
{0}-第{1}次课"
,
sItem
.
CourseGradeId
.
ToName
()
,
sItem
.
CourseChapterNo
);
}
else
{
FinishChapterNoName
=
"暂无"
;
}
CourseChapterNoName
=
string
.
Format
(
"
第{0}次课"
,
sItem
.
CourseGradeNo
);
CourseChapterNoName
=
string
.
Format
(
"
{0}-第{1}次课"
,
sItem
.
CourseGradeId
.
ToName
()
,
sItem
.
CourseGradeNo
);
}
else
{
FinishChapterNoName
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
CourseRate
==
sItem
.
CourseGradeId
&&
qitem
.
ChapterNo
==
sItem
.
CourseChapterNo
.
ToString
())?.
ChapterName
;
CourseChapterNoName
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
CourseRate
==
sItem
.
CourseGradeId
&&
qitem
.
ChapterNo
==
sItem
.
CourseGradeNo
.
ToString
())?.
ChapterName
;
var
chapterFinish
=
new
RB_Course_Chapter_ViewModel
();
var
chapterCurrent
=
new
RB_Course_Chapter_ViewModel
();
//新订单
if
(
tempOrderCourse
!=
null
&&
tempOrderCourse
.
Count
>
0
)
{
chapterFinish
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
CourseRate
==
sItem
.
CourseGradeId
&&
qitem
.
ChapterNo
==
sItem
.
CourseChapterNo
.
ToString
());
chapterCurrent
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
CourseRate
==
sItem
.
CourseGradeId
&&
qitem
.
ChapterNo
==
sItem
.
CourseGradeNo
.
ToString
());
}
//老订单
else
{
chapterFinish
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
ChapterNo
==
sItem
.
CourseChapterNo
.
ToString
());
chapterCurrent
=
chatperList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
sItem
.
LearnCourseId
&&
qitem
.
ChapterNo
==
sItem
.
CourseGradeNo
.
ToString
());
}
if
(
chapterFinish
!=
null
&&
chapterFinish
.
ChapterId
>
0
)
{
if
(
chapterFinish
.
ChapterName
.
Contains
(
chapterFinish
.
CourseRate
.
ToName
().
Replace
(
"课程"
,
""
)))
{
FinishChapterNoName
=
chapterFinish
.
ChapterName
;
}
else
{
FinishChapterNoName
=
chapterFinish
?.
CourseRate
.
ToName
().
Replace
(
"课程"
,
""
)
+
"-"
+
chapterFinish
.
ChapterName
;
}
}
if
(
chapterCurrent
!=
null
&&
chapterCurrent
.
ChapterId
>
0
)
{
if
(
chapterCurrent
.
ChapterName
.
Contains
(
chapterCurrent
.
CourseRate
.
ToName
().
Replace
(
"课程"
,
""
)))
{
CourseChapterNoName
=
chapterCurrent
?.
ChapterName
;
}
else
{
CourseChapterNoName
=
chapterCurrent
?.
CourseRate
.
ToName
().
Replace
(
"课程"
,
""
)
+
"-"
+
chapterCurrent
?.
ChapterName
;
}
}
}
if
(
sItem
.
StuName
==
"
曹时锟
"
)
if
(
sItem
.
StuName
==
"
韩梦逸
"
)
{
string
str
=
""
;
}
appointGuestList
.
Add
(
new
{
GuestName
=
sItem
.
StuName
,
...
...
@@ -4290,7 +4323,7 @@ namespace Edu.Module.Course
}
var
tempChatper
=
chatperList
?.
Where
(
qitem
=>
qitem
.
CourseId
==
item
.
Key
.
CourseId
&&
qitem
.
ChapterNo
==
item
.
Key
.
ChapterNo
.
ToString
())?.
FirstOrDefault
();
string
ChapterName
=
""
;
int
CourseGradeId
=
0
;
if
(
tempChatper
!=
null
)
{
...
...
@@ -4327,7 +4360,7 @@ namespace Edu.Module.Course
StartTime
=
STime
,
EndTime
=
ETime
,
CompleteProgress
=
-
1
,
GuestList
=
appointGuestList
,
GuestList
=
appointGuestList
,
AppointState
=
item
.
Where
(
x
=>
x
.
State
==
CourseAppointStateEnum
.
WaitSure
).
Any
()
?
1
:
2
,
item
.
Key
.
ShiftSort
,
EnrollNum
=
item
.
Count
(),
...
...
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