...
|
...
|
@@ -18,18 +18,22 @@ type CooperationContractItem struct { |
|
|
UserId int `json:"userId,string,"`
|
|
|
UserName string `json:"userName"`
|
|
|
} `json:"cooperationContractSponsor"` //共创发起人
|
|
|
CooperationMode domain.CooperationMode `json:"cooperationMode"` //共创模式
|
|
|
Org domain.Org `json:"org"` //组织结构
|
|
|
CooperationMode domain.CooperationMode `json:"cooperationMode"` //共创模式
|
|
|
Org domain.Org `json:"org"` //组织结构
|
|
|
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开
|
|
|
CooperationContractDescription string `json:"cooperationContractDescription"` //合约描述
|
|
|
}
|
|
|
|
|
|
func ToCooperationContractItem(param *allied_creation_cooperation.CooperationContract) *CooperationContractItem {
|
|
|
data := CooperationContractItem{
|
|
|
CooperationContractId: param.CooperationContractId,
|
|
|
CooperationProjectNumber: param.CooperationContractNumber,
|
|
|
CooperationContractName: param.CooperationContractName,
|
|
|
CooperationContractNumber: param.CooperationContractNumber,
|
|
|
Status: param.Status,
|
|
|
CreateTime: int(param.CreatedAt.UnixNano() / 1e6),
|
|
|
CooperationContractUndertakerType: param.CooperationContractUndertakerTypes,
|
|
|
CooperationContractDescription: param.CooperationContractDescription,
|
|
|
CooperationContractId: param.CooperationContractId,
|
|
|
CooperationProjectNumber: param.CooperationContractNumber,
|
|
|
CooperationContractName: param.CooperationContractName,
|
|
|
CooperationContractNumber: param.CooperationContractNumber,
|
|
|
Status: param.Status,
|
|
|
CreateTime: int(param.CreatedAt.UnixNano() / 1e6),
|
|
|
}
|
|
|
data.CooperationContractSponsor.UserId = param.CooperationContractSponsor.UserId
|
|
|
data.CooperationContractSponsor.UserName = param.CooperationContractSponsor.UserInfo.UserName
|
...
|
...
|
@@ -86,11 +90,12 @@ type ContractUndertaker struct { |
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
}
|
|
|
type CooperationContractInfo struct {
|
|
|
CooperationContract CooperationContractItem `json:"cooperationContract"`
|
|
|
Relevant []Relevant `json:"relevant"`
|
|
|
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
|
|
|
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
|
|
|
ContractUndertaker []ContractUndertaker `json:"contractUndertaker"`
|
|
|
CooperationContract CooperationContractItem `json:"cooperationContract"`
|
|
|
Relevant []Relevant `json:"relevant"`
|
|
|
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
|
|
|
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
|
|
|
ContractUndertaker []ContractUndertaker `json:"contractUndertaker"`
|
|
|
UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"` // 可以去除勾选的共创项目承接对象列表
|
|
|
}
|
|
|
|
|
|
func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationContract) *CooperationContractInfo {
|
...
|
...
|
@@ -172,12 +177,17 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon |
|
|
}
|
|
|
contractUndertaker = append(contractUndertaker, u)
|
|
|
}
|
|
|
|
|
|
data := CooperationContractInfo{
|
|
|
CooperationContract: *ToCooperationContractItem(param),
|
|
|
Relevant: relevants,
|
|
|
DividendsIncentivesRules: dividendsIncentivesRules,
|
|
|
MoneyIncentivesRules: moneyIncentivesRules,
|
|
|
ContractUndertaker: contractUndertaker,
|
|
|
CooperationContract: *ToCooperationContractItem(param),
|
|
|
Relevant: relevants,
|
|
|
DividendsIncentivesRules: dividendsIncentivesRules,
|
|
|
MoneyIncentivesRules: moneyIncentivesRules,
|
|
|
ContractUndertaker: contractUndertaker,
|
|
|
UndertakerTypesUncheckedAvailable: param.UndertakerTypesUncheckedAvailable,
|
|
|
}
|
|
|
if len(param.UndertakerTypesUncheckedAvailable) == 0 {
|
|
|
data.UndertakerTypesUncheckedAvailable = []int{}
|
|
|
}
|
|
|
return &data
|
|
|
|
...
|
...
|
|