| | |
| | | List<String> result = outCallClient.createOutCallTaskJobHandler(isOver,taskScheduleTime,personNumber, day); |
| | | XxlJobLogger.log("任务响应结果..." + result); |
| | | if (result.get(2).equals("true")) { |
| | | Integer jobId = 11; |
| | | // 获取任务id |
| | | String taskId = result.get(1); |
| | | // 修改定时任务 |
| | | XxlJobInfo jobInfo = xxlJobInfoService.getById(11); |
| | | XxlJobInfo jobInfo = xxlJobInfoService.getById(jobId); |
| | | // 解析参数 |
| | | Map mapParams = (Map) jobInfo.getExecutorParam(); |
| | | String time = mapParams.get("time").toString(); |
| | | XxlJobInfoVO xxlJobInfo = new XxlJobInfoVO(); |
| | | xxlJobInfo.setId(11); |
| | | xxlJobInfo.setId(jobId); |
| | | Map<String, Object> map = new HashMap<>(2); |
| | | map.put("taskId", taskId); |
| | | map.put("time", time); |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @XxlJob("createOutCallTaskByNotConnectJobHandler_test_0619") |
| | | @XxlJob("createOutCallTaskByNotConnectJobHandler") |
| | | public ReturnT<String> createOutCallTaskByNotConnectJobHandler(String param){ |
| | | XxlJobLogger.log("开始执行智能外呼未接通呼叫任务..."); |
| | | JSONObject jsonParam = JSON.parseObject(param); |
| | | String taskScheduleTime = jsonParam.getString("taskScheduleTime"); |
| | | // 创建外呼任务 |
| | | List<String> result = outCallClient.createOutCallTaskByNotConnectJobHandler(taskScheduleTime); |
| | | if (null != result && result.size() > 0) { |
| | | if (result.get(2).equals("true")) { |
| | | Integer jobId = 14; |
| | | // 获取任务id |
| | | String taskId = result.get(1); |
| | | // 修改定时任务(前一天未接通今天又呼叫未接的短息通知) |
| | | XxlJobInfo jobInfo = xxlJobInfoService.getById(jobId); |
| | | // 解析参数 |
| | | Map mapParams = (Map) jobInfo.getExecutorParam(); |
| | | String time = mapParams.get("time").toString(); |
| | | XxlJobInfoVO xxlJobInfo = new XxlJobInfoVO(); |
| | | xxlJobInfo.setId(jobId); |
| | | Map<String, Object> map = new HashMap<>(2); |
| | | map.put("taskId", taskId); |
| | | map.put("time", time); |
| | | xxlJobInfo.setExecutorParam(map); |
| | | Object o = xxlJobInfoService.updateXxlJobById(xxlJobInfo); |
| | | if (Boolean.parseBoolean(o.toString())) { |
| | | XxlJobLogger.log("外呼未接通短信通知定时任务修改成功!任务ID:" + taskId); |
| | | } else { |
| | | XxlJobLogger.log("外呼未接通短信通知定时任务修改失败!任务ID:" + taskId); |
| | | } |
| | | } |
| | | } |
| | | XxlJobLogger.log("任务响应结果..." + result); |
| | | XxlJobLogger.log("结束自动创建任务..."); |
| | | return ReturnT.SUCCESS; |