Преглед изворни кода

修改报警列表和详情单位不一致的问题

wangmiaomiao пре 8 месеци
родитељ
комит
d5388c0a34

+ 2 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -245,6 +245,8 @@ public class FrontController extends BaseController {
         BigDecimal absAndScale = DecimalUtils.getAbsAndScale(warningVal, MyConstants.INT_2);
         BigDecimal absAndScale = DecimalUtils.getAbsAndScale(warningVal, MyConstants.INT_2);
         if(BusinessEnum.WarningCategoryEnum.NHLB.getCode().equals(category))
         if(BusinessEnum.WarningCategoryEnum.NHLB.getCode().equals(category))
             return absAndScale + SPACE_STR + BusinessEnum.BigModelUnitEnum.PERCENT.getCode();
             return absAndScale + SPACE_STR + BusinessEnum.BigModelUnitEnum.PERCENT.getCode();
+        if(BusinessEnum.WarningCategoryEnum.WHLB.getCode().equals(category))
+            return absAndScale + SPACE_STR + BusinessEnum.BigModelUnitEnum.PERCENT.getCode();
         if(BusinessEnum.WarningCategoryEnum.WNND_MLSS_1.getCode().equals(category))
         if(BusinessEnum.WarningCategoryEnum.WNND_MLSS_1.getCode().equals(category))
             return absAndScale + SPACE_STR  + BusinessEnum.BigModelUnitEnum.MG_L.getCode();
             return absAndScale + SPACE_STR  + BusinessEnum.BigModelUnitEnum.MG_L.getCode();
         if(BusinessEnum.WarningCategoryEnum.WNND_MLSS_2.getCode().equals(category))
         if(BusinessEnum.WarningCategoryEnum.WNND_MLSS_2.getCode().equals(category))

+ 4 - 1
slibra-common/src/main/java/com/slibra/common/DecimalUtils.java

@@ -13,6 +13,8 @@ import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import java.util.stream.Stream;
 
 
+import static com.slibra.common.constant.MyConstants.INT_2;
+
 public class DecimalUtils {
 public class DecimalUtils {
 
 
 
 
@@ -60,8 +62,9 @@ public class DecimalUtils {
         System.out.println(list.toString());
         System.out.println(list.toString());
         System.out.println(JSON.toJSONString(list));
         System.out.println(JSON.toJSONString(list));
 
 
-        System.out.println(getAbsForArray("a", 1));
+//        System.out.println(getAbsForArray("a", 1));
 
 
         System.out.println(new BigDecimal(1.1).divide(new BigDecimal(1.3), 0, RoundingMode.HALF_UP));
         System.out.println(new BigDecimal(1.1).divide(new BigDecimal(1.3), 0, RoundingMode.HALF_UP));
+        System.out.println(DecimalUtils.getAbsAndScale(new BigDecimal("3486.000000"), INT_2));
     }
     }
 }
 }

+ 1 - 1
slibra-quartz/src/main/java/com/slibra/quartz/task/AsyncTask.java

@@ -856,7 +856,7 @@ public class AsyncTask {
         TXinyiDaily tXinyiDaily = this.xinyiDailyMapper.selectNewestData();
         TXinyiDaily tXinyiDaily = this.xinyiDailyMapper.selectNewestData();
         if(Objects.isNull(tXinyiDaily))
         if(Objects.isNull(tXinyiDaily))
             return;//肯定不会出现这种情况 因为有很多历史数据了  新水厂可能会有这个问题
             return;//肯定不会出现这种情况 因为有很多历史数据了  新水厂可能会有这个问题
-        log.info("生化报警获取日报的最新的一条数据为{}", JSON.toJSONString(tXinyiDaily));
+//        log.info("生化报警获取日报的最新的一条数据为{}", JSON.toJSONString(tXinyiDaily));
 
 
         //污泥浓度报警
         //污泥浓度报警
         BigDecimal sjscgkz = null;
         BigDecimal sjscgkz = null;