...
|
...
|
@@ -233,3 +233,26 @@ func (cooperationContractService *CooperationContractService) RemoveCooperationC |
|
|
|
|
|
return removeCooperationContractCommand, nil
|
|
|
}
|
|
|
|
|
|
// 返回共创合约下拉选择列表表
|
|
|
func (cooperationContractService *CooperationContractService) ListCooperationContractSelector(
|
|
|
listCooperationContractQuery *query.ListContractSelectorQuery) (int, interface{}, error) {
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator)
|
|
|
result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{
|
|
|
PageNumber: listCooperationContractQuery.PageNumber,
|
|
|
PageSize: listCooperationContractQuery.PageSize,
|
|
|
SponsorName: listCooperationContractQuery.SponsorName,
|
|
|
CooperationContractNumber: listCooperationContractQuery.CooperationContractNumber,
|
|
|
OrgId: listCooperationContractQuery.Operator.OrgId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
data := []dto.CooperationContractItem{}
|
|
|
for i := range result.Grid.List {
|
|
|
item := dto.ToCooperationContractItem(&result.Grid.List[i], listCooperationContractQuery.Operator.OrgId)
|
|
|
data = append(data, *item)
|
|
|
}
|
|
|
|
|
|
return result.Grid.Total, data, nil
|
|
|
} |
...
|
...
|
|