mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
@@ -25,7 +25,7 @@ public class MybatisPlusGenerator {
|
||||
/**
|
||||
* 这是要生成代码的表名称
|
||||
*/
|
||||
private static final String TABLE_NAME = "data_visualization_info";
|
||||
private static final String TABLE_NAME = "snapshot_core_chart_view";
|
||||
|
||||
/**
|
||||
* 下面两个配置基本上不用动
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.dataease.chart.dao.ext.mapper;
|
||||
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.ext.entity.ChartBasePO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -41,4 +42,6 @@ public interface ExtChartViewMapper {
|
||||
where ccv.id = #{id}
|
||||
""")
|
||||
ChartBasePO queryChart(@Param("id") Long id);
|
||||
|
||||
List<CoreChartView> selectListCustom(@Param("sceneId") Long sceneId, @Param("resourceTable") String resourceTable);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ import io.dataease.utils.IDUtils;
|
||||
import io.dataease.utils.JsonUtil;
|
||||
import io.dataease.utils.LogUtil;
|
||||
import io.dataease.visualization.dao.auto.entity.DataVisualizationInfo;
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotCoreChartView;
|
||||
import io.dataease.visualization.dao.auto.mapper.DataVisualizationInfoMapper;
|
||||
import io.dataease.visualization.dao.auto.mapper.SnapshotCoreChartViewMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -57,6 +59,8 @@ public class ChartViewManege {
|
||||
@Resource
|
||||
private CoreChartViewMapper coreChartViewMapper;
|
||||
@Resource
|
||||
private SnapshotCoreChartViewMapper snapshotCoreChartViewMapper;
|
||||
@Resource
|
||||
private ChartDataManage chartDataManage;
|
||||
@Resource
|
||||
private CoreDatasetTableFieldMapper coreDatasetTableFieldMapper;
|
||||
@@ -85,18 +89,18 @@ public class ChartViewManege {
|
||||
if (id == null) {
|
||||
DEException.throwException(Translator.get("i18n_no_id"));
|
||||
}
|
||||
CoreChartView coreChartView = coreChartViewMapper.selectById(id);
|
||||
CoreChartView record = transDTO2Record(chartViewDTO);
|
||||
SnapshotCoreChartView coreChartView = snapshotCoreChartViewMapper.selectById(id);
|
||||
SnapshotCoreChartView record = transDTO2Record(chartViewDTO);
|
||||
if (ObjectUtils.isEmpty(coreChartView)) {
|
||||
coreChartViewMapper.insert(record);
|
||||
snapshotCoreChartViewMapper.insert(record);
|
||||
} else {
|
||||
UpdateWrapper<CoreChartView> updateWrapper = new UpdateWrapper<>();
|
||||
UpdateWrapper<SnapshotCoreChartView> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("id", record.getId());
|
||||
//富文本允许设置空的tableId 这里额外更新一下
|
||||
if (record.getTableId() == null) {
|
||||
updateWrapper.set("table_id", null);
|
||||
}
|
||||
coreChartViewMapper.update(record, updateWrapper);
|
||||
snapshotCoreChartViewMapper.update(record, updateWrapper);
|
||||
}
|
||||
return chartViewDTO;
|
||||
}
|
||||
@@ -129,10 +133,10 @@ public class ChartViewManege {
|
||||
/**
|
||||
* sceneId 为仪表板或者数据大屏id
|
||||
*/
|
||||
public List<ChartViewDTO> listBySceneId(Long sceneId) {
|
||||
public List<ChartViewDTO> listBySceneId(Long sceneId,String resourceTable) {
|
||||
QueryWrapper<CoreChartView> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("scene_id", sceneId);
|
||||
List<ChartViewDTO> chartViewDTOS = transChart(coreChartViewMapper.selectList(wrapper));
|
||||
List<ChartViewDTO> chartViewDTOS = transChart(extChartViewMapper.selectListCustom(sceneId,resourceTable));
|
||||
if (!CollectionUtils.isEmpty(chartViewDTOS)) {
|
||||
List<Long> tableIds = chartViewDTOS.stream()
|
||||
.map(ChartViewDTO::getTableId)
|
||||
@@ -377,8 +381,8 @@ public class ChartViewManege {
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public CoreChartView transDTO2Record(ChartViewDTO dto) throws Exception {
|
||||
CoreChartView record = new CoreChartView();
|
||||
public SnapshotCoreChartView transDTO2Record(ChartViewDTO dto) throws Exception {
|
||||
SnapshotCoreChartView record = new SnapshotCoreChartView();
|
||||
BeanUtils.copyBean(record, dto);
|
||||
|
||||
record.setxAxis(objectMapper.writeValueAsString(dto.getXAxis()));
|
||||
|
||||
@@ -0,0 +1,640 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_core_chart_view")
|
||||
public class SnapshotCoreChartView implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 场景ID chart_type为private的时候 是仪表板id
|
||||
*/
|
||||
private Long sceneId;
|
||||
|
||||
/**
|
||||
* 数据集表ID
|
||||
*/
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 图表类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 图表渲染方式
|
||||
*/
|
||||
private String render;
|
||||
|
||||
/**
|
||||
* 展示结果
|
||||
*/
|
||||
private Integer resultCount;
|
||||
|
||||
/**
|
||||
* 展示模式
|
||||
*/
|
||||
private String resultMode;
|
||||
|
||||
/**
|
||||
* 横轴field
|
||||
*/
|
||||
private String xAxis;
|
||||
|
||||
/**
|
||||
* table-row
|
||||
*/
|
||||
private String xAxisExt;
|
||||
|
||||
/**
|
||||
* 纵轴field
|
||||
*/
|
||||
private String yAxis;
|
||||
|
||||
/**
|
||||
* 副轴
|
||||
*/
|
||||
private String yAxisExt;
|
||||
|
||||
/**
|
||||
* 堆叠项
|
||||
*/
|
||||
private String extStack;
|
||||
|
||||
/**
|
||||
* 气泡大小
|
||||
*/
|
||||
private String extBubble;
|
||||
|
||||
/**
|
||||
* 动态标签
|
||||
*/
|
||||
private String extLabel;
|
||||
|
||||
/**
|
||||
* 动态提示
|
||||
*/
|
||||
private String extTooltip;
|
||||
|
||||
/**
|
||||
* 图形属性
|
||||
*/
|
||||
private String customAttr;
|
||||
|
||||
/**
|
||||
* 图形属性_移动端
|
||||
*/
|
||||
private String customAttrMobile;
|
||||
|
||||
/**
|
||||
* 组件样式
|
||||
*/
|
||||
private String customStyle;
|
||||
|
||||
/**
|
||||
* 组件样式_移动端
|
||||
*/
|
||||
private String customStyleMobile;
|
||||
|
||||
/**
|
||||
* 结果过滤
|
||||
*/
|
||||
private String customFilter;
|
||||
|
||||
/**
|
||||
* 钻取字段
|
||||
*/
|
||||
private String drillFields;
|
||||
|
||||
/**
|
||||
* 高级
|
||||
*/
|
||||
private String senior;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Long createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
private String snapshot;
|
||||
|
||||
/**
|
||||
* 样式优先级 panel 仪表板 view 图表
|
||||
*/
|
||||
private String stylePriority;
|
||||
|
||||
/**
|
||||
* 图表类型 public 公共 历史可复用的图表,private 私有 专属某个仪表板
|
||||
*/
|
||||
private String chartType;
|
||||
|
||||
/**
|
||||
* 是否插件
|
||||
*/
|
||||
private Boolean isPlugin;
|
||||
|
||||
/**
|
||||
* 数据来源 template 模板数据 dataset 数据集数据
|
||||
*/
|
||||
private String dataFrom;
|
||||
|
||||
/**
|
||||
* 图表字段集合
|
||||
*/
|
||||
private String viewFields;
|
||||
|
||||
/**
|
||||
* 是否开启刷新
|
||||
*/
|
||||
private Boolean refreshViewEnable;
|
||||
|
||||
/**
|
||||
* 刷新时间单位
|
||||
*/
|
||||
private String refreshUnit;
|
||||
|
||||
/**
|
||||
* 刷新时间
|
||||
*/
|
||||
private Integer refreshTime;
|
||||
|
||||
/**
|
||||
* 是否开启联动
|
||||
*/
|
||||
private Boolean linkageActive;
|
||||
|
||||
/**
|
||||
* 是否开启跳转
|
||||
*/
|
||||
private Boolean jumpActive;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
/**
|
||||
* 区间条形图开启时间纬度开启聚合
|
||||
*/
|
||||
private Boolean aggregate;
|
||||
|
||||
/**
|
||||
* 流向地图起点名称field
|
||||
*/
|
||||
private String flowMapStartName;
|
||||
|
||||
/**
|
||||
* 流向地图终点名称field
|
||||
*/
|
||||
private String flowMapEndName;
|
||||
|
||||
/**
|
||||
* 颜色维度field
|
||||
*/
|
||||
private String extColor;
|
||||
|
||||
/**
|
||||
* 字段排序优先级
|
||||
*/
|
||||
private String sortPriority;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Long getSceneId() {
|
||||
return sceneId;
|
||||
}
|
||||
|
||||
public void setSceneId(Long sceneId) {
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
|
||||
public Long getTableId() {
|
||||
return tableId;
|
||||
}
|
||||
|
||||
public void setTableId(Long tableId) {
|
||||
this.tableId = tableId;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getRender() {
|
||||
return render;
|
||||
}
|
||||
|
||||
public void setRender(String render) {
|
||||
this.render = render;
|
||||
}
|
||||
|
||||
public Integer getResultCount() {
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public void setResultCount(Integer resultCount) {
|
||||
this.resultCount = resultCount;
|
||||
}
|
||||
|
||||
public String getResultMode() {
|
||||
return resultMode;
|
||||
}
|
||||
|
||||
public void setResultMode(String resultMode) {
|
||||
this.resultMode = resultMode;
|
||||
}
|
||||
|
||||
public String getxAxis() {
|
||||
return xAxis;
|
||||
}
|
||||
|
||||
public void setxAxis(String xAxis) {
|
||||
this.xAxis = xAxis;
|
||||
}
|
||||
|
||||
public String getxAxisExt() {
|
||||
return xAxisExt;
|
||||
}
|
||||
|
||||
public void setxAxisExt(String xAxisExt) {
|
||||
this.xAxisExt = xAxisExt;
|
||||
}
|
||||
|
||||
public String getyAxis() {
|
||||
return yAxis;
|
||||
}
|
||||
|
||||
public void setyAxis(String yAxis) {
|
||||
this.yAxis = yAxis;
|
||||
}
|
||||
|
||||
public String getyAxisExt() {
|
||||
return yAxisExt;
|
||||
}
|
||||
|
||||
public void setyAxisExt(String yAxisExt) {
|
||||
this.yAxisExt = yAxisExt;
|
||||
}
|
||||
|
||||
public String getExtStack() {
|
||||
return extStack;
|
||||
}
|
||||
|
||||
public void setExtStack(String extStack) {
|
||||
this.extStack = extStack;
|
||||
}
|
||||
|
||||
public String getExtBubble() {
|
||||
return extBubble;
|
||||
}
|
||||
|
||||
public void setExtBubble(String extBubble) {
|
||||
this.extBubble = extBubble;
|
||||
}
|
||||
|
||||
public String getExtLabel() {
|
||||
return extLabel;
|
||||
}
|
||||
|
||||
public void setExtLabel(String extLabel) {
|
||||
this.extLabel = extLabel;
|
||||
}
|
||||
|
||||
public String getExtTooltip() {
|
||||
return extTooltip;
|
||||
}
|
||||
|
||||
public void setExtTooltip(String extTooltip) {
|
||||
this.extTooltip = extTooltip;
|
||||
}
|
||||
|
||||
public String getCustomAttr() {
|
||||
return customAttr;
|
||||
}
|
||||
|
||||
public void setCustomAttr(String customAttr) {
|
||||
this.customAttr = customAttr;
|
||||
}
|
||||
|
||||
public String getCustomAttrMobile() {
|
||||
return customAttrMobile;
|
||||
}
|
||||
|
||||
public void setCustomAttrMobile(String customAttrMobile) {
|
||||
this.customAttrMobile = customAttrMobile;
|
||||
}
|
||||
|
||||
public String getCustomStyle() {
|
||||
return customStyle;
|
||||
}
|
||||
|
||||
public void setCustomStyle(String customStyle) {
|
||||
this.customStyle = customStyle;
|
||||
}
|
||||
|
||||
public String getCustomStyleMobile() {
|
||||
return customStyleMobile;
|
||||
}
|
||||
|
||||
public void setCustomStyleMobile(String customStyleMobile) {
|
||||
this.customStyleMobile = customStyleMobile;
|
||||
}
|
||||
|
||||
public String getCustomFilter() {
|
||||
return customFilter;
|
||||
}
|
||||
|
||||
public void setCustomFilter(String customFilter) {
|
||||
this.customFilter = customFilter;
|
||||
}
|
||||
|
||||
public String getDrillFields() {
|
||||
return drillFields;
|
||||
}
|
||||
|
||||
public void setDrillFields(String drillFields) {
|
||||
this.drillFields = drillFields;
|
||||
}
|
||||
|
||||
public String getSenior() {
|
||||
return senior;
|
||||
}
|
||||
|
||||
public void setSenior(String senior) {
|
||||
this.senior = senior;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getSnapshot() {
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
public void setSnapshot(String snapshot) {
|
||||
this.snapshot = snapshot;
|
||||
}
|
||||
|
||||
public String getStylePriority() {
|
||||
return stylePriority;
|
||||
}
|
||||
|
||||
public void setStylePriority(String stylePriority) {
|
||||
this.stylePriority = stylePriority;
|
||||
}
|
||||
|
||||
public String getChartType() {
|
||||
return chartType;
|
||||
}
|
||||
|
||||
public void setChartType(String chartType) {
|
||||
this.chartType = chartType;
|
||||
}
|
||||
|
||||
public Boolean getIsPlugin() {
|
||||
return isPlugin;
|
||||
}
|
||||
|
||||
public void setIsPlugin(Boolean isPlugin) {
|
||||
this.isPlugin = isPlugin;
|
||||
}
|
||||
|
||||
public String getDataFrom() {
|
||||
return dataFrom;
|
||||
}
|
||||
|
||||
public void setDataFrom(String dataFrom) {
|
||||
this.dataFrom = dataFrom;
|
||||
}
|
||||
|
||||
public String getViewFields() {
|
||||
return viewFields;
|
||||
}
|
||||
|
||||
public void setViewFields(String viewFields) {
|
||||
this.viewFields = viewFields;
|
||||
}
|
||||
|
||||
public Boolean getRefreshViewEnable() {
|
||||
return refreshViewEnable;
|
||||
}
|
||||
|
||||
public void setRefreshViewEnable(Boolean refreshViewEnable) {
|
||||
this.refreshViewEnable = refreshViewEnable;
|
||||
}
|
||||
|
||||
public String getRefreshUnit() {
|
||||
return refreshUnit;
|
||||
}
|
||||
|
||||
public void setRefreshUnit(String refreshUnit) {
|
||||
this.refreshUnit = refreshUnit;
|
||||
}
|
||||
|
||||
public Integer getRefreshTime() {
|
||||
return refreshTime;
|
||||
}
|
||||
|
||||
public void setRefreshTime(Integer refreshTime) {
|
||||
this.refreshTime = refreshTime;
|
||||
}
|
||||
|
||||
public Boolean getLinkageActive() {
|
||||
return linkageActive;
|
||||
}
|
||||
|
||||
public void setLinkageActive(Boolean linkageActive) {
|
||||
this.linkageActive = linkageActive;
|
||||
}
|
||||
|
||||
public Boolean getJumpActive() {
|
||||
return jumpActive;
|
||||
}
|
||||
|
||||
public void setJumpActive(Boolean jumpActive) {
|
||||
this.jumpActive = jumpActive;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
public Boolean getAggregate() {
|
||||
return aggregate;
|
||||
}
|
||||
|
||||
public void setAggregate(Boolean aggregate) {
|
||||
this.aggregate = aggregate;
|
||||
}
|
||||
|
||||
public String getFlowMapStartName() {
|
||||
return flowMapStartName;
|
||||
}
|
||||
|
||||
public void setFlowMapStartName(String flowMapStartName) {
|
||||
this.flowMapStartName = flowMapStartName;
|
||||
}
|
||||
|
||||
public String getFlowMapEndName() {
|
||||
return flowMapEndName;
|
||||
}
|
||||
|
||||
public void setFlowMapEndName(String flowMapEndName) {
|
||||
this.flowMapEndName = flowMapEndName;
|
||||
}
|
||||
|
||||
public String getExtColor() {
|
||||
return extColor;
|
||||
}
|
||||
|
||||
public void setExtColor(String extColor) {
|
||||
this.extColor = extColor;
|
||||
}
|
||||
|
||||
public String getSortPriority() {
|
||||
return sortPriority;
|
||||
}
|
||||
|
||||
public void setSortPriority(String sortPriority) {
|
||||
this.sortPriority = sortPriority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotCoreChartView{" +
|
||||
"id = " + id +
|
||||
", title = " + title +
|
||||
", sceneId = " + sceneId +
|
||||
", tableId = " + tableId +
|
||||
", type = " + type +
|
||||
", render = " + render +
|
||||
", resultCount = " + resultCount +
|
||||
", resultMode = " + resultMode +
|
||||
", xAxis = " + xAxis +
|
||||
", xAxisExt = " + xAxisExt +
|
||||
", yAxis = " + yAxis +
|
||||
", yAxisExt = " + yAxisExt +
|
||||
", extStack = " + extStack +
|
||||
", extBubble = " + extBubble +
|
||||
", extLabel = " + extLabel +
|
||||
", extTooltip = " + extTooltip +
|
||||
", customAttr = " + customAttr +
|
||||
", customAttrMobile = " + customAttrMobile +
|
||||
", customStyle = " + customStyle +
|
||||
", customStyleMobile = " + customStyleMobile +
|
||||
", customFilter = " + customFilter +
|
||||
", drillFields = " + drillFields +
|
||||
", senior = " + senior +
|
||||
", createBy = " + createBy +
|
||||
", createTime = " + createTime +
|
||||
", updateTime = " + updateTime +
|
||||
", snapshot = " + snapshot +
|
||||
", stylePriority = " + stylePriority +
|
||||
", chartType = " + chartType +
|
||||
", isPlugin = " + isPlugin +
|
||||
", dataFrom = " + dataFrom +
|
||||
", viewFields = " + viewFields +
|
||||
", refreshViewEnable = " + refreshViewEnable +
|
||||
", refreshUnit = " + refreshUnit +
|
||||
", refreshTime = " + refreshTime +
|
||||
", linkageActive = " + linkageActive +
|
||||
", jumpActive = " + jumpActive +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
", aggregate = " + aggregate +
|
||||
", flowMapStartName = " + flowMapStartName +
|
||||
", flowMapEndName = " + flowMapEndName +
|
||||
", extColor = " + extColor +
|
||||
", sortPriority = " + sortPriority +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,374 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 可视化大屏信息表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_data_visualization_info")
|
||||
public class SnapshotDataVisualizationInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 所属组织id
|
||||
*/
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 节点类型 folder or panel 目录或者文件夹
|
||||
*/
|
||||
private String nodeType;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 样式数据
|
||||
*/
|
||||
private String canvasStyleData;
|
||||
|
||||
/**
|
||||
* 组件数据
|
||||
*/
|
||||
private String componentData;
|
||||
|
||||
/**
|
||||
* 移动端布局0-关闭 1-开启
|
||||
*/
|
||||
private Byte mobileLayout;
|
||||
|
||||
/**
|
||||
* 状态 0-未发布 1-已发布
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否单独打开水印 0-关闭 1-开启
|
||||
*/
|
||||
private Integer selfWatermarkStatus;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Long createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
private Boolean deleteFlag;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Long deleteTime;
|
||||
|
||||
/**
|
||||
* 删除人
|
||||
*/
|
||||
private String deleteBy;
|
||||
|
||||
/**
|
||||
* 可视化资源版本
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 内容标识
|
||||
*/
|
||||
private String contentId;
|
||||
|
||||
/**
|
||||
* 内容检查标识
|
||||
*/
|
||||
private String checkVersion;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getOrgId() {
|
||||
return orgId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getNodeType() {
|
||||
return nodeType;
|
||||
}
|
||||
|
||||
public void setNodeType(String nodeType) {
|
||||
this.nodeType = nodeType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCanvasStyleData() {
|
||||
return canvasStyleData;
|
||||
}
|
||||
|
||||
public void setCanvasStyleData(String canvasStyleData) {
|
||||
this.canvasStyleData = canvasStyleData;
|
||||
}
|
||||
|
||||
public String getComponentData() {
|
||||
return componentData;
|
||||
}
|
||||
|
||||
public void setComponentData(String componentData) {
|
||||
this.componentData = componentData;
|
||||
}
|
||||
|
||||
public Byte getMobileLayout() {
|
||||
return mobileLayout;
|
||||
}
|
||||
|
||||
public void setMobileLayout(Byte mobileLayout) {
|
||||
this.mobileLayout = mobileLayout;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getSelfWatermarkStatus() {
|
||||
return selfWatermarkStatus;
|
||||
}
|
||||
|
||||
public void setSelfWatermarkStatus(Integer selfWatermarkStatus) {
|
||||
this.selfWatermarkStatus = selfWatermarkStatus;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Boolean getDeleteFlag() {
|
||||
return deleteFlag;
|
||||
}
|
||||
|
||||
public void setDeleteFlag(Boolean deleteFlag) {
|
||||
this.deleteFlag = deleteFlag;
|
||||
}
|
||||
|
||||
public Long getDeleteTime() {
|
||||
return deleteTime;
|
||||
}
|
||||
|
||||
public void setDeleteTime(Long deleteTime) {
|
||||
this.deleteTime = deleteTime;
|
||||
}
|
||||
|
||||
public String getDeleteBy() {
|
||||
return deleteBy;
|
||||
}
|
||||
|
||||
public void setDeleteBy(String deleteBy) {
|
||||
this.deleteBy = deleteBy;
|
||||
}
|
||||
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getContentId() {
|
||||
return contentId;
|
||||
}
|
||||
|
||||
public void setContentId(String contentId) {
|
||||
this.contentId = contentId;
|
||||
}
|
||||
|
||||
public String getCheckVersion() {
|
||||
return checkVersion;
|
||||
}
|
||||
|
||||
public void setCheckVersion(String checkVersion) {
|
||||
this.checkVersion = checkVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotDataVisualizationInfo{" +
|
||||
"id = " + id +
|
||||
", name = " + name +
|
||||
", pid = " + pid +
|
||||
", orgId = " + orgId +
|
||||
", level = " + level +
|
||||
", nodeType = " + nodeType +
|
||||
", type = " + type +
|
||||
", canvasStyleData = " + canvasStyleData +
|
||||
", componentData = " + componentData +
|
||||
", mobileLayout = " + mobileLayout +
|
||||
", status = " + status +
|
||||
", selfWatermarkStatus = " + selfWatermarkStatus +
|
||||
", sort = " + sort +
|
||||
", createTime = " + createTime +
|
||||
", createBy = " + createBy +
|
||||
", updateTime = " + updateTime +
|
||||
", updateBy = " + updateBy +
|
||||
", remark = " + remark +
|
||||
", source = " + source +
|
||||
", deleteFlag = " + deleteFlag +
|
||||
", deleteTime = " + deleteTime +
|
||||
", deleteBy = " + deleteBy +
|
||||
", version = " + version +
|
||||
", contentId = " + contentId +
|
||||
", checkVersion = " + checkVersion +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转记录表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_link_jump")
|
||||
public class SnapshotVisualizationLinkJump implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 源仪表板ID
|
||||
*/
|
||||
private Long sourceDvId;
|
||||
|
||||
/**
|
||||
* 源图表ID
|
||||
*/
|
||||
private Long sourceViewId;
|
||||
|
||||
/**
|
||||
* 跳转信息
|
||||
*/
|
||||
private String linkJumpInfo;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean checked;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getSourceDvId() {
|
||||
return sourceDvId;
|
||||
}
|
||||
|
||||
public void setSourceDvId(Long sourceDvId) {
|
||||
this.sourceDvId = sourceDvId;
|
||||
}
|
||||
|
||||
public Long getSourceViewId() {
|
||||
return sourceViewId;
|
||||
}
|
||||
|
||||
public void setSourceViewId(Long sourceViewId) {
|
||||
this.sourceViewId = sourceViewId;
|
||||
}
|
||||
|
||||
public String getLinkJumpInfo() {
|
||||
return linkJumpInfo;
|
||||
}
|
||||
|
||||
public void setLinkJumpInfo(String linkJumpInfo) {
|
||||
this.linkJumpInfo = linkJumpInfo;
|
||||
}
|
||||
|
||||
public Boolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationLinkJump{" +
|
||||
"id = " + id +
|
||||
", sourceDvId = " + sourceDvId +
|
||||
", sourceViewId = " + sourceViewId +
|
||||
", linkJumpInfo = " + linkJumpInfo +
|
||||
", checked = " + checked +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转配置表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_link_jump_info")
|
||||
public class SnapshotVisualizationLinkJumpInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* link jump ID
|
||||
*/
|
||||
private Long linkJumpId;
|
||||
|
||||
/**
|
||||
* 关联类型 inner 内部仪表板,outer 外部链接
|
||||
*/
|
||||
private String linkType;
|
||||
|
||||
/**
|
||||
* 跳转类型 _blank 新开页面 _self 当前窗口
|
||||
*/
|
||||
private String jumpType;
|
||||
|
||||
/**
|
||||
* 关联仪表板ID
|
||||
*/
|
||||
private Long targetDvId;
|
||||
|
||||
/**
|
||||
* 字段ID
|
||||
*/
|
||||
private Long sourceFieldId;
|
||||
|
||||
/**
|
||||
* 内容 linkType = outer时使用
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 是否可用
|
||||
*/
|
||||
private Boolean checked;
|
||||
|
||||
/**
|
||||
* 是否附加点击参数
|
||||
*/
|
||||
private Boolean attachParams;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
/**
|
||||
* 窗口大小large middle small
|
||||
*/
|
||||
private String windowSize;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getLinkJumpId() {
|
||||
return linkJumpId;
|
||||
}
|
||||
|
||||
public void setLinkJumpId(Long linkJumpId) {
|
||||
this.linkJumpId = linkJumpId;
|
||||
}
|
||||
|
||||
public String getLinkType() {
|
||||
return linkType;
|
||||
}
|
||||
|
||||
public void setLinkType(String linkType) {
|
||||
this.linkType = linkType;
|
||||
}
|
||||
|
||||
public String getJumpType() {
|
||||
return jumpType;
|
||||
}
|
||||
|
||||
public void setJumpType(String jumpType) {
|
||||
this.jumpType = jumpType;
|
||||
}
|
||||
|
||||
public Long getTargetDvId() {
|
||||
return targetDvId;
|
||||
}
|
||||
|
||||
public void setTargetDvId(Long targetDvId) {
|
||||
this.targetDvId = targetDvId;
|
||||
}
|
||||
|
||||
public Long getSourceFieldId() {
|
||||
return sourceFieldId;
|
||||
}
|
||||
|
||||
public void setSourceFieldId(Long sourceFieldId) {
|
||||
this.sourceFieldId = sourceFieldId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Boolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public Boolean getAttachParams() {
|
||||
return attachParams;
|
||||
}
|
||||
|
||||
public void setAttachParams(Boolean attachParams) {
|
||||
this.attachParams = attachParams;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
public String getWindowSize() {
|
||||
return windowSize;
|
||||
}
|
||||
|
||||
public void setWindowSize(String windowSize) {
|
||||
this.windowSize = windowSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationLinkJumpInfo{" +
|
||||
"id = " + id +
|
||||
", linkJumpId = " + linkJumpId +
|
||||
", linkType = " + linkType +
|
||||
", jumpType = " + jumpType +
|
||||
", targetDvId = " + targetDvId +
|
||||
", sourceFieldId = " + sourceFieldId +
|
||||
", content = " + content +
|
||||
", checked = " + checked +
|
||||
", attachParams = " + attachParams +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
", windowSize = " + windowSize +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转目标仪表板图表字段配置表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_link_jump_target_view_info")
|
||||
public class SnapshotVisualizationLinkJumpTargetViewInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId("target_id")
|
||||
private Long targetId;
|
||||
|
||||
/**
|
||||
* visualization_link_jump_info 表的 ID
|
||||
*/
|
||||
private Long linkJumpInfoId;
|
||||
|
||||
/**
|
||||
* 勾选字段设置的匹配字段,也可以不是勾选字段本身
|
||||
*/
|
||||
private Long sourceFieldActiveId;
|
||||
|
||||
/**
|
||||
* 目标图表ID
|
||||
*/
|
||||
private String targetViewId;
|
||||
|
||||
/**
|
||||
* 目标字段ID
|
||||
*/
|
||||
private String targetFieldId;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
/**
|
||||
* 联动目标类型 view 图表 filter 过滤组件 outParams 外部参数
|
||||
*/
|
||||
private String targetType;
|
||||
|
||||
public Long getTargetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
public void setTargetId(Long targetId) {
|
||||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
public Long getLinkJumpInfoId() {
|
||||
return linkJumpInfoId;
|
||||
}
|
||||
|
||||
public void setLinkJumpInfoId(Long linkJumpInfoId) {
|
||||
this.linkJumpInfoId = linkJumpInfoId;
|
||||
}
|
||||
|
||||
public Long getSourceFieldActiveId() {
|
||||
return sourceFieldActiveId;
|
||||
}
|
||||
|
||||
public void setSourceFieldActiveId(Long sourceFieldActiveId) {
|
||||
this.sourceFieldActiveId = sourceFieldActiveId;
|
||||
}
|
||||
|
||||
public String getTargetViewId() {
|
||||
return targetViewId;
|
||||
}
|
||||
|
||||
public void setTargetViewId(String targetViewId) {
|
||||
this.targetViewId = targetViewId;
|
||||
}
|
||||
|
||||
public String getTargetFieldId() {
|
||||
return targetFieldId;
|
||||
}
|
||||
|
||||
public void setTargetFieldId(String targetFieldId) {
|
||||
this.targetFieldId = targetFieldId;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
public String getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
|
||||
public void setTargetType(String targetType) {
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationLinkJumpTargetViewInfo{" +
|
||||
"targetId = " + targetId +
|
||||
", linkJumpInfoId = " + linkJumpInfoId +
|
||||
", sourceFieldActiveId = " + sourceFieldActiveId +
|
||||
", targetViewId = " + targetViewId +
|
||||
", targetFieldId = " + targetFieldId +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
", targetType = " + targetType +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 联动记录表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_linkage")
|
||||
public class SnapshotVisualizationLinkage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 联动大屏/仪表板ID
|
||||
*/
|
||||
private Long dvId;
|
||||
|
||||
/**
|
||||
* 源图表id
|
||||
*/
|
||||
private Long sourceViewId;
|
||||
|
||||
/**
|
||||
* 联动图表id
|
||||
*/
|
||||
private Long targetViewId;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updatePeople;
|
||||
|
||||
/**
|
||||
* 是否启用关联
|
||||
*/
|
||||
private Boolean linkageActive;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
private String ext1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
private String ext2;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getDvId() {
|
||||
return dvId;
|
||||
}
|
||||
|
||||
public void setDvId(Long dvId) {
|
||||
this.dvId = dvId;
|
||||
}
|
||||
|
||||
public Long getSourceViewId() {
|
||||
return sourceViewId;
|
||||
}
|
||||
|
||||
public void setSourceViewId(Long sourceViewId) {
|
||||
this.sourceViewId = sourceViewId;
|
||||
}
|
||||
|
||||
public Long getTargetViewId() {
|
||||
return targetViewId;
|
||||
}
|
||||
|
||||
public void setTargetViewId(Long targetViewId) {
|
||||
this.targetViewId = targetViewId;
|
||||
}
|
||||
|
||||
public Long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getUpdatePeople() {
|
||||
return updatePeople;
|
||||
}
|
||||
|
||||
public void setUpdatePeople(String updatePeople) {
|
||||
this.updatePeople = updatePeople;
|
||||
}
|
||||
|
||||
public Boolean getLinkageActive() {
|
||||
return linkageActive;
|
||||
}
|
||||
|
||||
public void setLinkageActive(Boolean linkageActive) {
|
||||
this.linkageActive = linkageActive;
|
||||
}
|
||||
|
||||
public String getExt1() {
|
||||
return ext1;
|
||||
}
|
||||
|
||||
public void setExt1(String ext1) {
|
||||
this.ext1 = ext1;
|
||||
}
|
||||
|
||||
public String getExt2() {
|
||||
return ext2;
|
||||
}
|
||||
|
||||
public void setExt2(String ext2) {
|
||||
this.ext2 = ext2;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationLinkage{" +
|
||||
"id = " + id +
|
||||
", dvId = " + dvId +
|
||||
", sourceViewId = " + sourceViewId +
|
||||
", targetViewId = " + targetViewId +
|
||||
", updateTime = " + updateTime +
|
||||
", updatePeople = " + updatePeople +
|
||||
", linkageActive = " + linkageActive +
|
||||
", ext1 = " + ext1 +
|
||||
", ext2 = " + ext2 +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 联动字段
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_linkage_field")
|
||||
public class SnapshotVisualizationLinkageField implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 联动ID
|
||||
*/
|
||||
private Long linkageId;
|
||||
|
||||
/**
|
||||
* 源图表字段
|
||||
*/
|
||||
private Long sourceField;
|
||||
|
||||
/**
|
||||
* 目标图表字段
|
||||
*/
|
||||
private Long targetField;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getLinkageId() {
|
||||
return linkageId;
|
||||
}
|
||||
|
||||
public void setLinkageId(Long linkageId) {
|
||||
this.linkageId = linkageId;
|
||||
}
|
||||
|
||||
public Long getSourceField() {
|
||||
return sourceField;
|
||||
}
|
||||
|
||||
public void setSourceField(Long sourceField) {
|
||||
this.sourceField = sourceField;
|
||||
}
|
||||
|
||||
public Long getTargetField() {
|
||||
return targetField;
|
||||
}
|
||||
|
||||
public void setTargetField(Long targetField) {
|
||||
this.targetField = targetField;
|
||||
}
|
||||
|
||||
public Long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Long getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(Long copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public Long getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(Long copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationLinkageField{" +
|
||||
"id = " + id +
|
||||
", linkageId = " + linkageId +
|
||||
", sourceField = " + sourceField +
|
||||
", targetField = " + targetField +
|
||||
", updateTime = " + updateTime +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 外部参数配置表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_outer_params_info")
|
||||
public class SnapshotVisualizationOuterParamsInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId("params_info_id")
|
||||
private String paramsInfoId;
|
||||
|
||||
/**
|
||||
* visualization_outer_params 表的 ID
|
||||
*/
|
||||
private String paramsId;
|
||||
|
||||
/**
|
||||
* 参数名
|
||||
*/
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean checked;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private String copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private String copyId;
|
||||
|
||||
/**
|
||||
* 是否必填
|
||||
*/
|
||||
private Boolean required;
|
||||
|
||||
/**
|
||||
* 默认值 JSON格式
|
||||
*/
|
||||
private String defaultValue;
|
||||
|
||||
/**
|
||||
* 是否启用默认值
|
||||
*/
|
||||
private Boolean enabledDefault;
|
||||
|
||||
public String getParamsInfoId() {
|
||||
return paramsInfoId;
|
||||
}
|
||||
|
||||
public void setParamsInfoId(String paramsInfoId) {
|
||||
this.paramsInfoId = paramsInfoId;
|
||||
}
|
||||
|
||||
public String getParamsId() {
|
||||
return paramsId;
|
||||
}
|
||||
|
||||
public void setParamsId(String paramsId) {
|
||||
this.paramsId = paramsId;
|
||||
}
|
||||
|
||||
public String getParamName() {
|
||||
return paramName;
|
||||
}
|
||||
|
||||
public void setParamName(String paramName) {
|
||||
this.paramName = paramName;
|
||||
}
|
||||
|
||||
public Boolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public String getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(String copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public String getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(String copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
public Boolean getRequired() {
|
||||
return required;
|
||||
}
|
||||
|
||||
public void setRequired(Boolean required) {
|
||||
this.required = required;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(String defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public Boolean getEnabledDefault() {
|
||||
return enabledDefault;
|
||||
}
|
||||
|
||||
public void setEnabledDefault(Boolean enabledDefault) {
|
||||
this.enabledDefault = enabledDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationOuterParamsInfo{" +
|
||||
"paramsInfoId = " + paramsInfoId +
|
||||
", paramsId = " + paramsId +
|
||||
", paramName = " + paramName +
|
||||
", checked = " + checked +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
", required = " + required +
|
||||
", defaultValue = " + defaultValue +
|
||||
", enabledDefault = " + enabledDefault +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package io.dataease.visualization.dao.auto.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 外部参数联动视图字段信息表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@TableName("snapshot_visualization_outer_params_target_view_info")
|
||||
public class SnapshotVisualizationOuterParamsTargetViewInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId("target_id")
|
||||
private String targetId;
|
||||
|
||||
/**
|
||||
* visualization_outer_params_info 表的 ID
|
||||
*/
|
||||
private String paramsInfoId;
|
||||
|
||||
/**
|
||||
* 联动视图ID/联动过滤项ID
|
||||
*/
|
||||
private String targetViewId;
|
||||
|
||||
/**
|
||||
* 联动字段ID
|
||||
*/
|
||||
private String targetFieldId;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private String copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private String copyId;
|
||||
|
||||
/**
|
||||
* 联动数据集id/联动过滤组件id
|
||||
*/
|
||||
private String targetDsId;
|
||||
|
||||
public String getTargetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
public void setTargetId(String targetId) {
|
||||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
public String getParamsInfoId() {
|
||||
return paramsInfoId;
|
||||
}
|
||||
|
||||
public void setParamsInfoId(String paramsInfoId) {
|
||||
this.paramsInfoId = paramsInfoId;
|
||||
}
|
||||
|
||||
public String getTargetViewId() {
|
||||
return targetViewId;
|
||||
}
|
||||
|
||||
public void setTargetViewId(String targetViewId) {
|
||||
this.targetViewId = targetViewId;
|
||||
}
|
||||
|
||||
public String getTargetFieldId() {
|
||||
return targetFieldId;
|
||||
}
|
||||
|
||||
public void setTargetFieldId(String targetFieldId) {
|
||||
this.targetFieldId = targetFieldId;
|
||||
}
|
||||
|
||||
public String getCopyFrom() {
|
||||
return copyFrom;
|
||||
}
|
||||
|
||||
public void setCopyFrom(String copyFrom) {
|
||||
this.copyFrom = copyFrom;
|
||||
}
|
||||
|
||||
public String getCopyId() {
|
||||
return copyId;
|
||||
}
|
||||
|
||||
public void setCopyId(String copyId) {
|
||||
this.copyId = copyId;
|
||||
}
|
||||
|
||||
public String getTargetDsId() {
|
||||
return targetDsId;
|
||||
}
|
||||
|
||||
public void setTargetDsId(String targetDsId) {
|
||||
this.targetDsId = targetDsId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SnapshotVisualizationOuterParamsTargetViewInfo{" +
|
||||
"targetId = " + targetId +
|
||||
", paramsInfoId = " + paramsInfoId +
|
||||
", targetViewId = " + targetViewId +
|
||||
", targetFieldId = " + targetFieldId +
|
||||
", copyFrom = " + copyFrom +
|
||||
", copyId = " + copyId +
|
||||
", targetDsId = " + targetDsId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotCoreChartView;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotCoreChartViewMapper extends BaseMapper<SnapshotCoreChartView> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotDataVisualizationInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 可视化大屏信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotDataVisualizationInfoMapper extends BaseMapper<SnapshotDataVisualizationInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationLinkJumpInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationLinkJumpInfoMapper extends BaseMapper<SnapshotVisualizationLinkJumpInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationLinkJump;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationLinkJumpMapper extends BaseMapper<SnapshotVisualizationLinkJump> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationLinkJumpTargetViewInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 跳转目标仪表板图表字段配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationLinkJumpTargetViewInfoMapper extends BaseMapper<SnapshotVisualizationLinkJumpTargetViewInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationLinkageField;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 联动字段 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationLinkageFieldMapper extends BaseMapper<SnapshotVisualizationLinkageField> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationLinkage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 联动记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationLinkageMapper extends BaseMapper<SnapshotVisualizationLinkage> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationOuterParamsInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 外部参数配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationOuterParamsInfoMapper extends BaseMapper<SnapshotVisualizationOuterParamsInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.dataease.visualization.dao.auto.mapper;
|
||||
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotVisualizationOuterParamsTargetViewInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 外部参数联动视图字段信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2025-03-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface SnapshotVisualizationOuterParamsTargetViewInfoMapper extends BaseMapper<SnapshotVisualizationOuterParamsTargetViewInfo> {
|
||||
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public interface ExtDataVisualizationMapper {
|
||||
void viewCopyWithDv(@Param("sourceDvId") Long sourceDvId,@Param("newDvId") Long newDvId,@Param("copyId") Long copyId);
|
||||
List<CoreChartView> findViewInfoByCopyId(@Param("copyId") Long copyId);
|
||||
|
||||
DataVisualizationVO findDvInfo(@Param("dvId") Long dvId,@Param("dvType") String dvType);
|
||||
DataVisualizationVO findDvInfo(@Param("dvId") Long dvId,@Param("dvType") String dvType,@Param("resourceTable") String resourceTable);
|
||||
|
||||
IPage<VisualizationResourcePO> findRecent(IPage<VisualizationResourcePO> page, @Param("uid") Long uid, @Param("keyword") String keyword, @Param("ew") Map ew);
|
||||
|
||||
@@ -58,4 +58,44 @@ public interface ExtDataVisualizationMapper {
|
||||
void deleteViewsBatch(@Param("ids") Set<Long> ids);
|
||||
|
||||
UserFormVO queryInnerUserInfo(@Param("id") Long id);
|
||||
|
||||
void snapshotDataV(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotViews(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotLinkJumpTargetViewInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotLinkJumpInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotLinkJump(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotLinkageField(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotLinkage(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotOuterParamsTargetViewInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotOuterParamsInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void snapshotOuterParams(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreDataV(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreViews(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreLinkJumpTargetViewInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreLinkJumpInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreLinkJump(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreLinkageField(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreLinkage(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreOuterParamsTargetViewInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreOuterParamsInfo(@Param("dvId") Long dvId);
|
||||
|
||||
void restoreOuterParams(@Param("dvId") Long dvId);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,12 @@ public interface ExtVisualizationLinkJumpMapper {
|
||||
|
||||
void deleteJumpWithVisualization(@Param("dvId") Long dvId);
|
||||
|
||||
void deleteJumpTargetViewInfoWithVisualizationSnapshot(@Param("dvId") Long dvId);
|
||||
|
||||
void deleteJumpInfoWithVisualizationSnapshot(@Param("dvId") Long dvId);
|
||||
|
||||
void deleteJumpWithVisualizationSnapshot(@Param("dvId") Long dvId);
|
||||
|
||||
List<VisualizationLinkJumpDTO> getTargetVisualizationJumpInfo(@Param("request") VisualizationLinkJumpBaseRequest request);
|
||||
|
||||
void copyLinkJump(@Param("copyId")Long copyId);
|
||||
|
||||
@@ -25,6 +25,10 @@ public interface ExtVisualizationLinkageMapper {
|
||||
|
||||
void deleteViewLinkageField(@Param("dvId") Long dvId,@Param("sourceViewId") Long sourceViewId);
|
||||
|
||||
void deleteViewLinkageSnapshot(@Param("dvId") Long dvId,@Param("sourceViewId") Long sourceViewId);
|
||||
|
||||
void deleteViewLinkageFieldSnapshot(@Param("dvId") Long dvId,@Param("sourceViewId") Long sourceViewId);
|
||||
|
||||
void copyViewLinkage(@Param("copyId") Long copyId);
|
||||
|
||||
void copyViewLinkageField(@Param("copyId") Long copyId);
|
||||
|
||||
@@ -21,6 +21,12 @@ public interface ExtVisualizationOuterParamsMapper {
|
||||
|
||||
void deleteOuterParamsWithVisualizationId(@Param("visualizationId") String visualizationId);
|
||||
|
||||
void deleteOuterParamsTargetWithVisualizationIdSnapshot(@Param("visualizationId") Long visualizationId);
|
||||
|
||||
void deleteOuterParamsInfoWithVisualizationIdSnapshot(@Param("visualizationId") Long visualizationId);
|
||||
|
||||
void deleteOuterParamsWithVisualizationIdSnapshot(@Param("visualizationId") Long visualizationId);
|
||||
|
||||
List<VisualizationOuterParamsInfoDTO> getVisualizationOuterParamsInfo(@Param("visualizationId") String visualizationId);
|
||||
|
||||
List<VisualizationOuterParamsInfo> getVisualizationOuterParamsInfoBase(@Param("visualizationId") String visualizationId);
|
||||
|
||||
@@ -52,15 +52,15 @@ public class CoreVisualizationExportManage {
|
||||
private DatasetFieldServer datasetFieldServer;
|
||||
|
||||
public String getResourceName(Long dvId, String busiFlag) {
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag);
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag,"core");
|
||||
if (ObjectUtils.isEmpty(visualization)) DEException.throwException("资源不存在或已经被删除...");
|
||||
return visualization.getName();
|
||||
}
|
||||
|
||||
public File exportExcel(Long dvId, String busiFlag, List<Long> viewIdList, boolean onlyDisplay) throws Exception {
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag);
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag,"core");
|
||||
if (ObjectUtils.isEmpty(visualization)) DEException.throwException("资源不存在或已经被删除...");
|
||||
List<ChartViewDTO> chartViewDTOS = chartViewManege.listBySceneId(dvId);
|
||||
List<ChartViewDTO> chartViewDTOS = chartViewManege.listBySceneId(dvId,CommonConstants.RESOURCE_TABLE.CORE);
|
||||
|
||||
String componentsJson = visualization.getComponentData();
|
||||
List<Map<String, Object>> components = JsonUtil.parseList(componentsJson, tokenType);
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.dataease.api.visualization.vo.VisualizationResourceVO;
|
||||
import io.dataease.commons.constants.DataVisualizationConstants;
|
||||
import io.dataease.commons.constants.OptConstants;
|
||||
import io.dataease.constant.BusiResourceEnum;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.license.config.XpackInteract;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
@@ -16,9 +17,10 @@ import io.dataease.model.BusiNodeVO;
|
||||
import io.dataease.operation.manage.CoreOptRecentManage;
|
||||
import io.dataease.utils.*;
|
||||
import io.dataease.visualization.dao.auto.entity.DataVisualizationInfo;
|
||||
import io.dataease.visualization.dao.auto.entity.SnapshotDataVisualizationInfo;
|
||||
import io.dataease.visualization.dao.auto.mapper.DataVisualizationInfoMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.CoreVisualiationExtMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.ExtDataVisualizationMapper;
|
||||
import io.dataease.visualization.dao.auto.mapper.SnapshotDataVisualizationInfoMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.*;
|
||||
import io.dataease.visualization.dao.ext.po.VisualizationNodePO;
|
||||
import io.dataease.visualization.dao.ext.po.VisualizationResourcePO;
|
||||
import io.dataease.visualization.dto.VisualizationNodeBO;
|
||||
@@ -42,6 +44,18 @@ public class CoreVisualizationManage {
|
||||
@Resource
|
||||
private DataVisualizationInfoMapper mapper;
|
||||
|
||||
@Resource
|
||||
private SnapshotDataVisualizationInfoMapper snapshotMapper;
|
||||
|
||||
@Resource
|
||||
private ExtVisualizationLinkageMapper linkageMapper;
|
||||
|
||||
@Resource
|
||||
private ExtVisualizationLinkJumpMapper linkJumpMapper;
|
||||
|
||||
@Resource
|
||||
private ExtVisualizationOuterParamsMapper outerParamsMapper;
|
||||
|
||||
@Resource
|
||||
private ExtDataVisualizationMapper extDataVisualizationMapper;
|
||||
|
||||
@@ -133,16 +147,29 @@ public class CoreVisualizationManage {
|
||||
visualizationInfo.setUpdateTime(System.currentTimeMillis());
|
||||
visualizationInfo.setOrgId(AuthUtils.getUser().getDefaultOid());
|
||||
mapper.insert(visualizationInfo);
|
||||
// 镜像文件插入
|
||||
SnapshotDataVisualizationInfo snapshotVisualizationInfo = new SnapshotDataVisualizationInfo();
|
||||
BeanUtils.copyBean(snapshotVisualizationInfo,visualizationInfo);
|
||||
snapshotMapper.insert(snapshotVisualizationInfo);
|
||||
coreOptRecentManage.saveOpt(visualizationInfo.getId(), OptConstants.OPT_RESOURCE_TYPE.VISUALIZATION, OptConstants.OPT_TYPE.NEW);
|
||||
return visualizationInfo.getId();
|
||||
}
|
||||
|
||||
@XpackInteract(value = "visualizationResourceTree", before = false)
|
||||
public void innerEdit(DataVisualizationInfo visualizationInfo) {
|
||||
// 镜像和主表保持名称一致
|
||||
visualizationInfo.setUpdateTime(System.currentTimeMillis());
|
||||
visualizationInfo.setUpdateBy(AuthUtils.getUser().getUserId().toString());
|
||||
visualizationInfo.setVersion(3);
|
||||
mapper.updateById(visualizationInfo);
|
||||
// 更新镜像
|
||||
SnapshotDataVisualizationInfo snapshotVisualizationInfo = new SnapshotDataVisualizationInfo();
|
||||
BeanUtils.copyBean(snapshotVisualizationInfo,visualizationInfo);
|
||||
snapshotMapper.updateById(snapshotVisualizationInfo);
|
||||
// 更新主表名称
|
||||
DataVisualizationInfo coreVisualizationInfo = new DataVisualizationInfo();
|
||||
coreVisualizationInfo.setId(visualizationInfo.getId());
|
||||
coreVisualizationInfo.setName(visualizationInfo.getName());
|
||||
mapper.updateById(coreVisualizationInfo);
|
||||
coreOptRecentManage.saveOpt(visualizationInfo.getId(), OptConstants.OPT_RESOURCE_TYPE.VISUALIZATION, OptConstants.OPT_TYPE.UPDATE);
|
||||
}
|
||||
|
||||
@@ -207,4 +234,57 @@ public class CoreVisualizationManage {
|
||||
Page<VisualizationResourcePO> page = new Page<>(goPage, pageSize);
|
||||
return extDataVisualizationMapper.findRecent(page, uid, request.getKeyword(), params);
|
||||
}
|
||||
|
||||
public void removeSnapshot(Long dvId){
|
||||
if(dvId != null){
|
||||
// 清理历史数据
|
||||
linkageMapper.deleteViewLinkageFieldSnapshot(dvId,null);
|
||||
linkageMapper.deleteViewLinkageSnapshot(dvId,null);
|
||||
linkJumpMapper.deleteJumpTargetViewInfoWithVisualizationSnapshot(dvId);
|
||||
linkJumpMapper.deleteJumpInfoWithVisualizationSnapshot(dvId);
|
||||
linkJumpMapper.deleteJumpWithVisualizationSnapshot(dvId);
|
||||
outerParamsMapper.deleteOuterParamsTargetWithVisualizationIdSnapshot(dvId);
|
||||
outerParamsMapper.deleteOuterParamsInfoWithVisualizationIdSnapshot(dvId);
|
||||
outerParamsMapper.deleteOuterParamsWithVisualizationIdSnapshot(dvId);
|
||||
}
|
||||
}
|
||||
|
||||
public void dvSnapshotCheck(Long dvId){
|
||||
/**
|
||||
* 1.检查当前仪表板(大屏)是否存在镜像
|
||||
* 2.如果已经存在 不做处理
|
||||
* 3.如果不存在则将主表所有信息拷贝到镜像中
|
||||
* */
|
||||
QueryWrapper<SnapshotDataVisualizationInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id", dvId);
|
||||
if(!snapshotMapper.exists(queryWrapper)){
|
||||
// 清理历史数据
|
||||
this.removeSnapshot(dvId);
|
||||
// 导入新数据
|
||||
extDataVisualizationMapper.snapshotDataV(dvId);
|
||||
extDataVisualizationMapper.snapshotViews(dvId);
|
||||
extDataVisualizationMapper.snapshotLinkJumpTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotLinkJumpInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotLinkJump(dvId);
|
||||
extDataVisualizationMapper.snapshotLinkageField(dvId);
|
||||
extDataVisualizationMapper.snapshotLinkage(dvId);
|
||||
extDataVisualizationMapper.snapshotOuterParamsTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotOuterParamsInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotOuterParams(dvId);
|
||||
}
|
||||
}
|
||||
|
||||
public void dvRemove(Long dvId){
|
||||
extDataVisualizationMapper.restoreDataV(dvId);
|
||||
extDataVisualizationMapper.restoreViews(dvId);
|
||||
extDataVisualizationMapper.restoreLinkJumpTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.restoreLinkJumpInfo(dvId);
|
||||
extDataVisualizationMapper.restoreLinkJump(dvId);
|
||||
extDataVisualizationMapper.restoreLinkageField(dvId);
|
||||
extDataVisualizationMapper.restoreLinkage(dvId);
|
||||
extDataVisualizationMapper.restoreOuterParamsTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.restoreOuterParamsInfo(dvId);
|
||||
extDataVisualizationMapper.restoreOuterParams(dvId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -161,7 +161,12 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
public DataVisualizationVO findById(DataVisualizationBaseRequest request) {
|
||||
Long dvId = request.getId();
|
||||
String busiFlag = request.getBusiFlag();
|
||||
DataVisualizationVO result = extDataVisualizationMapper.findDvInfo(dvId, busiFlag);
|
||||
String resourceTable = request.getResourceTable();
|
||||
// 如果是编辑查询 则进行镜像检查
|
||||
if(CommonConstants.RESOURCE_TABLE.SNAPSHOT.equals(resourceTable)){
|
||||
coreVisualizationManage.dvSnapshotCheck(dvId);
|
||||
}
|
||||
DataVisualizationVO result = extDataVisualizationMapper.findDvInfo(dvId, busiFlag,resourceTable);
|
||||
if (result != null) {
|
||||
// get creator
|
||||
String userName = coreUserManage.getUserName(Long.valueOf(result.getCreateBy()));
|
||||
@@ -169,7 +174,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
result.setCreatorName(userName);
|
||||
}
|
||||
//获取图表信息
|
||||
List<ChartViewDTO> chartViewDTOS = chartViewManege.listBySceneId(dvId);
|
||||
List<ChartViewDTO> chartViewDTOS = chartViewManege.listBySceneId(dvId,resourceTable);
|
||||
if (!CollectionUtils.isEmpty(chartViewDTOS)) {
|
||||
Map<Long, ChartViewDTO> viewInfo = chartViewDTOS.stream().collect(Collectors.toMap(ChartViewDTO::getId, chartView -> chartView));
|
||||
result.setCanvasViewInfo(viewInfo);
|
||||
@@ -210,6 +215,14 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
@Override
|
||||
@Transactional
|
||||
public String saveCanvas(DataVisualizationBaseRequest request) throws Exception {
|
||||
/*
|
||||
* 发布兼容逻辑
|
||||
* saveCanvas 为初次保存 包括 模板 应用 普通创建 所有变更操作都走snapshot表
|
||||
* 1.如果是文件夹直接保存在主表中,如果是仪表板(数据大屏),主表和镜像表各保存一份 主表仅作为权限和预览控制此时主表状态为‘未发布’
|
||||
* 2.编辑检查:如果存在未发布的仪表板snapshot,则默认加载snapshot进行编辑所有操作均为snapshot操作
|
||||
* 3.发布(重新发布):将snapshot表中的所有数据复制到主表中,同时变更主表状态为‘已发布’
|
||||
* 4.如果对已发布的仪表板编辑并存在已保存的镜像,此时仪表板状态为‘已保存未发布’
|
||||
*/
|
||||
boolean isAppSave = false;
|
||||
Long time = System.currentTimeMillis();
|
||||
// 如果是应用 则新进行应用校验 数据集名称和 数据源名称校验
|
||||
@@ -491,12 +504,21 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
coreVisualizationManage.move(request);
|
||||
}
|
||||
}
|
||||
visualizationInfo.setStatus(CommonConstants.DV_STATUS.SAVED_UNPUBLISHED);
|
||||
coreVisualizationManage.innerEdit(visualizationInfo);
|
||||
|
||||
//保存图表信息
|
||||
chartDataManage.saveChartViewFromVisualization(request.getComponentData(), dvId, request.getCanvasViewInfo());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePublishStatus(DataVisualizationBaseRequest request) {
|
||||
DataVisualizationInfo visualizationInfo = new DataVisualizationInfo();
|
||||
visualizationInfo.setStatus(request.getStatus());
|
||||
visualizationInfo.setId(request.getId());
|
||||
visualizationInfo.setStatus(CommonConstants.DV_STATUS.SAVED_UNPUBLISHED);
|
||||
coreVisualizationManage.innerEdit(visualizationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 更新基础信息;
|
||||
* 为什么单独接口:1.基础信息更新频繁数据且数据载量较小;2.防止出现更新过多信息的情况,造成图表的误删等操作
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
|
||||
DROP TABLE IF EXISTS `snapshot_core_chart_view`;
|
||||
CREATE TABLE `snapshot_core_chart_view` (
|
||||
`id` bigint NOT NULL COMMENT 'ID',
|
||||
`title` varchar(1024) DEFAULT NULL COMMENT '标题',
|
||||
`scene_id` bigint NOT NULL COMMENT '场景ID chart_type为private的时候 是仪表板id',
|
||||
`table_id` bigint DEFAULT NULL COMMENT '数据集表ID',
|
||||
`type` varchar(50) DEFAULT NULL COMMENT '图表类型',
|
||||
`render` varchar(50) DEFAULT NULL COMMENT '图表渲染方式',
|
||||
`result_count` int DEFAULT NULL COMMENT '展示结果',
|
||||
`result_mode` varchar(50) DEFAULT NULL COMMENT '展示模式',
|
||||
`x_axis` longtext COMMENT '横轴field',
|
||||
`x_axis_ext` longtext COMMENT 'table-row',
|
||||
`y_axis` longtext COMMENT '纵轴field',
|
||||
`y_axis_ext` longtext COMMENT '副轴',
|
||||
`ext_stack` longtext COMMENT '堆叠项',
|
||||
`ext_bubble` longtext COMMENT '气泡大小',
|
||||
`ext_label` longtext COMMENT '动态标签',
|
||||
`ext_tooltip` longtext COMMENT '动态提示',
|
||||
`custom_attr` longtext COMMENT '图形属性',
|
||||
`custom_attr_mobile` longtext COMMENT '图形属性_移动端',
|
||||
`custom_style` longtext COMMENT '组件样式',
|
||||
`custom_style_mobile` longtext COMMENT '组件样式_移动端',
|
||||
`custom_filter` longtext COMMENT '结果过滤',
|
||||
`drill_fields` longtext COMMENT '钻取字段',
|
||||
`senior` longtext COMMENT '高级',
|
||||
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` bigint DEFAULT NULL COMMENT '更新时间',
|
||||
`snapshot` longtext COMMENT '缩略图 ',
|
||||
`style_priority` varchar(255) DEFAULT 'panel' COMMENT '样式优先级 panel 仪表板 view 图表',
|
||||
`chart_type` varchar(255) DEFAULT 'private' COMMENT '图表类型 public 公共 历史可复用的图表,private 私有 专属某个仪表板',
|
||||
`is_plugin` bit(1) DEFAULT NULL COMMENT '是否插件',
|
||||
`data_from` varchar(255) DEFAULT 'dataset' COMMENT '数据来源 template 模板数据 dataset 数据集数据',
|
||||
`view_fields` longtext COMMENT '图表字段集合',
|
||||
`refresh_view_enable` tinyint(1) DEFAULT '0' COMMENT '是否开启刷新',
|
||||
`refresh_unit` varchar(255) DEFAULT 'minute' COMMENT '刷新时间单位',
|
||||
`refresh_time` int DEFAULT '5' COMMENT '刷新时间',
|
||||
`linkage_active` tinyint(1) DEFAULT '0' COMMENT '是否开启联动',
|
||||
`jump_active` tinyint(1) DEFAULT '0' COMMENT '是否开启跳转',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制ID',
|
||||
`aggregate` bit(1) DEFAULT NULL COMMENT '区间条形图开启时间纬度开启聚合',
|
||||
`flow_map_start_name` longtext COMMENT '流向地图起点名称field',
|
||||
`flow_map_end_name` longtext COMMENT '流向地图终点名称field',
|
||||
`ext_color` longtext COMMENT '颜色维度field',
|
||||
`sort_priority` longtext COMMENT '字段排序优先级',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_data_visualization_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_data_visualization_info`;
|
||||
CREATE TABLE `snapshot_data_visualization_info` (
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(50) DEFAULT NULL COMMENT '父id',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '所属组织id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`type` varchar(50) DEFAULT NULL COMMENT '类型',
|
||||
`canvas_style_data` longtext COMMENT '样式数据',
|
||||
`component_data` longtext COMMENT '组件数据',
|
||||
`mobile_layout` tinyint DEFAULT '0' COMMENT '移动端布局0-关闭 1-开启',
|
||||
`status` int DEFAULT '1' COMMENT '状态 0-未发布 1-已发布',
|
||||
`self_watermark_status` int DEFAULT '0' COMMENT '是否单独打开水印 0-关闭 1-开启',
|
||||
`sort` int DEFAULT '0' COMMENT '排序',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`update_time` bigint DEFAULT NULL COMMENT '更新时间',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||
`source` varchar(255) DEFAULT NULL COMMENT '数据来源',
|
||||
`delete_flag` tinyint(1) DEFAULT '0' COMMENT '删除标志',
|
||||
`delete_time` bigint DEFAULT NULL COMMENT '删除时间',
|
||||
`delete_by` varchar(255) DEFAULT NULL COMMENT '删除人',
|
||||
`version` int DEFAULT '3' COMMENT '可视化资源版本',
|
||||
`content_id` varchar(50) DEFAULT '0' COMMENT '内容标识',
|
||||
`check_version` varchar(50) DEFAULT '1' COMMENT '内容检查标识',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_link_jump
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_link_jump`;
|
||||
CREATE TABLE `snapshot_visualization_link_jump` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`source_dv_id` bigint DEFAULT NULL COMMENT '源仪表板ID',
|
||||
`source_view_id` bigint DEFAULT NULL COMMENT '源图表ID',
|
||||
`link_jump_info` varchar(4000) DEFAULT NULL COMMENT '跳转信息',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制来源ID',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_link_jump_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_link_jump_info`;
|
||||
CREATE TABLE `snapshot_visualization_link_jump_info` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`link_jump_id` bigint DEFAULT NULL COMMENT 'link jump ID',
|
||||
`link_type` varchar(255) DEFAULT NULL COMMENT '关联类型 inner 内部仪表板,outer 外部链接',
|
||||
`jump_type` varchar(255) DEFAULT NULL COMMENT '跳转类型 _blank 新开页面 _self 当前窗口',
|
||||
`target_dv_id` bigint DEFAULT NULL COMMENT '关联仪表板ID',
|
||||
`source_field_id` bigint DEFAULT NULL COMMENT '字段ID',
|
||||
`content` varchar(4000) DEFAULT NULL COMMENT '内容 linkType = outer时使用',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否可用',
|
||||
`attach_params` tinyint(1) DEFAULT NULL COMMENT '是否附加点击参数',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制来源ID',
|
||||
`window_size` varchar(255) DEFAULT 'middle' COMMENT '窗口大小large middle small',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_link_jump_target_view_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_link_jump_target_view_info`;
|
||||
CREATE TABLE `snapshot_visualization_link_jump_target_view_info` (
|
||||
`target_id` bigint NOT NULL COMMENT '主键',
|
||||
`link_jump_info_id` bigint DEFAULT NULL COMMENT 'visualization_link_jump_info 表的 ID',
|
||||
`source_field_active_id` bigint DEFAULT NULL COMMENT '勾选字段设置的匹配字段,也可以不是勾选字段本身',
|
||||
`target_view_id` varchar(50) DEFAULT NULL COMMENT '目标图表ID',
|
||||
`target_field_id` varchar(50) DEFAULT NULL COMMENT '目标字段ID',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制来源ID',
|
||||
`target_type` varchar(50) DEFAULT 'view' COMMENT '联动目标类型 view 图表 filter 过滤组件 outParams 外部参数',
|
||||
PRIMARY KEY (`target_id`) USING BTREE
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_linkage
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_linkage`;
|
||||
CREATE TABLE `snapshot_visualization_linkage` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`dv_id` bigint DEFAULT NULL COMMENT '联动大屏/仪表板ID',
|
||||
`source_view_id` bigint DEFAULT NULL COMMENT '源图表id',
|
||||
`target_view_id` bigint DEFAULT NULL COMMENT '联动图表id',
|
||||
`update_time` bigint DEFAULT NULL COMMENT '更新时间',
|
||||
`update_people` varchar(255) DEFAULT NULL COMMENT '更新人',
|
||||
`linkage_active` tinyint(1) DEFAULT '0' COMMENT '是否启用关联',
|
||||
`ext1` varchar(2000) DEFAULT NULL COMMENT '扩展字段1',
|
||||
`ext2` varchar(2000) DEFAULT NULL COMMENT '扩展字段2',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制来源ID',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_linkage_field
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_linkage_field`;
|
||||
CREATE TABLE `snapshot_visualization_linkage_field` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`linkage_id` bigint DEFAULT NULL COMMENT '联动ID',
|
||||
`source_field` bigint DEFAULT NULL COMMENT '源图表字段',
|
||||
`target_field` bigint DEFAULT NULL COMMENT '目标图表字段',
|
||||
`update_time` bigint DEFAULT NULL COMMENT '更新时间',
|
||||
`copy_from` bigint DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` bigint DEFAULT NULL COMMENT '复制来源ID',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_outer_params
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_outer_params`;
|
||||
CREATE TABLE `snapshot_visualization_outer_params` (
|
||||
`params_id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`visualization_id` varchar(50) DEFAULT NULL COMMENT '可视化资源ID',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否启用外部参数标识(1-是,0-否)',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||
`copy_from` varchar(50) DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` varchar(50) DEFAULT NULL COMMENT '复制来源ID',
|
||||
PRIMARY KEY (`params_id`) USING BTREE
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for snapshot_visualization_outer_params_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_outer_params_info`;
|
||||
CREATE TABLE `snapshot_visualization_outer_params_info` (
|
||||
`params_info_id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`params_id` varchar(50) DEFAULT NULL COMMENT 'visualization_outer_params 表的 ID',
|
||||
`param_name` varchar(255) DEFAULT NULL COMMENT '参数名',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||
`copy_from` varchar(255) DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` varchar(50) DEFAULT NULL COMMENT '复制来源ID',
|
||||
`required` tinyint(1) DEFAULT '0' COMMENT '是否必填',
|
||||
`default_value` varchar(255) DEFAULT NULL COMMENT '默认值 JSON格式',
|
||||
`enabled_default` tinyint(1) DEFAULT '0' COMMENT '是否启用默认值',
|
||||
PRIMARY KEY (`params_info_id`) USING BTREE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `snapshot_visualization_outer_params_target_view_info`;
|
||||
CREATE TABLE `snapshot_visualization_outer_params_target_view_info` (
|
||||
`target_id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`params_info_id` varchar(50) DEFAULT NULL COMMENT 'visualization_outer_params_info 表的 ID',
|
||||
`target_view_id` varchar(50) DEFAULT NULL COMMENT '联动视图ID/联动过滤项ID',
|
||||
`target_field_id` varchar(50) DEFAULT NULL COMMENT '联动字段ID',
|
||||
`copy_from` varchar(255) DEFAULT NULL COMMENT '复制来源',
|
||||
`copy_id` varchar(50) DEFAULT NULL COMMENT '复制来源ID',
|
||||
`target_ds_id` varchar(50) DEFAULT NULL COMMENT '联动数据集id/联动过滤组件id',
|
||||
PRIMARY KEY (`target_id`)
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.dataease.chart.dao.ext.mapper.ExtChartViewMapper">
|
||||
|
||||
<select id="selectListCustom" resultType="io.dataease.chart.dao.auto.entity.CoreChartView">
|
||||
select * from
|
||||
<if test="resourceTable = 'snapshot'">
|
||||
snapshot_core_chart_view
|
||||
</if>
|
||||
<if test="resourceTable = 'snapshot'">
|
||||
core_chart_view
|
||||
</if>
|
||||
where scene_id = #{sceneId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -169,11 +169,17 @@
|
||||
`version`,
|
||||
`content_id`,
|
||||
`check_version`
|
||||
FROM data_visualization_info
|
||||
where data_visualization_info.delete_flag = 0
|
||||
and data_visualization_info.id = #{dvId}
|
||||
FROM
|
||||
<if test="resourceTable == 'snapshot'">
|
||||
snapshot_data_visualization_info dvi
|
||||
</if>
|
||||
<if test="resourceTable == 'core'">
|
||||
data_visualization_info dvi
|
||||
</if>
|
||||
where dvi.delete_flag = 0
|
||||
and dvi.id = #{dvId}
|
||||
<if test="dvType">
|
||||
and data_visualization_info.type = #{dvType}
|
||||
and dvi.type = #{dvType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -459,7 +465,188 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryInnerUserInfo" resultType="io.dataease.api.permissions.user.vo.UserFormVO">
|
||||
<select id="queryInnerUserInfo" resultType="io.dataease.api.permissions.user.vo.UserFormVO">
|
||||
select id,account,name from per_user where id = #{id}
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<insert id="snapshotDataV">
|
||||
INSERT snapshot_data_visualization_info SELECT
|
||||
*
|
||||
FROM
|
||||
data_visualization_info
|
||||
WHERE
|
||||
id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="snapshotViews">
|
||||
INSERT snapshot_core_chart_view SELECT
|
||||
*
|
||||
FROM
|
||||
core_chart_view
|
||||
WHERE
|
||||
scene_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="snapshotLinkJumpTargetViewInfo">
|
||||
INSERT snapshot_visualization_link_jump_target_view_info SELECT
|
||||
vljtvi.*
|
||||
FROM
|
||||
visualization_link_jump_target_view_info vljtvi
|
||||
LEFT JOIN visualization_link_jump_info vlji ON vljtvi.link_jump_info_id = vlji.id
|
||||
LEFT JOIN visualization_link_jump vlj ON vlji.link_jump_id = vlj.id
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="snapshotLinkJumpInfo">
|
||||
INSERT snapshot_visualization_link_jump_info SELECT
|
||||
vlji.*
|
||||
FROM
|
||||
visualization_link_jump_info vlji
|
||||
LEFT JOIN visualization_link_jump vlj ON vlji.link_jump_id = vlj.id
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="snapshotLinkJump">
|
||||
INSERT snapshot_visualization_link_jump SELECT
|
||||
vlj.*
|
||||
FROM visualization_link_jump vlj
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="snapshotLinkageField">
|
||||
INSERT snapshot_visualization_linkage_field SELECT
|
||||
vlf.*
|
||||
FROM
|
||||
visualization_linkage_field vlf
|
||||
LEFT JOIN visualization_linkage vl ON vlf.linkage_id = vl.id
|
||||
WHERE
|
||||
vl.dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="snapshotLinkage">
|
||||
INSERT snapshot_visualization_linkage SELECT
|
||||
vl.*
|
||||
FROM
|
||||
visualization_linkage vl
|
||||
WHERE
|
||||
vl.dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="snapshotOuterParamsTargetViewInfo">
|
||||
INSERT snapshot_visualization_outer_params_target_view_info SELECT
|
||||
voptvi.*
|
||||
FROM
|
||||
visualization_outer_params_target_view_info voptvi
|
||||
LEFT JOIN visualization_outer_params_info vopi ON vopi.params_info_id = voptvi.params_info_id
|
||||
LEFT JOIN visualization_outer_params vop ON vop.params_id = vopi.params_id
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="snapshotOuterParamsInfo">
|
||||
INSERT snapshot_visualization_outer_params_info SELECT
|
||||
vopi.*
|
||||
FROM
|
||||
visualization_outer_params_info vopi
|
||||
LEFT JOIN visualization_outer_params vop ON vop.params_id = vopi.params_id
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="snapshotOuterParams">
|
||||
INSERT snapshot_visualization_outer_params SELECT
|
||||
vop.*
|
||||
FROM visualization_outer_params vop
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="restoreDataV">
|
||||
INSERT data_visualization_info SELECT
|
||||
*
|
||||
FROM
|
||||
snapshot_data_visualization_info
|
||||
WHERE
|
||||
id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="restoreViews">
|
||||
INSERT core_chart_view SELECT
|
||||
*
|
||||
FROM
|
||||
snapshot_core_chart_view
|
||||
WHERE
|
||||
scene_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="restoreLinkJumpTargetViewInfo">
|
||||
INSERT visualization_link_jump_target_view_info SELECT
|
||||
vljtvi.*
|
||||
FROM
|
||||
snapshot_visualization_link_jump_target_view_info vljtvi
|
||||
LEFT JOIN snapshot_visualization_link_jump_info vlji ON vljtvi.link_jump_info_id = vlji.id
|
||||
LEFT JOIN snapshot_visualization_link_jump vlj ON vlji.link_jump_id = vlj.id
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="restoreLinkJumpInfo">
|
||||
INSERT visualization_link_jump_info SELECT
|
||||
vlji.*
|
||||
FROM
|
||||
snapshot_visualization_link_jump_info vlji
|
||||
LEFT JOIN snapshot_visualization_link_jump vlj ON vlji.link_jump_id = vlj.id
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="restoreLinkJump">
|
||||
INSERT visualization_link_jump SELECT
|
||||
vlj.*
|
||||
FROM snapshot_visualization_link_jump vlj
|
||||
WHERE
|
||||
vlj.source_dv_id = #{dvId}
|
||||
</insert>
|
||||
|
||||
<insert id="restoreLinkageField">
|
||||
INSERT visualization_linkage_field SELECT
|
||||
vlf.*
|
||||
FROM
|
||||
snapshot_visualization_linkage_field vlf
|
||||
LEFT JOIN snapshot_visualization_linkage vl ON vlf.linkage_id = vl.id
|
||||
WHERE
|
||||
vl.dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="restoreLinkage">
|
||||
INSERT visualization_linkage SELECT
|
||||
vl.*
|
||||
FROM
|
||||
snapshot_visualization_linkage vl
|
||||
WHERE
|
||||
vl.dv_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="restoreOuterParamsTargetViewInfo">
|
||||
INSERT visualization_outer_params_target_view_info SELECT
|
||||
voptvi.*
|
||||
FROM
|
||||
snapshot_visualization_outer_params_target_view_info voptvi
|
||||
LEFT JOIN snapshot_visualization_outer_params_info vopi ON vopi.params_info_id = voptvi.params_info_id
|
||||
LEFT JOIN snapshot_visualization_outer_params vop ON vop.params_id = vopi.params_id
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="restoreOuterParamsInfo">
|
||||
INSERT visualization_outer_params_info SELECT
|
||||
vopi.*
|
||||
FROM
|
||||
snapshot_visualization_outer_params_info vopi
|
||||
LEFT JOIN snapshot_visualization_outer_params vop ON vop.params_id = vopi.params_id
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
<insert id="restoreOuterParams">
|
||||
INSERT visualization_outer_params SELECT
|
||||
vop.*
|
||||
FROM snapshot_visualization_outer_params vop
|
||||
WHERE
|
||||
vop.visualization_id = #{dvId}
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
@@ -226,13 +226,32 @@
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJumpTargetViewInfoWithVisualizationSnapshot">
|
||||
DELETE FROM snapshot_visualization_link_jump_target_view_info
|
||||
WHERE link_jump_info_id IN (
|
||||
SELECT lji.id
|
||||
FROM snapshot_visualization_link_jump_info lji
|
||||
JOIN snapshot_visualization_link_jump lj ON lji.link_jump_id = lj.id
|
||||
WHERE lj.source_dv_id = #{dvId}
|
||||
OR lji.target_dv_id = #{dvId}
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJumpInfoWithVisualization">
|
||||
DELETE FROM visualization_link_jump_info
|
||||
WHERE link_jump_id IN (
|
||||
SELECT lj.id
|
||||
FROM visualization_link_jump lj
|
||||
WHERE lj.source_dv_id = #{dvId}
|
||||
OR lj.target_dv_id = #{dvId}
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJumpInfoWithVisualizationSnapshot">
|
||||
DELETE FROM snapshot_visualization_link_jump_info
|
||||
WHERE link_jump_id IN (
|
||||
SELECT lj.id
|
||||
FROM snapshot_visualization_link_jump lj
|
||||
WHERE lj.source_dv_id = #{dvId}
|
||||
)
|
||||
</delete>
|
||||
|
||||
@@ -241,6 +260,11 @@
|
||||
WHERE source_dv_id = #{dvId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJumpWithVisualizationSnapshot">
|
||||
DELETE FROM snapshot_visualization_link_jump
|
||||
WHERE source_dv_id = #{dvId}
|
||||
</delete>
|
||||
|
||||
<select id="getTargetVisualizationJumpInfo" resultMap="AllJumpMap">
|
||||
SELECT DISTINCT
|
||||
concat( lj.source_view_id, '#', jtvi.source_field_active_id ) AS sourceInfo,
|
||||
|
||||
@@ -80,7 +80,16 @@
|
||||
|
||||
<delete id="deleteViewLinkage">
|
||||
delete from visualization_linkage where visualization_linkage.dv_id = #{dvId}
|
||||
AND visualization_linkage.source_view_id = #{sourceViewId}
|
||||
<if test="sourceViewId != null">
|
||||
AND visualization_linkage.source_view_id = #{sourceViewId}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewLinkageSnapshot">
|
||||
delete from snapshot_visualization_linkage where snapshot_visualization_linkage.dv_id = #{dvId}
|
||||
<if test="sourceViewId != null">
|
||||
AND snapshot_visualization_linkage.source_view_id = #{sourceViewId}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
|
||||
@@ -92,8 +101,26 @@
|
||||
FROM visualization_linkage pvl
|
||||
JOIN visualization_linkage_field pvlf
|
||||
ON pvl.id = pvlf.linkage_id
|
||||
WHERE pvl.source_view_id = #{sourceViewId}
|
||||
AND pvl.dv_id = #{dvId}
|
||||
WHERE pvl.dv_id = #{dvId}
|
||||
<if test="sourceViewId != null">
|
||||
AND pvl.source_view_id = #{sourceViewId}
|
||||
</if>
|
||||
) AS temp_table
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewLinkageFieldSnapshot">
|
||||
DELETE FROM snapshot_visualization_linkage
|
||||
WHERE id IN (
|
||||
SELECT id FROM (
|
||||
SELECT pvl.id
|
||||
FROM snapshot_visualization_linkage pvl
|
||||
JOIN snapshot_visualization_linkage_field pvlf
|
||||
ON pvl.id = pvlf.linkage_id
|
||||
WHERE pvl.dv_id = #{dvId}
|
||||
<if test="sourceViewId != null">
|
||||
AND pvl.source_view_id = #{sourceViewId}
|
||||
</if>
|
||||
) AS temp_table
|
||||
)
|
||||
</delete>
|
||||
|
||||
@@ -132,6 +132,46 @@
|
||||
pop.visualization_id = #{visualizationId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteOuterParamsTargetWithVisualizationIdSnapshot" >
|
||||
DELETE FROM
|
||||
snapshot_visualization_outer_params_target_view_info poptvi
|
||||
WHERE
|
||||
poptvi.params_info_id IN (
|
||||
SELECT params_info_id FROM
|
||||
(
|
||||
SELECT poptvi.params_info_id FROM
|
||||
snapshot_visualization_outer_params_target_view_info poptvi
|
||||
INNER JOIN snapshot_visualization_outer_params_info popi ON poptvi.params_info_id = popi.params_info_id
|
||||
INNER JOIN snapshot_visualization_outer_params pop ON popi.params_id = pop.params_id
|
||||
WHERE pop.visualization_id = #{visualizationId}
|
||||
) tmp
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOuterParamsInfoWithVisualizationIdSnapshot" >
|
||||
DELETE FROM
|
||||
snapshot_visualization_outer_params_info popi
|
||||
WHERE
|
||||
popi.params_id IN (
|
||||
SELECT params_id FROM
|
||||
(
|
||||
SELECT popi.params_id FROM
|
||||
snapshot_visualization_outer_params_info popi
|
||||
INNER JOIN snapshot_visualization_outer_params pop ON popi.params_id = pop.params_id
|
||||
WHERE pop.visualization_id = #{visualizationId}
|
||||
) tmp
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOuterParamsWithVisualizationIdSnapshot" >
|
||||
DELETE pop
|
||||
FROM
|
||||
snapshot_visualization_outer_params pop
|
||||
WHERE
|
||||
pop.visualization_id = #{visualizationId}
|
||||
</delete>
|
||||
|
||||
<select id="getVisualizationOuterParamsInfo" resultMap="AllOuterParamsMap">
|
||||
SELECT DISTINCT
|
||||
popi.param_name AS sourceInfo,
|
||||
|
||||
@@ -59,6 +59,10 @@ export const save = data => request.post({ url: '/dataVisualization/save', data
|
||||
export const checkCanvasChange = data =>
|
||||
request.post({ url: '/dataVisualization/checkCanvasChange', data, loading: true })
|
||||
|
||||
export const saveCanvas = data =>
|
||||
request.post({ url: '/dataVisualization/saveCanvas', data, loading: true })
|
||||
|
||||
|
||||
export const saveCanvas = data =>
|
||||
request.post({ url: '/dataVisualization/saveCanvas', data, loading: true })
|
||||
|
||||
|
||||
@@ -179,6 +179,10 @@ const resourceOptFinish = param => {
|
||||
}
|
||||
}
|
||||
|
||||
const publishStatusChange = status => {
|
||||
|
||||
}
|
||||
|
||||
const saveCanvasWithCheck = () => {
|
||||
if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) {
|
||||
ElMessageBox.confirm(t('components.from_other_organizations'), {
|
||||
@@ -243,7 +247,7 @@ const saveResource = () => {
|
||||
}
|
||||
|
||||
if (appData.value) {
|
||||
initCanvasData(dvInfo.value.id, 'dashboard', () => {
|
||||
initCanvasData(dvInfo.value.id, { busiFlag: 'dashboard' }, () => {
|
||||
useEmitt().emitter.emit('refresh-dataset-selector')
|
||||
useEmitt().emitter.emit('calcData-all')
|
||||
resourceAppOpt.value.close()
|
||||
@@ -689,16 +693,25 @@ const initOpenHandler = newWindow => {
|
||||
>
|
||||
{{ t('data_set.edit') }}
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="editMode === 'edit' || editMode === 'preview'"
|
||||
:disabled="styleChangeTimes < 1"
|
||||
@click="saveCanvasWithCheck()"
|
||||
style="float: right; margin-right: 12px"
|
||||
type="primary"
|
||||
>
|
||||
{{ t('data_set.save') }}
|
||||
</el-button>
|
||||
<template v-if="editMode === 'edit' || editMode === 'preview'">
|
||||
<el-button
|
||||
v-if="editMode === 'edit' || editMode === 'preview'"
|
||||
:disabled="styleChangeTimes < 1"
|
||||
@click="saveCanvasWithCheck()"
|
||||
style="float: right; margin-right: 12px"
|
||||
type="primary"
|
||||
>
|
||||
{{ t('data_set.save') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="dvInfo.status === 2"
|
||||
@click="saveCanvasWithCheck()"
|
||||
style="float: right; margin-right: 12px"
|
||||
type="primary"
|
||||
>
|
||||
{{ t('visualization.re_publish') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="right-area full-area" v-if="batchOptStatus">
|
||||
|
||||
@@ -179,7 +179,7 @@ const saveResource = () => {
|
||||
)
|
||||
}
|
||||
if (appData.value) {
|
||||
initCanvasData(dvInfo.value.id, 'dataV', () => {
|
||||
initCanvasData(dvInfo.value.id, { busiFlag: 'dataV' }, () => {
|
||||
useEmitt().emitter.emit('refresh-dataset-selector')
|
||||
resourceAppOpt.value.close()
|
||||
dvMainStore.setAppDataInfo(null)
|
||||
|
||||
@@ -2801,6 +2801,8 @@ export default {
|
||||
column_name: '字段名称'
|
||||
},
|
||||
visualization: {
|
||||
re_publish: '重新发布',
|
||||
publish: '发布',
|
||||
freeze_top: '位置冻结在顶部',
|
||||
indicator_linkage: '指标卡联动仅携带图表过滤参数',
|
||||
gap_size: '间隙大小',
|
||||
|
||||
@@ -81,7 +81,7 @@ onBeforeMount(async () => {
|
||||
|
||||
req(
|
||||
embeddedParams.dvId,
|
||||
embeddedParams.busiFlag,
|
||||
{ busiFlag: embeddedParams.busiFlag },
|
||||
function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
||||
@@ -91,7 +91,7 @@ onBeforeMount(async () => {
|
||||
|
||||
initCanvasData(
|
||||
embeddedParams.dvId,
|
||||
embeddedParams.busiFlag,
|
||||
{ busiFlag: embeddedParams.busiFlag },
|
||||
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
||||
state.canvasDataPreview = canvasDataResult
|
||||
state.canvasStylePreview = canvasStyleResult
|
||||
|
||||
@@ -322,7 +322,8 @@ export function refreshOtherComponent(dvId, busiFlag) {
|
||||
}
|
||||
}
|
||||
|
||||
export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
|
||||
export function initCanvasDataPrepare(dvId, params, callBack) {
|
||||
const busiFlag = params.busiFlag
|
||||
const copyFlag = busiFlag != null && busiFlag.includes('-copy')
|
||||
const busiFlagCustom = copyFlag ? busiFlag.split('-')[0] : busiFlag
|
||||
const method = copyFlag ? findCopyResource : findById
|
||||
@@ -338,7 +339,7 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
|
||||
attachInfo['showWatermark'] = enable
|
||||
}
|
||||
}
|
||||
|
||||
attachInfo['resourceTable'] = params.resourceTable ? params.resourceTable : 'core'
|
||||
method(dvId, busiFlagCustom, attachInfo).then(res => {
|
||||
const canvasInfo = res.data
|
||||
const watermarkInfo = {
|
||||
@@ -382,10 +383,10 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
|
||||
})
|
||||
}
|
||||
|
||||
export async function initCanvasData(dvId, busiFlag, callBack) {
|
||||
export async function initCanvasData(dvId, params, callBack) {
|
||||
initCanvasDataPrepare(
|
||||
dvId,
|
||||
busiFlag,
|
||||
params,
|
||||
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
||||
dvMainStore.setComponentData(canvasDataResult)
|
||||
dvMainStore.setCanvasStyle(canvasStyleResult)
|
||||
@@ -407,7 +408,7 @@ export async function initCanvasData(dvId, busiFlag, callBack) {
|
||||
export async function backCanvasData(dvId, mobileViewInfo, busiFlag, callBack) {
|
||||
initCanvasDataPrepare(
|
||||
dvId,
|
||||
busiFlag,
|
||||
{ busiFlag },
|
||||
function ({ canvasDataResult, canvasStyleResult, canvasViewInfoPreview }) {
|
||||
const componentDataCopy = canvasDataResult.filter(ele => !!ele.inMobile)
|
||||
const componentDataId = componentDataCopy.map(ele => ele.id)
|
||||
@@ -454,10 +455,10 @@ export async function backCanvasData(dvId, mobileViewInfo, busiFlag, callBack) {
|
||||
)
|
||||
}
|
||||
|
||||
export function initCanvasDataMobile(dvId, busiFlag, callBack) {
|
||||
export function initCanvasDataMobile(dvId, params, callBack) {
|
||||
initCanvasDataPrepare(
|
||||
dvId,
|
||||
busiFlag,
|
||||
params,
|
||||
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
||||
const componentData = canvasDataResult.filter(ele => !!ele.inMobile)
|
||||
canvasDataResult.forEach(ele => {
|
||||
|
||||
@@ -98,7 +98,7 @@ const loadCanvasData = (dvId, weight?) => {
|
||||
dataInitState.value = false
|
||||
initMethod(
|
||||
dvId,
|
||||
'dashboard',
|
||||
{ busiFlag: 'dashboard' },
|
||||
function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
||||
@@ -161,7 +161,7 @@ const doUseCache = flag => {
|
||||
const initLocalCanvasData = () => {
|
||||
const { resourceId, opt, sourcePid } = state
|
||||
const busiFlg = opt === 'copy' ? 'dashboard-copy' : 'dashboard'
|
||||
initCanvasData(resourceId, busiFlg, function () {
|
||||
initCanvasData(resourceId, { busiFlg, resourceTable: 'snapshot' }, function () {
|
||||
dataInitState.value = true
|
||||
if (dvInfo.value && opt === 'copy') {
|
||||
dvInfo.value.dataState = 'prepare'
|
||||
|
||||
@@ -117,7 +117,7 @@ const loadCanvasDataAsync = async (dvId, dvType, ignoreParams = false) => {
|
||||
|
||||
await initCanvasData(
|
||||
dvId,
|
||||
dvType,
|
||||
{ busiFlag: dvType },
|
||||
async function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
||||
@@ -96,7 +96,7 @@ const loadCanvasDataAsync = async (dvId, dvType) => {
|
||||
const req = dvType === 'dashboard' ? initCanvasDataMobile : initCanvasData
|
||||
req(
|
||||
dvId,
|
||||
dvType,
|
||||
{ busiFlag: dvType },
|
||||
async function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
||||
@@ -75,7 +75,7 @@ const loadCanvasData = (dvId, weight?, ext?) => {
|
||||
dataInitState.value = false
|
||||
initMethod(
|
||||
dvId,
|
||||
'dataV',
|
||||
{ busiFlag: 'dataV' },
|
||||
function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
||||
@@ -299,8 +299,8 @@ const doUseCache = flag => {
|
||||
|
||||
const initLocalCanvasData = async () => {
|
||||
const { opt, sourcePid, resourceId } = state
|
||||
const busiFlg = opt === 'copy' ? 'dataV-copy' : 'dataV'
|
||||
await initCanvasData(resourceId, busiFlg, function () {
|
||||
const busiFlag = opt === 'copy' ? 'dataV-copy' : 'dataV'
|
||||
await initCanvasData(resourceId, { busiFlag, resourceTable: 'snapshot' }, function () {
|
||||
state.canvasInitStatus = true
|
||||
// afterInit
|
||||
nextTick(() => {
|
||||
|
||||
@@ -64,6 +64,12 @@ public interface DataVisualizationApi {
|
||||
@Operation(summary = "画布更新")
|
||||
void updateCanvas(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
|
||||
@PostMapping("/updatePublishStatus")
|
||||
@DePermit(value = {"#p0.id + ':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "发布状态更新")
|
||||
void updatePublishStatus(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@PostMapping("/updateBase")
|
||||
@DePermit(value = {"#p0.id + ':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "可视化资源基础信息更新")
|
||||
|
||||
@@ -57,6 +57,8 @@ public class DataVisualizationBaseRequest extends DataVisualizationVO {
|
||||
// 是否强制校验新旧contentId
|
||||
private Boolean checkHistory = false;
|
||||
|
||||
//数据来源 core 主表 snapshot 镜像表
|
||||
private String resourceTable = "core";
|
||||
|
||||
public DataVisualizationBaseRequest(Long id,String busiFlag) {
|
||||
this.busiFlag = busiFlag;
|
||||
|
||||
@@ -88,4 +88,22 @@ public class CommonConstants {
|
||||
//公共
|
||||
public static final String PUBLIC = "public";
|
||||
}
|
||||
|
||||
public static final class RESOURCE_TABLE {
|
||||
//主表
|
||||
public static final String CORE = "core";
|
||||
//镜像表
|
||||
public static final String SNAPSHOT = "snapshot";
|
||||
}
|
||||
|
||||
|
||||
public static final class DV_STATUS {
|
||||
//未发布
|
||||
public static final int UNPUBLISHED = 0;
|
||||
//已发布
|
||||
public static final int PUBLISHED = 1;
|
||||
//已保存未发布
|
||||
public static final int SAVED_UNPUBLISHED = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user