作者 陈志颖

feat:调整共创合约更新服务

... ... @@ -560,6 +560,19 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
} else {
userService = value
}
// 获取发起人
var sponsor *domain.User
sponsorUid, _ := strconv.ParseInt(updateCooperationContractCommand.SponsorUid, 10, 64)
if data, err := userService.OperatorFrom(updateCooperationContractCommand.CompanyId, updateCooperationContractCommand.OrgId, sponsorUid); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
sponsor = data
}
// 更新发起人
cooperationContract.CooperationContractSponsor = sponsor
// 获取相关人
var relevantPeople []*domain.Relevant
for _, relevantPersonUid := range updateCooperationContractCommand.RelevantPeople {
... ...
... ... @@ -69,6 +69,9 @@ func (cooperationContract *CooperationContract) Update(data map[string]interface
if cooperationContractName, ok := data["cooperationContractName"]; ok {
cooperationContract.CooperationContractName = cooperationContractName.(string)
}
if cooperationProjectNumber, ok := data["cooperationProjectNumber"]; ok {
cooperationContract.CooperationProjectNumber = cooperationProjectNumber.(string)
}
if cooperationContractNumber, ok := data["cooperationContractNumber"]; ok {
cooperationContract.CooperationContractNumber = cooperationContractNumber.(string)
}
... ...