作者 陈志颖

fix:修复共创合约变更记录组织信息

... ... @@ -632,6 +632,7 @@ func (cooperationContractService *CooperationContractService) OperateCooperation
Undertakers: "",
CooperationContractNumber: cooperationContractUpdated.CooperationContractNumber,
Company: cooperationContractUpdated.Company,
Org: cooperationContract.Org,
Operator: operator,
CreatedAt: time.Now(),
}
... ... @@ -731,6 +732,7 @@ func (cooperationContractService *CooperationContractService) BatchOperateCooper
Undertakers: "",
CooperationContractNumber: cooperationContractOperated.CooperationContractNumber,
Company: cooperationContractOperated.Company,
Org: cooperationContractOperated.Org,
Operator: operator,
CreatedAt: time.Now(),
}
... ... @@ -1266,6 +1268,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
Undertakers: undertakerChange,
CooperationContractNumber: cooperationContractSaved.CooperationContractNumber,
Company: company,
Org: organization,
Operator: operator,
UpdatedAt: time.Time{},
CreatedAt: time.Now(),
... ...
... ... @@ -49,6 +49,22 @@ func (cooperationContractChangeLogService *CooperationContractChangeLogService)
company = data
}
// 组织机构REST服务初始化
var organizationService service.OrgService
if value, err := factory.CreateOrganizationService(map[string]interface{}{}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
organizationService = value
}
// 获取组织机构信息
var organization *domain.Org
if data, err := organizationService.OrgFrom(createCooperationContractChangeLogCommand.CompanyId, createCooperationContractChangeLogCommand.OrgId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
organization = data
}
// 用户REST服务初始化
var userService service.UserService
if value, err := factory.CreateUserService(map[string]interface{}{}); err != nil {
... ... @@ -82,6 +98,7 @@ func (cooperationContractChangeLogService *CooperationContractChangeLogService)
Undertakers: createCooperationContractChangeLogCommand.Undertakers,
CooperationContractNumber: createCooperationContractChangeLogCommand.CooperationContractNumber,
Company: company,
Org: organization,
Operator: operator,
UpdatedAt: time.Time{},
DeletedAt: time.Time{},
... ...