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