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
ea636e7f
Commit
ea636e7f
authored
Jul 16, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
7ddbdb59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+22
-6
No files found.
Edu.Module.Course/ClassModule.cs
View file @
ea636e7f
...
...
@@ -2095,19 +2095,35 @@ namespace Edu.Module.Course
Group_Id
=
model
.
Group_Id
});
foreach
(
var
item
in
planList
)
foreach
(
var
item
in
planList
.
OrderBy
(
x
=>
x
.
ClassDate
)
)
{
item
.
PlanTimeList
=
new
List
<
RB_Class_Time_ViewModel
>();
item
.
PlanTimeList
=
timeList
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
&&(
x
.
ClassPlanId
==
item
.
ClassPlanId
||
item
.
ClassDate
==
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
x
.
NewPlanDateTime
)))).
ToList
();
item
.
PlanTimeList
=
timeList
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
&&
(
x
.
ClassPlanId
==
item
.
ClassPlanId
||
item
.
ClassDate
==
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
x
.
NewPlanDateTime
)))).
ToList
();
foreach
(
var
itemTime
in
item
.
PlanTimeList
)
{
itemTime
.
GuestList
=
new
List
<
RB_Order_Guest_ViewModel
>();
itemTime
.
GuestList
=
orderStudentList
.
Where
(
x
=>
x
.
ClassId
==
itemTime
.
ClassId
&&
(
x
.
GuestState
==
1
||
x
.
GuestState
==
6
||
((
x
.
GuestState
==
5
||
x
.
GuestState
==
7
)
&&
x
.
ChangeEffectTime
.
HasValue
&&
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
x
.
ChangeEffectTime
))
>=
item
.
ClassDate
))).
ToList
();
var
tempList
=
orderStudentList
.
Where
(
x
=>
x
.
ClassId
==
itemTime
.
ClassId
&&
(
x
.
GuestState
==
1
||
x
.
GuestState
==
6
||
((
x
.
GuestState
==
5
||
x
.
GuestState
==
7
)
&&
x
.
ChangeEffectTime
.
HasValue
&&
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
x
.
ChangeEffectTime
))
>=
item
.
ClassDate
))).
ToList
();
foreach
(
var
sItem
in
tempList
)
{
itemTime
.
GuestList
.
Add
(
new
RB_Order_Guest_ViewModel
()
{
Id
=
sItem
.
Id
,
GuestName
=
sItem
.
GuestName
,
IsCheck
=
0
});
}
foreach
(
var
itemCheck
in
itemTime
.
GuestList
)
{
//if (itemTime.ClassTimeId == 12805 || itemTime.ClassTimeId == 12806)
//{
// var str = "";
// int IsCheck = checkList?.Where(y => y.OrderGuestId == itemCheck.Id && y.ClassTimeId == itemTime.ClassTimeId).FirstOrDefault()?.CheckStatus ?? 2;
//}
//0-正常,1-缺勤,2-未签到
itemCheck
.
IsCheck
=
(
checkList
!=
null
&&
checkList
.
Any
())
?
checkList
.
Where
(
y
=>
y
.
OrderGuestId
==
itemCheck
.
Id
&&
y
.
ClassTimeId
==
itemTime
.
ClassTimeId
).
FirstOrDefault
()?.
CheckStatus
??
2
:
2
;
itemCheck
.
IsCheck
=
checkList
?.
Where
(
y
=>
y
.
OrderGuestId
==
itemCheck
.
Id
&&
y
.
ClassTimeId
==
itemTime
.
ClassTimeId
).
FirstOrDefault
()?.
CheckStatus
??
2
;
}
}
...
...
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