|
@@ -1943,7 +1943,8 @@ public class EconomyPointHomePageService {
|
|
String s = LocalDate.now().getYear() + "-" + LocalDate.now().getMonthValue();
|
|
String s = LocalDate.now().getYear() + "-" + LocalDate.now().getMonthValue();
|
|
BigDecimal monCache = yfdlCal.get(s);
|
|
BigDecimal monCache = yfdlCal.get(s);
|
|
yfdl.setValue(monCache.add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
yfdl.setValue(monCache.add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
- yfdl.setTotal(yllfdlCal.get(s).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue());
|
|
|
|
|
|
+ double yllfdl = yllfdlCal.get(s).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue();
|
|
|
|
+ yfdl.setTotal(Double.parseDouble(String.format("%.2f", yllfdl)));
|
|
Double ybfb = calDivide(yfdl.getValue(), yfdl.getTotal());
|
|
Double ybfb = calDivide(yfdl.getValue(), yfdl.getTotal());
|
|
yfdl.setBfb(new BigDecimal(ybfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
yfdl.setBfb(new BigDecimal(ybfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
ls.add(yfdl);
|
|
ls.add(yfdl);
|
|
@@ -1951,7 +1952,8 @@ public class EconomyPointHomePageService {
|
|
GeneratingCapacityVo nfdl = new GeneratingCapacityVo();
|
|
GeneratingCapacityVo nfdl = new GeneratingCapacityVo();
|
|
nfdl.setName("年发电量");
|
|
nfdl.setName("年发电量");
|
|
nfdl.setValue(nfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
nfdl.setValue(nfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
- nfdl.setTotal(nllfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue());
|
|
|
|
|
|
+ double nllfdl = nllfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue();
|
|
|
|
+ nfdl.setTotal(Double.parseDouble(String.format("%.2f", nllfdl)));
|
|
Double nbfb = calDivide(nfdl.getValue(), nfdl.getTotal());
|
|
Double nbfb = calDivide(nfdl.getValue(), nfdl.getTotal());
|
|
nfdl.setBfb(new BigDecimal(nbfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
nfdl.setBfb(new BigDecimal(nbfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
ls.add(nfdl);
|
|
ls.add(nfdl);
|
|
@@ -2027,7 +2029,7 @@ public class EconomyPointHomePageService {
|
|
* 缓存月、年发电量
|
|
* 缓存月、年发电量
|
|
*/
|
|
*/
|
|
public void calFdl() {
|
|
public void calFdl() {
|
|
- if (null != lastCalDate || LocalDate.now().equals(lastCalDate)) {
|
|
|
|
|
|
+ if (LocalDate.now().equals(lastCalDate)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
LocalDate yesterday = LocalDate.now().atStartOfDay().toLocalDate();
|
|
LocalDate yesterday = LocalDate.now().atStartOfDay().toLocalDate();
|