|
@@ -166,7 +166,7 @@ func getETAReportDetail(report *reportService.ReportDTO) (etaReport reportServic
|
|
|
func getHTReportDetail(report *reportService.ReportDTO) (url string, err error) {
|
|
|
return reportService.GetHtReport(report.OrgId)
|
|
|
}
|
|
|
-func GetTotalPageCountByPermissionIds(permissionIds []int, isLogin bool, userId int) (total int64, latestId int64, ids map[string][]int) {
|
|
|
+func GetTotalPageCountByPermissionIds(permissionIds []int, isLogin bool, userId int) (total int64, latestId int64, ids map[string][]int, disCardIds []int) {
|
|
|
return getCount(permissionIds, isLogin, userId)
|
|
|
}
|
|
|
|
|
@@ -193,9 +193,9 @@ func SearchReportProduct(key string, docIds []int) (list []reportService.ReportD
|
|
|
func RangeSearchByAnalyst(analystName string, userId int) (total int64, latestId int64, ids []int) {
|
|
|
return getCountByAnalyst(nil, true, userId, analystName)
|
|
|
}
|
|
|
-func RangeSearch(key string, isLogin bool, userId int) (total int64, latestId int64, reportIds []int, err error) {
|
|
|
+func RangeSearch(key string, isLogin bool, userId int) (total int64, latestId int64, reportIds []int, discardIds []int, err error) {
|
|
|
var orgIds map[string][]int
|
|
|
- _, latestId, orgIds = getCount(nil, isLogin, userId)
|
|
|
+ _, latestId, orgIds, discardIds = getCount(nil, isLogin, userId)
|
|
|
reportIds, err = GetReportByIdListByOrgIds(orgIds)
|
|
|
if err != nil {
|
|
|
logger.Error("获取报告ID列表失败:%v", err)
|
|
@@ -310,11 +310,10 @@ func DealReportInfo(report *reportService.ReportDTO, isLogin bool, userId int) (
|
|
|
}
|
|
|
|
|
|
// GetReportPage 分页获取报告列表
|
|
|
-func GetReportPage(pageInfo page.PageInfo, orgIds map[string][]int, searchAll bool, isLogin bool, userId int) (reports []reportService.ReportDTO, err error) {
|
|
|
+func GetReportPage(pageInfo page.PageInfo, orgIds map[string][]int, discardIds []int, isLogin bool, userId int) (reports []reportService.ReportDTO, err error) {
|
|
|
var list []reportService.ReportDTO
|
|
|
- list, err = reportService.GetReportPageByOrgIds(pageInfo, orgIds, searchAll)
|
|
|
+ list, err = reportService.GetReportPageByOrgIds(pageInfo, orgIds, discardIds)
|
|
|
reports, err = dealReportInfo(list, isLogin, userId)
|
|
|
-
|
|
|
if err != nil {
|
|
|
err = exception.New(exception.QueryReportPageFailed)
|
|
|
}
|
|
@@ -575,7 +574,7 @@ func RangePermissionIds(isLogin bool, userId int) (filterPermissionIds []int, ri
|
|
|
return user.GetRiskLevelPermissionList(nil, isLogin, userId)
|
|
|
}
|
|
|
|
|
|
-func getCount(permissionIds []int, isLogin bool, userId int) (total int64, latestId int64, ids map[string][]int) {
|
|
|
+func getCount(permissionIds []int, isLogin bool, userId int) (total int64, latestId int64, ids map[string][]int, discardIds []int) {
|
|
|
filterPermissionIds, _, err := user.GetRiskLevelPermissionList(permissionIds, isLogin, userId)
|
|
|
if err != nil {
|
|
|
logger.Error("获取过滤品种信息失败:%v", err)
|