...
|
...
|
@@ -1019,14 +1019,14 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
UserId: relevantDomain.UserId,
|
|
|
UserBaseId: relevantDomain.UserBaseId,
|
|
|
Org: relevantDomain.Org,
|
|
|
Org: organization,
|
|
|
Orgs: relevantDomain.Orgs,
|
|
|
Department: relevantDomain.Department,
|
|
|
Roles: relevantDomain.Roles,
|
|
|
UserInfo: relevantDomain.UserInfo,
|
|
|
UserType: relevantDomain.UserType,
|
|
|
Status: relevantDomain.Status,
|
|
|
Company: relevantDomain.Company,
|
|
|
Company: company,
|
|
|
})
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1114,7 +1114,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
CooperationContractId: cooperationContract.CooperationContractId,
|
|
|
UserBaseId: undertakerDomain.UserBaseId,
|
|
|
Org: undertakerDomain.Org,
|
|
|
Org: organization,
|
|
|
Orgs: undertakerDomain.Orgs,
|
|
|
Department: undertakerDomain.Department,
|
|
|
Roles: undertakerDomain.Roles,
|
...
|
...
|
@@ -1123,7 +1123,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
Referrer: referrerDomain,
|
|
|
Salesman: salesmanDomain,
|
|
|
Status: undertakerDomain.Status,
|
|
|
Company: undertakerDomain.Company,
|
|
|
Company: company,
|
|
|
ContractAttachment: contractAttachments,
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -1275,7 +1275,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, rule := range cooperationContractFound.DividendsIncentivesRules {
|
|
|
jsons, errs := json.Marshal(rule)
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractFoundBytes = append(cooperationContractFoundBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1288,7 +1288,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, rule := range cooperationContract.DividendsIncentivesRules {
|
|
|
jsons, errs := json.Marshal(rule)
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractBytes = append(cooperationContractBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1331,7 +1331,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, rule := range cooperationContractFound.MoneyIncentivesRules {
|
|
|
jsons, errs := json.Marshal(rule)
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractFoundBytes = append(cooperationContractFoundBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1344,7 +1344,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, rule := range cooperationContract.MoneyIncentivesRules {
|
|
|
jsons, errs := json.Marshal(rule)
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractBytes = append(cooperationContractBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1388,7 +1388,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, undertaker := range cooperationContractFound.Undertakers {
|
|
|
jsons, errs := json.Marshal(undertaker)
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractFoundBytes = append(cooperationContractFoundBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1400,7 +1400,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
for _, undertaker := range cooperationContract.Undertakers {
|
|
|
jsons, errs := json.Marshal(undertaker) //转换成JSON返回的是byte[]
|
|
|
if errs != nil {
|
|
|
(errs.Error())
|
|
|
fmt.Printf(errs.Error())
|
|
|
}
|
|
|
cooperationContractBytes = append(cooperationContractBytes, jsons...)
|
|
|
}
|
...
|
...
|
@@ -1501,8 +1501,10 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
|
|
|
// 保存共创合约变更记录
|
|
|
if _, err20 := cooperationContractChangeLogRepository.Save(newCooperationContractChangeLog); err20 != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err20.Error())
|
|
|
if newCooperationContractChangeLog.IncentivesRule != "" || newCooperationContractChangeLog.IncentivesRuleDetail != "" || newCooperationContractChangeLog.Undertakers != "" {
|
|
|
if _, err20 := cooperationContractChangeLogRepository.Save(newCooperationContractChangeLog); err20 != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err20.Error())
|
|
|
}
|
|
|
}
|
|
|
if err21 := transactionContext.CommitTransaction(); err21 != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err21.Error())
|
...
|
...
|
|