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
3158a807
Commit
3158a807
authored
Dec 11, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日语培训 调整
parent
4a69f56a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
RB_Class_Plan_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
+1
-1
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+14
-11
No files found.
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
View file @
3158a807
...
...
@@ -41,7 +41,7 @@ namespace Edu.Model.ViewModel.Course
/// <summary>
/// 周几
/// </summary>
public
string
WeekDay
{
get
;
set
;
}
public
int
WeekDay
{
get
;
set
;
}
/// <summary>
/// 班级对应的老师id
...
...
Edu.Module.Course/OrderModule.cs
View file @
3158a807
...
...
@@ -97,33 +97,36 @@ namespace Edu.Module.Course
string
classIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
ClassId
));
//查询阶梯价格
var
stepList
=
class_StepPriceRepository
.
GetClassStepPriceListRepository
(
new
RB_Class_StepPrice_ViewModel
()
{
QClassIds
=
classIds
});
//查询课程安排
List
<
RB_Class_Plan_ViewModel
>
PlanWeek
=
new
List
<
RB_Class_Plan_ViewModel
>();
List
<
RB_Class_Plan_ViewModel
>
PlanFixed
=
new
List
<
RB_Class_Plan_ViewModel
>();
string
k1classIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
Week
||
x
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
Month
).
Select
(
x
=>
x
.
ClassId
));
if
(!
string
.
IsNullOrEmpty
(
k1classIds
))
{
PlanWeek
=
class_PlanRepository
.
GetClassPlanForProduct
(
k1classIds
);
}
string
k2classIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
FixedDate
).
Select
(
x
=>
x
.
ClassId
));
if
(!
string
.
IsNullOrEmpty
(
k2classIds
))
{
PlanFixed
=
class_PlanRepository
.
GetClassPlanListRepository
(
new
RB_Class_Plan_ViewModel
()
{
QClassIds
=
k2classIds
});
}
//查询课程时间
var
TimeList
=
class_TimeRepository
.
GetClassTimeForProduct
(
classIds
);
foreach
(
var
item
in
list
)
{
item
.
ClassStepPriceList
=
stepList
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
).
OrderBy
(
x
=>
x
.
PersionNum
).
ToList
();
item
.
ClassTimeList
=
new
List
<
RB_Class_Time_ViewModel
>();
if
(
item
.
ClassStyle
!=
Common
.
Enum
.
Course
.
ClassStyleEnum
.
OnLine
)
{
item
.
ClassTimeList
=
TimeList
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
).
OrderBy
(
x
=>
x
.
StartTime
).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
item
.
DefaultTimeJson
))
{
item
.
ClassTimeList
=
JsonHelper
.
DeserializeObject
<
List
<
RB_Class_Time_ViewModel
>>(
item
.
DefaultTimeJson
);
}
}
item
.
ClassPlanList
=
new
List
<
RB_Class_Plan_ViewModel
>();
if
(
item
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
Week
||
item
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
Month
)
{
item
.
ClassPlanList
=
PlanWeek
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
item
.
DateJson
))
{
List
<
int
>
DayList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
item
.
DateJson
);
foreach
(
var
qitem
in
DayList
)
{
item
.
ClassPlanList
.
Add
(
new
RB_Class_Plan_ViewModel
()
{
WeekDay
=
qitem
});
}
}
}
else
if
(
item
.
ClassStyle
==
Common
.
Enum
.
Course
.
ClassStyleEnum
.
FixedDate
)
{
...
...
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