| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ByteArrayResource; |
| | | import org.springframework.http.*; |
| | | import org.springframework.http.client.SimpleClientHttpRequestFactory; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void mytask5() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(10); |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | time = addOneHourToTimestamp(time, 0, 50); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void mytask6() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(11); |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | time = addOneHourToTimestamp(time, 1, 40); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void mytask7() throws IOException { |
| | | Long time = getCurrentTimestampPlus8Hours(13); |
| | | Long time = getCurrentTimestampPlus8Hours(9); |
| | | time = addOneHourToTimestamp(time, 2, 50); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(time); // 添加整数值 |
| | |
| | | |
| | | // 发送请求 |
| | | ResponseEntity<String> response = restTemplate.exchange( |
| | | "https://jxlandcloud.org.cn/landCloudWork/artifact/media/upload.action", |
| | | "http://39.98.49.177:8083/landCloudWork/artifact/media/upload.action", |
| | | // "http://localhost:6789/territory/tbdkjbxx/upload", |
| | | HttpMethod.POST, |
| | | requestEntity, |