|
|
|
@ -14,7 +14,7 @@ import com.supervision.nebula.dto.graph.*;
|
|
|
|
|
import com.supervision.nebula.util.NebulaUtil;
|
|
|
|
|
import com.supervision.nebula.vo.AttributeVo;
|
|
|
|
|
import com.supervision.nebula.vo.CommonVo;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
@ -26,10 +26,10 @@ import java.util.Map;
|
|
|
|
|
* @ClassName: AttributeService
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class AttributeService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
GraphCommonService graphCommonService;
|
|
|
|
|
private final GraphCommonService graphCommonService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return java.util.List<com.hoteamsoft.common.vo.AttributeVo>
|
|
|
|
@ -99,7 +99,7 @@ public class AttributeService {
|
|
|
|
|
|
|
|
|
|
public <T> PageInfo<T> startPage(List<T> list, Integer pageNum, Integer pageSize) {
|
|
|
|
|
//创建Page类
|
|
|
|
|
Page page = new Page(pageNum, pageSize);
|
|
|
|
|
Page<T> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
//为Page类中的total属性赋值
|
|
|
|
|
page.setTotal(list.size());
|
|
|
|
|
//计算当前需要显示的数据下标起始值
|
|
|
|
@ -108,8 +108,7 @@ public class AttributeService {
|
|
|
|
|
//从链表中截取需要显示的子链表,并加入到Page
|
|
|
|
|
page.addAll(list.subList(startIndex, endIndex));
|
|
|
|
|
//以Page创建PageInfo
|
|
|
|
|
PageInfo pageInfo = new PageInfo<>(page);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
return new PageInfo<>(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -127,9 +126,7 @@ public class AttributeService {
|
|
|
|
|
* @Param [graphShowInfo]
|
|
|
|
|
**/
|
|
|
|
|
public List<AttributeVo> showAttributeInfo(GraphShowInfo graphShowInfo) {
|
|
|
|
|
List<AttributeVo> attributeVoList = graphCommonService.executeJson(NebulaUtil.showAttributeInfo(graphShowInfo), AttributeVo.class);
|
|
|
|
|
//cover(attributeVoList);
|
|
|
|
|
return attributeVoList;
|
|
|
|
|
return graphCommonService.executeJson(NebulaUtil.showAttributeInfo(graphShowInfo), AttributeVo.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cover(List<AttributeVo> attributeVoList) {
|
|
|
|
@ -140,7 +137,7 @@ public class AttributeService {
|
|
|
|
|
if (ObjectUtil.isNull(attributeVo)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
List<AttributeVo.DataBean> data = (List<AttributeVo.DataBean>) attributeVo.getData();
|
|
|
|
|
List<AttributeVo.DataBean> data = attributeVo.getData();
|
|
|
|
|
List<String> columns = attributeVo.getColumns();
|
|
|
|
|
HashMap<String, List<String>> stringListHashMap = MapUtil.newHashMap();
|
|
|
|
|
List<String> valueList = CollectionUtil.newArrayList();
|
|
|
|
|