Browse Source

no message

zhangchuanxing 3 days ago
parent
commit
a92ee7de6e
1 changed files with 58 additions and 21 deletions
  1. 58 21
      controllers/cygx/report_article.go

+ 58 - 21
controllers/cygx/report_article.go

@@ -7589,9 +7589,9 @@ func initgggg() {
 	return
 }
 
-//func init() {
-//	initActComapnyIds()
-//}
+func init() {
+	initActComapnyIds()
+}
 
 // 固收类型互动记录
 func initActComapnyIds() {
@@ -7599,7 +7599,7 @@ func initActComapnyIds() {
 	var condition string
 	mapuserMapbil := make(map[int]*models.WxUserSller)
 
-	companyIdArr := []int{19130, 17227, 5349, 18764}
+	companyIdArr := []int{7577, 5618, 7416, 7408, 15736}
 	//companyIdArr = []int{17227}
 	fmt.Println(companyIdArr)
 	listCompany, err := models.GetWxUserRaiSllerListByUserComapnyId(companyIdArr)
@@ -7664,6 +7664,30 @@ func initActComapnyIds() {
 	cellE := rowTitle.AddCell()
 	cellE.Value = "4月份活动互动量"
 
+	cellE5 := rowTitle.AddCell()
+	cellE5.Value = "5月份活动互动量"
+
+	cellE6 := rowTitle.AddCell()
+	cellE6.Value = "6月份活动互动量"
+
+	cellE7 := rowTitle.AddCell()
+	cellE7.Value = "7月份活动互动量"
+
+	cellE8 := rowTitle.AddCell()
+	cellE8.Value = "8月份活动互动量"
+
+	cellE9 := rowTitle.AddCell()
+	cellE9.Value = "9月份活动互动量"
+
+	cellE10 := rowTitle.AddCell()
+	cellE10.Value = "10月份活动互动量"
+
+	cellE11 := rowTitle.AddCell()
+	cellE11.Value = "11月份活动互动量"
+
+	cellE12 := rowTitle.AddCell()
+	cellE12.Value = "12月份活动互动量"
+
 	cellArt1 := rowTitle.AddCell()
 	cellArt1.Value = "1月份报告互动量"
 
@@ -7676,14 +7700,38 @@ func initActComapnyIds() {
 	cellArt4 := rowTitle.AddCell()
 	cellArt4.Value = "4月份报告互动量"
 
+	cellArt5 := rowTitle.AddCell()
+	cellArt5.Value = "5月份报告互动量"
+
+	cellArt6 := rowTitle.AddCell()
+	cellArt6.Value = "6月份报告互动量"
+
+	cellArt7 := rowTitle.AddCell()
+	cellArt7.Value = "7月份报告互动量"
+
+	cellArt8 := rowTitle.AddCell()
+	cellArt8.Value = "8月份报告互动量"
+
+	cellArt9 := rowTitle.AddCell()
+	cellArt9.Value = "9月份报告互动量"
+
+	cellArt10 := rowTitle.AddCell()
+	cellArt10.Value = "10月份报告互动量"
+
+	cellArt11 := rowTitle.AddCell()
+	cellArt11.Value = "11月份报告互动量"
+
+	cellArt12 := rowTitle.AddCell()
+	cellArt12.Value = "12月份报告互动量"
+
 	for _, v := range listCompany {
 		row := sheet.AddRow()
 		cellComData := row.AddCell()
 		cellComData.Value = v.CompanyName
-		for i := 1; i < 5; i++ {
+		for i := 1; i < 13; i++ {
 			//var statrDate, endDate string
-			statrDate := fmt.Sprint("2025-", i, "-01")
-			endDate := fmt.Sprint("2025-", i, "-31")
+			statrDate := fmt.Sprint("2024-", i, "-01")
+			endDate := fmt.Sprint("2024-", i, "-31")
 			condition = `  AND  ( is_meeting  = 1  OR    duration != '' )  AND  a.activity_time >= '` + statrDate + `'  AND  a.activity_time <='` + endDate + `' AND  s.company_id = ` + strconv.Itoa(v.CompanyId)
 			listData, err := cygx.GetActivityMeetByUser(condition, 0, 99999)
 			if err != nil {
@@ -7692,24 +7740,13 @@ func initActComapnyIds() {
 			}
 			cellActData := row.AddCell()
 			cellActData.Value = strconv.Itoa(len((listData)))
-			//var conditionArt string
-			//var parsArt []interface{}
-			//conditionArt = ` AND  s.create_time >=  ?  AND  s.create_time <= ? AND  s.company_id = ?`
-			//parsArt = append(parsArt, statrDate, endDate, v.CompanyId)
-			//listTotal, err := cygx.GetCygxCompanyUserListSplitArt(conditionArt, parsArt)
-			//if err != nil {
-			//	fmt.Println(err)
-			//	return
-			//}
-			//cellArtData := row.AddCell()
-			//cellArtData.Value = strconv.Itoa(listTotal)
 			fmt.Println(len(listData))
 		}
 
-		for i := 1; i < 5; i++ {
+		for i := 1; i < 13; i++ {
 			//var statrDate, endDate string
-			statrDate := fmt.Sprint("2025-", i, "-01")
-			endDate := fmt.Sprint("2025-", i, "-31")
+			statrDate := fmt.Sprint("2024-", i, "-01")
+			endDate := fmt.Sprint("2024-", i, "-31")
 
 			var conditionArt string
 			var parsArt []interface{}