Commit ff7f0036 by zhiwj

指标说明

parent 5d26cad3
...@@ -142,6 +142,7 @@ public class IndexDTO implements Serializable { ...@@ -142,6 +142,7 @@ public class IndexDTO implements Serializable {
private Integer indexGroupId; private Integer indexGroupId;
private String indexGroupName; private String indexGroupName;
private String relTopLevelName;
public Integer getIndexId() { public Integer getIndexId() {
return indexId; return indexId;
...@@ -374,4 +375,12 @@ public class IndexDTO implements Serializable { ...@@ -374,4 +375,12 @@ public class IndexDTO implements Serializable {
public void setIndexGroupName(String indexGroupName) { public void setIndexGroupName(String indexGroupName) {
this.indexGroupName = indexGroupName; this.indexGroupName = indexGroupName;
} }
public void setRelTopLevelName(String relTopLevelName) {
this.relTopLevelName = relTopLevelName;
}
public String getRelTopLevelName() {
return relTopLevelName;
}
} }
...@@ -10,17 +10,16 @@ import com.gic.cloud.entity.TabIndexGroup; ...@@ -10,17 +10,16 @@ import com.gic.cloud.entity.TabIndexGroup;
import com.gic.cloud.qo.IndexQO; import com.gic.cloud.qo.IndexQO;
import com.gic.cloud.service.*; import com.gic.cloud.service.*;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.commons.util.PageHelperUtils; import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode; import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.response.EnterpriseServiceResponse; import com.gic.enterprise.response.EnterpriseServiceResponse;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -103,6 +102,15 @@ public class IndexApiServiceImpl implements IndexApiService { ...@@ -103,6 +102,15 @@ public class IndexApiServiceImpl implements IndexApiService {
indexDTO.setIndexGroupName(indexGroup.getIndexGroupName()); indexDTO.setIndexGroupName(indexGroup.getIndexGroupName());
} }
} }
if (StringUtils.isNotBlank(indexDTO.getRelTopLevel())) {
List<Integer> idsList = Stream.of(indexDTO.getRelTopLevel().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList());
IndexQO indexQO = new IndexQO();
indexQO.setIndexIdList(idsList);
List<TabIndex> indexList = this.indexService.listAllIndex(indexQO);
String repTopLevelName = Optional.ofNullable(indexList).orElse(Collections.emptyList())
.stream().map(TabIndex::getName).collect(Collectors.joining(","));
indexDTO.setRelTopLevelName(repTopLevelName);
}
return EnterpriseServiceResponse.success(indexDTO); return EnterpriseServiceResponse.success(indexDTO);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment