fix
This commit is contained in:
parent
ad2bdac0b5
commit
0e43d5b9dc
@ -106,6 +106,15 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl<IndicatorLibraryMap
|
|||||||
public List<StatisticalIndicatorTypeDto> statisticalByIndicatorType(Long indicatorType) {
|
public List<StatisticalIndicatorTypeDto> statisticalByIndicatorType(Long indicatorType) {
|
||||||
List<StatisticalIndicatorTypeDto> dtos = indicatorLibraryMapper.statisticalByIndicatorType(indicatorType);
|
List<StatisticalIndicatorTypeDto> dtos = indicatorLibraryMapper.statisticalByIndicatorType(indicatorType);
|
||||||
StatisticalIndicatorTypeDto dto = new StatisticalIndicatorTypeDto();
|
StatisticalIndicatorTypeDto dto = new StatisticalIndicatorTypeDto();
|
||||||
|
dto.setName("未分类指标");
|
||||||
|
dto.setIndicatorType(0);
|
||||||
|
int count = indicatorLibraryMapper.countIndicatorLibrarysByIndicatorType(0);
|
||||||
|
dto.setCount(count);
|
||||||
|
if(count>0){
|
||||||
|
dtos.add(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
dto = new StatisticalIndicatorTypeDto();
|
||||||
dto.setName("全部分类");
|
dto.setName("全部分类");
|
||||||
dto.setIndicatorType(null);
|
dto.setIndicatorType(null);
|
||||||
if(CollectionUtils.isNotEmpty(dtos)){
|
if(CollectionUtils.isNotEmpty(dtos)){
|
||||||
@ -114,14 +123,7 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl<IndicatorLibraryMap
|
|||||||
}
|
}
|
||||||
//加入首位
|
//加入首位
|
||||||
dtos.add(0,dto);
|
dtos.add(0,dto);
|
||||||
dto = new StatisticalIndicatorTypeDto();
|
|
||||||
dto.setName("未分类指标");
|
|
||||||
dto.setIndicatorType(0);
|
|
||||||
int count = indicatorLibraryMapper.countIndicatorLibrarysByIndicatorType(0);
|
|
||||||
dto.setCount(count);
|
|
||||||
if(count>0){
|
|
||||||
dtos.add(0,dto);
|
|
||||||
}
|
|
||||||
return dtos;
|
return dtos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user