zhongrj
2023-04-24 c39814d95d070c4b1daf95081e4eb8394ef5bffe
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/intelligentCall/service/impl/CallServiceImpl.java
@@ -53,8 +53,13 @@
   private final static String CREATE_TASK_URL = "/api/task/createTask.json";
   private final static String CALL_DETAIL_URL = "/api/task/callDetail.json";
   /**
    * 创建任务
    * @param params
    * @return
    */
   @Override
   public void createTask(List<Map<String, String>> params) {
   public Object createTask(List<Map<String, String>> params) {
      String requestUrl = url + CREATE_TASK_URL;
      LocalDateTime now = LocalDateTime.now();
      String timestamp = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss SSS"));
@@ -62,7 +67,6 @@
      String taskName = now.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm")) + "智能外呼";
      String[] numbers = StringUtils.split(callingNumbers,",");
      String taskScheduleTime = LocalDateTime.now().plusHours(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
      System.out.println("taskScheduleTime = " + taskScheduleTime);
      JSONArray arr = getCalleeInfo(params);
      HttpHeaders httpHeaders = new HttpHeaders();
      httpHeaders.add("Content-Type", CONTENT_TYPE);
@@ -91,8 +95,15 @@
      if (response.getStatusCode() != HttpStatus.OK) {
         log.error("创建智能外呼任务失败:{}", response.getStatusCode());
      }
      return response;
   }
   /**
    * 获取通话详情
    * @param taskId
    * @param calleeNumber
    * @return
    */
   @Override
   public Object getCallDetail(String taskId, String calleeNumber) {
      String requestUrl = url + CALL_DETAIL_URL;