|
@@ -314,16 +314,13 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
List<DashboardDetailedDataDTO> errorRequestDetailedData = this.getErrorRequestDetailedData(queryDTO);
|
|
List<DashboardDetailedDataDTO> errorRequestDetailedData = this.getErrorRequestDetailedData(queryDTO);
|
|
List<DashboardDetailedDataDTO> dataDTOS = new ArrayList<>();
|
|
List<DashboardDetailedDataDTO> dataDTOS = new ArrayList<>();
|
|
for (int i = 0; i < successfulRequestDetailedData.size(); i++) {
|
|
for (int i = 0; i < successfulRequestDetailedData.size(); i++) {
|
|
-
|
|
|
|
int fileTotal = Integer.parseInt(successfulRequestDetailedData.get(i).getYData()) + Integer.parseInt(errorRequestDetailedData.get(i).getYData());
|
|
int fileTotal = Integer.parseInt(successfulRequestDetailedData.get(i).getYData()) + Integer.parseInt(errorRequestDetailedData.get(i).getYData());
|
|
-
|
|
|
|
dataDTOS.add(DashboardDetailedDataDTO.builder()
|
|
dataDTOS.add(DashboardDetailedDataDTO.builder()
|
|
.xData(successfulRequestDetailedData.get(i).getXData())
|
|
.xData(successfulRequestDetailedData.get(i).getXData())
|
|
.yData(fileTotal == 0 ? "0.00%" : new BigDecimal(String.format("%.2f", Integer.parseInt(errorRequestDetailedData.get(i).getYData()) * 100.00
|
|
.yData(fileTotal == 0 ? "0.00%" : new BigDecimal(String.format("%.2f", Integer.parseInt(errorRequestDetailedData.get(i).getYData()) * 100.00
|
|
/ fileTotal)).toString() + "%")
|
|
/ fileTotal)).toString() + "%")
|
|
.build());
|
|
.build());
|
|
}
|
|
}
|
|
- Collections.reverse(dataDTOS);
|
|
|
|
return dataDTOS;
|
|
return dataDTOS;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -559,7 +556,7 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
assert b != null;
|
|
assert b != null;
|
|
if (!b) {
|
|
if (!b) {
|
|
log.info("开始数据同步");
|
|
log.info("开始数据同步");
|
|
- redisTemplate.opsForValue().setIfAbsent(DASHBOARD_SYNC_KEY, "", 60, TimeUnit.MINUTES);
|
|
|
|
|
|
+ redisTemplate.opsForValue().setIfAbsent(DASHBOARD_SYNC_KEY, "", 59, TimeUnit.MINUTES);
|
|
try {
|
|
try {
|
|
this.baseMapper.insertList(list);
|
|
this.baseMapper.insertList(list);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -630,10 +627,11 @@ public class BackgroundConvertDataServiceImpl extends ServiceImpl<BackgroundConv
|
|
throw new CommonException(BackgroundErrorEnum.QUEUE_PARAMETER_ERROR);
|
|
throw new CommonException(BackgroundErrorEnum.QUEUE_PARAMETER_ERROR);
|
|
} else if (endDateTime.isAfter(MyLocalDateUtil.timeZoneConversion(LocalDateTime.now(), queryDTO.getTimeZone()).toLocalDate())) {
|
|
} else if (endDateTime.isAfter(MyLocalDateUtil.timeZoneConversion(LocalDateTime.now(), queryDTO.getTimeZone()).toLocalDate())) {
|
|
throw new CommonException(BackgroundErrorEnum.QUEUE_PARAMETER_ERROR);
|
|
throw new CommonException(BackgroundErrorEnum.QUEUE_PARAMETER_ERROR);
|
|
- } else if (startDateTime.equals(endDateTime)) {
|
|
|
|
|
|
+ }
|
|
|
|
+// else if (startDateTime.equals(endDateTime)) {
|
|
// 开始时间等于结束时间
|
|
// 开始时间等于结束时间
|
|
endDateTime = endDateTime.plusDays(1);
|
|
endDateTime = endDateTime.plusDays(1);
|
|
- }
|
|
|
|
|
|
+// }
|
|
// else if (ChronoUnit.DAYS.between(startDateTime, endDateTime) > 30) {
|
|
// else if (ChronoUnit.DAYS.between(startDateTime, endDateTime) > 30) {
|
|
// // 开始时间和结束时间大于30天
|
|
// // 开始时间和结束时间大于30天
|
|
// startDateTime = endDateTime.minus(30, ChronoUnit.DAYS);
|
|
// startDateTime = endDateTime.minus(30, ChronoUnit.DAYS);
|