Parcourir la source

由于有的风机发电量采集不到为0,导致理论电量过高,过滤发电量为0的数据

xushili il y a 1 an
Parent
commit
4a183bc002

+ 2 - 6
benchmarking-impala/src/main/java/com/gyee/benchmarkingimpala/service/BenchmarkingService.java

@@ -414,8 +414,8 @@ public class BenchmarkingService  {
         }
         sb.append("sum(genecapacity) genecapacity,sum(therogenecapacity) therogenecapacity,avg(speed) speed,sum(daynhwhssdl) daynhwhssdl,sum(daynhgzssdl) daynhgzssdl,sum(daynhxdssdl) daynhxdssdl,sum(daynhqfdl) daynhqfdl,sum(daynhcfdl) daynhcfdl");
         qw.select(String.valueOf(sb));
-        qw.ge("recorddate",DateUtils.parseDate(beginDate)).le("recorddate",DateUtils.parseDate(endDate));
-
+        qw.ge("recorddate", DateUtils.parseDate(beginDate)).le("recorddate", DateUtils.parseDate(endDate));
+        qw.gt("genecapacity", 0); //由于有的风机发电量采集不到为0,导致理论电量过高,过滤发电量为0的数据
         if (StringUtils.isNotEmpty(wpids)){
             List<String> wpList = Arrays.asList(wpids.split(","));
             qw.in("windpowerstationid",wpList);
@@ -449,10 +449,6 @@ public class BenchmarkingService  {
        AtomicReference<Double> sl = new AtomicReference<>((double) 0);
         list.stream().forEach(i->{
            FjjxbVo vo = new FjjxbVo();
-           //由于部分风机的发电量数据采集不到,所以将理论发电量也去掉
-            if (i.getGenecapacity() <= 0){
-                i.setTherogenecapacity(0.0);
-            }
             if (type.equals("1")){
                 vo.setId(i.getWindpowerstationid());
                 vo.setName(CacheContext.wpmap.get(i.getWindpowerstationid().trim()).getName());