|
@@ -178,7 +178,6 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
|
dataDTOS.add(DashboardDetailedDataDTO.builder()
|
|
|
.xData(minus.toString())
|
|
|
.yData(successTotal + "").build());
|
|
|
-// successTotal = 0;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -190,9 +189,7 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
|
endDateTime = endDateTime.plusDays(1L);
|
|
|
for (int i = 1; i <= 24; i++) {
|
|
|
// 减去 i 小时时间
|
|
|
-
|
|
|
LocalDateTime minus = endDateTime.atStartOfDay().minus(i, ChronoUnit.HOURS);
|
|
|
-
|
|
|
successTotal = backgroundConvertData.stream().filter(convertData -> localDataCompareTo(convertData.getSyncTime(), minus)
|
|
|
&& !localDataCompareTo(convertData.getSyncTime(), minus.plus(1L, ChronoUnit.HOURS)))
|
|
|
.collect(Collectors.summarizingLong(BackgroundConvertData::getFileSuccessTotal)).getSum();
|
|
@@ -200,20 +197,17 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
|
dataDTOS.add(DashboardDetailedDataDTO.builder()
|
|
|
.xData(minus.toString())
|
|
|
.yData(successTotal + "").build());
|
|
|
-// successTotal = 0;
|
|
|
}
|
|
|
} else {
|
|
|
for (int i = 0; i < days; i++) {
|
|
|
// 减去 i 天时间
|
|
|
LocalDate minus = endDateTime.minus(i, ChronoUnit.DAYS);
|
|
|
-
|
|
|
successTotal = backgroundConvertData.stream().filter(convertData -> localDataCompareTo(convertData.getSyncTime(), minus.atStartOfDay())
|
|
|
&& !localDataCompareTo(convertData.getSyncTime(), minus.plusDays(1).atStartOfDay()))
|
|
|
.collect(Collectors.summarizingLong(BackgroundConvertData::getFileSuccessTotal)).getSum();
|
|
|
dataDTOS.add(DashboardDetailedDataDTO.builder()
|
|
|
.xData(minus.toString())
|
|
|
.yData(successTotal + "").build());
|
|
|
-// successTotal = 0;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -655,19 +649,9 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- long fileTotal = 0; // 文件总数
|
|
|
- long successfulRequest = 0; // 成功数
|
|
|
- long errorRequest = 0; // 失败数
|
|
|
- BigDecimal errorRatio = BigDecimal.ZERO; // 失败率
|
|
|
- BigDecimal averageProcessTime = BigDecimal.ZERO; // 平均处理时长
|
|
|
-
|
|
|
- AnalysisDataDTO build = AnalysisDataDTO.builder()
|
|
|
- .fileTotal(fileTotal)
|
|
|
- .successfulRequest(successfulRequest)
|
|
|
- .errorRequest(errorRequest)
|
|
|
- .errorRatio(errorRatio + "%")
|
|
|
- .averageProcessTime(averageProcessTime + "ms")
|
|
|
- .build();
|
|
|
- System.out.println(build);
|
|
|
+ Integer a = Integer.valueOf("+8");
|
|
|
+ System.out.println(a);
|
|
|
+ Integer b = Integer.valueOf("-8");
|
|
|
+ System.out.println(b);
|
|
|
}
|
|
|
}
|