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
6fc40df9
Commit
6fc40df9
authored
Mar 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
8d176991
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
29 deletions
+52
-29
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+43
-24
RB_OrderRepository.cs
Edu.Repository/Course/RB_OrderRepository.cs
+4
-0
CourseOfferController.cs
Edu.WebApi/Controllers/Course/CourseOfferController.cs
+0
-1
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+5
-4
No files found.
Edu.Module.Course/OrderModule.cs
View file @
6fc40df9
...
...
@@ -674,50 +674,69 @@ namespace Edu.Module.Course
#
endregion
#
region
班级订单
#
region
班级
或留学产品
订单
/// <summary>
///
获取班级订单列表
///
班级或留学产品订单
/// </summary>
/// <param name="classId"></param>
/// <param name="classId">
班级编号
</param>
/// <param name="groupId"></param>
/// <param name="SourceId">留学就业产品编号</param>
/// <param name="ClassInfo"></param>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetClassOrderList
(
int
classId
,
int
groupId
,
out
object
ClassInfo
)
public
List
<
RB_Order_ViewModel
>
GetClassOrderList
(
int
classId
,
int
groupId
,
int
SourceId
,
out
object
ClassInfo
)
{
var
cModel
=
classRepository
.
GetEntity
(
classId
);
if
(
cModel
==
null
)
{
ClassInfo
=
new
{
};
return
new
List
<
RB_Order_ViewModel
>();
ClassInfo
=
new
{
};
//获取订单列表
var
orderList
=
new
List
<
RB_Order_ViewModel
>();
if
(
classId
>
0
)
{
var
cModel
=
classRepository
.
GetEntity
(
classId
);
if
(
cModel
==
null
)
{
return
new
List
<
RB_Order_ViewModel
>();
}
//获取班级教师
var
tModel
=
teacherRepository
.
GetEntity
(
cModel
.
Teacher_Id
);
var
zModel
=
assistRepository
.
GetEntity
(
cModel
.
Assist_Id
);
ClassInfo
=
new
{
cModel
.
ClassName
,
tModel
?.
TeacherName
,
tModel
?.
TeacherIcon
,
zModel
?.
AssistName
,
zModel
?.
AssistIcon
};
}
else
if
(
SourceId
>
0
)
{
var
studyModel
=
studyAbroadRepository
.
GetEntity
(
SourceId
);
if
(
studyModel
!=
null
&&
studyModel
.
Id
>
0
)
{
ClassInfo
=
new
{
StudyName
=
studyModel
.
Name
,
};
}
}
//获取班级教师
var
tModel
=
teacherRepository
.
GetEntity
(
cModel
.
Teacher_Id
);
var
zModel
=
assistRepository
.
GetEntity
(
cModel
.
Assist_Id
);
//获取订单列表
var
orderList
=
orderRepository
.
GetList
(
new
RB_Order_ViewModel
()
{
Group_Id
=
groupId
,
ClassId
=
classId
});
if
(
orderList
.
Any
())
{
orderList
=
orderRepository
.
GetList
(
new
RB_Order_ViewModel
()
{
Group_Id
=
groupId
,
ClassId
=
classId
,
SourceId
=
SourceId
});
if
(
orderList
.
Any
())
{
string
orderIds
=
string
.
Join
(
","
,
orderList
.
Select
(
x
=>
x
.
OrderId
));
//获取备注列表
var
remarkList
=
order_RemarkRepository
.
GetList
(
new
RB_Order_Remark_ViewModel
()
{
},
orderIds
);
//获取名单列表
var
guestList
=
order_GuestRepository
.
GetList
(
new
RB_Order_Guest_ViewModel
()
{
OrderIds
=
orderIds
});
foreach
(
var
item
in
orderList
)
{
foreach
(
var
item
in
orderList
)
{
item
.
SaleRemarkList
=
remarkList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
&&
x
.
Type
==
1
).
ToList
();
item
.
TeacherRemarkList
=
remarkList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
&&
x
.
Type
==
2
).
ToList
();
item
.
RectorRemarkList
=
remarkList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
&&
x
.
Type
==
3
).
ToList
();
item
.
DirectorRemarkList
=
remarkList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
&&
x
.
Type
==
4
).
ToList
();
item
.
GuestList
=
guestList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
}
}
ClassInfo
=
new
{
cModel
.
ClassName
,
tModel
?.
TeacherName
,
tModel
?.
TeacherIcon
,
zModel
?.
AssistName
,
zModel
?.
AssistIcon
};
return
orderList
;
}
...
...
Edu.Repository/Course/RB_OrderRepository.cs
View file @
6fc40df9
...
...
@@ -39,6 +39,10 @@ namespace Edu.Repository.Course
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
SourceId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
SourceId
)}
=
{
demodel
.
SourceId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
ClassId
)}
in(
{
demodel
.
ClassIds
}
)"
;
...
...
Edu.WebApi/Controllers/Course/CourseOfferController.cs
View file @
6fc40df9
...
...
@@ -346,7 +346,6 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
if
(!
string
.
IsNullOrEmpty
(
message
))
{
return
ApiResult
.
ParamIsNull
(
message
:
message
[
1.
.]);
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
6fc40df9
...
...
@@ -113,7 +113,7 @@ namespace Edu.WebApi.Controllers.Course
#
region
订单管理
/// <summary>
/// 获取班级订单列表
/// 获取班级
/留学就业
订单列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
...
...
@@ -122,11 +122,12 @@ namespace Edu.WebApi.Controllers.Course
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
var
userInfo
=
base
.
UserInfo
;
int
ClassId
=
parms
.
GetInt
(
"ClassId"
,
0
);
if
(
ClassId
<=
0
)
{
int
SourceId
=
parms
.
GetInt
(
"SourceId"
,
0
);
if
(
ClassId
<=
0
&&
SourceId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
orderList
=
orderModule
.
GetClassOrderList
(
ClassId
,
userInfo
.
Group_Id
,
out
object
ClassInfo
);
var
orderList
=
orderModule
.
GetClassOrderList
(
ClassId
,
userInfo
.
Group_Id
,
SourceId
,
out
object
ClassInfo
);
return
ApiResult
.
Success
(
""
,
new
{
ClassInfo
,
...
...
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