|
@ -38,7 +38,7 @@ public class DeviceStatus { |
|
|
private ExcelExportService excelExportService; |
|
|
private ExcelExportService excelExportService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "* * 0/1 * * ?") |
|
|
@Scheduled(cron = "0 0 0-23 * * ?") |
|
|
// @Scheduled(cron = "0 0 1,5,7,8,11,14,17,19,21,23")
|
|
|
// @Scheduled(cron = "0 0 1,5,7,8,11,14,17,19,21,23")
|
|
|
public void generateDeviceStatus() { |
|
|
public void generateDeviceStatus() { |
|
|
deviceStatus(); |
|
|
deviceStatus(); |
|
@ -126,7 +126,6 @@ public class DeviceStatus { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
executor.shutdown(); |
|
|
executor.shutdown(); |
|
|
calculateSuccessRate(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -169,12 +168,14 @@ public class DeviceStatus { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 成功率和丢包率按小时分组 |
|
|
* 成功率和丢包率按小时分组 |
|
|
|
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 5 1 * * ?") |
|
|
public void calculateSuccessRate() { |
|
|
public void calculateSuccessRate() { |
|
|
|
|
|
|
|
|
LocalDateTime todayStart = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS); |
|
|
LocalDateTime todayStart = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS); |
|
|
LocalDateTime currentTime = LocalDateTime.now(); |
|
|
LocalDateTime currentTime = LocalDateTime.now(); |
|
|
Map<String, String> ipMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Status status = new Status(); |
|
|
Status status = new Status(); |
|
|