...
|
...
|
@@ -160,6 +160,37 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
return updateCooperationProjectCommand, nil
|
|
|
}
|
|
|
|
|
|
// 返回共创项目管理列表
|
|
|
func (cooperationProjectService *CooperationProjectService) ListCooperationProjectSelector(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) {
|
|
|
listCooperationProjectQuery.PageSize = 999
|
|
|
if err := listCooperationProjectQuery.ValidateQuery(); err != nil {
|
|
|
return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationProjectQuery.Operator)
|
|
|
result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
|
|
|
PageNumber: listCooperationProjectQuery.PageNumber,
|
|
|
PageSize: listCooperationProjectQuery.PageSize,
|
|
|
//发起部门名称
|
|
|
DepartmentName: listCooperationProjectQuery.DepartmentName,
|
|
|
//项目名
|
|
|
CooperationProjectName: listCooperationProjectQuery.CooperationProjectName,
|
|
|
CooperationProjectNumberLike: listCooperationProjectQuery.CooperationProjectNumberLike,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
var items []interface{}
|
|
|
for i := range result.List {
|
|
|
item := result.List[i]
|
|
|
items = append(items, map[string]interface{}{
|
|
|
"cooperationProjectId": item.CooperationProjectID,
|
|
|
"cooperationProjectNumber": item.CooperationProjectNumber,
|
|
|
"cooperationProjectName": item.CooperationProjectName,
|
|
|
})
|
|
|
}
|
|
|
return int64(result.Total), items, nil
|
|
|
}
|
|
|
|
|
|
func NewCooperationProjectService(options map[string]interface{}) *CooperationProjectService {
|
|
|
newCooperationProjectService := &CooperationProjectService{}
|
|
|
return newCooperationProjectService
|
...
|
...
|
|