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
00c2c71c
Commit
00c2c71c
authored
Jul 21, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人头奖励修改
parent
30d45433
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
RB_Order_ViewModel.cs
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
+5
-0
EmployeeBonusModule.cs
Edu.Module.Course/EmployeeBonusModule.cs
+19
-3
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+2
-2
No files found.
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
View file @
00c2c71c
...
...
@@ -344,5 +344,10 @@ namespace Edu.Model.ViewModel.Sell
/// 返佣总金额 (rb_order_returncomission)
/// </summary>
public
decimal
BrokerageMoney
{
get
;
set
;
}
/// <summary>
/// 订单学员编号
/// </summary>
public
int
Student_Id
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/EmployeeBonusModule.cs
View file @
00c2c71c
...
...
@@ -363,8 +363,17 @@ namespace Edu.Module.Course
/// <param name="saleId"></param>
private
void
CalcPersionBonusModule
(
RB_Personnel_Period
period
,
RB_Bonus_PlanExtend
item
,
int
GroupId
,
string
startDate
,
string
endDate
,
int
saleId
)
{
if
(
saleId
==
3478
)
{
string
str
=
""
;
}
var
orderList
=
GetSaleOrderList
(
item
,
GroupId
,
startDate
,
endDate
,
saleId
,
out
List
<
RB_Order_ViewModel
>
allOrderList
,
out
int
IsOpenOrder
);
var
curNum
=
orderList
?.
Where
(
qitem
=>
!
item
.
NotUseCourseIds
.
Contains
(
qitem
.
CourseId
.
ToString
())).
Sum
(
qitem
=>
qitem
.
GuestNum
)
??
0
;
var
tempOrderList
=
orderList
?.
Where
(
qitem
=>
!
item
.
NotUseCourseIds
.
Contains
(
qitem
.
CourseId
.
ToString
()))?.
ToList
();
var
numList
=
tempOrderList
?.
GroupBy
(
qitem
=>
new
{
qitem
.
Student_Id
})
?.
Select
(
qitem
=>
new
{
qitem
.
Key
.
Student_Id
})
;
var
curNum
=
numList
?.
Count
()
??
0
;
var
curOrderMoney
=
orderList
?.
Where
(
qitem
=>!
item
.
NotUseCourseIds
.
Contains
(
qitem
.
CourseId
.
ToString
())).
Sum
(
qitem
=>
qitem
.
OrderMoney
)
??
0
;
//查询未平账的人员
...
...
@@ -567,13 +576,14 @@ namespace Edu.Module.Course
//按照年份、月份统计订单人数和金额
var
groupList
=
orderList
.
GroupBy
(
qitem
=>
new
{
qitem
.
CreateTime
.
Year
,
qitem
.
CreateTime
.
Month
,
qitem
.
CourseId
,
})
.
GroupBy
(
qitem
=>
new
{
qitem
.
CreateTime
.
Year
,
qitem
.
CreateTime
.
Month
,
qitem
.
CourseId
,
qitem
.
Student_Id
})
.
Select
(
qitem
=>
new
{
qitem
.
Key
.
Year
,
qitem
.
Key
.
Month
,
qitem
.
Key
.
CourseId
,
GuestNum
=
qitem
.
Sum
(
s
=>
s
.
GuestNum
),
qitem
.
Key
.
Student_Id
,
GuestNum
=
qitem
.
Count
(),
OrderMoney
=
qitem
.
Sum
(
s
=>
s
.
Income
-
s
.
Refund
-
s
.
PlatformTax
)
});
...
...
@@ -584,6 +594,7 @@ namespace Edu.Module.Course
Year
=
gItem
.
Year
,
Month
=
gItem
.
Month
,
GuestNum
=
gItem
.
GuestNum
,
Student_Id
=
gItem
.
Student_Id
,
OrderMoney
=
gItem
.
OrderMoney
,
CourseId
=
gItem
.
CourseId
,
});
...
...
@@ -964,6 +975,11 @@ namespace Edu.Module.Course
/// </summary>
public
int
Month
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
Student_Id
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
00c2c71c
...
...
@@ -1261,8 +1261,8 @@ group by o.OrderId
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT o.*
FROM rb_order o
SELECT o.*
,B.Student_Id
FROM rb_order o
INNER JOIN rb_student_orderguest AS B ON o.OrderId=B.OrderId
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND o.OrderState IN({0}) "
,
(
int
)
OrderStateEnum
.
Normal
);
...
...
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