| | |
| | | |
| | | /** |
| | | * 创建任务 |
| | | * @param params |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object createTask(List<Map<String, String>> params) { |
| | | public Object createTask(Map<String,Object> map) { |
| | | List<Map<String, String>> params = (List<Map<String, String>>) map.get("list"); |
| | | String requestUrl = url + CREATE_TASK_URL; |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | String timestamp = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss SSS")); |
| | | String transId = generateTransId(now); |
| | | String taskName = now.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm")) + "智能外呼"; |
| | | // String taskName = now.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm")) + "智能外呼"; |
| | | String taskName = map.get("taskName").toString(); |
| | | String[] numbers = StringUtils.split(callingNumbers,","); |
| | | String taskScheduleTime = LocalDateTime.now().plusHours(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // String taskScheduleTime = LocalDateTime.now().plusHours(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String taskScheduleTime = map.get("taskScheduleTime").toString(); |
| | | JSONArray arr = getCalleeInfo(params); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("Content-Type", CONTENT_TYPE); |