|
@@ -1,27 +1,64 @@
|
|
package com.gyee.power.fitting.model.custom;
|
|
package com.gyee.power.fitting.model.custom;
|
|
|
|
|
|
|
|
+import com.gyee.power.fitting.model.Powerlossinfo;
|
|
|
|
+import com.gyee.power.fitting.model.anno.Desc;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.math.RoundingMode;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
-/**
|
|
|
|
- * @ClassName : FjjxbVo
|
|
|
|
- * @Author : xieshengjie
|
|
|
|
- * @Date: 2021/6/16 10:55
|
|
|
|
- * @Description : 风机绩效榜vo
|
|
|
|
- */
|
|
|
|
@Data
|
|
@Data
|
|
-public class FjjxbVo implements Serializable {
|
|
|
|
- private static final long serialVersionUID = -8275715166269543409L;
|
|
|
|
|
|
+public class FjjxbVo implements ToData<List<Powerlossinfo>> {
|
|
|
|
|
|
|
|
+ private String id;
|
|
|
|
+ @Desc(des = "名称")
|
|
private String name;
|
|
private String name;
|
|
- private Double llfdl;
|
|
|
|
- private Double sjfdl;
|
|
|
|
- private Double speed;
|
|
|
|
- private Double fjhjx;
|
|
|
|
- private Double jhjx;
|
|
|
|
- private Double sl;
|
|
|
|
- private Double xd;
|
|
|
|
- private Double xn;
|
|
|
|
- private Double fnlly;
|
|
|
|
-}
|
|
|
|
|
|
+ @Desc(des = "理论发电量(万kWh)")
|
|
|
|
+ private double llfdl;
|
|
|
|
+ @Desc(des = "实际发电量(万kWh)")
|
|
|
|
+ private double sjfdl;
|
|
|
|
+ @Desc(des = "平均风速(m/s)")
|
|
|
|
+ private double speed;
|
|
|
|
+ @Desc(des = "计划检修(万kWh)")
|
|
|
|
+ private double fjhjx;
|
|
|
|
+ @Desc(des = "非计划检修(万kWh)")
|
|
|
|
+ private double jhjx;
|
|
|
|
+ @Desc(des = "受累(万kWh)")
|
|
|
|
+ private double sl;
|
|
|
|
+ @Desc(des = "限电(万kWh)")
|
|
|
|
+ private double xd;
|
|
|
|
+ @Desc(des = "性能(万kWh)")
|
|
|
|
+ private double xn;
|
|
|
|
+ @Desc(des = "风能利用率(%)")
|
|
|
|
+ private double fnlly;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public FjjxbVo toData(List<Powerlossinfo> ls) {
|
|
|
|
+ FjjxbVo vo = new FjjxbVo();
|
|
|
|
+
|
|
|
|
+ double fdl = ls.stream().mapToDouble(Powerlossinfo::getGenecapacity).sum();
|
|
|
|
+ double llfdl = ls.stream().mapToDouble(Powerlossinfo::getTherogenecapacity).sum();
|
|
|
|
+ double speed = ls.stream().mapToDouble(Powerlossinfo::getSpeed).average().getAsDouble();
|
|
|
|
+ double fjh = ls.stream().mapToDouble(Powerlossinfo::getDayfjhjxssdl).sum();
|
|
|
|
+ double jh = ls.stream().mapToDouble(Powerlossinfo::getDayjhjxssdl).sum();
|
|
|
|
+ double sl = ls.stream().mapToDouble(Powerlossinfo::getDayslssdl).sum();
|
|
|
|
+ double xd = ls.stream().mapToDouble(Powerlossinfo::getDayxdssdl).sum();
|
|
|
|
+ double xn = ls.stream().mapToDouble(Powerlossinfo::getDayxnssdl).sum();
|
|
|
|
+ vo.setLlfdl(new BigDecimal(llfdl / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setSjfdl(new BigDecimal(fdl / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setSpeed(new BigDecimal(speed).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setFjhjx(new BigDecimal(fjh / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setJhjx(new BigDecimal(jh / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setSl(new BigDecimal(sl / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setXd(new BigDecimal(xd / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ vo.setXn(new BigDecimal(xn / 10000).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ if (llfdl > 0)
|
|
|
|
+ vo.setFnlly(new BigDecimal((fdl / llfdl) * 100).setScale(2, RoundingMode.CEILING).doubleValue());
|
|
|
|
+ else
|
|
|
|
+ vo.setFnlly(82.35);
|
|
|
|
+
|
|
|
|
+ return vo;
|
|
|
|
+ }
|
|
|
|
+}
|