forked from github/dataease
feat(视图): chart调整
This commit is contained in:
parent
9ae93df8fb
commit
b0e42fd75c
@ -153,7 +153,7 @@ public class ChartViewService {
|
||||
|
||||
public String transMysqlSQL(String table, List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> yAxis) {
|
||||
// TODO 字段汇总 排序等
|
||||
String[] field = yAxis.stream().map(y -> "CAST(" + y.getSummary() + "(" + y.getOriginName() + ") AS DECIMAL(10,2))").toArray(String[]::new);
|
||||
String[] field = yAxis.stream().map(y -> "CAST(" + y.getSummary() + "(" + y.getOriginName() + ") AS DECIMAL(20,2))").toArray(String[]::new);
|
||||
String[] group = xAxis.stream().map(ChartViewFieldDTO::getOriginName).toArray(String[]::new);
|
||||
return MessageFormat.format("SELECT {0},{1} FROM {2} GROUP BY {3}", StringUtils.join(group, ","), StringUtils.join(field, ","), table, StringUtils.join(group, ","));
|
||||
}
|
||||
|
@ -14,8 +14,7 @@
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</span>
|
||||
</el-dropdown></span>
|
||||
</el-dropdown>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
@ -26,8 +26,7 @@
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</span>
|
||||
</el-dropdown></span>
|
||||
</el-dropdown>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user