...
|
...
|
@@ -84,14 +84,21 @@ type Relevant struct { |
|
|
}
|
|
|
|
|
|
type ContractUndertaker struct {
|
|
|
UndertakerId int `json:"undertakerId,string"`
|
|
|
UndertakerId int `json:"undertakerId,string,"`
|
|
|
Attachment []domain.Attachment `json:"attachment"`
|
|
|
Department domain.Department `json:"department"`
|
|
|
HasReferrer bool `json:"hasReferrer"`
|
|
|
HasSalesman bool `json:"hasSalesman"`
|
|
|
ReferrerUser domain.UserInfo `json:"referrerUser"`
|
|
|
SalesmanUser domain.UserInfo `json:"salesmanUser"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
ReferrerUser struct {
|
|
|
UserId int `json:"userId,string"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
} `json:"referrerUser"`
|
|
|
SalesmanUser struct {
|
|
|
UserId int `json:"userId,string"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
}
|
|
|
UserId int `json:"userId,string"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
}
|
|
|
type CooperationContractInfo struct {
|
|
|
CooperationContract CooperationContractItem `json:"cooperationContract"`
|
...
|
...
|
@@ -159,26 +166,24 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon |
|
|
DepartmentId: int(v.Department.DepartmentId),
|
|
|
DepartmentName: v.Department.DepartmentName,
|
|
|
},
|
|
|
HasReferrer: v.Referrer.UserId > 0,
|
|
|
HasSalesman: v.Salesman.UserId > 0,
|
|
|
ReferrerUser: domain.UserInfo{
|
|
|
UsersName: v.Referrer.UserInfo.UserName,
|
|
|
Phone: v.Referrer.UserInfo.UserPhone,
|
|
|
UsersId: v.Referrer.UserId,
|
|
|
// UserCode :v.
|
|
|
},
|
|
|
SalesmanUser: domain.UserInfo{
|
|
|
UsersName: v.Salesman.UserInfo.UserName,
|
|
|
UsersId: v.Salesman.UserId,
|
|
|
Phone: v.Salesman.UserInfo.UserPhone,
|
|
|
},
|
|
|
HasReferrer: v.Referrer.UserId > 0,
|
|
|
HasSalesman: v.Salesman.UserId > 0,
|
|
|
UndertakerId: v.UndertakerId,
|
|
|
UserId: v.UserId,
|
|
|
UserInfo: domain.UserInfo{
|
|
|
UsersName: v.UserInfo.UserName,
|
|
|
UsersId: v.UserId,
|
|
|
Phone: v.UserInfo.UserPhone,
|
|
|
},
|
|
|
}
|
|
|
u.SalesmanUser.UserId = v.Salesman.UserId
|
|
|
u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId
|
|
|
u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserInfo.UserName
|
|
|
u.SalesmanUser.UserInfo.Phone = v.Salesman.UserInfo.UserPhone
|
|
|
u.ReferrerUser.UserId = v.Referrer.UserId
|
|
|
u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId
|
|
|
u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserInfo.UserName
|
|
|
u.ReferrerUser.UserInfo.Phone = v.Referrer.UserInfo.UserPhone
|
|
|
contractUndertaker = append(contractUndertaker, u)
|
|
|
}
|
|
|
undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable
|
...
|
...
|
|