소스 검색

首页问题修改

wangb 1 개월 전
부모
커밋
6eba88f966
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

+ 4 - 4
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -1943,17 +1943,17 @@ public class EconomyPointHomePageService {
         String s = LocalDate.now().getYear() + "-" + LocalDate.now().getMonthValue();
         BigDecimal monCache = yfdlCal.get(s);
         yfdl.setValue(monCache.add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
-        yfdl.setTotal(calDivide(yllfdlCal.get(s).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue(), 4.0));
+        yfdl.setTotal(yllfdlCal.get(s).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue());
         Double ybfb = calDivide(yfdl.getValue(), yfdl.getTotal());
-        yfdl.setBfb(new BigDecimal(ybfb).setScale(2, RoundingMode.HALF_UP).doubleValue());
+        yfdl.setBfb(new BigDecimal(ybfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
         ls.add(yfdl);
 
         GeneratingCapacityVo nfdl = new GeneratingCapacityVo();
         nfdl.setName("年发电量");
         nfdl.setValue(nfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getValue())).setScale(2, RoundingMode.HALF_UP).doubleValue());
-        nfdl.setTotal(calDivide(nllfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue(), 4.0));
+        nfdl.setTotal(nllfdlCal.get(LocalDate.now().getYear()).add(BigDecimal.valueOf(rfdl.getTotal())).doubleValue());
         Double nbfb = calDivide(nfdl.getValue(), nfdl.getTotal());
-        nfdl.setBfb(new BigDecimal(nbfb).setScale(2, RoundingMode.HALF_UP).doubleValue());
+        nfdl.setBfb(new BigDecimal(nbfb * 100).setScale(2, RoundingMode.HALF_UP).doubleValue());
         ls.add(nfdl);
 
         QueryWrapper<StationInfoDay> thisYear = new QueryWrapper<>();