Browse Source

fix:添加sheet的index保存

Roc 1 year ago
parent
commit
39fbb4aeda

+ 2 - 0
models/data_manage/excel/excel_info.go

@@ -394,6 +394,7 @@ func AddExcelInfoAndSheet(excelInfo *ExcelInfo, sheetParamsList []AddExcelSheetP
 			ExcelInfoId:  excelInfo.ExcelInfoId,
 			SheetName:    sheetInfo.SheetName,
 			PageNum:      dataNum,
+			Index:        sheetInfo.Index,
 			Sort:         sheetInfo.Sort,
 			Config:       sheetInfo.Config,
 			CalcChain:    sheetInfo.CalcChain,
@@ -468,6 +469,7 @@ func SaveExcelInfoAndSheet(excelInfo *ExcelInfo, updateExcelInfoParam []string,
 			ExcelInfoId:  excelInfo.ExcelInfoId,
 			SheetName:    sheetInfo.SheetName,
 			PageNum:      dataNum,
+			Index:        sheetInfo.Index,
 			Sort:         sheetInfo.Sort,
 			Config:       sheetInfo.Config,
 			CalcChain:    sheetInfo.CalcChain,

+ 2 - 0
models/data_manage/excel/excel_sheet.go

@@ -11,6 +11,7 @@ type ExcelSheet struct {
 	ExcelInfoId  int       `description:"excel的id"`
 	SheetName    string    `description:"sheet名称"`
 	PageNum      int       `description:"总页码数"`
+	Index        string    `description:"excel数据中的index"`
 	Sort         int       `description:"排序"`
 	Config       string    `description:"配置信息"`
 	CalcChain    string    `description:"计算公式"`
@@ -88,6 +89,7 @@ type AddExcelSheetParams struct {
 	ExcelSheetId int               `orm:"column(excel_sheet_id);pk"`
 	ExcelInfoId  int               `description:"excel的id"`
 	SheetName    string            `description:"sheet名称"`
+	Index        string            `description:"excel数据中的index"`
 	Sort         int               `description:"排序"`
 	Config       string            `description:"配置信息"`
 	CalcChain    string            `description:"计算公式"`

+ 2 - 0
services/data/excel/custom_analysis.go

@@ -133,6 +133,7 @@ func AddCustomAnalysisTable(excelName, content, excelImage string, excelClassify
 			ExcelSheetId: 0,
 			ExcelInfoId:  0,
 			SheetName:    sheetName,
+			Index:        sheetInfo.Index,
 			Sort:         k,
 			Config:       string(sheetConf),
 			CalcChain:    string(sheetCalcChain),
@@ -334,6 +335,7 @@ func SaveCustomAnalysisTable(excelInfo *excel.ExcelInfo, excelName, content, exc
 			ExcelSheetId: 0,
 			ExcelInfoId:  excelInfo.ExcelInfoId,
 			SheetName:    sheetName,
+			Index:        sheetInfo.Index,
 			Sort:         k,
 			Config:       string(sheetConf),
 			CalcChain:    string(sheetCalcChain),