Przeglądaj źródła

风机绩效榜单位问题处理

wangb 1 miesiąc temu
rodzic
commit
8abda6a2c5

+ 22 - 29
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java

@@ -413,17 +413,17 @@ public class BenchmarkingService {
                 vo.setName(CacheContext.wtmap.get(i.getTurbineId().trim()).getAname());
                 vo.setOrdernum(CacheContext.wtmap.get(i.getTurbineId().trim()).getOrderNum());
             }
-            vo.setSjfdl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getRfdl())), new BigDecimal(1), 2).doubleValue());
-            vo.setLlfdl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getLlfdl())), new BigDecimal(1), 2).doubleValue());
+            vo.setSjfdl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getRfdl())), new BigDecimal(1000), 2).doubleValue());
+            vo.setLlfdl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getLlfdl())), new BigDecimal(1000), 2).doubleValue());
 
             if (sttype.isEmpty()) {
                 vo.setSpeed(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getPjfs())), new BigDecimal(1), 2).doubleValue());
             }
-            vo.setFjhjx(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getFjhjxss())), new BigDecimal(1), 2).doubleValue());
-            vo.setJhjx(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getJhjxss())), new BigDecimal(1), 2).doubleValue());
-            vo.setXd(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getXdss())), new BigDecimal(1), 2).doubleValue());
-            vo.setSl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getSlss())), new BigDecimal(1), 2).doubleValue());
-            vo.setXn(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getXnss())), new BigDecimal(1), 2).doubleValue());
+            vo.setFjhjx(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getFjhjxss())), new BigDecimal(1000), 2).doubleValue());
+            vo.setJhjx(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getJhjxss())), new BigDecimal(1000), 2).doubleValue());
+            vo.setXd(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getXdss())), new BigDecimal(1000), 2).doubleValue());
+            vo.setSl(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getSlss())), new BigDecimal(1000), 2).doubleValue());
+            vo.setXn(BigDecimalUtils.divide(new BigDecimal(String.valueOf(i.getXnss())), new BigDecimal(1000), 2).doubleValue());
             //            vo.setLlfdl(DoubleUtils.getRoundingNum(vo.getSjfdl()+vo.getFjhjx()+vo.getJhjx()+vo.getXd()+vo.getXn(),2));
             vo.setFnlly(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getSjfdl() / vo.getLlfdl() * 100, 2) : 0);
             vo.setPoint(DoubleUtils.keepPrecision(vo.getLlfdl() * 1.1, 2));
@@ -466,8 +466,6 @@ public class BenchmarkingService {
     }
 
 
-
-
     public List<FjjxbmxVo> performanceMX(String companyid, String getype, String sttype, String beginDate, String endDate, String wpids, String projectids, String lineids, String target, String sort) {
         List<FjjxbmxVo> resultList = new ArrayList<>();
         QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
@@ -815,7 +813,6 @@ public class BenchmarkingService {
     }
 
 
-
     public List<WxsslVo> wxssl(String companys, String type, String wpids, String projectids, String lineids, String beginDate, String endDate, String target, String sort) {
         List<WxsslVo> resultList = new ArrayList<>();
         List<ProBasicPowerstation> wpls = CacheContext.wpls;
@@ -893,13 +890,13 @@ public class BenchmarkingService {
                 vo.setOrdernum(station.get(i.getStationId()).doubleValue());
             }
 
-            vo.setFdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getRfdl()))/1000, 2));
-            vo.setLlfdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getLlfdl()))/1000, 2));
-            vo.setJxssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getJhjxss()+i.getFjhjxss()))/1000 , 2));
-            vo.setGzssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getGzss()))/1000,2));
-            vo.setXdssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXdss()))/1000, 2));
-            vo.setSlssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getSlss()))/1000, 2));
-            vo.setXnssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXnss()))/1000, 2));
+            vo.setFdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getRfdl())) / 1000, 2));
+            vo.setLlfdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getLlfdl())) / 1000, 2));
+            vo.setJxssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getJhjxss() + i.getFjhjxss())) / 1000, 2));
+            vo.setGzssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getGzss())) / 1000, 2));
+            vo.setXdssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXdss())) / 1000, 2));
+            vo.setSlssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getSlss())) / 1000, 2));
+            vo.setXnssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXnss())) / 1000, 2));
             vo.setZssdl(DoubleUtils.keepPrecision(vo.getGzssdl() + vo.getJxssdl() + vo.getXdssdl() + vo.getXnssdl() + vo.getSlssdl(), 2));
             vo.setFnlyl(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getFdl() / vo.getLlfdl() * 100, 2) : 0.0);
             vo.setGzssl(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getGzssdl() / vo.getLlfdl() * 100, 2) : 0.0);
