|
@@ -10,6 +10,7 @@ import (
|
|
|
"eta/eta_chart_lib/services/excel"
|
|
|
"eta/eta_chart_lib/utils"
|
|
|
"fmt"
|
|
|
+ "github.com/shopspring/decimal"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -22,6 +23,7 @@ type ExcelInfoController struct {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
func (this *ExcelInfoController) GetTableDetail() {
|
|
@@ -37,6 +39,7 @@ func (this *ExcelInfoController) GetTableDetail() {
|
|
|
br.ErrMsg = "参数错误,uniqueCode is empty"
|
|
|
return
|
|
|
}
|
|
|
+ fromScene, _ := this.GetInt("FromScene", 0)
|
|
|
key := utils.HZ_CHART_LIB_EXCEL_TABLE_DETAIL + ":" + uniqueCode
|
|
|
resp := new(response.ExcelTableDetailResp)
|
|
|
|
|
@@ -128,6 +131,21 @@ func (this *ExcelInfoController) GetTableDetail() {
|
|
|
}
|
|
|
|
|
|
tableData = excel.HandleTableCell(tableData)
|
|
|
+ config := response.ExcelTableDetailConfigResp{
|
|
|
+ FontSize: 9,
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ confName := models.FromSceneMap[fromScene]
|
|
|
+ if confName != `` {
|
|
|
+ busConf, err := models.GetBusinessConfByKey(confName)
|
|
|
+ if err == nil {
|
|
|
+ sizeDeci, err := decimal.NewFromString(busConf.ConfVal)
|
|
|
+ if err == nil {
|
|
|
+ config.FontSize = int(sizeDeci.IntPart())
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
resp.TableInfo = tableData
|
|
|
resp.Source = excelInfo.Source
|
|
@@ -135,6 +153,7 @@ func (this *ExcelInfoController) GetTableDetail() {
|
|
|
resp.ExcelName = excelInfo.ExcelName
|
|
|
resp.ExcelImage = excelInfo.ExcelImage
|
|
|
resp.UniqueCode = excelInfo.UniqueCode
|
|
|
+ resp.Config = config
|
|
|
|
|
|
if utils.Re == nil {
|
|
|
data, _ := json.Marshal(resp)
|