更新了api-extensions_view模块
This commit is contained in:
parent
81e9d6f4ca
commit
54f6f6cdea
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>io.gisbi</groupId>
|
||||
<artifactId>extensions</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>extensions-view</artifactId>
|
||||
@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.gisbi</groupId>
|
||||
<artifactId>extensions-datasource</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
|
@ -11,6 +11,8 @@ public class ChartCalcDataResult {
|
||||
private List<String[]> originData;
|
||||
private List<String[]> assistData;
|
||||
private List<ChartSeniorAssistDTO> dynamicAssistFields;
|
||||
private List<String[]> assistDataOriginList;
|
||||
private List<ChartSeniorAssistDTO> dynamicAssistFieldsOriginList;
|
||||
private Map<String, Object> context;
|
||||
// TODO 数据源插件化之后换成整个请求对象
|
||||
private String querySql;
|
||||
|
@ -4,9 +4,11 @@ package io.gisbi.extensions.view.dto;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.gisbi.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import io.gisbi.extensions.view.filter.FilterTreeObj;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ -24,6 +26,6 @@ public class ChartExtFilterDTO {
|
||||
private String datePattern;
|
||||
@JsonIgnore
|
||||
private List<String> originValue;
|
||||
private int filterType;// 0-过滤组件,1-下钻,2-联动,外部参数
|
||||
|
||||
private int filterType;// 0-过滤组件,1-下钻,2-联动,外部参数 3-联动 自定义参数
|
||||
private FilterTreeObj customFilter;
|
||||
}
|
||||
|
@ -15,10 +15,21 @@ public class ChartViewFieldBaseDTO extends DatasetTableFieldDTO implements Seria
|
||||
|
||||
private String sort;
|
||||
|
||||
/**
|
||||
* 日期解析格式,后端参与聚合运算
|
||||
*/
|
||||
private String dateStyle;
|
||||
|
||||
/**
|
||||
* 日期分隔符
|
||||
*/
|
||||
private String datePattern;
|
||||
|
||||
/**
|
||||
* 日期显示格式,仅前端图表格式化
|
||||
*/
|
||||
private String dateShowFormat;
|
||||
|
||||
private Integer extField;
|
||||
|
||||
private String chartType;
|
||||
|
@ -1,13 +1,16 @@
|
||||
package io.gisbi.extensions.view.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FormatterCfgDTO {
|
||||
private String type = "auto"; // auto,value,percent
|
||||
private String unitLanguage = "ch";
|
||||
private Integer unit = 1; // 换算单位
|
||||
private String suffix = ""; // 单位后缀
|
||||
private Integer decimalCount = 0; // 小数位数
|
||||
|
@ -4,7 +4,7 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TableCalcTotalCfg {
|
||||
private String dataeaseName;
|
||||
private String gisbiName;
|
||||
private String aggregation;
|
||||
private String originName;
|
||||
private int extField;
|
||||
|
@ -0,0 +1,39 @@
|
||||
package io.gisbi.extensions.view.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TableHeader {
|
||||
private HeaderGroupConfig headerGroupConfig;
|
||||
private boolean headerGroup;
|
||||
|
||||
|
||||
@Data
|
||||
static
|
||||
public class HeaderGroupConfig {
|
||||
private List<MetaInfo> meta = new ArrayList<>();
|
||||
private List<ColumnInfo> columns = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Data
|
||||
static
|
||||
public class ColumnInfo {
|
||||
@Getter
|
||||
private String key;
|
||||
private List<ColumnInfo> children = new ArrayList<>();
|
||||
private Integer width;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Data
|
||||
static
|
||||
public class MetaInfo {
|
||||
private String field;
|
||||
private String name;
|
||||
|
||||
}
|
||||
}
|
@ -127,16 +127,16 @@ public class ChartDataUtil {
|
||||
data.forEach(ele -> {
|
||||
Map<String, Object> d = new HashMap<>();
|
||||
for (int i = 0; i < fields.size(); i++) {
|
||||
if (ObjectUtils.isNotEmpty(desensitizationList.keySet()) && desensitizationList.keySet().contains(fields.get(i).getDataeaseName())) {
|
||||
d.put(fields.get(i).getDataeaseName(), desensitizationValue(desensitizationList.get(fields.get(i).getDataeaseName()), String.valueOf(ele[i])));
|
||||
if (ObjectUtils.isNotEmpty(desensitizationList.keySet()) && desensitizationList.keySet().contains(fields.get(i).getGisbiName())) {
|
||||
d.put(fields.get(i).getGisbiName(), desensitizationValue(desensitizationList.get(fields.get(i).getGisbiName()), String.valueOf(ele[i])));
|
||||
continue;
|
||||
}
|
||||
if (i == ele.length) break;
|
||||
ChartViewFieldDTO chartViewFieldDTO = fields.get(i);
|
||||
if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
|
||||
d.put(fields.get(i).getGisbiName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
|
||||
} else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3 || chartViewFieldDTO.getDeType() == 4) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP));
|
||||
d.put(fields.get(i).getGisbiName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP));
|
||||
}
|
||||
}
|
||||
tableRow.add(d);
|
||||
|
Loading…
Reference in New Issue
Block a user