|
@@ -289,44 +289,49 @@ public class Windturbineinfoday3Service implements BaseService<Windturbineinfoda
|
|
|
double lyl = 0.0;
|
|
|
double dayspeed = 0.0;
|
|
|
long count = 0;
|
|
|
- vos.addAll(vosapp);
|
|
|
-
|
|
|
- for (Windturbineinfoday3 wi : vos) {
|
|
|
- count++;
|
|
|
- fdl = StringUtils.round(wi.getDaydl2(), 4) + StringUtils.round(fdl, 4);
|
|
|
- gzss = StringUtils.round(wi.getDaynhgzssdl(), 4) + StringUtils.round(gzss, 4);
|
|
|
- whss = StringUtils.round(wi.getDaynhwhssdl(), 4) + StringUtils.round(whss, 4);
|
|
|
- xdss = StringUtils.round(wi.getDaynhxdssdl(), 4) + StringUtils.round(xdss, 4);
|
|
|
- xnss = StringUtils.round(wi.getDaynhqfdl(), 4) + StringUtils.round(xnss, 4);
|
|
|
- dayspeed = StringUtils.round(wi.getDayspeed(), 2) + StringUtils.round(dayspeed, 2);
|
|
|
- slss = StringUtils.round(wi.getDaynhcfdl(), 4) + StringUtils.round(slss, 4);
|
|
|
-
|
|
|
- // wi.setTotal(new BigDecimal(wi.getTotal()).divide(new
|
|
|
- // BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue());
|
|
|
- }
|
|
|
- llfdl = StringUtils.round(fdl + whss + gzss + xnss + xdss + slss, 4);
|
|
|
- if (llfdl != 0) {
|
|
|
- // llfdl=StringUtils.round(llfdl, 2);
|
|
|
- // fdl=StringUtils.round(fdl, 2);
|
|
|
- lyl = StringUtils.round(fdl / llfdl * 100, 2);
|
|
|
- // lyl = new BigDecimal(fdl).divide(new BigDecimal(llfdl), 2,
|
|
|
- // RoundingMode.HALF_EVEN).multiply(new
|
|
|
- // BigDecimal(100)).doubleValue();
|
|
|
+
|
|
|
+ if(!vosapp.isEmpty())
|
|
|
+ {
|
|
|
+ vos.addAll(vosapp);
|
|
|
+
|
|
|
+ for (Windturbineinfoday3 wi : vos) {
|
|
|
+ count++;
|
|
|
+ fdl = StringUtils.round(wi.getDaydl2(), 4) + StringUtils.round(fdl, 4);
|
|
|
+ gzss = StringUtils.round(wi.getDaynhgzssdl(), 4) + StringUtils.round(gzss, 4);
|
|
|
+ whss = StringUtils.round(wi.getDaynhwhssdl(), 4) + StringUtils.round(whss, 4);
|
|
|
+ xdss = StringUtils.round(wi.getDaynhxdssdl(), 4) + StringUtils.round(xdss, 4);
|
|
|
+ xnss = StringUtils.round(wi.getDaynhqfdl(), 4) + StringUtils.round(xnss, 4);
|
|
|
+ dayspeed = StringUtils.round(wi.getDayspeed(), 2) + StringUtils.round(dayspeed, 2);
|
|
|
+ slss = StringUtils.round(wi.getDaynhcfdl(), 4) + StringUtils.round(slss, 4);
|
|
|
+
|
|
|
+ // wi.setTotal(new BigDecimal(wi.getTotal()).divide(new
|
|
|
+ // BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue());
|
|
|
+ }
|
|
|
+ llfdl = StringUtils.round(fdl + whss + gzss + xnss + xdss + slss, 4);
|
|
|
+ if (llfdl != 0) {
|
|
|
+ // llfdl=StringUtils.round(llfdl, 2);
|
|
|
+ // fdl=StringUtils.round(fdl, 2);
|
|
|
+ lyl = StringUtils.round(fdl / llfdl * 100, 2);
|
|
|
+ // lyl = new BigDecimal(fdl).divide(new BigDecimal(llfdl), 2,
|
|
|
+ // RoundingMode.HALF_EVEN).multiply(new
|
|
|
+ // BigDecimal(100)).doubleValue();
|
|
|
+ }
|
|
|
+ getSortData(sortName, sortOrder, vos);
|
|
|
+
|
|
|
+ Windturbineinfoday3 wi = new Windturbineinfoday3();
|
|
|
+ wi.setWtName("合计");
|
|
|
+ wi.setDaydl2(StringUtils.round(fdl, 4));
|
|
|
+ wi.setDaynhgzssdl(StringUtils.round(gzss, 4));
|
|
|
+ wi.setDaynhwhssdl(StringUtils.round(whss, 4));
|
|
|
+ wi.setDaynhcfdl(StringUtils.round(slss, 4));
|
|
|
+ wi.setDaynhxdssdl(StringUtils.round(xdss, 4));
|
|
|
+ wi.setDaynhqfdl(StringUtils.round(xnss, 4));
|
|
|
+ wi.setTotal(StringUtils.round(llfdl, 4));
|
|
|
+ wi.setLyl(lyl > 100 ? 100.00 : lyl);
|
|
|
+ wi.setDayspeed(dayspeed / count);
|
|
|
+ vos.add(wi);
|
|
|
}
|
|
|
- getSortData(sortName, sortOrder, vos);
|
|
|
-
|
|
|
- Windturbineinfoday3 wi = new Windturbineinfoday3();
|
|
|
- wi.setWtName("合计");
|
|
|
- wi.setDaydl2(StringUtils.round(fdl, 4));
|
|
|
- wi.setDaynhgzssdl(StringUtils.round(gzss, 4));
|
|
|
- wi.setDaynhwhssdl(StringUtils.round(whss, 4));
|
|
|
- wi.setDaynhcfdl(StringUtils.round(slss, 4));
|
|
|
- wi.setDaynhxdssdl(StringUtils.round(xdss, 4));
|
|
|
- wi.setDaynhqfdl(StringUtils.round(xnss, 4));
|
|
|
- wi.setTotal(StringUtils.round(llfdl, 4));
|
|
|
- wi.setLyl(lyl > 100 ? 100.00 : lyl);
|
|
|
- wi.setDayspeed(dayspeed / count);
|
|
|
- vos.add(wi);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|