作者 陈志颖

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

@@ -560,6 +560,19 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC @@ -560,6 +560,19 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
560 } else { 560 } else {
561 userService = value 561 userService = value
562 } 562 }
  563 +
  564 + // 获取发起人
  565 + var sponsor *domain.User
  566 + sponsorUid, _ := strconv.ParseInt(updateCooperationContractCommand.SponsorUid, 10, 64)
  567 + if data, err := userService.OperatorFrom(updateCooperationContractCommand.CompanyId, updateCooperationContractCommand.OrgId, sponsorUid); err != nil {
  568 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  569 + } else {
  570 + sponsor = data
  571 + }
  572 +
  573 + // 更新发起人
  574 + cooperationContract.CooperationContractSponsor = sponsor
  575 +
563 // 获取相关人 576 // 获取相关人
564 var relevantPeople []*domain.Relevant 577 var relevantPeople []*domain.Relevant
565 for _, relevantPersonUid := range updateCooperationContractCommand.RelevantPeople { 578 for _, relevantPersonUid := range updateCooperationContractCommand.RelevantPeople {
@@ -69,6 +69,9 @@ func (cooperationContract *CooperationContract) Update(data map[string]interface @@ -69,6 +69,9 @@ func (cooperationContract *CooperationContract) Update(data map[string]interface
69 if cooperationContractName, ok := data["cooperationContractName"]; ok { 69 if cooperationContractName, ok := data["cooperationContractName"]; ok {
70 cooperationContract.CooperationContractName = cooperationContractName.(string) 70 cooperationContract.CooperationContractName = cooperationContractName.(string)
71 } 71 }
  72 + if cooperationProjectNumber, ok := data["cooperationProjectNumber"]; ok {
  73 + cooperationContract.CooperationProjectNumber = cooperationProjectNumber.(string)
  74 + }
72 if cooperationContractNumber, ok := data["cooperationContractNumber"]; ok { 75 if cooperationContractNumber, ok := data["cooperationContractNumber"]; ok {
73 cooperationContract.CooperationContractNumber = cooperationContractNumber.(string) 76 cooperationContract.CooperationContractNumber = cooperationContractNumber.(string)
74 } 77 }