From 0e43d5b9dc9531b252d310d8bdb0fc621991a5c5 Mon Sep 17 00:00:00 2001 From: DirectionOfMind <3182967682@qq.com> Date: Wed, 20 Jan 2021 11:07:32 +0800 Subject: [PATCH] fix --- .../impl/IndicatorLibraryServiceImpl.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java index 0326f2ac..23851cae 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java @@ -106,6 +106,15 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl statisticalByIndicatorType(Long indicatorType) { List dtos = indicatorLibraryMapper.statisticalByIndicatorType(indicatorType); 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.setIndicatorType(null); if(CollectionUtils.isNotEmpty(dtos)){ @@ -114,14 +123,7 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl0){ - dtos.add(0,dto); - } + return dtos; }