Browse Source

no message

xingzai 1 year ago
parent
commit
21c84c975b
2 changed files with 18 additions and 1 deletions
  1. 17 1
      controllers/report.go
  2. 1 0
      controllers/report_selection.go

+ 17 - 1
controllers/report.go

@@ -1765,6 +1765,12 @@ func (this *ReportController) ResearchDetail() {
 		return
 	}
 
+	PermissionNameMap, err := services.GetPermissionNameMap()
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败 GetPermissionNameMap,Err:" + err.Error()
+		return
+	}
 	//未设置全部可见的只能给弘则内部查看
 	if detail.VisibleRange == 1 || user.CompanyId == utils.HZ_COMPANY_ID {
 		resp.IsShow = true
@@ -1799,6 +1805,7 @@ func (this *ReportController) ResearchDetail() {
 			return
 		}
 		for k2, v2 := range listSecond {
+			v2.PermissionName = PermissionNameMap[v2.ChartPermissionId]
 			listThird, err := models.GetResearchSummarylogSonListThird(articleId, v2.ChartPermissionId, v.Type)
 			if err != nil && err.Error() != utils.ErrNoRow() {
 				br.Msg = "获取信息失败"
@@ -1927,6 +1934,12 @@ func (this *ReportController) MinutesDetailV4() {
 		br.ErrMsg = "报告不存在,Err:" + err.Error() + "articleId:" + strconv.Itoa(articleId)
 		return
 	}
+	PermissionNameMap, err := services.GetPermissionNameMap()
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败 GetPermissionNameMap,Err:" + err.Error()
+		return
+	}
 	//未设置全部可见的只能给弘则内部查看
 	if detail.VisibleRange == 1 || user.CompanyId == utils.HZ_COMPANY_ID {
 		resp.IsShow = true
@@ -1955,6 +1968,7 @@ func (this *ReportController) MinutesDetailV4() {
 			return
 		}
 		for k2, v2 := range listSecond {
+			v2.PermissionName = PermissionNameMap[v2.ChartPermissionId]
 			listThird, err := models.GetMinutesSummarylogListThird(articleId, v2.ChartPermissionId, v.Type)
 			if err != nil && err.Error() != utils.ErrNoRow() {
 				br.Msg = "获取信息失败"
@@ -2061,6 +2075,7 @@ func (this *ReportController) MinutesDetail() {
 		br.ErrMsg = "报告不存在,Err:" + err.Error() + "articleId:" + strconv.Itoa(articleId)
 		return
 	}
+
 	detail.PublishDate = utils.StrTimeToTime(detail.PublishDate).Format("2006-01-02")
 	detail.VideoPlaySeconds = utils.Mp3Time(detail.VideoPlaySeconds)
 	listLog, err := models.GetMinutesSummarylogListAll(articleId)
@@ -2077,12 +2092,13 @@ func (this *ReportController) MinutesDetail() {
 			return
 		}
 		if len(listSonLog) > 0 {
-			listLog[k].List = listSonLog
 			for k2, v2 := range listSonLog {
 				if v2.ReportLink == "0" {
 					listSonLog[k2].ReportLink = ""
 				}
 			}
+			listLog[k].List = listSonLog
+
 		}
 	}
 	//historyRecord := new(models.CygxReportHistoryRecord)

+ 1 - 0
controllers/report_selection.go

@@ -132,6 +132,7 @@ func (this *ReportSelectionController) Detail() {
 		mapChartLog[v.ChartPermissionName] = v.BodyChartSummary
 	}
 	for _, v := range listLog {
+		v.PermissionName = PermissionNameMap[v.ChartPermissionId]
 		item := new(models.ReportSelectionChartPermission)
 		itemSubject := new(models.ReportSelectionChartLogPermission)
 		itemSubject.PermissionName = v.PermissionName