...
|
...
|
@@ -6,6 +6,7 @@ import ( |
|
|
"fmt"
|
|
|
"strconv"
|
|
|
"time"
|
|
|
"unsafe"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
...
|
...
|
@@ -1269,12 +1270,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
} else if cooperationContractFound.IncentivesType == cooperationContract.IncentivesType { // 2.激励规则内容变更
|
|
|
if cooperationContractFound.IncentivesType == domain.TYPE_DIVIDNEDS_INCENTIVES { // 业绩分红规则内容变更
|
|
|
// 计算原合约哈希值
|
|
|
cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.MoneyIncentivesRules)
|
|
|
cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.DividendsIncentivesRules))
|
|
|
cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte)
|
|
|
cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:])
|
|
|
|
|
|
// 计算更新后的合约哈希值
|
|
|
cooperationContractByte := utils.AnyToHex(cooperationContract.MoneyIncentivesRules)
|
|
|
cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.DividendsIncentivesRules))
|
|
|
cooperationContractHashValue := md5.Sum(cooperationContractByte)
|
|
|
cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:])
|
|
|
//if !cooperationContract.DividendsIncentivesRuleSliceEqualBCE(cooperationContractFound.DividendsIncentivesRules, cooperationContract.DividendsIncentivesRules) {
|
...
|
...
|
@@ -1310,12 +1311,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
} else if cooperationContractFound.IncentivesType == domain.MONEY_INCENTIVES { // 金额激励规则内容变更
|
|
|
// 计算原合约哈希值
|
|
|
cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.MoneyIncentivesRules)
|
|
|
cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.MoneyIncentivesRules))
|
|
|
cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte)
|
|
|
cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:])
|
|
|
|
|
|
// 计算更新后的合约哈希值
|
|
|
cooperationContractByte := utils.AnyToHex(cooperationContract.MoneyIncentivesRules)
|
|
|
cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.MoneyIncentivesRules))
|
|
|
cooperationContractHashValue := md5.Sum(cooperationContractByte)
|
|
|
cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:])
|
|
|
|
...
|
...
|
@@ -1349,14 +1350,14 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 承接人变更
|
|
|
/*********************************************** 承接人变更 *****************************************************/
|
|
|
// 计算原合约哈希值
|
|
|
cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.Undertakers)
|
|
|
cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.Undertakers))
|
|
|
cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte)
|
|
|
cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:])
|
|
|
|
|
|
// 计算更新后的合约哈希值
|
|
|
cooperationContractByte := utils.AnyToHex(cooperationContract.Undertakers)
|
|
|
cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.Undertakers))
|
|
|
cooperationContractHashValue := md5.Sum(cooperationContractByte)
|
|
|
cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:])
|
|
|
|
...
|
...
|
|