Browse Source

Merge pull request #1565 in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit 'fd15016024ee9bf2a25b5b35946e97458d5f98c7':
  CHART-12791 去掉埋点中的类型判断
feature/big-screen
Bjorn 5 years ago
parent
commit
a7d6318735
  1. 37
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

37
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

@ -7,7 +7,6 @@ import com.fr.design.mainframe.template.info.TemplateInfo;
import com.fr.design.mainframe.template.info.TemplateProcessInfo;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
@ -57,36 +56,29 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
}
public void collection(ChartProvider chartProvider, String createTime, boolean isReuse) {
if (chartProvider instanceof VanChart) {
VanChart vanChart = (VanChart) chartProvider;
collection(vanChart.getUuid(), vanChart.getID(), createTime, isReuse);
}
collection(chartProvider.getChartUuid(), chartProvider.getID(), createTime, isReuse);
}
/**
* 新建图表保存状态
*/
public void collection(String chartId, String chartType, String createTime, boolean isReuse) {
if (!shouldCollectInfo()) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) {
return;
}
ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType, createTime, true, isReuse);
chartInfoCacheMap.put(chartId, chartInfo);
}
public void updateChartPropertyTime(ChartProvider chartProvider) {
if (chartProvider instanceof VanChart) {
VanChart vanChart = (VanChart) chartProvider;
updateChartPropertyTime(vanChart.getUuid(), vanChart.getID());
}
updateChartPropertyTime(chartProvider.getChartUuid(), chartProvider.getID());
}
/**
* 图表编辑更新编辑时间
*/
public void updateChartPropertyTime(String chartId, String chartType) {
if (!shouldCollectInfo()) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) {
return;
}
ChartInfo chartInfo = getOrCreateChartInfo(chartId, chartType, null);
@ -99,17 +91,14 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
}
public void updateChartTypeTime(ChartProvider chartProvider, String oldType) {
if (chartProvider instanceof VanChart) {
VanChart vanChart = (VanChart) chartProvider;
updateChartTypeTime(vanChart.getUuid(), vanChart.getID(), oldType);
}
updateChartTypeTime(chartProvider.getChartUuid(), chartProvider.getID(), oldType);
}
/**
* 图表类型变化更新类型和类型确认时间
*/
public void updateChartTypeTime(String chartId, String chartType, String oldType) {
if (!shouldCollectInfo()) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) {
return;
}
@ -143,18 +132,14 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
}
public void checkTestChart(ChartProvider chartProvider) {
if (chartProvider instanceof VanChart) {
checkTestChart((VanChart) chartProvider);
}
}
public void checkTestChart(VanChart vanChart) {
if (!shouldCollectInfo()) {
return;
}
boolean testChart = vanChart.isTestChart();
ChartInfo chartInfo = chartInfoCacheMap.get(vanChart.getUuid());
chartInfo.setTestChart(testChart);
ChartInfo chartInfo = chartInfoCacheMap.get(chartProvider.getChartUuid());
if (chartInfo != null) {
boolean testChart = chartProvider.isTestChart();
chartInfo.setTestChart(testChart);
}
}
/**

Loading…
Cancel
Save