|
@@ -79,7 +79,7 @@ func ReportViewTimes() (err error) {
|
|
|
cellA:=row.AddCell()
|
|
|
cellA.Value=item.ResearchReportName+"("+item.CreateDate+")"
|
|
|
cellB:=row.AddCell()
|
|
|
- cellB.Value=item.ReportType
|
|
|
+ cellB.Value=v.TypeName
|
|
|
cellC:=row.AddCell()
|
|
|
cellC.Value=strconv.Itoa(item.Count)
|
|
|
cellD:=row.AddCell()
|
|
@@ -95,7 +95,7 @@ func ReportViewTimes() (err error) {
|
|
|
cellA:=row.AddCell()
|
|
|
cellA.Value=item.ResearchReportName
|
|
|
cellB:=row.AddCell()
|
|
|
- cellB.Value=item.ReportType
|
|
|
+ cellB.Value=v.TypeName
|
|
|
cellC:=row.AddCell()
|
|
|
cellC.Value=strconv.Itoa(item.Count)
|
|
|
cellD:=row.AddCell()
|
|
@@ -164,14 +164,12 @@ func ReportViewDetail() (err error) {
|
|
|
//创建excel
|
|
|
file:=xlsx.NewFile()
|
|
|
for _, v := range typeList {
|
|
|
- fmt.Println(v.TypeValue,v.TypeName)
|
|
|
- sheet,err:=file.AddSheet(v.TypeName+"阅读人次数")
|
|
|
- if err!=nil {
|
|
|
- return err
|
|
|
- }
|
|
|
-
|
|
|
fmt.Println(v.TypeName, v.TypeValue)
|
|
|
if v.TypeValue == "rddp" {
|
|
|
+ sheet,err:=file.AddSheet(v.TypeName+"阅读统计")
|
|
|
+ if err!=nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
//标头
|
|
|
rowTitle:=sheet.AddRow()
|
|
|
cellA:=rowTitle.AddCell()
|
|
@@ -203,6 +201,10 @@ func ReportViewDetail() (err error) {
|
|
|
cellE.Value=v.TypeName
|
|
|
}
|
|
|
} else {
|
|
|
+ sheet,err:=file.AddSheet(v.TypeName+"研报阅读统计")
|
|
|
+ if err!=nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
//标头
|
|
|
rowTitle:=sheet.AddRow()
|
|
|
cellA:=rowTitle.AddCell()
|
|
@@ -239,7 +241,7 @@ func ReportViewDetail() (err error) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- savePath:="report_view_times"+time.Now().Format(utils.FormatDateTimeUnSpace)+".xlsx"
|
|
|
+ savePath:="report_viewer_details"+time.Now().Format(utils.FormatDateTimeUnSpace)+".xlsx"
|
|
|
err=file.Save("./"+savePath)
|
|
|
if err!=nil {
|
|
|
return
|