Browse Source

fix:双周报阅读数据统计

Roc 2 years ago
parent
commit
8be2337f47
2 changed files with 5 additions and 4 deletions
  1. 2 1
      models/report_view.go
  2. 3 3
      services/report_view.go

+ 2 - 1
models/report_view.go

@@ -97,6 +97,7 @@ type RddpWeekReportViewersDetail struct {
 	ResearchReportType string
 	ReportCreateDate   string
 	ChapterTitle       string
+	ClassifyNameSecond string
 }
 
 func GetRddpWeekReportViewersDetail(startTime, endTime string) (items []*RddpWeekReportViewersDetail, err error) {
@@ -125,7 +126,7 @@ func GetRddpTwoWeekReportViewersDetail(startTime, endTime string) (items []*Rddp
 	sql := `
 			SELECT
 	u.real_name,c.company_name,uvh.create_time AS created_time,REPLACE ( SUBSTRING( r.create_time, 6, 5 ), '-', '' ) AS report_create_date,
-	r.title AS research_report_name,r.classify_name_second AS research_report_type 
+	r.title AS research_report_name,r.classify_name_second AS research_report_type,r.classify_name_second 
 FROM
 	hongze_rddp.report_view_record AS uvh
 	INNER JOIN hongze_rddp.report AS r ON uvh.report_id = r.id

+ 3 - 3
services/report_view.go

@@ -251,11 +251,11 @@ func ReportViewDetail() (err error) {
 				cellC := row.AddCell()
 				cellC.Value = item.CreatedTime
 				cellD := row.AddCell()
-				cellD.Value = item.ResearchReportName + "(" + item.ReportCreateDate + ")"
+				cellD.Value = `【弘则` + item.ClassifyNameSecond + `】` + item.ResearchReportName
 				cellE := row.AddCell()
-				cellE.Value = item.ReportVariety
+				cellE.Value = item.ClassifyNameSecond
 				cellF := row.AddCell()
-				cellF.Value = v.TypeName
+				cellF.Value = `双周报`
 			}
 			continue
 		}