|
|
@@ -1612,14 +1612,14 @@ public class EconomyPointHomePageService {
|
|
|
hv.setFnlyl("0.00");
|
|
|
} else {
|
|
|
List<TurbineInfoDay> currentResults = getFnlyl("AVG(fnlyl) AS fnlyl", nowStart, nowEnd);
|
|
|
- hv.setFnlyl(String.format("%.2f", currentResults.get(0).getFnlyl()));
|
|
|
+ hv.setFnlyl(String.valueOf(NumberUtil.round(currentResults.get(0).getFnlyl(), 2).doubleValue()));
|
|
|
}
|
|
|
List<TurbineInfoDay> lastYearResults1 = getFnlyl("*", lastYearStartDate, lastYearEndDate);
|
|
|
if (null == lastYearResults1 || lastYearResults1.isEmpty()) {
|
|
|
hv.setYearTq("0.00");
|
|
|
} else {
|
|
|
List<TurbineInfoDay> lastYearResults = getFnlyl("AVG(fnlyl) AS fnlyl", lastYearStartDate, lastYearEndDate);
|
|
|
- hv.setYearTq(String.format("%.2f", lastYearResults.get(0).getFnlyl()));
|
|
|
+ hv.setYearTq(String.valueOf(NumberUtil.round(lastYearResults.get(0).getFnlyl(), 2).doubleValue()));
|
|
|
}
|
|
|
if (Double.parseDouble(hv.getFnlyl()) == 0 && Double.parseDouble(hv.getYearTq()) == 0) {
|
|
|
hv.setOperation("0.00");
|
|
|
@@ -1629,7 +1629,7 @@ public class EconomyPointHomePageService {
|
|
|
hv.setOperation("-100");
|
|
|
} else {
|
|
|
Double operation = calDivide(Double.parseDouble(hv.getFnlyl()) - Double.parseDouble(hv.getYearTq()), Double.valueOf(hv.getYearTq()));
|
|
|
- hv.setOperation(String.valueOf(operation));
|
|
|
+ hv.setOperation(String.valueOf(NumberUtil.round(operation * 100, 2).doubleValue()));
|
|
|
}
|
|
|
ls2.add(hv);
|
|
|
|
|
|
@@ -1648,14 +1648,14 @@ public class EconomyPointHomePageService {
|
|
|
hv2.setFnlyl("0.00");
|
|
|
} else {
|
|
|
List<TurbineInfoDay> currentSbResults = getFnlyl("AVG(klyl) AS klyl", nowStart, nowEnd);
|
|
|
- hv2.setFnlyl(String.format("%.2f", currentSbResults.get(0).getKlyl()));
|
|
|
+ hv2.setFnlyl(String.valueOf(NumberUtil.round(currentSbResults.get(0).getKlyl(), 2).doubleValue()));
|
|
|
}
|
|
|
List<TurbineInfoDay> lastYearQwSb1 = getFnlyl("*", lastYearStartDate, lastYearEndDate);
|
|
|
if (null == lastYearQwSb1 || lastYearQwSb1.isEmpty()) {
|
|
|
hv2.setYearTq("0.00");
|
|
|
} else {
|
|
|
List<TurbineInfoDay> lastYearQwSb = getFnlyl("AVG(klyl) AS klyl", lastYearStartDate, lastYearEndDate);
|
|
|
- hv2.setYearTq(String.format("%.2f", lastYearQwSb.get(0).getKlyl()));
|
|
|
+ hv2.setYearTq(String.valueOf(NumberUtil.round(lastYearQwSb.get(0).getKlyl(), 2).doubleValue()));
|
|
|
}
|
|
|
if (Double.parseDouble(hv2.getFnlyl()) == 0 && Double.parseDouble(hv2.getYearTq()) == 0) {
|
|
|
hv2.setOperation("0.00");
|
|
|
@@ -1665,7 +1665,7 @@ public class EconomyPointHomePageService {
|
|
|
hv2.setOperation("-100");
|
|
|
} else {
|
|
|
Double aDouble1 = calDivide(Double.parseDouble(hv2.getFnlyl()) - Double.parseDouble(hv2.getYearTq()), Double.valueOf(hv2.getYearTq()));
|
|
|
- hv2.setOperation(String.valueOf(aDouble1));
|
|
|
+ hv2.setOperation(String.valueOf(NumberUtil.round(aDouble1 * 100, 2).doubleValue()));
|
|
|
}
|
|
|
ls4.add(hv2);
|
|
|
sbklyl.put("data", ls4);
|
|
|
@@ -1709,29 +1709,29 @@ public class EconomyPointHomePageService {
|
|
|
Map<String, Object> allmap = new HashMap<>();
|
|
|
PlanDataVo pd = new PlanDataVo();
|
|
|
Double week = weekFdlCal();
|
|
|
- pd.setZfdlsj(NumberUtil.round(week,2).doubleValue());
|
|
|
+ pd.setZfdlsj(NumberUtil.round(week, 2).doubleValue());
|
|
|
String s = year + "-" + month;
|
|
|
BigDecimal monCache = yfdlCal.get(s);
|
|
|
// pd.setYfdlsj(monCache.add(new BigDecimal(rfdl)).doubleValue());
|
|
|
- pd.setYfdlsj(NumberUtil.round(monCache.add(new BigDecimal(rfdl)).doubleValue(),2).doubleValue());
|
|
|
+ pd.setYfdlsj(NumberUtil.round(monCache.add(new BigDecimal(rfdl)).doubleValue(), 2).doubleValue());
|
|
|
BigDecimal yearCache = nfdlCal.get(year);
|
|
|
// pd.setNfdlsj(yearCache.add(new BigDecimal(rfdl)).doubleValue());
|
|
|
- pd.setNfdlsj(NumberUtil.round(yearCache.add(new BigDecimal(rfdl)).doubleValue(),2).doubleValue());
|
|
|
+ pd.setNfdlsj(NumberUtil.round(yearCache.add(new BigDecimal(rfdl)).doubleValue(), 2).doubleValue());
|
|
|
|
|
|
//计划发电量
|
|
|
pd.setZfdljh(NumberUtil.round(yjh / 4, 0).doubleValue());
|
|
|
pd.setYfdljh(NumberUtil.round(yjh, 0).doubleValue());
|
|
|
double zjd = calDivide(pd.getZfdlsj(), pd.getZfdljh());
|
|
|
- pd.setZjd(NumberUtil.round(zjd * 100,2).doubleValue());
|
|
|
- pd.setZwcl(NumberUtil.round(zjd,2).doubleValue());
|
|
|
+ pd.setZjd(NumberUtil.round(zjd * 100, 2).doubleValue());
|
|
|
+ pd.setZwcl(NumberUtil.round(zjd, 2).doubleValue());
|
|
|
double yjd = calDivide(pd.getYfdlsj(), pd.getYfdljh());
|
|
|
- pd.setYjd(NumberUtil.round(yjd * 100,2).doubleValue());
|
|
|
- pd.setYwcl(NumberUtil.round(yjd,2).doubleValue());
|
|
|
+ pd.setYjd(NumberUtil.round(yjd * 100, 2).doubleValue());
|
|
|
+ pd.setYwcl(NumberUtil.round(yjd, 2).doubleValue());
|
|
|
|
|
|
pd.setNfdljh(NumberUtil.round(njh, 0).doubleValue());
|
|
|
double njd = calDivide(pd.getNfdlsj(), pd.getNfdljh());
|
|
|
- pd.setNjd(NumberUtil.round(njd * 100,2).doubleValue());
|
|
|
- pd.setNwcl(NumberUtil.round(njd,2).doubleValue());
|
|
|
+ pd.setNjd(NumberUtil.round(njd * 100, 2).doubleValue());
|
|
|
+ pd.setNwcl(NumberUtil.round(njd, 2).doubleValue());
|
|
|
allmap.put("planData", pd);
|
|
|
|
|
|
QueryWrapper<TurbineInfoDay> qw2 = new QueryWrapper<>();
|
|
|
@@ -1920,7 +1920,7 @@ public class EconomyPointHomePageService {
|
|
|
GeneratingCapacityVo rfdl = new GeneratingCapacityVo();
|
|
|
rfdl.setName("日发电量");
|
|
|
rfdl.setValue(NumberUtil.round(dayFdl, 2).doubleValue());
|
|
|
- rfdl.setTotal(NumberUtil.round(dayLlfdl,2).doubleValue());
|
|
|
+ rfdl.setTotal(NumberUtil.round(dayLlfdl, 2).doubleValue());
|
|
|
Double rbfb = calDivide(dayFdl, dayLlfdl);
|
|
|
rfdl.setBfb(NumberUtil.round(rbfb * 100, 2).doubleValue());
|
|
|
ls.add(rfdl);
|