|
@@ -197,7 +197,69 @@ func ReportViewDetail() (err error) {
|
|
|
cellF.Value = v.TypeName
|
|
|
}
|
|
|
continue
|
|
|
+ } else if v.TypeName == `双周报` {
|
|
|
+ sheet, err := file.AddSheet(v.TypeName + "研报阅读统计")
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ //标头
|
|
|
+ rowTitle := sheet.AddRow()
|
|
|
+ cellA := rowTitle.AddCell()
|
|
|
+ cellA.Value = "用户名称"
|
|
|
+ cellB := rowTitle.AddCell()
|
|
|
+ cellB.Value = "公司名称"
|
|
|
+ cellC := rowTitle.AddCell()
|
|
|
+ cellC.Value = "访问时间"
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
+ cellD.Value = "访问标题"
|
|
|
+ cellE := rowTitle.AddCell()
|
|
|
+ cellE.Value = "访问页面"
|
|
|
+ cellF := rowTitle.AddCell()
|
|
|
+ cellF.Value = "报告类型"
|
|
|
+
|
|
|
+ items, err := models.GetResearchReportViewersDetail(startTime, endTime, v.TypeValue)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ for _, item := range items {
|
|
|
+ row := sheet.AddRow()
|
|
|
+ cellA := row.AddCell()
|
|
|
+ cellA.Value = item.RealName
|
|
|
+ cellB := row.AddCell()
|
|
|
+ cellB.Value = item.CompanyName
|
|
|
+ cellC := row.AddCell()
|
|
|
+ cellC.Value = item.CreatedTime
|
|
|
+ cellD := row.AddCell()
|
|
|
+ cellD.Value = item.ResearchReportName
|
|
|
+ cellE := row.AddCell()
|
|
|
+ cellE.Value = item.ReportVariety
|
|
|
+ cellF := row.AddCell()
|
|
|
+ cellF.Value = v.TypeName
|
|
|
+ }
|
|
|
+
|
|
|
+ //新双周报的数据
|
|
|
+ weekItems, err := models.GetRddpTwoWeekReportViewersDetail(startTime, endTime)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ for _, item := range weekItems {
|
|
|
+ row := sheet.AddRow()
|
|
|
+ cellA := row.AddCell()
|
|
|
+ cellA.Value = item.RealName
|
|
|
+ cellB := row.AddCell()
|
|
|
+ cellB.Value = item.CompanyName
|
|
|
+ cellC := row.AddCell()
|
|
|
+ cellC.Value = item.CreatedTime
|
|
|
+ cellD := row.AddCell()
|
|
|
+ cellD.Value = item.ResearchReportName + "(" + item.ReportCreateDate + ")"
|
|
|
+ cellE := row.AddCell()
|
|
|
+ cellE.Value = item.ReportVariety
|
|
|
+ cellF := row.AddCell()
|
|
|
+ cellF.Value = v.TypeName
|
|
|
+ }
|
|
|
+ continue
|
|
|
}
|
|
|
+
|
|
|
if v.TypeValue == "rddp" {
|
|
|
sheet, err := file.AddSheet(v.TypeName + "阅读统计")
|
|
|
if err != nil {
|