...
|
...
|
@@ -48,7 +48,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
// 获取操作人
|
|
|
var operator *domain.User
|
|
|
if data, err := userService.OperatorFrom(createCooperationContractCommand.CompanyId, createCooperationContractCommand.OrgId, createCooperationContractCommand.UserId); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取操作人失败")
|
|
|
} else {
|
|
|
operator = data
|
|
|
}
|
...
|
...
|
@@ -57,7 +57,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
var sponsor *domain.User
|
|
|
sponsorUid, _ := strconv.ParseInt(createCooperationContractCommand.SponsorUid, 10, 64)
|
|
|
if data, err := userService.OperatorFrom(createCooperationContractCommand.CompanyId, createCooperationContractCommand.OrgId, sponsorUid); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取发起人失败")
|
|
|
} else {
|
|
|
sponsor = data
|
|
|
}
|
...
|
...
|
@@ -73,7 +73,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
// 获取公司信息
|
|
|
var company *domain.Company
|
|
|
if data, err := companyService.CompanyFrom(createCooperationContractCommand.CompanyId); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取公司信息失败")
|
|
|
} else {
|
|
|
company = data
|
|
|
}
|
...
|
...
|
@@ -89,7 +89,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
// 获取组织机构信息
|
|
|
var organization *domain.Org
|
|
|
if data, err := organizationService.OrgFrom(createCooperationContractCommand.CompanyId, createCooperationContractCommand.OrgId); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取组织机构失败")
|
|
|
} else {
|
|
|
organization = data
|
|
|
}
|
...
|
...
|
@@ -106,7 +106,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
var department *domain.Department
|
|
|
departmentId, err := strconv.ParseInt(createCooperationContractCommand.DepartmentId, 10, 64)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取部门失败")
|
|
|
}
|
|
|
if data, err := departmentService.DepartmentFrom(createCooperationContractCommand.CompanyId, departmentId); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
...
|
...
|
@@ -253,6 +253,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
UpdatedAt: time.Time{},
|
|
|
DeletedAt: time.Time{},
|
|
|
CreatedAt: time.Now(),
|
|
|
Remarks: dividendsIncentivesRule.Remarks,
|
|
|
})
|
|
|
}
|
|
|
|
...
|
...
|
@@ -274,6 +275,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
UpdatedAt: time.Time{},
|
|
|
DeletedAt: time.Time{},
|
|
|
CreatedAt: time.Now(),
|
|
|
Remarks: moneyIncentivesRule.Remarks,
|
|
|
})
|
|
|
}
|
|
|
|
...
|
...
|
|