Browse Source

Merge remote-tracking branch 'origin/master'

chenshudong 4 weeks ago
parent
commit
2382c527e3

+ 1 - 5
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/vo/UnsafeTypeVO.java

@@ -13,14 +13,10 @@ import java.io.Serializable;
13
 @Data
13
 @Data
14
 public class UnsafeTypeVO implements Serializable {
14
 public class UnsafeTypeVO implements Serializable {
15
     /**
15
     /**
16
-     * 事件类型值(数据字典
16
+     * 事件类型值(存储的是中文
17
      */
17
      */
18
     private String eventType;
18
     private String eventType;
19
     /**
19
     /**
20
-     * 事件类型名称(数据字典)
21
-     */
22
-    private String eventTypeName;
23
-    /**
24
      * 该类型不安全事件数量(饼图数值,统计条数)
20
      * 该类型不安全事件数量(饼图数值,统计条数)
25
      */
21
      */
26
     private Integer eventTypeNum;
22
     private Integer eventTypeNum;

+ 1 - 18
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerUnsafeEventServiceImpl.java

@@ -76,24 +76,7 @@ public class LedgerUnsafeEventServiceImpl extends ServiceImpl<LedgerUnsafeEventM
76
     @Override
76
     @Override
77
     public List<UnsafeTypeVO> countSeizureStatsType(CountQueryReqVO countQueryReq) {
77
     public List<UnsafeTypeVO> countSeizureStatsType(CountQueryReqVO countQueryReq) {
78
         List<UnsafeTypeVO> unsafeTypeList = this.baseMapper.countSeizureStatsType(countQueryReq);
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
     /**

+ 1 - 1
airport-ledger/src/main/resources/mapper/ledger/LedgerUnsafeEventMapper.xml

@@ -85,7 +85,7 @@
85
             AND event_type IS NOT NULL AND event_type != ''
85
             AND event_type IS NOT NULL AND event_type != ''
86
         </where>
86
         </where>
87
         GROUP BY event_type
87
         GROUP BY event_type
88
-        ORDER BY typeNum DESC
88
+        ORDER BY eventTypeNum DESC
89
     </select>
89
     </select>
90
 
90
 
91
     <select id="countSeizureStatsPost" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.UnsafePositionVO">
91
     <select id="countSeizureStatsPost" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.UnsafePositionVO">