作者 yangfu

feat: CalculateTable support group expr

@@ -77,6 +77,7 @@ type ( @@ -77,6 +77,7 @@ type (
77 FieldSchema FieldSchema `json:"fieldSchema"` 77 FieldSchema FieldSchema `json:"fieldSchema"`
78 // 字段新的英文名称(3.汇总集4.计算项中对应的新字段名称) 78 // 字段新的英文名称(3.汇总集4.计算项中对应的新字段名称)
79 GroupFieldName string `json:"groupFieldName"` 79 GroupFieldName string `json:"groupFieldName"`
  80 + CalculateExpression string `json:"calculateExpression"`
80 } 81 }
81 ) 82 )
82 83
@@ -207,6 +208,7 @@ func NewFormulaCalculate(table *domain.Table, queryComponent *domain.QueryCompon @@ -207,6 +208,7 @@ func NewFormulaCalculate(table *domain.Table, queryComponent *domain.QueryCompon
207 res.FormulaGroupFields = append(res.FormulaGroupFields, &FormulaGroupField{ 208 res.FormulaGroupFields = append(res.FormulaGroupFields, &FormulaGroupField{
208 DatabaseTableName: queryComponent.MasterTable.SQLName, 209 DatabaseTableName: queryComponent.MasterTable.SQLName,
209 FieldSchema: NewFieldSchemaFromField(f.Field), 210 FieldSchema: NewFieldSchemaFromField(f.Field),
  211 + CalculateExpression: f.Expr.ExprSql,
210 GroupFieldName: tableField.SQLName, 212 GroupFieldName: tableField.SQLName,
211 }) 213 })
212 } 214 }