|
|
@@ -76,24 +76,7 @@ public class LedgerUnsafeEventServiceImpl extends ServiceImpl<LedgerUnsafeEventM
|
|
76
|
76
|
@Override
|
|
77
|
77
|
public List<UnsafeTypeVO> countSeizureStatsType(CountQueryReqVO countQueryReq) {
|
|
78
|
78
|
List<UnsafeTypeVO> unsafeTypeList = this.baseMapper.countSeizureStatsType(countQueryReq);
|
|
79
|
|
- if (CollUtil.isEmpty(unsafeTypeList)){
|
|
80
|
|
- return Lists.newArrayList();
|
|
81
|
|
- }
|
|
82
|
|
-
|
|
83
|
|
- SysDictData dictData = new SysDictData();
|
|
84
|
|
- dictData.setDictType("sys_unsafe_type");
|
|
85
|
|
- dictData.setStatus("0");
|
|
86
|
|
- List<SysDictData> sysDictData = dictDataService.selectDictDataList(dictData);
|
|
87
|
|
- Map<String, SysDictData> trendDataMap = CollUtil.emptyIfNull(sysDictData).stream().collect(Collectors.toMap(SysDictData::getDictValue, dto -> dto));
|
|
88
|
|
-
|
|
89
|
|
- unsafeTypeList.forEach(unsafeType -> {
|
|
90
|
|
- SysDictData dict = trendDataMap.get(unsafeType.getEventType());
|
|
91
|
|
- if (Objects.nonNull(dict)) {
|
|
92
|
|
- unsafeType.setEventTypeName(dict.getDictLabel());
|
|
93
|
|
- }
|
|
94
|
|
- });
|
|
95
|
|
-
|
|
96
|
|
- return unsafeTypeList;
|
|
|
79
|
+ return CollUtil.emptyIfNull(unsafeTypeList);
|
|
97
|
80
|
}
|
|
98
|
81
|
|
|
99
|
82
|
/**
|