|
@@ -397,18 +397,19 @@ func GetReportPage(pageInfo page.PageInfo, orgIds map[string][]int, searchAll bo
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
-func GetReportPageByAnalyst(pageInfo page.PageInfo, analyst string, reportIds []int) (list []reportService.ReportDTO, err error) {
|
|
|
+func GetReportPageByAnalyst(pageInfo page.PageInfo, analyst string, reportIds []int, templateUserId int) (list []reportService.ReportDTO, err error) {
|
|
|
list, err = reportService.GetReportPageByAnalyst(pageInfo, analyst, reportIds)
|
|
|
+ list, err = dealReportInfo(list, true, templateUserId)
|
|
|
//并发获取研报的标签
|
|
|
- var wg sync.WaitGroup
|
|
|
- wg.Add(len(list))
|
|
|
- for i := 0; i < len(list); i++ {
|
|
|
- go func(report *reportService.ReportDTO) {
|
|
|
- defer wg.Done()
|
|
|
- report.Permissions, report.PermissionNames = GetReportPermissionNames(report.OrgId, report.Source)
|
|
|
- }(&list[i])
|
|
|
- }
|
|
|
- wg.Wait()
|
|
|
+ //var wg sync.WaitGroup
|
|
|
+ //wg.Add(len(list))
|
|
|
+ //for i := 0; i < len(list); i++ {
|
|
|
+ // go func(report *reportService.ReportDTO) {
|
|
|
+ // defer wg.Done()
|
|
|
+ // report.Permissions, report.PermissionNames = GetReportPermissionNames(report.OrgId, report.Source)
|
|
|
+ // }(&list[i])
|
|
|
+ //}
|
|
|
+ //wg.Wait()
|
|
|
if err != nil {
|
|
|
err = exception.New(exception.QueryReportPageFailed)
|
|
|
}
|