Browse Source

山西大同功能实现

xieshengjie 2 years ago
parent
commit
67c38dc731

+ 3 - 1
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/GhostService.java

@@ -240,6 +240,7 @@ public class GhostService {
     public List<Shutdownevent> shutdownevent(String wpid, String beginDate, String endDate) {
         List<Shutdownevent> resultList = new ArrayList<>();
         Map<String, String> stopmap = CacheContext.stopmap;
+        Map<String, Windturbine> wtmap = CacheContext.wtmap;
         Date begin = DateUtils.parseDate(beginDate);
         Date end = DateUtils.parseDate(endDate);
         QueryWrapper<Shutdownevent> qw = new QueryWrapper<>();
@@ -251,9 +252,10 @@ public class GhostService {
         shutdowneventList.stream().forEach(shutdownevent->{
             String stoptypeid = shutdownevent.getStoptypeid();
             shutdownevent.setStoptypeid(stopmap.get(stoptypeid));
+            shutdownevent.setWindturbineid(wtmap.get(shutdownevent.getWindturbineid()).getName());
             resultList.add(shutdownevent);
         });
-
+        SortUtils.sort(resultList,"stoptime",SortUtils.DESC);
         return resultList;
     }
 }