forked from github/dataease
Merge pull request #1380 from dataease/pr@dev@feat_union_ds
feat(数据集): 关联数据集
This commit is contained in:
commit
7747d9ed55
@ -41,7 +41,7 @@ public class VAuthModelService {
|
||||
private List<VAuthModelDTO> filterData(VAuthModelRequest request, List<VAuthModelDTO> result) {
|
||||
if (request.getDatasetMode() != null && request.getDatasetMode() == 1) {
|
||||
result = result.stream().filter(vAuthModelDTO -> {
|
||||
if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getMode().equals(1L)) && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("excel") && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("custom")) {
|
||||
if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getMode().equals(1L)) && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("excel") && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("custom") && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("union")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -75,6 +75,10 @@ public class DirectFieldService implements DataSetFieldService {
|
||||
List<DataSetTableUnionDTO> listUnion = dataSetTableUnionService.listByTableId(dt.getList().get(0).getTableId());
|
||||
String sql = dataSetTableService.getCustomSQLDatasource(dt, listUnion, ds);
|
||||
datasourceRequest.setQuery(qp.createQuerySQLAsTmp(sql, Collections.singletonList(field), true));
|
||||
} else if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "union")) {
|
||||
DataTableInfoDTO dt = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
||||
String sql = (String) dataSetTableService.getUnionSQLDatasource(dt, ds).get("sql");
|
||||
datasourceRequest.setQuery(qp.createQuerySQLAsTmp(sql, Collections.singletonList(field), true));
|
||||
}
|
||||
} else if (datasetTable.getMode() == 1) {// 抽取
|
||||
// 连接doris,构建doris数据源查询
|
||||
|
@ -96,6 +96,7 @@
|
||||
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
|
||||
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
|
||||
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
|
||||
<svg-icon v-if="data.type === 'union'" icon-class="ds-union" class="ds-icon-union" />
|
||||
</span>
|
||||
<span v-if="data.type === 'db' || data.type === 'sql'">
|
||||
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span>
|
||||
|
@ -46,6 +46,7 @@
|
||||
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
|
||||
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
|
||||
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
|
||||
<svg-icon v-if="data.type === 'union'" icon-class="ds-union" class="ds-icon-union" />
|
||||
</span>
|
||||
<el-tooltip class="item" effect="dark" placement="top">
|
||||
<div slot="content">{{ node.label }}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user