作者 yangfu

feat: CalculateTable support group expr

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