...
|
...
|
@@ -1172,7 +1172,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
if cooperationContractFound.IncentivesType != cooperationContractSaved.IncentivesType && cooperationContractFound.IncentivesType == domain.TYPE_DIVIDNEDS_INCENTIVES && cooperationContractSaved.IncentivesType == domain.TYPE_MONEY_INCENTIVES { // 1.激励类型变更
|
|
|
// 业绩分红-->金额激励
|
|
|
incentivesRuleChange = cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractFound.IncentivesType)) + "-->" + cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractSaved.IncentivesType))
|
|
|
|
|
|
//【第一阶段:20,2021-01-01~2021-12-31,,,;第二阶段:20,2021-01-01~2021-12-31,30,10】变更为【第一阶段:20,2021-01-01~2021-12-31,,,;】
|
|
|
// 原业绩分红激励规则
|
|
|
var dividendsIncentivesRuleOriginal string
|
...
|
...
|
@@ -1203,7 +1202,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
// 金额激励-->业绩分红
|
|
|
incentivesRuleChange = cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractFound.IncentivesType)) + "-->" + cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractSaved.IncentivesType))
|
|
|
//【第一阶段:20,2021-01-01~2021-12-31,,,;第二阶段:20,2021-01-01~2021-12-31,30,10】变更为【第一阶段:20,2021-01-01~2021-12-31,,,;】
|
|
|
|
|
|
// 原金额激励规则
|
|
|
var moneyIncentivesRuleOriginal string
|
|
|
for _, moneyIncentivesRule := range cooperationContractFound.MoneyIncentivesRules {
|
...
|
...
|
@@ -1214,7 +1212,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
moneyIncentivesRuleOriginalTmp := "【" + moneyIncentivesRuleOriginal + "】"
|
|
|
|
|
|
// 变更后的业绩分红激励规则
|
|
|
var dividendsIncentivesRuleChanged string
|
|
|
for _, dividendsIncentivesRule := range cooperationContractSaved.DividendsIncentivesRules {
|
...
|
...
|
@@ -1226,7 +1223,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(dividendsIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
dividendsIncentivesRuleOriginalTmp := "【" + dividendsIncentivesRuleChanged + "】"
|
|
|
|
|
|
// 拼接规则变更
|
|
|
incentivesRuleChangeDetail = moneyIncentivesRuleOriginalTmp + " 变更为 " + dividendsIncentivesRuleOriginalTmp
|
|
|
} else { // 2.激励规则变更
|
...
|
...
|
@@ -1235,7 +1231,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
// 业绩分红-->业绩分红
|
|
|
incentivesRuleChange = cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractFound.IncentivesType)) + "-->" + cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractSaved.IncentivesType))
|
|
|
//【第一阶段:20,2021-01-01~2021-12-31,,,;第二阶段:20,2021-01-01~2021-12-31,30,10】变更为【第一阶段:20,2021-01-01~2021-12-31,,,;】
|
|
|
|
|
|
// 原业绩分红激励规则
|
|
|
var dividendsIncentivesRuleOriginal string
|
|
|
for _, dividendsIncentivesRule := range cooperationContractFound.DividendsIncentivesRules {
|
...
|
...
|
@@ -1247,7 +1242,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(dividendsIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
dividendsIncentivesRuleOriginalTmp := "【" + dividendsIncentivesRuleOriginal + "】"
|
|
|
|
|
|
// 变更后的业绩分红激励规则
|
|
|
var dividendsIncentivesRuleChanged string
|
|
|
for _, dividendsIncentivesRule := range cooperationContractSaved.DividendsIncentivesRules {
|
...
|
...
|
@@ -1259,7 +1253,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(dividendsIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
dividendsIncentivesRuleChangedTmp := "【" + dividendsIncentivesRuleChanged + "】"
|
|
|
|
|
|
// 拼接规则变更
|
|
|
incentivesRuleChangeDetail = dividendsIncentivesRuleOriginalTmp + " 变更为 " + dividendsIncentivesRuleChangedTmp
|
|
|
}
|
...
|
...
|
@@ -1267,7 +1260,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
if !cooperationContract.MoneyIncentivesRuleSliceEqualBCE(cooperationContractFound.MoneyIncentivesRules, cooperationContractSaved.MoneyIncentivesRules) {
|
|
|
incentivesRuleChange = cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractFound.IncentivesType)) + "-->" + cooperationContract.ReturnIncentivesName(domain.IncentivesType(cooperationContractSaved.IncentivesType))
|
|
|
//【第一阶段:20,2021-01-01~2021-12-31,,,;第二阶段:20,2021-01-01~2021-12-31,30,10】变更为【第一阶段:20,2021-01-01~2021-12-31,,,;】
|
|
|
|
|
|
// 原金额激励规则
|
|
|
var moneyIncentivesRuleOriginal string
|
|
|
for _, moneyIncentivesRule := range cooperationContractFound.MoneyIncentivesRules {
|
...
|
...
|
@@ -1278,7 +1270,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
moneyIncentivesRuleOriginalTmp := "【" + moneyIncentivesRuleOriginal + "】"
|
|
|
|
|
|
// 变更后的激励规则
|
|
|
var moneyIncentivesRuleChanged string
|
|
|
for _, moneyIncentivesRule := range cooperationContractSaved.MoneyIncentivesRules {
|
...
|
...
|
@@ -1289,7 +1280,6 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
|
|
}
|
|
|
moneyIncentivesRuleChangedTmp := "【" + moneyIncentivesRuleChanged + "】"
|
|
|
|
|
|
// 拼接规则变更
|
|
|
incentivesRuleChangeDetail = moneyIncentivesRuleOriginalTmp + " 变更为 " + moneyIncentivesRuleChangedTmp
|
|
|
}
|
...
|
...
|
|