Browse Source

no message

zhangchuanxing 2 weeks ago
parent
commit
f76b9e5eee
1 changed files with 13 additions and 1 deletions
  1. 13 1
      controllers/cygx/report_article.go

+ 13 - 1
controllers/cygx/report_article.go

@@ -6050,6 +6050,18 @@ func initPointBill() {
 		return
 	}
 
+	listCompany, err := company.GetOverseasCompanysByCompanyIds(companyIds)
+	if err != nil {
+		fmt.Println(err)
+		return
+	}
+
+	mapCompamyName := make(map[int]string)
+
+	for _, v := range listCompany {
+		mapCompamyName[v.CompanyId] = v.CompanyName
+	}
+
 	//创建excel
 	dir, err := os.Executable()
 	exPath := filepath.Dir(dir)
@@ -6113,7 +6125,7 @@ func initPointBill() {
 		}
 		row := sheet.AddRow()
 		cellADatatitle := row.AddCell()
-		cellADatatitle.Value = v.CompanyName
+		cellADatatitle.Value = mapCompamyName[v.CompanyId]
 
 		cellADataPd := row.AddCell()