Parcourir la source

debug 驾驶舱算法

tags/24080901
PoffyZhang il y a 1 an
Parent
révision
4b17b85c26
2 fichiers modifiés avec 14 ajouts et 11 suppressions
  1. +5
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java
  2. +9
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java

+ 5
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java Voir le fichier

@@ -130,8 +130,11 @@ public class BizUtils {
}

public static String computeRise(Integer numa, Integer numb) {
if(Objects.isNull(numa) || Objects.isNull(numb) || numa.equals(0) || numb.equals(0)){
return "0";
if(Objects.isNull(numa) || numa.equals(0)){
return "-100";
}
if(Objects.isNull(numb)|| numb.equals(0)){
return "100";
}
return BigDecimal.valueOf((numa - numb) * 100.0).divide(BigDecimal.valueOf(numb),2, RoundingMode.CEILING)
.stripTrailingZeros().toPlainString();


+ 9
- 9
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java Voir le fichier

@@ -102,7 +102,7 @@ public class CockpitStatsStatisticsTask {
StopWatch stopWatch = new StopWatch();
stopWatch.start();

List<Integer> years = Lists.newArrayList(2021,2022,2023,2024);
List<Integer> years = Lists.newArrayList(2021,2022,2023,2024,2025);

List<CockpitStats> res = Lists.newArrayList();
//1.根据2个维度来统计 区域和分年
@@ -507,13 +507,13 @@ public class CockpitStatsStatisticsTask {
}
cockpitStats.setMonitorOverdueConstructionProjectsRise(BizUtils.computeRise(thisYearData.getMonitorOverdueConstructionProjectsNum(),
lastYearData.getMonitorOverdueConstructionProjectsNum()));
cockpitStats.setMonitorLaggingProjectsRise(BizUtils.computeRise(thisYearData.getMonitorOverdueConstructionProjectsNum(),
lastYearData.getMonitorOverdueConstructionProjectsNum()));
cockpitStats.setMonitorRejectedApproveProjectsRise(BizUtils.computeRise(thisYearData.getMonitorOverdueConstructionProjectsNum(),
lastYearData.getMonitorOverdueConstructionProjectsNum()));
cockpitStats.setMonitorRejectedPreReviewProjectsRise(BizUtils.computeRise(thisYearData.getMonitorOverdueConstructionProjectsNum(),
lastYearData.getMonitorOverdueConstructionProjectsNum()));
cockpitStats.setMonitorAcceptConditionsNotStandardsRise(BizUtils.computeRise(thisYearData.getMonitorOverdueConstructionProjectsNum(),
lastYearData.getMonitorOverdueConstructionProjectsNum()));
cockpitStats.setMonitorLaggingProjectsRise(BizUtils.computeRise(thisYearData.getMonitorLaggingProjectsNum(),
lastYearData.getMonitorLaggingProjectsNum()));
cockpitStats.setMonitorRejectedApproveProjectsRise(BizUtils.computeRise(thisYearData.getMonitorRejectedApproveProjectsNum(),
lastYearData.getMonitorRejectedApproveProjectsNum()));
cockpitStats.setMonitorRejectedPreReviewProjectsRise(BizUtils.computeRise(thisYearData.getMonitorRejectedPreReviewProjectsNum(),
lastYearData.getMonitorRejectedPreReviewProjectsNum()));
cockpitStats.setMonitorAcceptConditionsNotStandardsRise(BizUtils.computeRise(thisYearData.getMonitorAcceptConditionsNotStandardsNum(),
lastYearData.getMonitorAcceptConditionsNotStandardsNum()));
}
}

Chargement…
Annuler
Enregistrer