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
4b0168a4
Commit
4b0168a4
authored
Jul 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d60ffd92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
67 deletions
+18
-67
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+16
-67
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+2
-0
No files found.
Edu.Module.Course/OrderModule.cs
View file @
4b0168a4
...
...
@@ -1161,73 +1161,8 @@ namespace Edu.Module.Course
}
}
//获取订单列表
orderList
=
orderRepository
.
GetOrderListRepository
(
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
.
GetOrderRemarkListRepository
(
new
RB_Order_Remark_ViewModel
()
{
QOrderIds
=
orderIds
});
//获取名单列表
var
guestList
=
order_GuestRepository
.
GetOrderGuestListRepository
(
new
RB_Order_Guest_ViewModel
()
{
OrderIds
=
orderIds
});
//获取合同列表
var
clist
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
groupId
,
OrderIds
=
orderIds
,
Status
=
-
1
}).
Where
(
x
=>
x
.
Status
!=
4
).
ToList
();
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
();
if
(
item
.
GuestList
!=
null
&&
item
.
GuestList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
GuestList
)
{
var
contractModel
=
clist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
&&
x
.
GuestId
==
subItem
.
Id
)?.
FirstOrDefault
();
subItem
.
ContractId
=
contractModel
?.
Id
??
0
;
subItem
.
ContractNo
=
contractModel
?.
ContractNo
??
""
;
subItem
.
ContractStatus
=
contractModel
?.
Status
??
-
1
;
string
ContractStatusStr
=
""
;
if
(
subItem
.
ContractStatus
==
0
)
{
ContractStatusStr
=
"草稿"
;
}
else
if
(
subItem
.
ContractStatus
==
1
)
{
ContractStatusStr
=
"提交审核"
;
}
else
if
(
subItem
.
ContractStatus
==
2
)
{
ContractStatusStr
=
"审核通过"
;
}
else
if
(
subItem
.
ContractStatus
==
3
)
{
ContractStatusStr
=
"驳回"
;
}
else
if
(
subItem
.
ContractStatus
==
4
)
{
ContractStatusStr
=
"取消"
;
}
subItem
.
ContractStatusStr
=
ContractStatusStr
;
}
}
item
.
ContractList
=
clist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
var
ZList
=
item
.
GuestList
.
Where
(
x
=>
!
item
.
ContractList
.
Select
(
z
=>
z
.
GuestId
).
Contains
(
x
.
Id
)).
ToList
();
if
(
ZList
.
Any
()
&&
item
.
ContractList
.
Any
())
{
foreach
(
var
qitem
in
ZList
)
{
item
.
ContractList
.
Add
(
new
RB_Education_Contract_ViewModel
()
{
Id
=
0
,
StudentName
=
qitem
.
GuestName
,
ContractNo
=
""
,
GuestId
=
qitem
.
Id
,
Status
=
0
});
}
}
}
}
var
query
=
new
RB_Order_ViewModel
()
{
Group_Id
=
groupId
,
ClassId
=
classId
,
SourceId
=
SourceId
};
orderList
=
OrderPageModule
(
1
,
100000
,
out
_
,
query
);
return
orderList
;
}
...
...
@@ -2035,6 +1970,7 @@ namespace Edu.Module.Course
#
endregion
#
region
销售中心
/// <summary>
/// 获取我的订单列表
/// </summary>
...
...
@@ -2044,6 +1980,19 @@ namespace Edu.Module.Course
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetMyOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Order_ViewModel
demodel
)
{
return
OrderPageModule
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
}
/// <summary>
/// 获取订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
private
List
<
RB_Order_ViewModel
>
OrderPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Order_ViewModel
demodel
)
{
//获取订单列表
var
orderList
=
orderRepository
.
GetOrderPageRepository
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
4b0168a4
...
...
@@ -265,6 +265,8 @@ namespace Edu.WebApi.Controllers.Course
z
.
GuestStateStr
,
z
.
ContractNo
,
z
.
ContractId
,
z
.
ContractStatus
,
z
.
ContractStatusStr
,
}),
ContractList
=
x
.
ContractList
.
Select
(
z
=>
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