@@ -976,7 +973,6 @@ public class BenchmarkingService {
     }
 
 
-
     public Map<String, Object> cndb2(String companys, String type, String wpid, String beginDate, String endDate, String target, String sort, int pageNum, int pageSize) {
         QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
         Integer total = 0;
@@ -1094,7 +1090,6 @@ public class BenchmarkingService {
     }
 
 
-
     public Map<String, Object> cndbthb(String companys, String type, String wpid, String beginDate, String endDate, int pageNum, int pageSize) {
         QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
         Integer total = 0;
@@ -1240,7 +1235,6 @@ public class BenchmarkingService {
     }
 
 
-
     public Map<String, Object> xmdb(String companys, String type, String wpids, String projectids, String beginDate, String endDate, String target, String sort, int pageNum, int pageSize) {
         List<WxsslVo> resultList = new ArrayList<>();
         QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
@@ -1377,7 +1371,6 @@ public class BenchmarkingService {
     }
 
 
-
     /**
      * 根据查询条件和类型,查询处五项损失并封装到结果list
      *
@@ -1543,14 +1536,14 @@ public class BenchmarkingService {
                 Date date = i.getRecordDate();
                 vo.setDate(date);
             }
-            vo.setFdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getRfdl())), 2));
-            vo.setLlfdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getLlfdl())), 2));
-            vo.setJxssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getJhjxss()+i.getFjhjxss())), 2));
-            vo.setGzssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getGzss())), 2));
-            vo.setXdssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXdss()+i.getDjss())), 2));
-            vo.setSlssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getSlss())), 2));
-            vo.setXnssdl(DoubleUtils.keepPrecision(Double.valueOf(String.valueOf(i.getXnss())), 2));
-            vo.setZssdl(DoubleUtils.keepPrecision(vo.getGzssdl() + vo.getJxssdl() + vo.getXdssdl() + vo.getXnssdl() + vo.getSlssdl(), 2));
+            vo.setFdl(DoubleUtils.keepPrecision(i.getRfdl() / 1000, 2));
+            vo.setLlfdl(DoubleUtils.keepPrecision(i.getLlfdl() / 1000, 2));
+            vo.setJxssdl(DoubleUtils.keepPrecision((i.getJhjxss() + i.getFjhjxss()) / 1000, 2));
+            vo.setGzssdl(DoubleUtils.keepPrecision(i.getGzss() / 1000, 2));
+            vo.setXdssdl(DoubleUtils.keepPrecision((i.getXdss() + i.getDjss()) / 1000, 2));
+            vo.setSlssdl(DoubleUtils.keepPrecision(i.getSlss() / 1000, 2));
+            vo.setXnssdl(DoubleUtils.keepPrecision(i.getXnss() / 1000, 2));
+            vo.setZssdl(DoubleUtils.keepPrecision((vo.getGzssdl() + vo.getJxssdl() + vo.getXdssdl() + vo.getXnssdl() + vo.getSlssdl()) / 1000, 2));
             vo.setFnlyl(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getFdl() / vo.getLlfdl() * 100, 2) : 0);
             vo.setGzssl(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getGzssdl() / vo.getLlfdl() * 100, 2) : 0);
             vo.setJxssl(vo.getLlfdl() != 0 ? DoubleUtils.keepPrecision(vo.getJxssdl() / vo.getLlfdl() * 100, 2) : 0);