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
19d6016f
Commit
19d6016f
authored
Feb 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 订单列表 业绩提成显示
parent
200a9c3c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
14 deletions
+38
-14
RB_Order_ViewModel.cs
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
+5
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+12
-1
ScrollClassCommonModule.cs
Edu.Module.Course/ScrollClassCommonModule.cs
+2
-2
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+6
-2
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+2
-2
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+11
-7
No files found.
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
View file @
19d6016f
...
...
@@ -319,5 +319,10 @@ namespace Edu.Model.ViewModel.Sell
/// 开班类型 1正常班 2滚动班
/// </summary>
public
int
ClassScrollType
{
get
;
set
;
}
/// <summary>
/// 业绩应发提成
/// </summary>
public
decimal
YFCommission
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/OrderModule.cs
View file @
19d6016f
...
...
@@ -221,6 +221,10 @@ namespace Edu.Module.Course
/// 学习目的仓储层对象
/// </summary>
private
readonly
RB_LearningGoalsRepository
learningGoalsRepository
=
new
RB_LearningGoalsRepository
();
/// <summary>
/// 业绩提成
/// </summary>
private
readonly
RB_Sell_Achievements_EmpRepository
sell_Achievements_EmpRepository
=
new
RB_Sell_Achievements_EmpRepository
();
private
readonly
RB_Order_ReturnComissionRepository
returnComissionRepository
=
new
RB_Order_ReturnComissionRepository
();
...
...
@@ -3275,7 +3279,7 @@ namespace Edu.Module.Course
//获取合同列表
var
clist
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
OrderIds
=
orderIds
,
Status
=
-
1
}).
Where
(
x
=>
x
.
Status
!=
4
).
ToList
();
//获取新的业绩提成
//
var achList = sell_Achievements_EmpRepository.GetList(new RB_Sell_Achievements_Emp_ViewModel() { Group_Id = demodel.Group_Id, OrderIds = orderIds });
var
achList
=
sell_Achievements_EmpRepository
.
GetList
(
new
RB_Sell_Achievements_Emp_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
OrderIds
=
orderIds
});
foreach
(
var
item
in
orderList
)
{
...
...
@@ -3326,6 +3330,13 @@ namespace Edu.Module.Course
subItem
.
ContractStatusStr
=
ContractStatusStr
;
}
}
var
achievementList
=
achList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
if
(
achievementList
.
Any
())
{
item
.
CommissionMoney
=
achievementList
.
Sum
(
x
=>
x
.
GiveOutMoney
);
item
.
YFCommission
=
achievementList
.
Sum
(
x
=>
x
.
PushMoney
);
}
}
}
return
orderList
;
...
...
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
19d6016f
...
...
@@ -76,7 +76,7 @@ namespace Edu.Module.Course
continue
;
}
#
region
生成班级号
string
ClassNo
=
"GD"
;
int
ClassLetterNum
=
0
;
string
ClassNo
=
"GD
KB
"
;
int
ClassLetterNum
=
0
;
////查询最大的字母
//int CNum = classRepository.GetMaxClassNoPrefix(time + "-01");
//if (CNum == 0)
...
...
@@ -272,7 +272,7 @@ namespace Edu.Module.Course
Status
=
0
,
ClassRoomId
=
item
.
Key
.
RoomId
,
Group_Id
=
groupId
,
School_Id
=
0
,
// 暂时 应该要赋值 订单上的预约校区
School_Id
=
-
1
,
// 暂时 应该要赋值 订单上的预约校区
TeacherId
=
item
.
Key
.
TeacherId
,
BeiKeStatus
=
0
,
FanKuiStatus
=
0
,
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
19d6016f
...
...
@@ -407,10 +407,14 @@ SELECT SUM(CASE WHEN o.OrderState <> 3 THEN o.PreferPrice ELSE 0 END) AS PreferP
SUM(CASE WHEN o.OrderState <> 3 THEN o.PreferPrice - o.Income + o.Refund - o.DiscountMoney - o.PlatformTax ELSE 0 END) AS DueInMoney,
SUM(CASE WHEN o.OrderState <> 3 THEN o.GuestNum ELSE 0 END) AS GuestNum,
SUM(CASE WHEN o.OrderState = 3 THEN o.GuestNum ELSE 0 END) AS CancelNum,
SUM(CASE WHEN o.CommissionMoney <> -1 AND o.OrderState <> 3 THEN o.CommissionMoney ELSE 0 END) AS CommissionMoney,
SUM(CASE WHEN ea.GiveOutMoney > 0 THEN ea.GiveOutMoney ELSE
CASE WHEN o.CommissionMoney <> -1 AND o.OrderState <> 3 THEN o.CommissionMoney ELSE 0 END END) AS CommissionMoney,
SUM(CASE WHEN o.OrderState <> 3 THEN o.ExtraRewardMoney - o.ExtraDeductMoney ELSE 0 END) AS ExtraRewardMoney
FROM RB_Order o LEFT JOIN rb_class c on o.ClassId = c.ClassId
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
LEFT JOIN (
SELECT em.OrderId,SUM(em.GiveOutMoney) as GiveOutMoney FROM rb_sell_achievements_emp em GROUP BY em.OrderId
) ea on ea.OrderId = o.OrderId
WHERE
{
where
}
"
;
return
Get
<
RB_Order_ViewModel
>(
sql
).
FirstOrDefault
();
...
...
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
19d6016f
...
...
@@ -438,9 +438,9 @@ namespace Edu.WebApi.Controllers.Applet
{
return
ApiResult
.
ParamIsNull
(
"请传递班级ID"
);
}
if
(
ClassScrollType
==
2
&&
StuId
<=
0
)
if
(
ClassScrollType
==
2
)
{
return
ApiResult
.
ParamIsNull
(
"请传递学生ID"
)
;
StuId
=
appletUserInfo
.
AccountId
;
}
//获取课程回顾
int
Day
=
7
;
//默认最近7次上课
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
19d6016f
...
...
@@ -235,12 +235,13 @@ namespace Edu.WebApi.Controllers.Course
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
)?.
AccountName
??
""
,
x
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CourseConsultantId
)?.
AccountName
??
""
,
YFCommissionMoney
=
GetOrderYFCommission
(
x
),
IsAchievements
=
x
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
x
.
YFCommission
>
0
?
x
.
YFCommission
:
GetOrderYFCommission
(
x
),
x
.
CommissionMoney
,
x
.
ExtraCommissionMoney
,
x
.
ExtraRewardMoney
,
x
.
ExtraDeductMoney
,
x
.
IsCommissionGive
,
IsCommissionGive
=
x
.
YFCommission
>
0
?
1
:
x
.
IsCommissionGive
,
x
.
CommissionBack
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
x
.
SaleRemark
,
...
...
@@ -356,7 +357,8 @@ namespace Edu.WebApi.Controllers.Course
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
)?.
AccountName
??
""
,
x
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CourseConsultantId
)?.
AccountName
??
""
,
YFCommissionMoney
=
GetOrderYFCommission
(
x
),
IsAchievements
=
x
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
x
.
YFCommission
>
0
?
x
.
YFCommission
:
GetOrderYFCommission
(
x
),
x
.
CommissionMoney
,
x
.
ExtraCommissionMoney
,
x
.
ExtraRewardMoney
,
...
...
@@ -1407,12 +1409,13 @@ namespace Edu.WebApi.Controllers.Course
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
)?.
AccountName
??
""
,
x
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CourseConsultantId
)?.
AccountName
??
""
,
YFCommissionMoney
=
GetOrderYFCommission
(
x
),
IsAchievements
=
x
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
x
.
YFCommission
>
0
?
x
.
YFCommission
:
GetOrderYFCommission
(
x
),
x
.
CommissionMoney
,
x
.
ExtraCommissionMoney
,
x
.
ExtraRewardMoney
,
x
.
ExtraDeductMoney
,
x
.
IsCommissionGive
,
IsCommissionGive
=
x
.
YFCommission
>
0
?
1
:
x
.
IsCommissionGive
,
x
.
CommissionBack
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
SaleRemark
=
x
?.
SaleRemark
??
""
,
...
...
@@ -1601,12 +1604,13 @@ namespace Edu.WebApi.Controllers.Course
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
)?.
AccountName
??
""
,
x
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CourseConsultantId
)?.
AccountName
??
""
,
YFCommissionMoney
=
GetOrderYFCommission
(
x
),
IsAchievements
=
x
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
x
.
YFCommission
>
0
?
x
.
YFCommission
:
GetOrderYFCommission
(
x
),
x
.
CommissionMoney
,
x
.
ExtraCommissionMoney
,
x
.
ExtraRewardMoney
,
x
.
ExtraDeductMoney
,
x
.
IsCommissionGive
,
IsCommissionGive
=
x
.
YFCommission
>
0
?
1
:
x
.
IsCommissionGive
,
x
.
CommissionBack
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
SaleRemark
=
x
?.
SaleRemark
??
""
,
...
...
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