feat: CalculateTable support group expr
正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -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 | } |
-
请 注册 或 登录 后发表评论