Browse Source

Merge branch 'master' of http://49.4.49.126:3000/xieshengjie/sis-background

xieshengjie 3 years ago
parent
commit
192ad60857

+ 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;
 

+ 4 - 1
gradeevaluation/src/main/java/com/gyee/gradeevaluation/service/health/HealthReportService.java

@@ -311,7 +311,7 @@ public class HealthReportService {
         }
 
         List<Windturbinewindyaw> nzs =windturbinewindyawService.getnzt(wt.getId(),day);
-        if(nzs!=null && nzs.size()>0){
+        if(nzs.get(0)!=null){
             Windturbinewindyaw windturbinewindyaw = nzs.get(0);
             Field[] field = windturbinewindyaw.getClass().getDeclaredFields(); // 获取实体类的所有属性,返回Field数组
             List<NippleVo> nippleVos = new ArrayList<>();
@@ -729,6 +729,9 @@ public class HealthReportService {
         qw.eq("year",year);
         qw.eq("month",month);
         Healthreport healthreport = healthreportService.getOne(qw);
+        if(null==healthreport){
+            return  null;
+        }
         HealthReportVo healthReportVo = com.gyee.gradeevaluation.util.JSONUtils.jsonStrToJava(healthreport.getHealthreport(),HealthReportVo.class);
         HealthReportVo healthReportVo1 = null;
         if (healthreport.getIsrecommend()==1){