Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
huatu_API
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
liudong1993
huatu_API
Commits
d60b8d6b
Commit
d60b8d6b
authored
Mar 25, 2026
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
32846884
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
RB_SingleOrder_CommissionRule.cs
REBORN.Model/Entity/Dmc/RB_SingleOrder_CommissionRule.cs
+5
-0
MergeCommissionModule2.cs
REBORN.Module.CommissionModule/MergeCommissionModule2.cs
+12
-10
MergeCommissionService.cs
REBORN.Services.CommissionService/MergeCommissionService.cs
+2
-1
No files found.
REBORN.Model/Entity/Dmc/RB_SingleOrder_CommissionRule.cs
View file @
d60b8d6b
...
...
@@ -60,5 +60,10 @@ namespace REBORN.Model.Entity.Dmc
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 发放团队亏损提成 【=0 不扣提成, =1 要扣提成(负数提成)】
/// </summary>
public
int
SendLossCommission
{
get
;
set
;
}
}
}
REBORN.Module.CommissionModule/MergeCommissionModule2.cs
View file @
d60b8d6b
...
...
@@ -93,6 +93,7 @@ namespace REBORN.Module.CommissionModule
{
nameof
(
RB_SingleOrder_CommissionRule_Extend
.
Content
),
demodel
.
Content
},
{
nameof
(
RB_SingleOrder_CommissionRule_Extend
.
UpdateBy
),
demodel
.
UpdateBy
},
{
nameof
(
RB_SingleOrder_CommissionRule_Extend
.
UpdateDate
),
demodel
.
UpdateDate
},
{
nameof
(
RB_SingleOrder_CommissionRule_Extend
.
SendLossCommission
),
demodel
.
SendLossCommission
},
};
bool
flag
=
singleOrder_CommissionRuleRepository
.
Update
(
keyValues
,
new
WhereHelper
(
nameof
(
RB_SingleOrder_CommissionRule_Extend
.
Id
),
demodel
.
Id
));
return
flag
?
""
:
"出错了,请联系管理员"
;
...
...
@@ -743,7 +744,7 @@ namespace REBORN.Module.CommissionModule
//11月的团 开始 扣除 自费收入 徐总需求 12-06
dmodel
.
TCProfit
=
reportList
.
Any
()
?
reportList
.
Sum
(
x
=>
(
x
.
ShiJiLiRun
??
0
)
+
(
x
.
TiCheng
??
0
)
-
(
x
.
YongJinShouRu
??
0
)
-
x
.
LeaderPeopleMoney
+
x
.
EuropeShareProfit
-
(
x
.
ZiFei
??
0
))
:
0
;
}
if
(
dmodel
.
TCProfit
<
0
)
if
(
dmodel
.
TCProfit
<
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
//当团利润小于0 销售不承担, 看是否OP承担
dmodel
.
OrderProfit
=
0
;
...
...
@@ -839,7 +840,7 @@ namespace REBORN.Module.CommissionModule
dmodel
.
OrderRate
=
ruleOrderModel
.
Rate
;
dmodel
.
OrderProfit
=
Math
.
Round
(
dmodel
.
TCProfit
*
ruleOrderModel
.
Rate
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
dmodel
.
TCProfit
<
0
)
if
(
dmodel
.
TCProfit
<
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
}
...
...
@@ -998,7 +999,10 @@ namespace REBORN.Module.CommissionModule
OrderProfit
=
(
item
.
Income
??
0
)
-
(
item
.
RefundMoney
??
0
)
-
(
item
.
CostMoney
)
-
(
item
.
TrafficToll
),
BranchType
=
2
};
if
(
dmodel
.
OrderProfit
<
0
)
{
dmodel
.
OrderProfit
=
0
;
dmodel
.
Description
+=
"因利润小于0、不发放提成"
;
}
var
ruleModel
=
ruleList
.
Where
(
x
=>
(
","
+
x
.
BranchIds
+
","
).
Contains
(
","
+
item
.
RB_Branch_Id
+
","
)).
FirstOrDefault
();
if
(
ruleModel
==
null
)
{
ruleModel
=
ruleList
.
Where
(
x
=>
x
.
BranchIds
==
""
).
FirstOrDefault
();
}
if
(
dmodel
.
OrderProfit
<
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
dmodel
.
Description
+=
"因利润小于0、不发放提成"
;
}
//if (IsUnBanble) {
// dmodel.IsDeductOrder = 1;
// dmodel.OrderProfit = 0;
...
...
@@ -1016,15 +1020,13 @@ namespace REBORN.Module.CommissionModule
//}
item
.
AppointOPList
=
OrderOPList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
var
ruleModel
=
ruleList
.
Where
(
x
=>
(
","
+
x
.
BranchIds
+
","
).
Contains
(
","
+
item
.
RB_Branch_Id
+
","
)).
FirstOrDefault
();
if
(
ruleModel
==
null
)
{
ruleModel
=
ruleList
.
Where
(
x
=>
x
.
BranchIds
==
""
).
FirstOrDefault
();
}
//开始做提成比例设置
var
ruleOrderModel
=
ruleModel
.
RuleList
.
Where
(
x
=>
x
.
OrderType
==
6
).
FirstOrDefault
();
dmodel
.
RuleID
=
ruleModel
.
Id
;
dmodel
.
OrderRate
=
ruleOrderModel
.
Rate
;
dmodel
.
OrderProfit
=
Math
.
Round
(
dmodel
.
TCProfit
*
ruleOrderModel
.
Rate
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
dmodel
.
TCProfit
<=
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
dmodel
.
TCProfit
<=
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
item
.
SaleRate
<=
0
)
{
item
.
SaleRate
=
ruleOrderModel
?.
SaleRate
??
0
;
...
...
@@ -1172,7 +1174,7 @@ namespace REBORN.Module.CommissionModule
dmodel
.
RuleID
=
ruleModel
.
Id
;
dmodel
.
OrderRate
=
ruleOrderModel
.
Rate
;
dmodel
.
OrderProfit
=
Math
.
Round
(
dmodel
.
TCProfit
*
ruleOrderModel
.
Rate
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
dmodel
.
TCProfit
<=
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
dmodel
.
TCProfit
<=
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
item
.
SaleRate
<=
0
)
{
item
.
SaleRate
=
ruleOrderModel
?.
SaleRate
??
0
;
...
...
@@ -1380,7 +1382,7 @@ namespace REBORN.Module.CommissionModule
dmodel
.
RuleID
=
ruleModel
.
Id
;
dmodel
.
OrderRate
=
ruleOrderModel
.
Rate
;
dmodel
.
OrderProfit
=
Math
.
Round
(
dmodel
.
TCProfit
*
ruleOrderModel
.
Rate
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
dmodel
.
TCProfit
<=
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
dmodel
.
TCProfit
<=
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
item
.
SaleRate
<=
0
)
{
item
.
SaleRate
=
ruleOrderModel
?.
SaleRate
??
0
;
...
...
@@ -1533,7 +1535,7 @@ namespace REBORN.Module.CommissionModule
dmodel
.
RuleID
=
ruleModel
.
Id
;
dmodel
.
OrderRate
=
ruleOrderModel
.
Rate
;
dmodel
.
OrderProfit
=
Math
.
Round
(
dmodel
.
TCProfit
*
ruleOrderModel
.
Rate
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
dmodel
.
TCProfit
<=
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
dmodel
.
TCProfit
<=
0
&&
ruleModel
.
SendLossCommission
==
0
)
{
dmodel
.
OrderProfit
=
0
;
}
if
(
item
.
SaleRate
<=
0
)
{
item
.
SaleRate
=
ruleOrderModel
?.
SaleRate
??
0
;
...
...
REBORN.Services.CommissionService/MergeCommissionService.cs
View file @
d60b8d6b
...
...
@@ -2543,7 +2543,8 @@ namespace REBORN.Services.CommissionService
BranchIdList
=
!
string
.
IsNullOrEmpty
(
x
.
BranchIds
)
?
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
x
.
BranchIds
+
"]"
)
:
new
List
<
int
>(),
x
.
RuleList
,
UpdateBy
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
x
.
UpdateBy
.
ToString
())?.
emName
??
""
,
UpdateDate
=
x
.
UpdateDate
.
ToString
(
"yyyy-MM-dd"
)
UpdateDate
=
x
.
UpdateDate
.
ToString
(
"yyyy-MM-dd"
),
x
.
SendLossCommission
}));
}
...
...
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