...
|
...
|
@@ -308,39 +308,10 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje |
|
|
if count, cooperationProjects, err := cooperationProjectRepository.Find(tool_funs.SimpleStructToMap(listCooperationProjectQuery)); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
//var cooperationModeRepository domain.CooperationModeRepository
|
|
|
//if value, err := factory.CreateCooperationProjectRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
//}); err != nil {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
//} else {
|
|
|
// cooperationProjectRepository = value
|
|
|
//}
|
|
|
//var modeMap = make(map[string]*domain.CooperationMode)
|
|
|
//if _, cooperationProjects, err := cooperationModeRepository.Find(map[string]interface{}{"companyId":listCooperationProjectQuery.CompanyId,"orgId":listCooperationProjectQuery.OrgId}); err != nil {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
//}else{
|
|
|
// for i:=range cooperationProjects{
|
|
|
// p :=cooperationProjects[i]
|
|
|
// modeMap[p.CooperationModeNumber]=p
|
|
|
// }
|
|
|
//}
|
|
|
//
|
|
|
//var res []*dto.CooperationProjectsDto
|
|
|
//for i := range cooperationProjects {
|
|
|
// p := cooperationProjects[i]
|
|
|
// tp := &dto.CooperationProjectsDto{}
|
|
|
// tp.LoadDto(p, &domain.CooperationMode{})
|
|
|
// res = append(res, tp)
|
|
|
//}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
//"grid": map[string]interface{}{
|
|
|
//"total": count,
|
|
|
//"list": res,
|
|
|
//},
|
|
|
"list": cooperationProjects,
|
|
|
"total": count,
|
|
|
}, nil
|
...
|
...
|
|