zwxi 7 mesi fa
parent
commit
7debe6fc0a
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      controllers/commodity_coal.go

+ 5 - 2
controllers/commodity_coal.go

@@ -1059,14 +1059,17 @@ func (this *CoalMineDataController) Coastal() {
 	for _, sheet := range req.SheetData {
 		sheetName = sheet.Name
 		//遍历行读取
-		maxCol := sheet.MaxCol
-		for i := 0; i < maxCol; i++ {
+		maxRow := sheet.MaxRow
+		for i := 0; i < maxRow; i++ {
 			if i == 0 {
 				row := sheet.Rows[i]
 				cells := row.Cells
 				for k, cell := range cells {
 					if k > 0 && k < 9 {
 						text := cell.Value
+						if text == "" {
+							continue
+						}
 						groupMap[k] = text
 						var item models.BaseFromCoalmineMapping
 						//合计命名