| | |
| | | */ |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void myTask() throws Exception { |
| | | String taskId=""; |
| | | String taskId = ""; |
| | | String workspaceId = "4a574db8-4ad3-48f7-9f16-3edbcd8056e1"; |
| | | // 获取未规划的图斑集合 |
| | | List<List<LotInfo>> lists = getNoPlan(); |
| | |
| | | backWayline(multipartFile, waylineName, workspaceId, backclaim().getUsername()); |
| | | //将为规划的图斑状态更新为已规划 |
| | | updatePatchesStatu(list); |
| | | // waylineJobService.publishFlightTask(JobParam("656c62f4-cb86-4911-930d-b38089829348"),backclaim()); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | //存储db到服务器 |
| | | dbSave(territoryConfigPojo.getResult(), territoryConfigPojo.getResultsave(), taskId); |
| | | |
| | | //发送请求给第三方接口 |
| | | sendPostWithFileAndParameter(territoryConfigPojo.getResult(), taskId); |
| | | |
| | |
| | | * @throws IOException |
| | | */ |
| | | public MultipartFile getFile(String waylineName, List<LotInfo> list) throws IOException { |
| | | List<PointPO> coordinates = GeoToolsUtil.getRoutePointOrder(list, 28.62703, 115.867719); |
| | | List<PointPO> coordinates = GeoToolsUtil.getRoutePointOrder(list, 28.62452712442823, 115.85666327144976); |
| | | XMLTemplateModel xmlModel = XMLTemplateModel.init(coordinates, list); |
| | | CreateWaylineFileUtils.createWaylineFile(xmlModel, patchesConfigPojo.getTemplate(), patchesConfigPojo.getTargetTemplate(), patchesConfigPojo.getWaylines(), patchesConfigPojo.getTargetWaylines()); |
| | | // 压缩文件夹中的内容 |
| | |
| | | * @return |
| | | */ |
| | | public String backWayline(MultipartFile multipartFile, String waylineName, String workspaceId, String username) { |
| | | waylineFileService.importKmzFile(multipartFile, workspaceId, username); |
| | | waylineFileService.importKmzFileBack(multipartFile, workspaceId, username); |
| | | WaylineFileEntity entity = waylineFileService.selectByName(waylineName); |
| | | try { |
| | | waylineFileService.getObjectUrl(workspaceId, entity.getWaylineId()); |
| | |
| | | |
| | | public List<List<MediaFileEntity>> getNoadd() { |
| | | List<MediaFileEntity> list = fileMapper.selectList(new LambdaQueryWrapper<MediaFileEntity>() |
| | | .eq(MediaFileEntity::getIsadd, 0).like(MediaFileEntity::getFileName, "~")); |
| | | .eq(MediaFileEntity::getIsadd, 0) |
| | | .eq(MediaFileEntity::getExamine, 1) |
| | | .like(MediaFileEntity::getFileName, "~")); |
| | | List<List<MediaFileEntity>> groupedFilenames = groupTasks(list); |
| | | return groupedFilenames; |
| | | } |
| | |
| | | long timestamp = System.currentTimeMillis(); |
| | | List<List<Long>> listOfLists = new ArrayList<>(); |
| | | List<Long> sublist = new ArrayList<>(); |
| | | sublist.add(1715852375L); // 添加整数值 |
| | | sublist.add(1715941980L); // 添加整数值 |
| | | listOfLists.add(sublist); |
| | | List<Long> list = new ArrayList<>(); |
| | | list.add(1715852375L); |
| | | list.add(1715941980L); |
| | | CreateJobParam param = new CreateJobParam(); |
| | | param.setName("云飞行调查"+timestamp); |
| | | param.setName("云飞行调查" + timestamp); |
| | | param.setExecuteStartTimeArr(listOfLists); |
| | | param.setTaskType(TIMED); |
| | | param.setOutOfControlAction(0); |
| | | param.setRepFreType(3); |
| | |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers); |
| | | |
| | | // 发送请求 |
| | | restTemplate.exchange( |
| | | ResponseEntity<String> response =restTemplate.exchange( |
| | | "https://jxlandcloud.org.cn/landCloudWork/artifact/media/upload.action", |
| | | // "http://localhost:6789/territory/tbdkjbxx/upload", |
| | | HttpMethod.POST, |
| | | requestEntity, |
| | | String.class); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | System.out.println(response); |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException("db推送失败" + e.getMessage()); |
| | | } |
| | |
| | | } |
| | | return folder; |
| | | } |
| | | |
| | | } |