|
@@ -7590,7 +7590,7 @@ func initgggg() {
|
|
}
|
|
}
|
|
|
|
|
|
//func init() {
|
|
//func init() {
|
|
-// initActComapnyIds()
|
|
|
|
|
|
+// initArticle()
|
|
//}
|
|
//}
|
|
|
|
|
|
// 固收类型互动记录
|
|
// 固收类型互动记录
|
|
@@ -7776,7 +7776,6 @@ func initActMobiles() {
|
|
|
|
|
|
mopbiles := "15669219918,96582719,56955949,90009909988,909808783909,22388888,67644885,55295728,4157460042,22388696,14714925361,90445630,22388817,22388806"
|
|
mopbiles := "15669219918,96582719,56955949,90009909988,909808783909,22388888,67644885,55295728,4157460042,22388696,14714925361,90445630,22388817,22388806"
|
|
var condition string
|
|
var condition string
|
|
- mapuserMapbil := make(map[int]*models.WxUserSller)
|
|
|
|
|
|
|
|
//创建excel
|
|
//创建excel
|
|
dir, err := os.Executable()
|
|
dir, err := os.Executable()
|
|
@@ -7929,3 +7928,115 @@ func initActMobiles() {
|
|
}
|
|
}
|
|
fmt.Println("end")
|
|
fmt.Println("end")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 指定客户下固收阅读记录
|
|
|
|
+func initArticle() {
|
|
|
|
+
|
|
|
|
+ //创建excel
|
|
|
|
+ dir, err := os.Executable()
|
|
|
|
+ exPath := filepath.Dir(dir)
|
|
|
|
+ downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
|
|
+ xlsxFile := xlsx.NewFile()
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println(err)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ style := xlsx.NewStyle()
|
|
|
|
+ alignment := xlsx.Alignment{
|
|
|
|
+ Horizontal: "center",
|
|
|
|
+ Vertical: "center",
|
|
|
|
+ WrapText: true,
|
|
|
|
+ }
|
|
|
|
+ style.Alignment = alignment
|
|
|
|
+ style.ApplyAlignment = true
|
|
|
|
+
|
|
|
|
+ redStyle := xlsx.NewStyle()
|
|
|
|
+ redStyle.Alignment = alignment
|
|
|
|
+ redStyle.ApplyAlignment = true
|
|
|
|
+ redStyle.Font.Color = "ff0000"
|
|
|
|
+ //定义底色需要标黄的 单元格颜色
|
|
|
|
+ redFill := xlsx.Fill{"solid", "ffff00", "ffff00"}
|
|
|
|
+ redStyle.Fill = redFill
|
|
|
|
+ //redStyle.Border = *border
|
|
|
|
+
|
|
|
|
+ var sheetName string
|
|
|
|
+ sheetName = "互动信息"
|
|
|
|
+ sheet, err := xlsxFile.AddSheet(sheetName)
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println(err)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ //标头
|
|
|
|
+ rowTitle := sheet.AddRow()
|
|
|
|
+
|
|
|
|
+ cellB := rowTitle.AddCell()
|
|
|
|
+ cellB.Value = "手机号"
|
|
|
|
+
|
|
|
|
+ cellActime := rowTitle.AddCell()
|
|
|
|
+ cellActime.Value = "姓名"
|
|
|
|
+
|
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
|
+ cellD.Value = "公司名"
|
|
|
|
+
|
|
|
|
+ cellE := rowTitle.AddCell()
|
|
|
|
+ cellE.Value = "阅读时间"
|
|
|
|
+
|
|
|
|
+ cellE5 := rowTitle.AddCell()
|
|
|
|
+ cellE5.Value = "报告标题"
|
|
|
|
+
|
|
|
|
+ cellE6 := rowTitle.AddCell()
|
|
|
|
+ cellE6.Value = "报告发布时间"
|
|
|
|
+
|
|
|
|
+ listData, err := cygx.GetArticleHistoryListInitss()
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println(err)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var mobils []string
|
|
|
|
+
|
|
|
|
+ for _, v := range listData {
|
|
|
|
+ mobils = append(mobils, v.Mobile)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ listUserFicc, err := models.GetWxUserRaiSllerListByUserMobileFiic(mobils)
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println(err)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ mapUser := make(map[string]string)
|
|
|
|
+ for _, v := range listUserFicc {
|
|
|
|
+ mapUser[v.Mobile] = v.RealName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range listData {
|
|
|
|
+ row := sheet.AddRow()
|
|
|
|
+ cellActData1 := row.AddCell()
|
|
|
|
+ cellActData1.Value = v.Mobile
|
|
|
|
+
|
|
|
|
+ cellActData2 := row.AddCell()
|
|
|
|
+ if v.RealName == "" {
|
|
|
|
+ v.RealName = mapUser[v.Mobile]
|
|
|
|
+ }
|
|
|
|
+ cellActData2.Value = v.RealName
|
|
|
|
+
|
|
|
|
+ cellActData3 := row.AddCell()
|
|
|
|
+ cellActData3.Value = v.CompanyName
|
|
|
|
+
|
|
|
|
+ cellActData4 := row.AddCell()
|
|
|
|
+ cellActData4.Value = v.CreateTime
|
|
|
|
+
|
|
|
|
+ cellActData5 := row.AddCell()
|
|
|
|
+ cellActData5.Value = v.Title
|
|
|
|
+
|
|
|
|
+ cellActData6 := row.AddCell()
|
|
|
|
+ cellActData6.Value = v.PublishDate
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println(err)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ fmt.Println("end")
|
|
|
|
+}
|