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
8292053e
Commit
8292053e
authored
Aug 30, 2024
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
639a1315
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+3
-1
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+9
-0
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+6
-7
No files found.
Edu.Module.Course/OrderModule2.cs
View file @
8292053e
...
...
@@ -134,7 +134,9 @@ namespace Edu.Module.Course
//预计退款金额
decimal
backMoney
=
0
;
orderModel
.
CommissionMoney
=
returnComissionRepository
.
GetOrderReturnComissionListRepositpry
(
new
RB_Order_ReturnComission_ViewModel
()
{
GroupId
=
orderModel
.
Group_Id
,
QOrderIds
=
orderModel
.
OrderId
.
ToString
()
}).
Sum
(
x
=>
x
.
CommissionMoeny
);
orderModel
.
TotalClassHours
=
guestModel
.
TotalHours
;
orderModel
.
Unit_Price
=
guestModel
.
ClassUnitPrice
;
backMoney
=
orderRepository
.
CalcBackMoneyRepository
(
orderModel
,
courseModel
,
FinishHours
,
out
_
);
var
backClassModel
=
new
RB_Student_BackClass_ViewModel
()
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
8292053e
...
...
@@ -55,6 +55,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_OrderRepository
orderRepository
=
new
RB_OrderRepository
();
/// <summary>
/// 订单返佣
/// </summary>
private
readonly
RB_Order_ReturnComissionRepository
returnComissionRepository
=
new
RB_Order_ReturnComissionRepository
();
/// <summary>
/// 班级
/// </summary>
...
...
@@ -134,6 +139,10 @@ namespace Edu.Module.Course
courseModel
=
courseRepository
.
GetEntity
(
classModel
.
CouseId
);
}
//预计退款金额
var
guestModel
=
order_GuestRepository
.
GetEntity
(
backModel
.
GuestId
);
orderModel
.
CommissionMoney
=
returnComissionRepository
.
GetOrderReturnComissionListRepositpry
(
new
RB_Order_ReturnComission_ViewModel
()
{
GroupId
=
orderModel
.
Group_Id
,
QOrderIds
=
orderModel
.
OrderId
.
ToString
()
}).
Sum
(
x
=>
x
.
CommissionMoeny
);
orderModel
.
TotalClassHours
=
guestModel
.
TotalHours
;
orderModel
.
Class_Price
=
guestModel
.
ClassUnitPrice
;
decimal
backMoney
=
orderRepository
.
CalcBackMoneyRepository
(
orderModel
,
courseModel
,
FinishHours
,
out
decimal
classHourPrice
);
var
obj
=
new
{
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
8292053e
...
...
@@ -672,17 +672,16 @@ GROUP BY ClassId;";
{
newClassHourPrice
=
0
;
//课时单价
decimal
classHourPrice
=
0
;
//原课时单价
//classHourPrice = orderModel.PreferPrice / orderModel.GuestNum / classModel.ClassHours;
//标准课时单价=课程卖价/课时
classHourPrice
=
courseModel
.
SellPrice
/
courseModel
.
ClassHours
;
decimal
classHourPrice
=
orderModel
.
Class_Price
;
newClassHourPrice
=
classHourPrice
;
//预计退款金额
decimal
backMoney
=
0
;
//违约金
decimal
breakContractPrice
=
(
courseModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
*
Convert
.
ToDecimal
(
0.1
);
backMoney
=
(
orderModel
.
Income
+
orderModel
.
PlatformTax
-
orderModel
.
Refund
)
/
orderModel
.
GuestNum
-
FinishHours
*
classHourPrice
-
breakContractPrice
;
decimal
breakContractPrice
=
(
orderModel
.
TotalClassHours
-
FinishHours
)
*
classHourPrice
*
Convert
.
ToDecimal
(
0.1
);
//可退总金额
decimal
OrderMoney
=
orderModel
.
Income
+
orderModel
.
PlatformTax
-
orderModel
.
Refund
-
orderModel
.
CoursewareFee
-
orderModel
.
TextbookFee
-
orderModel
.
CommissionMoney
;
backMoney
=
OrderMoney
/
orderModel
.
GuestNum
-
FinishHours
*
classHourPrice
-
breakContractPrice
;
return
backMoney
;
}
...
...
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