| | |
| | | import com.ard.oss.service.impl.OssServiceContext; |
| | | import com.ard.route.domain.route.ArdRouteInfo; |
| | | import com.ard.route.service.IArdRouteInfoService; |
| | | import com.ard.sample.config.DockConfiguration; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | |
| | | md5 = DigestUtils.md5Hex(inputStream); |
| | | url = new URL(ardRouteOpt.getPath()); |
| | | log.info("机场任务航线文件url地址转换前:{}", url); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, OssConfiguration.endpointSpare); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, DockConfiguration.endpoint); |
| | | log.info("机场任务航线文件url地址转换后:{}", httpUrl); |
| | | log.info("机场任务航线文件md5值:{}", md5); |
| | | } catch (Exception e) { |
| | |
| | | md5 = DigestUtils.md5Hex(inputStream); |
| | | url = new URL(ardRouteOpt.getPath()); |
| | | log.info("机场任务航线文件url地址转换前:{}", url); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, OssConfiguration.endpointSpare); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, DockConfiguration.endpoint); |
| | | log.info("机场任务航线文件url地址转换后:{}", httpUrl); |
| | | log.info("机场任务航线文件md5值:{}", md5); |
| | | } catch (Exception e) { |
| | |
| | | // 下发参数打印 |
| | | try{ |
| | | String json = objectMapper.writeValueAsString(flightTask); |
| | | log.info("机场下发航线任务的参数flightTask:{}", json); |
| | | log.info("机场下发循环任务子任务-定时任务的航线任务的参数flightTask:{}", json); |
| | | } |
| | | catch (Exception e){ |
| | | log.error("机场下发航线任务的参数flightTask异常:{}", e.getMessage()); |
| | | log.error("机场下发循环任务子任务-定时任务的航线任务的参数flightTask异常:{}", e.getMessage()); |
| | | } |
| | | |
| | | String topic = TopicConst.THING_MODEL_PRE + TopicConst.PRODUCT + |
| | |
| | | |
| | | ServiceReply serviceReply = messageSender.publishWithReply(topic, response); |
| | | |
| | | log.info("下发任务结果: {}", serviceReply.getResult()); |
| | | log.info("机场任务航线文件url地址:{}", httpUrl); |
| | | log.info("机场任务航线文件md5值:{}", md5); |
| | | log.info("下发循环任务子任务-定时任务的结果: {}", serviceReply.getResult()); |
| | | log.info("机场循环任务子任务-定时任务的航线文件url地址:{}", httpUrl); |
| | | log.info("机场循环任务子任务-定时任务的航线文件md5值:{}", md5); |
| | | |
| | | if (ResponseResult.CODE_SUCCESS != serviceReply.getResult()) { |
| | | String errorMsg = CommonErrorEnum.getMsgByCode(serviceReply.getResult()); |
| | |
| | | |
| | | // 飞行命令先注释掉 |
| | | // Issue an immediate task execution command. |
| | | if (WaylineTaskTypeEnum.IMMEDIATE.getVal() == waylineJob.getTaskType()) { |
| | | if (!executeFlightTask(waylineJob.getJobId())) { |
| | | return ResponseResult.error("无法执行作业。"); |
| | | } |
| | | } |
| | | // if (WaylineTaskTypeEnum.IMMEDIATE.getVal() == waylineJob.getTaskType()) { |
| | | // if (!executeFlightTask(waylineJob.getJobId())) { |
| | | // return ResponseResult.error("无法执行作业。"); |
| | | // } |
| | | // } |
| | | |
| | | if (WaylineTaskTypeEnum.TIMED.getVal() == waylineJob.getTaskType()) { |
| | | boolean isAdd = RedisOpsUtils.zAdd(RedisConst.WAYLINE_JOB_TIMED_EXECUTE, |
| | |
| | | url = new URL(ardRouteOpt.getPath()); |
| | | |
| | | log.info("机场通过flightTaskResourceGet获取航线文件地址转换前:{}", url); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, OssConfiguration.endpointSpare); |
| | | httpUrl = url.toString().replace(OssConfiguration.endpoint, DockConfiguration.endpoint); |
| | | log.info("机场通过flightTaskResourceGet获取航线文件地址转换后:{}", httpUrl); |
| | | |
| | | log.info("机场通过flightTaskResourceGet获取航线文件地址,jobId: " + jobId + " 返回信息为url:" + httpUrl + " md5:" + md5); |