| | |
| | | // waylineJobService.publishOneFlightTask(waylineJobDTO.get()); |
| | | // } |
| | | // } |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | public void mytask4() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(8); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("别墅巡查一段", "2a44748a-1500-406f-80cf-ad92186fe8d2", times, lists1, listOfLists); |
| | | } |
| | | |
| | | @Scheduled(cron = "0 50 0 * * ?") |
| | | public void mytask5() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("别墅巡查二段", "a07229af-471a-4058-9da6-5a2b84308b9e", times, lists1, listOfLists); |
| | | } |
| | | |
| | | @Scheduled(cron = "0 40 1 * * ?") |
| | | public void mytask6() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("九洲巡河一段", "9f471686-a73a-4e90-8f37-92eed8ed5929", times, lists1, listOfLists); |
| | | } |
| | | |
| | | @Scheduled(cron = "0 40 2 * * ?") |
| | | public void mytask7() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("九洲巡河二段", "58cd4261-02d7-4c4e-b876-25a4a2630c18", times, lists1, listOfLists); |
| | | } |
| | | |
| | | @Scheduled(cron = "0 30 2 * * ?") |
| | | public void mytask8() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(12); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("定时任务2:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists); |
| | | } |
| | | @Scheduled(cron = "0 30 2 * * ?") |
| | | public void mytask9() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(14); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> lists1 = new ArrayList<>(); |
| | | lists1.add(time); |
| | | String times = convertTimestampToFormattedString(time); |
| | | sendPostWithParameters("定时任务4:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists); |
| | | } |
| | | @Scheduled(cron = "0 0 6 * * ?") |
| | | public static void mytask10() { |
| | | File directory = new File("/tmp"); |
| | | String[] partialFileNames = {"temp", "mark"}; // 要匹配的部分文件名 |
| | | if (directory.isDirectory()) { |
| | | File[] files = directory.listFiles(); |
| | | if (files != null) { |
| | | for (File file : files) { |
| | | for (String partialFileName : partialFileNames) { |
| | | if (file.isFile() && file.getName().contains(partialFileName)) { |
| | | file.delete(); |
| | | break; // 跳出内层循环,以免重复删除同一个文件 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // @Scheduled(cron = "0 0 1 * * ?") |
| | | // public void mytask4() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(8); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("别墅巡查一段", "2a44748a-1500-406f-80cf-ad92186fe8d2", times, lists1, listOfLists); |
| | | // } |
| | | // |
| | | // @Scheduled(cron = "0 50 0 * * ?") |
| | | // public void mytask5() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(9); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("别墅巡查二段", "a07229af-471a-4058-9da6-5a2b84308b9e", times, lists1, listOfLists); |
| | | // } |
| | | // |
| | | // @Scheduled(cron = "0 40 1 * * ?") |
| | | // public void mytask6() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(9); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("九洲巡河一段", "9f471686-a73a-4e90-8f37-92eed8ed5929", times, lists1, listOfLists); |
| | | // } |
| | | // |
| | | // @Scheduled(cron = "0 40 2 * * ?") |
| | | // public void mytask7() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(9); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("九洲巡河二段", "58cd4261-02d7-4c4e-b876-25a4a2630c18", times, lists1, listOfLists); |
| | | // } |
| | | // |
| | | // @Scheduled(cron = "0 30 2 * * ?") |
| | | // public void mytask8() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(12); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("定时任务2:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists); |
| | | // } |
| | | // @Scheduled(cron = "0 30 2 * * ?") |
| | | // public void mytask9() throws IOException { |
| | | // Long time = getCurrentTimestampPlus8Hours(14); |
| | | // List<List<Long>> listOfLists = new ArrayList<>(); |
| | | // List<Long> sublist = new ArrayList<>(); |
| | | // sublist.add(time); // 添加整数值 |
| | | // listOfLists.add(sublist); |
| | | // List<Long> lists1 = new ArrayList<>(); |
| | | // lists1.add(time); |
| | | // String times = convertTimestampToFormattedString(time); |
| | | // sendPostWithParameters("定时任务4:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists); |
| | | // } |
| | | // @Scheduled(cron = "0 0 6 * * ?") |
| | | // public static void mytask10() { |
| | | // File directory = new File("/tmp"); |
| | | // String[] partialFileNames = {"temp", "mark"}; // 要匹配的部分文件名 |
| | | // if (directory.isDirectory()) { |
| | | // File[] files = directory.listFiles(); |
| | | // if (files != null) { |
| | | // for (File file : files) { |
| | | // for (String partialFileName : partialFileNames) { |
| | | // if (file.isFile() && file.getName().contains(partialFileName)) { |
| | | // file.delete(); |
| | | // break; // 跳出内层循环,以免重复删除同一个文件 |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | /** |
| | | * 完成对未推送的图斑数据进行整合发送 |
| | | * |