| | |
| | | @Autowired |
| | | private RemotesInfoProperties.RcsApi rcsApi; |
| | | @Autowired |
| | | private RemotesInfoProperties.WmsOpenApi wmsOpenApi; |
| | | @Autowired |
| | | private BasStationService basStationService; |
| | | @Autowired |
| | | private FlowStepInstanceServiceImpl flowStepInstanceService; |
| | |
| | | */ |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void missionTaskEXECUTE() { |
| | | public synchronized void missionTaskEXECUTE() { |
| | | try{ |
| | | List<FlowStepInstance> flowStepInstanceList = flowStepInstanceService.list(new LambdaQueryWrapper<FlowStepInstance>() |
| | | .eq(FlowStepInstance::getStatus, 1).in(FlowStepInstance::getStepType,MissionStepType.getTaskISSUE())); |
| | | for (FlowStepInstance flowStepInstance : flowStepInstanceList) { |
| | |
| | | } |
| | | } else { |
| | | /**任务下发接口*/ |
| | | String pubTakUrl = rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.MISSION_TRANSFER_STATION; |
| | | String pubTakUrl = wmsOpenApi.getHost() + ":" + wmsOpenApi.getPort() + RcsConstant.MISSION_TRANSFER_STATION; |
| | | |
| | | /**基础配置链接*/ |
| | | log.info("任务下发,请求地址: {}, 请求参数: {}", pubTakUrl, JSONObject.toJSONString("")); |
| | | log.info("任务下发,请求地址: {}, 请求参数: {}", pubTakUrl, JSONObject.toJSONString(flowStepInstance)); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.add("Content-Type", "application/json"); |
| | | headers.add("api-version", "v2.0"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | for (Task task : tasks) { |
| | | /**任务下发接口*/ |
| | | String pubTakUrl = rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.REPORT_TASKS; |
| | | String pubTakUrl = wmsOpenApi.getHost() + ":" + wmsOpenApi.getPort() + RcsConstant.REPORT_TASKS; |
| | | |
| | | /**基础配置链接*/ |
| | | log.info("任务上报,请求地址: {}, 请求参数: {}", pubTakUrl, JSONObject.toJSONString("")); |