作者 tangxuhui

调整 合约查询

... ... @@ -215,34 +215,15 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
}
type CooperationContractUndertake struct {
Undertaker struct {
UsersName string `json:"userName"`
Phone string `json:"phone"`
UserId int `json:"userId,string,"`
UserCode string `json:"userCode"`
} `json:"undertaker"`
CooperationContractDescription string `json:"cooperationContractDescription"`
CooperationContractId int `json:"cooperationContractId,string,"`
CooperationContractName string `json:"cooperationContractName"`
CooperationContractNumber string `json:"cooperationContractNumber"`
CooperationContractSponsor struct {
UsersName string `json:"userName"`
Phone string `json:"phone"`
UserId int `json:"userId,string,"`
UserCode string `json:"userCode"`
} `json:"cooperationContractSponsor"`
CooperationMode struct {
CooperationModeId int `json:"cooperationModeId,string"`
CooperationModeName string `json:"cooperationModeName"`
CooperationModeNumber string `json:"cooperationModeNumber"`
} `json:"cooperationMode"`
Org struct {
OrgName string `json:"orgName"`
} `json:"org"`
Attachment []domain.Attachment `json:"attachment"`
UndertakerId int64 `json:"undertakerId,string"` // 承接人ID
UndertakerCode string `json:"undertakerCode"` // 承接人编号
UndertakerName string `json:"undertakerName"` // 承接人姓名
UndertakerPhone string `json:"undertakerPhone"` // 承接人电话
CooperationContractNumber string `json:"cooperationContractNumber"` // 项目合约编号
CooperationContractName string `json:"cooperationContractName"` // 项目合约名称
Attachment []domain.Attachment `json:"attachment"` // 合同附件
SponsorName string `json:"sponsorName"` // 发起人姓名
DepartmentName string `json:"departmentName"` // 发起部门名称
CooperationModeName string `json:"cooperationModeName"` // 共创模式名称
OrgName string `json:"orgName"` // 组织机构名称
}
// func ToCooperationContractUndertake(allied_creation_cooperation.DataCooperationContractSearchByUndertaker) *CooperationContractUndertake {
// data := CooperationContractUndertake{}
// return &data
// }
... ...
... ... @@ -205,7 +205,7 @@ func NewCooperationContractService(options map[string]interface{}) *CooperationC
func (cooperationContractService *CooperationContractService) SearchCooperationContractsByUndertake(queryParam *query.SearchCooperationContractsByUndertake) (
int, interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(queryParam.Operator)
_, err := creationCooperationGateway.CooperationContractsSearchByUndertaker(
result, err := creationCooperationGateway.CooperationContractsSearchByUndertaker(
allied_creation_cooperation.ReqCooperationContractSearchByUndertaker{
CooperationContractName: queryParam.CooperationContractName,
SponsorName: queryParam.ContractSponsor,
... ... @@ -213,8 +213,8 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
PageIndex: queryParam.PageSize,
CompanyId: queryParam.Operator.CompanyId,
})
data := []dto.CooperationContractUndertake{{}}
return 10, data, err
return result.Grid.Total, result.Grid.List, err
}
// 移除共创合约详情
... ...
... ... @@ -258,6 +258,22 @@ type (
}
DataCooperationContractSearchByUndertaker struct {
Grid struct {
Total int
List []struct {
UndertakerId int64 `json:"undertakerId,string"` // 承接人ID
UndertakerCode string `json:"undertakerCode"` // 承接人编号
UndertakerName string `json:"undertakerName"` // 承接人姓名
UndertakerPhone string `json:"undertakerPhone"` // 承接人电话
CooperationContractNumber string `json:"cooperationContractNumber"` // 项目合约编号
CooperationContractName string `json:"cooperationContractName"` // 项目合约名称
Attachment []domain.Attachment `json:"attachment"` // 合同附件
SponsorName string `json:"sponsorName"` // 发起人姓名
DepartmentName string `json:"departmentName"` // 发起部门名称
CooperationModeName string `json:"cooperationModeName"` // 共创模式名称
OrgName string `json:"orgName"` // 组织机构名称
}
}
}
)
... ...