|
@@ -162,8 +162,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
}
|
|
|
|
|
|
// 长度固定,避免一直申请内存空间
|
|
|
- dateList = make([]string, endColumn-startColumn+1)
|
|
|
-
|
|
|
+ //dateList = make([]string, endColumn-startColumn+1)
|
|
|
+ dateList = make([]string, 0)
|
|
|
i := 0
|
|
|
for currColumn := startColumn; currColumn <= endColumn; currColumn++ {
|
|
|
currCell, ok := newMixedTableCellDataListMap[startNum][currColumn]
|
|
@@ -172,7 +172,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
err = errors.New(errMsg)
|
|
|
return
|
|
|
}
|
|
|
- dateList[i] = currCell.ShowValue
|
|
|
+ dateList = append(dateList, currCell.ShowValue)
|
|
|
+ //dateList[i] = currCell.ShowValue
|
|
|
i++
|
|
|
}
|
|
|
|
|
@@ -196,7 +197,9 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
endNum = maxRow - 1
|
|
|
}
|
|
|
// 长度固定,避免一直申请内存空间
|
|
|
- dateList = make([]string, endNum-startNum+1)
|
|
|
+ //dateList = make([]string, endNum-startNum+1)
|
|
|
+ fmt.Println("startNum:", startNum, "endNum:", endNum)
|
|
|
+ dateList = make([]string, 0)
|
|
|
i := 0
|
|
|
for currRow := startNum; currRow <= endNum; currRow++ {
|
|
|
currCell, ok := newMixedTableCellDataListMap[currRow][startColumn]
|
|
@@ -205,8 +208,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
err = errors.New(errMsg)
|
|
|
return
|
|
|
}
|
|
|
- //dateList = append(dateList, currCell.Value)
|
|
|
- dateList[i] = currCell.ShowValue
|
|
|
+ dateList = append(dateList, currCell.Value)
|
|
|
+ //dateList[i] = currCell.ShowValue
|
|
|
i++
|
|
|
}
|
|
|
}
|
|
@@ -255,7 +258,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
endColumn = maxCol - 1
|
|
|
}
|
|
|
// 长度固定,避免一直申请内存空间
|
|
|
- dataList = make([]string, endColumn-startColumn+1)
|
|
|
+ //dataList = make([]string, endColumn-startColumn+1)
|
|
|
+ dataList = make([]string, 0)
|
|
|
i := 0
|
|
|
for currColumn := startColumn; currColumn <= endColumn; currColumn++ {
|
|
|
currCell, ok := newMixedTableCellDataListMap[startNum][currColumn]
|
|
@@ -264,8 +268,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
err = errors.New(errMsg)
|
|
|
return
|
|
|
}
|
|
|
- //dataList = append(dataList, currCell.Value)
|
|
|
- dataList[i] = currCell.ShowValue
|
|
|
+ dataList = append(dataList, currCell.Value)
|
|
|
+ //dataList[i] = currCell.ShowValue
|
|
|
i++
|
|
|
}
|
|
|
|
|
@@ -290,7 +294,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
}
|
|
|
|
|
|
// 长度固定,避免一直申请内存空间
|
|
|
- dataList = make([]string, endNum-startNum+1)
|
|
|
+ //dataList = make([]string, endNum-startNum+1)
|
|
|
+ dataList = make([]string, 0)
|
|
|
i := 0
|
|
|
for currRow := startNum; currRow <= endNum; currRow++ {
|
|
|
currCell, ok := newMixedTableCellDataListMap[currRow][startColumn]
|
|
@@ -299,8 +304,8 @@ func GetBalanceExcelEdbData(excelEdbMappingItem *excelModel.ExcelChartEdb, newMi
|
|
|
err = errors.New(errMsg)
|
|
|
return
|
|
|
}
|
|
|
- //dataList = append(dataList, currCell.Value)
|
|
|
- dataList[i] = currCell.ShowValue
|
|
|
+ dataList = append(dataList, currCell.Value)
|
|
|
+ //dataList[i] = currCell.ShowValue
|
|
|
i++
|
|
|
}
|
|
|
}
|
|
@@ -534,10 +539,10 @@ func SyncBalanceEdbData(excelInfo *excelModel.ExcelInfo, balanceTableData [][]re
|
|
|
|
|
|
for _, mapping := range tmpMappingList {
|
|
|
excelEdbMap[mapping.ExcelChartEdbId] = mapping
|
|
|
- err, _ = GetBalanceExcelEdbData(mapping, newExcelDataMap, excelDataMap, excelAllRows, excelAllCols)
|
|
|
- if err != nil {
|
|
|
- err = fmt.Errorf(" 获取图表,指标信息失败 Err:%s", err.Error())
|
|
|
- return
|
|
|
+ er, msg := GetBalanceExcelEdbData(mapping, newExcelDataMap, excelDataMap, excelAllRows, excelAllCols)
|
|
|
+ if er != nil {
|
|
|
+ utils.FileLog.Info(fmt.Sprintf(" 获取图表,指标信息失败 Err:%s, %s", msg, er.Error()))
|
|
|
+ continue
|
|
|
}
|
|
|
}
|
|
|
// 批量更新图表数据
|