Commit 0e00894f by guojuxing

pmd规范

parent 5b07cbcf
......@@ -60,20 +60,20 @@ public interface DataExplainService {
* @Title: listDataExplain

* @Description:

* @author zhiwj
* @param dataExplainQO
* @param dataExplainQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabDataExplain>


*/
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQO);
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQo);
/**
* 查询数据解读列表数据
* @Title: listAllDataExplain

* @Description:

* @author zhiwj
* @param dataExplainQO
* @param dataExplainQo
* @return java.util.List<com.gic.cloud.entity.TabDataExplain>


*/
List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQO);
List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQo);
/**
* 删除数据解读
......
......@@ -71,20 +71,20 @@ public interface IndexService {
* @Title: listIndex

* @Description:

* @author zhiwj
* @param indexQO
* @param indexQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabIndex>


*/
Page<TabIndex> listIndex(IndexQo indexQO);
Page<TabIndex> listIndex(IndexQo indexQo);
/**
* 查询指标字典
* @Title: listAllIndex

* @Description:

* @author zhiwj
* @param indexQO
* @param indexQo
* @return java.util.List<com.gic.cloud.entity.TabIndex>


*/
List<TabIndex> listAllIndex(IndexQo indexQO);
List<TabIndex> listAllIndex(IndexQo indexQo);
/**
* 删除指标字典
......
......@@ -54,14 +54,14 @@ public class DataExplainServiceImpl implements DataExplainService {
}
@Override
public Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQO) {
PageHelper.startPage(dataExplainQO.getCurrentPage(), dataExplainQO.getPageSize());
return tabDataExplainMapper.listDataExplain(dataExplainQO);
public Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQo) {
PageHelper.startPage(dataExplainQo.getCurrentPage(), dataExplainQo.getPageSize());
return tabDataExplainMapper.listDataExplain(dataExplainQo);
}
@Override
public List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQO) {
return tabDataExplainMapper.listDataExplain(dataExplainQO);
public List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQo) {
return tabDataExplainMapper.listDataExplain(dataExplainQo);
}
@Override
......
......@@ -73,22 +73,22 @@ public class IndexServiceImpl implements IndexService {
}
@Override
public Page<TabIndex> listIndex(IndexQo indexQO) {
PageHelper.startPage(indexQO.getCurrentPage(), indexQO.getPageSize());
if (StringUtils.isNotBlank(indexQO.getModuleId())) {
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQO.getModuleId().split(",")));
indexQO.setIndexIdList(indexIdList);
public Page<TabIndex> listIndex(IndexQo indexQo) {
PageHelper.startPage(indexQo.getCurrentPage(), indexQo.getPageSize());
if (StringUtils.isNotBlank(indexQo.getModuleId())) {
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQo.getModuleId().split(",")));
indexQo.setIndexIdList(indexIdList);
}
if (indexQO.getIndexGroupId() != null) {
List<Integer> indexGroupIdList = indexGroupService.listChildIndexGroup(indexQO.getIndexGroupId());
indexQO.setIndexGroupIdList(indexGroupIdList);
if (indexQo.getIndexGroupId() != null) {
List<Integer> indexGroupIdList = indexGroupService.listChildIndexGroup(indexQo.getIndexGroupId());
indexQo.setIndexGroupIdList(indexGroupIdList);
}
return tabIndexMapper.listIndex(indexQO);
return tabIndexMapper.listIndex(indexQo);
}
@Override
public List<TabIndex> listAllIndex(IndexQo indexQO) {
return tabIndexMapper.listIndex(indexQO);
public List<TabIndex> listAllIndex(IndexQo indexQo) {
return tabIndexMapper.listIndex(indexQo);
}
@Override
......@@ -101,15 +101,15 @@ public class IndexServiceImpl implements IndexService {
@Override
public TabIndex getByIndexCode(String moduleId, String indexCode) {
IndexQo indexQO = new IndexQo();
IndexQo indexQo = new IndexQo();
PageHelper.startPage(1, 1);
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Collections.singletonList(moduleId));
if (CollectionUtils.isEmpty(indexIdList)) {
return null;
}
indexQO.setIndexIdList(indexIdList);
indexQO.setCode(indexCode);
Page<TabIndex> page = tabIndexMapper.listIndex(indexQO);
indexQo.setIndexIdList(indexIdList);
indexQo.setCode(indexCode);
Page<TabIndex> page = tabIndexMapper.listIndex(indexQo);
if (CollectionUtils.isEmpty(page)) {
return null;
} else {
......
......@@ -104,9 +104,9 @@ public class IndexApiServiceImpl implements IndexApiService {
}
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);
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);
......@@ -115,8 +115,8 @@ public class IndexApiServiceImpl implements IndexApiService {
}
@Override
public ServiceResponse<Page<IndexDTO>> listIndex(IndexQo indexQO) {
com.github.pagehelper.Page<TabIndex> indexList = indexService.listIndex(indexQO);
public ServiceResponse<Page<IndexDTO>> listIndex(IndexQo indexQo) {
com.github.pagehelper.Page<TabIndex> indexList = indexService.listIndex(indexQo);
Page<IndexDTO> indexDTOPage = PageHelperUtils.changePageHelperToCurrentPage(indexList, IndexDTO.class);
if (CollectionUtils.isNotEmpty(indexList)) {
List<Integer> indexIdList = indexList.stream().map(TabIndex::getIndexId).collect(Collectors.toList());
......@@ -147,8 +147,8 @@ public class IndexApiServiceImpl implements IndexApiService {
}
@Override
public ServiceResponse<List<IndexDTO>> listAllIndex(IndexQo indexQO) {
List<TabIndex> tabIndices = indexService.listAllIndex(indexQO);
public ServiceResponse<List<IndexDTO>> listAllIndex(IndexQo indexQo) {
List<TabIndex> tabIndices = indexService.listAllIndex(indexQo);
List<IndexDTO> dtoList = EntityUtil.changeEntityListByJSON(IndexDTO.class, tabIndices);
return EnterpriseServiceResponse.success(dtoList);
}
......@@ -183,9 +183,9 @@ public class IndexApiServiceImpl implements IndexApiService {
@Override
public ServiceResponse<List<IndexDTO>> listByModule(String moduleId) {
IndexQo indexQO = new IndexQo();
indexQO.setModuleId(moduleId);
List<TabIndex> indexList = indexService.listAllIndex(indexQO);
IndexQo indexQo = new IndexQo();
indexQo.setModuleId(moduleId);
List<TabIndex> indexList = indexService.listAllIndex(indexQo);
return EnterpriseServiceResponse.success(EntityUtil.changeEntityListByJSON(IndexDTO.class, indexList));
}
}
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