作者 tangxuhui

项目详情添加申请通过的承接人

... ... @@ -19,6 +19,5 @@ func main() {
w, _ := logrus.NewKafkaWriter(constant.KAFKA_HOST, constant.TOPIC_LOG_STASH, false)
log.Logger.AddHook(w)
}
web.Run()
}
... ...
... ... @@ -48,23 +48,49 @@ type CooperationProjectInfo struct {
DepartmentName string `json:"departmentName"`
} `json:"department"` //项目发起部门
Status int `json:"status"` // 共创项目状态,1招标中,2结束
// 可以去除勾选的共创项目承接对象列表
UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"`
// 承接人
Applicants []struct {
UserId int64 `json:"userId,string"`
UserBaseId int64 `json:"userBaseId,string"` // 用户基本id
Org struct {
OrgId int64 `json:"orgId,string"` // 组织机构ID
OrgName string `json:"orgName"` // 组织名称
} `json:"org"` // 用户所属组织机构
Department struct {
DepartmentId int64 `json:"departmentId,string"` // 部门ID,
DepartmentName string `json:"departmentName"` // 部门名称
DepartmentNumber string `json:"departmentNumber"` // 部门编码
} `json:"department"` // 用户所属的部门
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
UserName string `json:"userName"` // 共创人员姓名
UserPhone string `json:"userPhone"` // 用户手机号
UserAccount string `json:"userAccount"` // 用户账号,
UserCode string `json:"userCode"` // 用户编码
} `json:"userInfo,omitempty"`
} `json:"applicants"`
}
func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo {
data := CooperationProjectInfo{
Company: param.Company,
Org: param.Org,
CooperationMode: param.CooperationMode,
CooperationProjectDescription: param.CooperationProjectDescription,
CooperationProjectId: param.CooperationProjectId,
CooperationProjectName: param.CooperationProjectName,
CooperationProjectNumber: param.CooperationProjectNumber,
CooperationProjectPublishTime: param.CooperationProjectPublishTime,
CreatedAt: param.CreatedAt,
CooperationProjectUndertakerType: param.CooperationProjectUndertakerType,
Department: param.Department,
Status: param.Status,
Images: param.Attachment,
Company: param.Company,
Org: param.Org,
CooperationMode: param.CooperationMode,
CooperationProjectDescription: param.CooperationProjectDescription,
CooperationProjectId: param.CooperationProjectId,
CooperationProjectName: param.CooperationProjectName,
CooperationProjectNumber: param.CooperationProjectNumber,
CooperationProjectPublishTime: param.CooperationProjectPublishTime,
CreatedAt: param.CreatedAt,
CooperationProjectUndertakerType: param.CooperationProjectUndertakerType,
Department: param.Department,
Status: param.Status,
Images: param.Attachment,
UndertakerTypesUncheckedAvailable: param.UndertakerTypesUncheckedAvailable,
Applicants: param.Applicants,
}
data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode
... ...
... ... @@ -60,6 +60,30 @@ type CooperationProject struct {
DepartmentName string `json:"departmentName"`
} `json:"department"` //项目发起部门
Status int `json:"status"` // 共创项目状态,1招标中,2结束
// 可以去除勾选的共创项目承接对象列表
UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"`
// 承接人
Applicants []struct {
UserId int64 `json:"userId,string"`
UserBaseId int64 `json:"userBaseId,string"` // 用户基本id
Org struct {
OrgId int64 `json:"orgId,string"` // 组织机构ID
OrgName string `json:"orgName"` // 组织名称
} `json:"org"` // 用户所属组织机构
Department struct {
DepartmentId int64 `json:"departmentId,string"` // 部门ID,
DepartmentName string `json:"departmentName"` // 部门名称
DepartmentNumber string `json:"departmentNumber"` // 部门编码
} `json:"department"` // 用户所属的部门
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
UserName string `json:"userName"` // 共创人员姓名
UserPhone string `json:"userPhone"` // 用户手机号
UserAccount string `json:"userAccount"` // 用户账号,
UserCode string `json:"userCode"` // 用户编码
} `json:"userInfo,omitempty"`
} `json:"applicants"`
}
//创建共创项目
... ...