wangchangsheng 3 years ago
parent
commit
623247e327

+ 1 - 0
benchmarking-impala/src/main/java/com/gyee/benchmarkingimpala/model/vo/WxsslVo.java

@@ -19,6 +19,7 @@ public class WxsslVo implements Serializable {
 
     private String id;
     private String name;
+    private Double ordernum;
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date date;
     private Integer zhpm;

+ 11 - 1
benchmarking-impala/src/main/java/com/gyee/benchmarkingimpala/service/BenchmarkingService.java

@@ -71,6 +71,9 @@ public class BenchmarkingService  {
     @Resource
     private IWindpowerstationthewindinfoService windpowerstationthewindinfoService;
 
+    @Resource
+    private IWindpowerstationService windpowerstationService;
+
     /**
      * 保存日信息表
      * @param beginDate
@@ -762,8 +765,14 @@ public class BenchmarkingService  {
             qw.groupBy("windpowerstationid");
         }
         List<Equipmentdayinfo> list = equipmentdayinfoService.list(qw);
+
+        Map<String,Double> station =  windpowerstationService.list()
+                .stream().collect(Collectors.toMap(Windpowerstation::getId,Windpowerstation::getOrdernum));
+
         list.stream().forEach(i->{
             WxsslVo vo = new WxsslVo();
+            station.get(i.getWindpowerstationid());
+            vo.setOrdernum(station.get(i.getWindpowerstationid()));
             if (StringUtils.isNotEmpty(wpids) && StringUtils.isEmpty(projectids) && StringUtils.isEmpty(lineids)){
                 vo.setId(i.getWindpowerstationid());
                 vo.setName(CacheContext.wpmap.get(i.getWindpowerstationid().trim()).getName());
@@ -853,7 +862,8 @@ public class BenchmarkingService  {
                 SortUtils.sort(resultList,target,SortUtils.DESC);
             }
         }else {
-            SortUtils.sort(resultList,"fdl",SortUtils.ASC);
+            //SortUtils.sort(resultList,"fdl",SortUtils.DESC);
+            SortUtils.sort(resultList,"ordernum",SortUtils.ASC);
         }
         return resultList;