forked from github/dataease
feat(仪表板、数据大屏): 外部参数优化,支持自定义参数设置等
This commit is contained in:
parent
00c37f404c
commit
262edda652
@ -1,26 +1,28 @@
|
||||
package io.dataease.visualization.server;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import io.dataease.api.visualization.VisualizationOuterParamsApi;
|
||||
import io.dataease.api.visualization.dto.VisualizationOuterParamsDTO;
|
||||
import io.dataease.api.visualization.dto.VisualizationOuterParamsInfoDTO;
|
||||
import io.dataease.api.visualization.response.VisualizationOuterParamsBaseResponse;
|
||||
import io.dataease.api.visualization.vo.DataVisualizationVO;
|
||||
import io.dataease.utils.BeanUtils;
|
||||
import io.dataease.utils.JsonUtil;
|
||||
import io.dataease.visualization.dao.auto.entity.VisualizationOuterParams;
|
||||
import io.dataease.visualization.dao.auto.entity.VisualizationOuterParamsInfo;
|
||||
import io.dataease.visualization.dao.auto.entity.VisualizationOuterParamsTargetViewInfo;
|
||||
import io.dataease.visualization.dao.auto.mapper.VisualizationOuterParamsInfoMapper;
|
||||
import io.dataease.visualization.dao.auto.mapper.VisualizationOuterParamsMapper;
|
||||
import io.dataease.visualization.dao.auto.mapper.VisualizationOuterParamsTargetViewInfoMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.ExtDataVisualizationMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.ExtVisualizationOuterParamsMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -41,12 +43,18 @@ public class VisualizationOuterParamsService implements VisualizationOuterParams
|
||||
@Resource
|
||||
private VisualizationOuterParamsTargetViewInfoMapper outerParamsTargetViewInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public VisualizationOuterParamsDTO queryWithVisualizationId(String visualizationId) {
|
||||
VisualizationOuterParamsDTO visualizationOuterParamsDTO = extOuterParamsMapper.queryWithVisualizationId(visualizationId);
|
||||
return visualizationOuterParamsDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualizationOuterParamsDTO queryWithVisualizationIdDS(String dvId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOuterParamsSet(VisualizationOuterParamsDTO outerParamsDTO) {
|
||||
String visualizationId = outerParamsDTO.getVisualizationId();
|
||||
|
@ -160,7 +160,9 @@
|
||||
FROM data_visualization_info
|
||||
where data_visualization_info.delete_flag = 0
|
||||
and data_visualization_info.id = #{dvId}
|
||||
and data_visualization_info.type = #{dvType}
|
||||
<if test="dvType">
|
||||
and data_visualization_info.type = #{dvType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="findRecent" resultType="io.dataease.visualization.dao.ext.po.VisualizationResourcePO">
|
||||
|
@ -10,6 +10,9 @@ public interface VisualizationOuterParamsApi {
|
||||
@GetMapping("/queryWithVisualizationId/{dvId}")
|
||||
VisualizationOuterParamsDTO queryWithVisualizationId(@PathVariable("dvId") String dvId);
|
||||
|
||||
@GetMapping("/queryWithVisualizationId/{dvId}")
|
||||
VisualizationOuterParamsDTO queryWithVisualizationIdDS(@PathVariable("dvId") String dvId);
|
||||
|
||||
@PostMapping("/updateOuterParamsSet")
|
||||
void updateOuterParamsSet(@RequestBody VisualizationOuterParamsDTO OuterParamsDTO);
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package io.dataease.api.visualization.dto;
|
||||
|
||||
import io.dataease.api.visualization.vo.VisualizationOuterParamsDsInfoVO;
|
||||
import io.dataease.api.visualization.vo.VisualizationOuterParamsFilterInfoVO;
|
||||
import io.dataease.api.visualization.vo.VisualizationOuterParamsInfoVO;
|
||||
import io.dataease.api.visualization.vo.VisualizationOuterParamsTargetViewInfoVO;
|
||||
import lombok.Data;
|
||||
@ -20,4 +22,8 @@ public class VisualizationOuterParamsInfoDTO extends VisualizationOuterParamsInf
|
||||
//目标联动参数 targetViewId#targetFieldId
|
||||
private List<String> targetInfoList;
|
||||
|
||||
private List<VisualizationOuterParamsDsInfoVO> dsInfoVOList = new ArrayList<>();
|
||||
|
||||
private List<VisualizationOuterParamsFilterInfoVO> filterInfoVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package io.dataease.api.visualization.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class VisualizationOuterParamsDsInfoVO {
|
||||
|
||||
private String dsName;
|
||||
|
||||
private String dsId;
|
||||
|
||||
private List targetFieldInfo;
|
||||
|
||||
private Map<String,Boolean> viewCheckedInfo;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package io.dataease.api.visualization.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class VisualizationOuterParamsFilterInfoVO {
|
||||
|
||||
private String filterComponentId;
|
||||
|
||||
private String filterId;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user