| | |
| | | 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 = map.get("taskName").toString(); |
| | | String taskName = now.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm")) + "智能外呼";; |
| | | if(null!= map.get("taskName") && !map.get("taskName").equals("")){ |
| | | 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 = map.get("taskScheduleTime").toString(); |
| | | String taskScheduleTime = LocalDateTime.now().plusHours(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | if (null!=map.get("taskScheduleTime") && !map.get("taskScheduleTime").equals("")){ |
| | | taskScheduleTime = map.get("taskScheduleTime").toString(); |
| | | } |
| | | String scenesIds = scenesId; |
| | | if (null!=map.get("scenesId") && !map.get("scenesId").equals("")){ |
| | | scenesIds = map.get("scenesId").toString(); |
| | | } |
| | | JSONArray arr = getCalleeInfo(params); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("Content-Type", CONTENT_TYPE); |
| | |
| | | httpHeaders.add("Accept-Encoding", ACCEPT_ENCODING); |
| | | JSONObject paramJson = new JSONObject(); |
| | | paramJson.put("taskName", taskName); |
| | | paramJson.put("scenesId", scenesId); |
| | | paramJson.put("scenesId", scenesIds); |
| | | paramJson.put("callingNumbers", numbers); |
| | | paramJson.put("taskScheduleTime", taskScheduleTime); |
| | | paramJson.put("calleeData", arr); |