|
|
package dto
|
|
|
|
|
|
import (
|
|
|
"strconv"
|
|
|
"time"
|
|
|
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
...
|
...
|
@@ -91,25 +92,26 @@ type CooperationApplicationItem struct { |
|
|
}
|
|
|
|
|
|
func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem {
|
|
|
//data := CooperationApplicationItem{
|
|
|
// CooperationApplicationDescription: param.CooperationApplicationDescription,
|
|
|
// CooperationApplicationID: param.CooperationApplicationID,
|
|
|
// CooperationApplicationStatus: param.CooperationApplicationStatus,
|
|
|
// CooperationApplyTime: int(param.CooperationApplyTime.Unix()),
|
|
|
// CooperationApplicationAttachment: param.CooperationApplicationAttachment,
|
|
|
//}
|
|
|
//data.CooperationApplicationApplicant.Company.CompanyID = param.CooperationApplicationApplicant.Company.CompanyID
|
|
|
//data.CooperationApplicationApplicant.Company.CompanyName = param.CooperationApplicationApplicant.Company.CompanyName
|
|
|
//data.CooperationApplicationApplicant.Department.DepartmentId = param.CooperationApplicationApplicant.Department.DepartmentID
|
|
|
//data.CooperationApplicationApplicant.Department.DepartmentName = param.CooperationApplicationApplicant.Department.DepartmentName
|
|
|
applicationID, _ := strconv.Atoi(param.CooperationApplicationID)
|
|
|
data := CooperationApplicationItem{
|
|
|
CooperationApplicationDescription: param.CooperationApplicationDescription,
|
|
|
CooperationApplicationID: applicationID,
|
|
|
CooperationApplicationStatus: param.CooperationApplicationStatus,
|
|
|
CooperationApplyTime: int(param.CooperationApplyTime),
|
|
|
CooperationApplicationAttachment: param.CooperationApplicationAttachment,
|
|
|
}
|
|
|
data.CooperationApplicationApplicant.Company.CompanyID = param.Company.CompanyID
|
|
|
data.CooperationApplicationApplicant.Company.CompanyName = param.Company.CompanyName
|
|
|
data.CooperationApplicationApplicant.Department.DepartmentId = int(param.CooperationApplicationApplicant.Department.DepartmentId)
|
|
|
data.CooperationApplicationApplicant.Department.DepartmentName = param.CooperationApplicationApplicant.Department.DepartmentName
|
|
|
//data.CooperationApplicationApplicant.Department.DepartmentNumber = param.CooperationApplicationApplicant.Department.DepartmentNumber
|
|
|
//data.CooperationApplicationApplicant.Org.OrgID = param.CooperationApplicationApplicant.Org.OrgID
|
|
|
//data.CooperationApplicationApplicant.Org.OrgName = param.CooperationApplicationApplicant.Org.OrgName
|
|
|
//data.CooperationApplicationApplicant.UserID = param.CooperationApplicationApplicant.UserID
|
|
|
//data.CooperationApplicationApplicant.UserType = param.CooperationApplicationApplicant.UserType
|
|
|
//data.CooperationApplicationApplicant.UserInfo.Phone = param.CooperationApplicationApplicant.UserInfo.UserPhone
|
|
|
//data.CooperationApplicationApplicant.UserInfo.UsersName = param.CooperationApplicationApplicant.UserInfo.UserName
|
|
|
//data.CooperationApplicationApplicant.UserInfo.UsersId = param.CooperationApplicationApplicant.UserID
|
|
|
//return &data
|
|
|
return nil
|
|
|
data.CooperationApplicationApplicant.Org.OrgID = param.Org.OrgID
|
|
|
data.CooperationApplicationApplicant.Org.OrgName = param.Org.OrgName
|
|
|
data.CooperationApplicationApplicant.UserID = param.CooperationApplicationApplicant.UserID
|
|
|
//data.CooperationApplicationApplicant.UserType = param.CooperationApplicationApplicant.
|
|
|
data.CooperationApplicationApplicant.UserInfo.Phone = param.CooperationApplicationApplicant.UserInfo.UserPhone
|
|
|
data.CooperationApplicationApplicant.UserInfo.UsersName = param.CooperationApplicationApplicant.UserInfo.UserName
|
|
|
data.CooperationApplicationApplicant.UserInfo.UsersId = param.CooperationApplicationApplicant.UserID
|
|
|
return &data
|
|
|
//return nil
|
|
|
} |
...
|
...
|
|