Przeglądaj źródła

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 1 tydzień temu
rodzic
commit
79c93e989f
40 zmienionych plików z 371 dodań i 175 usunięć
  1. 1 1
      fs-cid-workflow/src/main/java/com/fs/app/task/CidTask.java
  2. 15 5
      fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallGatewayController.java
  3. 9 4
      fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallUserController.java
  4. 15 9
      fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallVoiceTtsAliyunController.java
  5. 4 0
      fs-company/src/main/java/com/fs/company/controller/company/CompanyVoiceRoboticCallBlacklistController.java
  6. 6 17
      fs-company/src/main/java/com/fs/company/controller/crm/CrmCustomerAnalyzeController.java
  7. 16 2
      fs-company/src/main/java/com/fs/company/controller/crm/chat/CrmCustomerChatSessionController.java
  8. 4 12
      fs-service/src/main/java/com/fs/aiSipCall/RemoteCommon.java
  9. 2 2
      fs-service/src/main/java/com/fs/aiSipCall/domain/AiSipCallGateway.java
  10. 5 3
      fs-service/src/main/java/com/fs/aiSipCall/domain/AiSipCallUser.java
  11. 2 0
      fs-service/src/main/java/com/fs/aiSipCall/param/ApiCallRecordByUuidQueryParams.java
  12. 10 7
      fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallGatewayService.java
  13. 6 4
      fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallUserService.java
  14. 8 9
      fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallVoiceTtsAliyunService.java
  15. 24 8
      fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallGatewayServiceImpl.java
  16. 71 21
      fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallOutboundCdrServiceImpl.java
  17. 13 14
      fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallPhoneServiceImpl.java
  18. 9 9
      fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallUserServiceImpl.java
  19. 1 1
      fs-service/src/main/java/com/fs/company/mapper/CompanyWxClientMapper.java
  20. 4 0
      fs-service/src/main/java/com/fs/company/mapper/EasyCallMapper.java
  21. 1 1
      fs-service/src/main/java/com/fs/company/service/ICompanyWxClientService.java
  22. 2 1
      fs-service/src/main/java/com/fs/company/service/impl/CompanyWorkflowEngineImpl.java
  23. 2 2
      fs-service/src/main/java/com/fs/company/service/impl/CompanyWxClientServiceImpl.java
  24. 2 1
      fs-service/src/main/java/com/fs/company/service/impl/call/node/AbstractWorkflowNode.java
  25. 1 0
      fs-service/src/main/java/com/fs/company/vo/CompanyWxClient4WorkFlowVO.java
  26. 52 0
      fs-service/src/main/java/com/fs/company/vo/easycall/EasyCallOutBoundVO.java
  27. 4 0
      fs-service/src/main/java/com/fs/crm/domain/CrmCustomerAnalyze.java
  28. 1 1
      fs-service/src/main/java/com/fs/crm/domain/CrmCustomerChatMessage.java
  29. 1 1
      fs-service/src/main/java/com/fs/crm/mapper/CrmCustomerChatMessageMapper.java
  30. 2 1
      fs-service/src/main/java/com/fs/crm/service/ICrmCustomerAnalyzeService.java
  31. 31 9
      fs-service/src/main/java/com/fs/crm/service/impl/CrmCustomerAnalyzeServiceImpl.java
  32. 5 18
      fs-service/src/main/java/com/fs/crm/service/impl/CrmCustomerChatSessionServiceImpl.java
  33. 1 1
      fs-service/src/main/resources/application-druid-hsyy.yml
  34. 2 2
      fs-service/src/main/resources/application-druid-mengniu.yml
  35. 7 3
      fs-service/src/main/resources/mapper/aiSipCall/AiSipCallUserMapper.xml
  36. 3 3
      fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticCallBlacklistMapper.xml
  37. 2 0
      fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticMapper.xml
  38. 6 2
      fs-service/src/main/resources/mapper/company/CompanyWxClientMapper.xml
  39. 4 0
      fs-service/src/main/resources/mapper/company/EasyCallMapper.xml
  40. 17 1
      fs-wx-task/src/main/java/com/fs/app/service/WxTaskService.java

+ 1 - 1
fs-cid-workflow/src/main/java/com/fs/app/task/CidTask.java

@@ -27,7 +27,7 @@ public class CidTask {
     /**
      * 扫描当前分组下就绪任务,并开启执行
      */
-    @Scheduled(cron = "0 0/1 * * * ?")
+    @Scheduled(cron = "0/30 * * * * ?")
     public void runCidWorkflow() {
         cidWorkflowTaskService.runCidWorkflow();
     }

+ 15 - 5
fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallGatewayController.java

@@ -32,14 +32,24 @@ public class AiSipCallGatewayController extends BaseController
      * 查询aiSIP外呼网关列表
      */
     @PreAuthorize("@ss.hasPermi('company:aiSipCall:gateway:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(AiSipCallGateway aiSipCallGateway)
+    @PostMapping("/remoteList")
+    public TableDataInfo list(@RequestBody AiSipCallGateway aiSipCallGateway)
     {
-        startPage();
-        List<AiSipCallGateway> list = aiSipCallGatewayService.selectAiSipCallGatewayList(aiSipCallGateway);
-        return getDataTable(list);
+        return aiSipCallGatewayService.remoteList(aiSipCallGateway);
     }
 
+    /**
+     * 查询aiSIP外呼网关列表
+     */
+//    @PreAuthorize("@ss.hasPermi('company:aiSipCall:gateway:list')")
+//    @GetMapping("/list")
+//    public TableDataInfo list(AiSipCallGateway aiSipCallGateway)
+//    {
+//        startPage();
+//        List<AiSipCallGateway> list = aiSipCallGatewayService.selectAiSipCallGatewayList(aiSipCallGateway);
+//        return getDataTable(list);
+//    }
+
     /**
      * 导出aiSIP外呼网关列表
      */

+ 9 - 4
fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallUserController.java

@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * sip用户信息Controller
@@ -141,12 +142,16 @@ public class AiSipCallUserController extends BaseController
 
     /**
      * 查询aiSIP工具条基础配置参数
-     * @param extNum 分机号
+     * @param param 参数
      * @return AjaxResult 结果
      */
-    @GetMapping("/getToolbarBasicParam/{extNum}")
-    public AjaxResult getToolbarBasicParam(@PathVariable("extNum") String extNum)
+    @PostMapping("/getToolbarBasicParam")
+    public AjaxResult getToolbarBasicParam(@RequestBody Map<String,String> param)
     {
-        return aiSipCallUserService.getToolbarBasicParam(extNum);
+        String extNum = param.get("extNum");
+        if(extNum == null){
+            return AjaxResult.error("分机号参数缺失");
+        }
+        return aiSipCallUserService.getToolbarBasicParam(param);
     }
 }

+ 15 - 9
fs-company/src/main/java/com/fs/company/controller/aiSipCall/AiSipCallVoiceTtsAliyunController.java

@@ -1,22 +1,28 @@
 package com.fs.company.controller.aiSipCall;
 
-import com.fs.aiSipCall.domain.AiSipCallVoiceTtsAliyun;
-import com.fs.aiSipCall.service.IAiSipCallVoiceTtsAliyunService;
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
+import com.fs.aiSipCall.domain.AiSipCallVoiceTtsAliyun;
+import com.fs.aiSipCall.service.IAiSipCallVoiceTtsAliyunService;
 import com.fs.common.utils.poi.ExcelUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import com.fs.common.core.page.TableDataInfo;
 
 /**
  * aiSIP外呼阿里云音色Controller
- * 
+ *
  * @author fs
  * @date 2026-03-06
  */

+ 4 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyVoiceRoboticCallBlacklistController.java

@@ -79,6 +79,8 @@ public class CompanyVoiceRoboticCallBlacklistController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody CompanyVoiceRoboticCallBlacklist companyVoiceRoboticCallBlacklist)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyVoiceRoboticCallBlacklist.setCompanyId(loginUser.getCompany().getCompanyId());
         return toAjax(companyVoiceRoboticCallBlacklistService.insertCompanyVoiceRoboticCallBlacklist(companyVoiceRoboticCallBlacklist));
     }
 
@@ -86,6 +88,7 @@ public class CompanyVoiceRoboticCallBlacklistController extends BaseController
      * 修改黑名单nessType = BusinessType.UPDATE)
      * */
     @PutMapping
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceBlacklist:update')")
     @Log(title = "修改黑名单信息", businessType = BusinessType.INSERT)
     public AjaxResult edit(@RequestBody CompanyVoiceRoboticCallBlacklist companyVoiceRoboticCallBlacklist)
     {
@@ -104,6 +107,7 @@ public class CompanyVoiceRoboticCallBlacklistController extends BaseController
     }
 
     @Log(title = "修改黑名单状态", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceBlacklist:update')")
     @PutMapping("/changeStatus")
     public AjaxResult changeStatus(@RequestBody CompanyVoiceRoboticCallBlacklist companyVoiceRoboticCallBlacklist) {
         return toAjax(companyVoiceRoboticCallBlacklistService.changeStatus(companyVoiceRoboticCallBlacklist));

+ 6 - 17
fs-company/src/main/java/com/fs/company/controller/crm/CrmCustomerAnalyzeController.java

@@ -3,7 +3,8 @@ package com.fs.company.controller.crm;
 import java.util.List;
 
 import com.fs.common.core.domain.R;
-import com.fs.crm.param.PolishingScriptParam;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -51,12 +52,11 @@ public class CrmCustomerAnalyzeController extends BaseController
     /**
      * 查询所有客户(根据客户分组取客户最新一条数据)
      */
-    @GetMapping("/listAll")
-    public TableDataInfo listAll(CrmCustomerAnalyze crmCustomerAnalyze)
+    @PostMapping("/listAll")
+    public R listAll(@RequestBody CrmCustomerAnalyze crmCustomerAnalyze)
     {
-        startPage();
-        List<CrmCustomerAnalyze> list = crmCustomerAnalyzeService.selectCrmCustomerAnalyzeListAll(crmCustomerAnalyze);
-        return getDataTable(list);
+        PageHelper.startPage(crmCustomerAnalyze.getPageNum(), crmCustomerAnalyze.getPageSize());
+        return R.ok().put("data",new PageInfo<>(crmCustomerAnalyzeService.selectCrmCustomerAnalyzeListAll(crmCustomerAnalyze)));
     }
 
 
@@ -115,15 +115,4 @@ public class CrmCustomerAnalyzeController extends BaseController
     {
         return toAjax(crmCustomerAnalyzeService.deleteCrmCustomerAnalyzeByIds(ids));
     }
-
-    /**
-     * 话术润色
-     */
-    @PreAuthorize("@ss.hasPermi('crm:analyze:polishingScript')")
-    @PostMapping("/polishingScript")
-    public R polishingScript(@RequestBody PolishingScriptParam param)
-    {
-        return R.ok().put("data",crmCustomerAnalyzeService.polishingScript(param));
-    }
-
 }

+ 16 - 2
fs-company/src/main/java/com/fs/company/controller/crm/chat/CrmCustomerChatSessionController.java

@@ -2,10 +2,13 @@ package com.fs.company.controller.crm.chat;
 
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.utils.ServletUtils;
 import com.fs.crm.domain.CrmCustomerChatMessage;
 import com.fs.crm.domain.CrmCustomerChatSession;
+import com.fs.crm.param.PolishingScriptParam;
+import com.fs.crm.service.ICrmCustomerAnalyzeService;
 import com.fs.crm.service.ICrmCustomerChatMessageService;
 import com.fs.crm.service.ICrmCustomerChatSessionService;
 import com.fs.framework.security.LoginUser;
@@ -32,6 +35,8 @@ public class CrmCustomerChatSessionController extends BaseController {
     private TokenService tokenService;
     @Autowired
     private ICrmCustomerChatMessageService chatMessageService;
+    @Autowired
+    private ICrmCustomerAnalyzeService crmCustomerAnalyzeService;
 
     /**
      * 查询聊天会话列表
@@ -40,8 +45,9 @@ public class CrmCustomerChatSessionController extends BaseController {
     public TableDataInfo list(CrmCustomerChatSession chatSession) {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         chatSession.setUserId(loginUser.getUser().getUserId());
+        startPage();
         List<CrmCustomerChatSession> list = chatSessionService.selectChatSessionList(chatSession);
-        //根据会话查询对应的消息数据
+        //根据会话查询对应的消息数据,返回一个sessionId对应200条数据显示
         list.forEach(session -> {
             List<CrmCustomerChatMessage> messageList =chatMessageService.selectChatMessageBySessionIdLimit(session.getSessionId());
             session.setMessageList(messageList);
@@ -93,7 +99,6 @@ public class CrmCustomerChatSessionController extends BaseController {
             int result = chatSessionService.updateChatSessionTitle(sessionId, title);
             return result > 0 ? success("更新成功") : error("更新失败");
         } catch (Exception e) {
-            logger.error("更新会话标题失败", e);
             return error("更新失败:" + e.getMessage());
         }
     }
@@ -153,4 +158,13 @@ public class CrmCustomerChatSessionController extends BaseController {
     public AjaxResult removeBatch(@RequestBody Long[] sessionIds) {
         return toAjax(chatSessionService.deleteChatSessionByIds(sessionIds));
     }
+
+    /**
+     * 话术润色
+     */
+    @PostMapping("/polishingScript")
+    public R polishingScript(@RequestBody PolishingScriptParam param)
+    {
+        return R.ok().put("data",crmCustomerAnalyzeService.polishingScript(param));
+    }
 }

+ 4 - 12
fs-service/src/main/java/com/fs/aiSipCall/RemoteCommon.java

@@ -15,13 +15,13 @@ public class RemoteCommon {
     /**
      * 远程接口地址前缀
      */
-//    public static final String REMOTE_ADDERSS_PREFIX = "http://129.28.164.235:8899";
-    public static final String REMOTE_ADDERSS_PREFIX = "http://127.0.0.1:8899";
+    public static final String REMOTE_ADDERSS_PREFIX = "http://129.28.164.235:8899";
+//    public static final String REMOTE_ADDERSS_PREFIX = "http://127.0.0.1:8899";
 
     /**
      * 网关列表接口
      */
-    public static final String GATEWAY_LIST_API = "/aicall/api/gateway/list";
+    public static final String GATEWAY_LIST_API = "/aicall/api/gateway/myList";
     /**
      * 音色列表接口
      */
@@ -62,14 +62,10 @@ public class RemoteCommon {
      * 通用追加名单接口
      */
     public static final String COMMON_ADD_CALL_LIST_API = "/aicall/api/common/addCallList";
-    /**
-     * 录音文件下载接口
-     */
-    public static final String RECORDINGS_FILES_API = "/recordings/files";
     /**
      * 获取电话工具条的网关列表
      */
-    public static final String PHONEBAR_PARAMS_API = "/aicall/api/phoneBar/params";
+    public static final String PHONEBAR_PARAMS_API = "/aicall/api/myPhoneBar/params";
 
     /**
      * 新增用户并绑定分机
@@ -98,10 +94,6 @@ public class RemoteCommon {
      * 查询外呼记录列表
      */
     public static final String QUERY_OUTBOUNDCDR_LIST_API = "/aicall/api/outboundcdrList";
-    /**
-     * 根据uuid和外呼类型查询外呼记录
-     */
-    public static final String QUERY_OUTBOUNDCDR_BYUUID_API = "/aicall/api/record/uuid";
 
     /**
      * 发送get请求

+ 2 - 2
fs-service/src/main/java/com/fs/aiSipCall/domain/AiSipCallGateway.java

@@ -78,8 +78,8 @@ public class AiSipCallGateway extends BaseEntity{
     @Excel(name = "远程网关ID")
     private Long remoteGatewayId;
 
-    private Long pageSize;
+    private Integer pageSize;
 
-    private Long pageNum;
+    private Integer pageNum;
 
 }

+ 5 - 3
fs-service/src/main/java/com/fs/aiSipCall/domain/AiSipCallUser.java

@@ -1,13 +1,12 @@
 package com.fs.aiSipCall.domain;
 
+import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
-import com.fs.common.core.domain.BaseEntity;
 import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
-
 /**
  * sip用户信息对象 ai_sip_call_user
  *
@@ -91,6 +90,9 @@ public class AiSipCallUser extends BaseEntity{
     /** 绑定的分机号 */
     @Excel(name = "绑定的分机号")
     private Long extNum;
+    /** 网关字符串 */
+    @Excel(name = "网关字符串")
+    private String gatewayIds;
 
     private Long companyId;
     private Long companyUserId;

+ 2 - 0
fs-service/src/main/java/com/fs/aiSipCall/param/ApiCallRecordByUuidQueryParams.java

@@ -27,5 +27,7 @@ public class ApiCallRecordByUuidQueryParams implements Serializable {
 
     private Long companyUserId;
 
+    private String intent;
+
 
 }

+ 10 - 7
fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallGatewayService.java

@@ -2,19 +2,20 @@ package com.fs.aiSipCall.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.aiSipCall.domain.AiSipCallGateway;
+import com.fs.common.core.page.TableDataInfo;
 
 import java.util.List;
 
 /**
  * aiSIP外呼网关Service接口
- * 
+ *
  * @author fs
  * @date 2026-03-06
  */
 public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
     /**
      * 查询aiSIP外呼网关
-     * 
+     *
      * @param id aiSIP外呼网关主键
      * @return aiSIP外呼网关
      */
@@ -22,7 +23,7 @@ public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
 
     /**
      * 查询aiSIP外呼网关列表
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return aiSIP外呼网关集合
      */
@@ -30,7 +31,7 @@ public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
 
     /**
      * 新增aiSIP外呼网关
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return 结果
      */
@@ -38,7 +39,7 @@ public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
 
     /**
      * 修改aiSIP外呼网关
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return 结果
      */
@@ -46,7 +47,7 @@ public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
 
     /**
      * 批量删除aiSIP外呼网关
-     * 
+     *
      * @param ids 需要删除的aiSIP外呼网关主键集合
      * @return 结果
      */
@@ -54,9 +55,11 @@ public interface IAiSipCallGatewayService extends IService<AiSipCallGateway>{
 
     /**
      * 删除aiSIP外呼网关信息
-     * 
+     *
      * @param id aiSIP外呼网关主键
      * @return 结果
      */
     int deleteAiSipCallGatewayById(Long id);
+
+    TableDataInfo remoteList(AiSipCallGateway aiSipCallGateway);
 }

+ 6 - 4
fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallUserService.java

@@ -1,11 +1,12 @@
 package com.fs.aiSipCall.service;
 
+import java.util.List;
+import java.util.Map;
+
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.aiSipCall.domain.AiSipCallUser;
 import com.fs.common.core.domain.AjaxResult;
 
-import java.util.List;
-
 /**
  * sip用户信息Service接口
  *
@@ -65,8 +66,9 @@ public interface IAiSipCallUserService extends IService<AiSipCallUser>{
 
     /**
      * 查询aiSIP工具条基础配置参数
-     * @param extNum 分机号
+     * @param param extNum分机号
+     * @param param extNum网关参数
      * @return AjaxResult 结果
      */
-    AjaxResult getToolbarBasicParam(String extNum);
+    AjaxResult getToolbarBasicParam(Map<String,String> param);
 }

+ 8 - 9
fs-service/src/main/java/com/fs/aiSipCall/service/IAiSipCallVoiceTtsAliyunService.java

@@ -1,20 +1,19 @@
 package com.fs.aiSipCall.service;
 
+import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.aiSipCall.domain.AiSipCallVoiceTtsAliyun;
 
-import java.util.List;
-
 /**
  * aiSIP外呼阿里云音色Service接口
- * 
+ *
  * @author fs
  * @date 2026-03-06
  */
 public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoiceTtsAliyun>{
     /**
      * 查询aiSIP外呼阿里云音色
-     * 
+     *
      * @param id aiSIP外呼阿里云音色主键
      * @return aiSIP外呼阿里云音色
      */
@@ -22,7 +21,7 @@ public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoice
 
     /**
      * 查询aiSIP外呼阿里云音色列表
-     * 
+     *
      * @param aiSipCallVoiceTtsAliyun aiSIP外呼阿里云音色
      * @return aiSIP外呼阿里云音色集合
      */
@@ -30,7 +29,7 @@ public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoice
 
     /**
      * 新增aiSIP外呼阿里云音色
-     * 
+     *
      * @param aiSipCallVoiceTtsAliyun aiSIP外呼阿里云音色
      * @return 结果
      */
@@ -38,7 +37,7 @@ public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoice
 
     /**
      * 修改aiSIP外呼阿里云音色
-     * 
+     *
      * @param aiSipCallVoiceTtsAliyun aiSIP外呼阿里云音色
      * @return 结果
      */
@@ -46,7 +45,7 @@ public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoice
 
     /**
      * 批量删除aiSIP外呼阿里云音色
-     * 
+     *
      * @param ids 需要删除的aiSIP外呼阿里云音色主键集合
      * @return 结果
      */
@@ -54,7 +53,7 @@ public interface IAiSipCallVoiceTtsAliyunService extends IService<AiSipCallVoice
 
     /**
      * 删除aiSIP外呼阿里云音色信息
-     * 
+     *
      * @param id aiSIP外呼阿里云音色主键
      * @return 结果
      */

+ 24 - 8
fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallGatewayServiceImpl.java

@@ -6,6 +6,7 @@ import com.fs.aiSipCall.RemoteCommon;
 import com.fs.aiSipCall.domain.AiSipCallGateway;
 import com.fs.aiSipCall.mapper.AiSipCallGatewayMapper;
 import com.fs.aiSipCall.service.IAiSipCallGatewayService;
+import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.utils.DateUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -15,7 +16,7 @@ import java.util.List;
 
 /**
  * aiSIP外呼网关Service业务层处理
- * 
+ *
  * @author fs
  * @date 2026-03-06
  */
@@ -25,7 +26,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 查询aiSIP外呼网关
-     * 
+     *
      * @param id aiSIP外呼网关主键
      * @return aiSIP外呼网关
      */
@@ -37,7 +38,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 查询aiSIP外呼网关列表
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return aiSIP外呼网关
      */
@@ -45,7 +46,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
     public List<AiSipCallGateway> selectAiSipCallGatewayList(AiSipCallGateway aiSipCallGateway)
     {
         //先使用远程网关
-        String result = RemoteCommon.sendGet(RemoteCommon.REMOTE_ADDERSS_PREFIX + RemoteCommon.GATEWAY_LIST_API);
+        String result = RemoteCommon.sendPost(RemoteCommon.REMOTE_ADDERSS_PREFIX + RemoteCommon.GATEWAY_LIST_API, JSONObject.toJSONString(aiSipCallGateway));
         if(StringUtils.isNotBlank(result)){
             JSONObject jsonObject = JSONObject.parseObject(result);
             if(jsonObject.getInteger("code") == 0){
@@ -63,7 +64,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 新增aiSIP外呼网关
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return 结果
      */
@@ -75,7 +76,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 修改aiSIP外呼网关
-     * 
+     *
      * @param aiSipCallGateway aiSIP外呼网关
      * @return 结果
      */
@@ -88,7 +89,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 批量删除aiSIP外呼网关
-     * 
+     *
      * @param ids 需要删除的aiSIP外呼网关主键
      * @return 结果
      */
@@ -100,7 +101,7 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
 
     /**
      * 删除aiSIP外呼网关信息
-     * 
+     *
      * @param id aiSIP外呼网关主键
      * @return 结果
      */
@@ -109,4 +110,19 @@ public class AiSipCallGatewayServiceImpl extends ServiceImpl<AiSipCallGatewayMap
     {
         return baseMapper.deleteAiSipCallGatewayById(id);
     }
+
+    @Override
+    public TableDataInfo remoteList(AiSipCallGateway aiSipCallGateway) {
+        //先使用远程网关
+        String result = RemoteCommon.sendPost(RemoteCommon.REMOTE_ADDERSS_PREFIX + RemoteCommon.GATEWAY_LIST_API, JSONObject.toJSONString(aiSipCallGateway));
+        if(StringUtils.isNotBlank(result)){
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            if(jsonObject.getInteger("code") == 0){
+                return JSONObject.parseObject(result, TableDataInfo.class);
+            }else{
+                log.error("获取网关接口失败:{}", jsonObject.getString("msg"));
+            }
+        }
+        return null;
+    }
 }

+ 71 - 21
fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallOutboundCdrServiceImpl.java

@@ -1,6 +1,9 @@
 package com.fs.aiSipCall.service.impl;
 
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -16,18 +19,27 @@ import com.fs.aiSipCall.vo.ApiCallRecordQueryVo;
 import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.company.domain.CompanyAiWorkflowExec;
+import com.fs.company.domain.CompanyVoiceRoboticBusiness;
 import com.fs.company.domain.CompanyVoiceRoboticCallLogCallphone;
 import com.fs.company.mapper.CompanyAiWorkflowExecMapper;
+import com.fs.company.mapper.CompanyVoiceRoboticBusinessMapper;
 import com.fs.company.mapper.CompanyVoiceRoboticCallLogCallphoneMapper;
 import com.fs.company.mapper.EasyCallMapper;
 import com.fs.company.param.ExecutionContext;
+import com.fs.company.service.CompanyWorkflowEngine;
+import com.fs.company.service.impl.call.node.AiCallTaskNode;
+import com.fs.company.vo.CidConfigVO;
 import com.fs.company.vo.easycall.EasyCallCallPhoneVO;
+import com.fs.company.vo.easycall.EasyCallOutBoundVO;
+import com.fs.system.service.ISysConfigService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.net.URLEncoder;
 import java.time.LocalDateTime;
 import java.util.*;
@@ -35,6 +47,8 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.stream.Collectors;
 
+import static com.fs.company.service.impl.call.node.AiCallTaskNode.EASYCALL_WORKFLOW_REDIS_KEY;
+
 /**
  * aiSIP手动外呼通话记录Service业务层处理
  * 
@@ -58,6 +72,17 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
 
     @Autowired
     private ObjectMapper objectMapper;
+    @Autowired
+    private CompanyVoiceRoboticBusinessMapper companyVoiceRoboticBusinessMapper;
+
+    @Autowired
+    private CompanyWorkflowEngine companyWorkflowEngine;
+    @Autowired
+    private ISysConfigService configService;
+
+    private static final BigDecimal DEFAULT_CALL_CHARGE = new BigDecimal("0.12");
+    private static final BigDecimal ONE_MINUTES_SECOND = new BigDecimal("60");
+
 
 
     @Override
@@ -187,7 +212,7 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
     @Async
     public CompletableFuture<String> scheduledGetCallRecord() {
         if (!isRunning.compareAndSet(false, true)) {
-            log.warn("scheduledGetCallRecord 任务正在执行中,请稍后再试");
+            log.error("scheduledGetCallRecord 任务正在执行中,请稍后再试");
             return CompletableFuture.completedFuture("任务正在执行中,请稍后再试");
         }
 
@@ -276,19 +301,18 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
                 params.setPageNum(currentPage);
                 List<AiSipCallOutboundCdr> pageData = fetchSinglePageRecords(params);
 
-                // 失败时跳过该页,继续下一页
+                // 失败时直接结束
                 if (pageData == null) {
-                    log.warn("分页查询第{}页失败,已丢弃该页数据", currentPage);
-                    currentPage++;
-                    continue;
+                    log.error("sip手动外呼同步电话 分页查询第{}页失败,已丢弃该页数据,停止查询", currentPage);
+                    break;
                 }
 
                 if (pageData.isEmpty()) {
-                    log.info("第{}页无数据,查询结束", currentPage);
+                    log.error("sip手动外呼同步电话 第{}页无数据,查询结束", currentPage);
                     hasMore = false;
                 } else {
                     allRecords.addAll(pageData);
-                    log.debug("第{}页数据:{},累计总数:{}", currentPage, pageData.size(), allRecords.size());
+                    log.error("sip手动外呼同步电话 第{}页数据:{},累计总数:{}", currentPage, pageData.size(), allRecords.size());
 
                     // 如果返回数据少于页大小,说明已是最后一页
                     if (pageData.size() < params.getPageSize()) {
@@ -299,13 +323,13 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
 
                 // 安全限制:最多拉取 50 页
                 if (currentPage > 50) {
-                    log.warn("已达到最大页数限制 50 页,停止查询。已获取数据量:{}", allRecords.size());
+                    log.error("sip手动外呼同步电话 已达到最大页数限制 50 页,停止查询。已获取数据量:{}", allRecords.size());
                     hasMore = false;
                 }
             }
         }
 
-        log.info("远程数据获取完成,总计:{} 条", allRecords.size());
+        log.error("sip手动外呼同步电话 远程数据获取完成,总计:{} 条", allRecords.size());
         return allRecords.isEmpty() ? Collections.emptyList() : allRecords;
     }
 
@@ -472,9 +496,12 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
 
         String callType = StringUtils.isBlank(req.getCallType()) ? "03" : req.getCallType();
 
-        EasyCallCallPhoneVO callPhoneRes = easyCallMapper.getCallPhoneInfoByUuid(req.getUuid());
+//        EasyCallCallPhoneVO callPhoneRes = easyCallMapper.getCallPhoneInfoByUuid(req.getUuid());
+        EasyCallOutBoundVO callPhoneRes = easyCallMapper.getOutBoundInfoByUuid(req.getUuid());
         String callBackUuid = UUID.randomUUID().toString();
         CompanyAiWorkflowExec record = currentExecutionMapper.selectByWorkflowInstanceId(req.getWorkflowInstanceId());
+        CompanyVoiceRoboticBusiness business = companyVoiceRoboticBusinessMapper.selectOne(new LambdaQueryWrapper<CompanyVoiceRoboticBusiness>()
+                .eq(CompanyVoiceRoboticBusiness::getId, record.getBusinessKey()));
         try {
             Map<String, Object> variablesMap;
             if (record.getVariables() == null || record.getVariables().isEmpty()) {
@@ -493,27 +520,50 @@ public class AiSipCallOutboundCdrServiceImpl extends ServiceImpl<AiSipCallOutbou
         CompanyVoiceRoboticCallLogCallphone companyVoiceRoboticCallLogCallphone = new CompanyVoiceRoboticCallLogCallphone();
         companyVoiceRoboticCallLogCallphone.setCallbackUuid(callBackUuid);
         companyVoiceRoboticCallLogCallphone.setRoboticId(req.getRoboticId());
-        companyVoiceRoboticCallLogCallphone.setCallerId(null);
-        companyVoiceRoboticCallLogCallphone.setRunTime(null);
+        if (ObjectUtil.isNotEmpty(business)) {
+            companyVoiceRoboticCallLogCallphone.setCallerId(business.getCalleeId());
+        }
+        companyVoiceRoboticCallLogCallphone.setRunTime(new Date(callPhoneRes.getStartTime()));
         companyVoiceRoboticCallLogCallphone.setRunParam(null);
         companyVoiceRoboticCallLogCallphone.setResult(null);
         companyVoiceRoboticCallLogCallphone.setStatus(req.getStatus());
-        companyVoiceRoboticCallLogCallphone.setRecordPath(callPhoneRes.getRecordServerUrl());
-        companyVoiceRoboticCallLogCallphone.setContentList(callPhoneRes.getDialogue());
-        companyVoiceRoboticCallLogCallphone.setCallerNum(callPhoneRes.getTelephone());
-        companyVoiceRoboticCallLogCallphone.setCalleeNum(callPhoneRes.getCallerNumber());
+        companyVoiceRoboticCallLogCallphone.setRecordPath(callPhoneRes.getRecordFilename());
+        companyVoiceRoboticCallLogCallphone.setContentList(callPhoneRes.getChatContent());
+        companyVoiceRoboticCallLogCallphone.setCallerNum(callPhoneRes.getCallee());
+        companyVoiceRoboticCallLogCallphone.setCalleeNum(callPhoneRes.getCaller());
         companyVoiceRoboticCallLogCallphone.setUuid(req.getUuid());
-        companyVoiceRoboticCallLogCallphone.setCallCreateTime(callPhoneRes.getCalloutTime());
-        companyVoiceRoboticCallLogCallphone.setCallAnswerTime(callPhoneRes.getConnectedTime());
-        companyVoiceRoboticCallLogCallphone.setIntention(callPhoneRes.getIntent());
+        companyVoiceRoboticCallLogCallphone.setCallCreateTime(callPhoneRes.getStartTime());
+        companyVoiceRoboticCallLogCallphone.setCallAnswerTime(callPhoneRes.getAnsweredTime());
+        companyVoiceRoboticCallLogCallphone.setIntention(req.getIntent());
         companyVoiceRoboticCallLogCallphone.setCompanyId(req.getCompanyId());
         companyVoiceRoboticCallLogCallphone.setCompanyUserId(req.getCompanyUserId());
         companyVoiceRoboticCallLogCallphone.setCallTime(Long.valueOf(callPhoneRes.getTimeLen()));
-        companyVoiceRoboticCallLogCallphone.setCost(callPhoneRes.getTotalCost());
         companyVoiceRoboticCallLogCallphone.setCallType(Integer.valueOf(callType));
 
+        String json = configService.selectConfigByKey("cid.config");
+        CidConfigVO cidConfigVO = JSONUtil.toBean(json, CidConfigVO.class);
+        BigDecimal callCharge = cidConfigVO.getCallCharge();
+        //
+        if (null == callCharge) {
+            callCharge = DEFAULT_CALL_CHARGE;
+        }
+        //向上取整分钟数
+        BigDecimal divide = new BigDecimal(companyVoiceRoboticCallLogCallphone.getCallTime()).divide(ONE_MINUTES_SECOND, 0, RoundingMode.CEILING);
+        BigDecimal multiply = divide.multiply(callCharge);
+        companyVoiceRoboticCallLogCallphone.setCost(multiply);
+
+
+        int i = companyVoiceRoboticCallLogCallphoneMapper.insertCompanyVoiceRoboticCallLogCallphone(companyVoiceRoboticCallLogCallphone);
+
+        Map<String, Object> param = new HashMap<>();
+        param.put("callBackUuid", callBackUuid);
+        param.put("callSource", "callBack");
+        companyWorkflowEngine.resumeFromBlockingNode(req.getWorkflowInstanceId(),record.getCurrentNodeKey(),param);
+
+        redisCache.deleteObject(EASYCALL_WORKFLOW_REDIS_KEY +  callBackUuid);
+
 
-        return companyVoiceRoboticCallLogCallphoneMapper.insertCompanyVoiceRoboticCallLogCallphone(companyVoiceRoboticCallLogCallphone);
+        return i;
     }
 
 

+ 13 - 14
fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallPhoneServiceImpl.java

@@ -232,41 +232,40 @@ public class AiSipCallPhoneServiceImpl extends ServiceImpl<AiSipCallPhoneMapper,
         for (ApiCallRecordQueryParams params : paramsList) {
             int currentPage = 1;
             boolean hasMore = true;
-                
+
             while (hasMore) {
                 params.setPageNum(currentPage);
                 List<AiSipCallPhone> pageData = fetchSinglePageRecords(params);
-                    
-                // 失败时跳过该页,继续下一页
+
+                // 失败时直接结束
                 if (pageData == null) {
-                    log.warn("分页查询第{}页失败,已丢弃该页数据", currentPage);
-                    currentPage++;
-                    continue;
+                    log.error("sip自动外呼同步电话 分页查询第{}页失败,已丢弃该页数据,停止查询", currentPage);
+                    break;
                 }
-                    
+
                 if (pageData.isEmpty()) {
-                    log.info("第{}页无数据,查询结束", currentPage);
+                    log.error("sip自动外呼同步电话 第{}页无数据,查询结束", currentPage);
                     hasMore = false;
                 } else {
                     allRecords.addAll(pageData);
-                    log.debug("第{}页数据:{},累计总数:{}", currentPage, pageData.size(), allRecords.size());
-                        
+                    log.error("sip自动外呼同步电话 第{}页数据:{},累计总数:{}", currentPage, pageData.size(), allRecords.size());
+
                     // 如果返回数据少于页大小,说明已是最后一页
                     if (pageData.size() < params.getPageSize()) {
                         hasMore = false;
                     }
                     currentPage++;
                 }
-                    
+
                 // 安全限制:最多拉取 50 页
                 if (currentPage > 50) {
-                    log.warn("已达到最大页数限制 50 页,停止查询。已获取数据量:{}", allRecords.size());
+                    log.error("sip自动外呼同步电话 已达到最大页数限制 50 页,停止查询。已获取数据量:{}", allRecords.size());
                     hasMore = false;
                 }
             }
         }
-            
-        log.info("远程数据获取完成,总计:{} 条", allRecords.size());
+
+        log.error("sip自动外呼同步电话 远程数据获取完成,总计:{} 条", allRecords.size());
         return allRecords.isEmpty() ? Collections.emptyList() : allRecords;
     }
     

+ 9 - 9
fs-service/src/main/java/com/fs/aiSipCall/service/impl/AiSipCallUserServiceImpl.java

@@ -1,23 +1,23 @@
 package com.fs.aiSipCall.service.impl;
+import java.util.List;
+import java.util.Map;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fs.aiSipCall.RemoteCommon;
-import com.fs.aiSipCall.domain.AiSipCallUser;
-import com.fs.aiSipCall.mapper.AiSipCallUserMapper;
-import com.fs.aiSipCall.service.IAiSipCallUserService;
 import com.fs.common.core.domain.AjaxResult;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fs.company.mapper.CompanyUserMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
-import java.util.List;
+import com.fs.aiSipCall.mapper.AiSipCallUserMapper;
+import com.fs.aiSipCall.domain.AiSipCallUser;
+import com.fs.aiSipCall.service.IAiSipCallUserService;
 
 /**
  * sip用户信息Service业务层处理
- * 
+ *
  * @author fs
  * @date 2026-03-13
  */
@@ -166,9 +166,9 @@ public class AiSipCallUserServiceImpl extends ServiceImpl<AiSipCallUserMapper, A
     }
 
     @Override
-    public AjaxResult getToolbarBasicParam(String extNum) {
+    public AjaxResult getToolbarBasicParam(Map<String,String> param) {
         //先使用远程网关
-        String result = RemoteCommon.sendGet(RemoteCommon.REMOTE_ADDERSS_PREFIX + RemoteCommon.PHONEBAR_PARAMS_API + "?extNum=" + extNum);
+        String result = RemoteCommon.sendPost(RemoteCommon.REMOTE_ADDERSS_PREFIX + RemoteCommon.PHONEBAR_PARAMS_API,JSONObject.toJSONString(param));
         if(StringUtils.isNotBlank(result)){
             JSONObject jsonObject = JSONObject.parseObject(result);
             if(jsonObject.getInteger("code") == 0){

+ 1 - 1
fs-service/src/main/java/com/fs/company/mapper/CompanyWxClientMapper.java

@@ -84,5 +84,5 @@ public interface CompanyWxClientMapper extends BaseMapper<CompanyWxClient> {
 
     List<CompanyWxClient> getQwAddWxList(@Param("accountIdList") List<Long> accountIdList, @Param("isWeCom") Integer isWeCom);
 
-    List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(@Param("accountIdList") List<Long> accountIdList, @Param("execStatus") Integer execStatus, @Param("execNodeType") Integer execNodeType);
+    List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(@Param("accountIdList") List<Long> accountIdList, @Param("execStatus") Integer execStatus, @Param("execNodeType") Integer execNodeType, @Param("cidGroupNo") Integer cidGroupNo);
 }

+ 4 - 0
fs-service/src/main/java/com/fs/company/mapper/EasyCallMapper.java

@@ -3,6 +3,7 @@ package com.fs.company.mapper;
 import com.fs.common.annotation.DataSource;
 import com.fs.common.enums.DataSourceType;
 import com.fs.company.vo.easycall.EasyCallCallPhoneVO;
+import com.fs.company.vo.easycall.EasyCallOutBoundVO;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -18,4 +19,7 @@ public interface EasyCallMapper {
     @DataSource(DataSourceType.EASYCALL)
     EasyCallCallPhoneVO getCallPhoneInfoByUuid(@Param("uuid") String uuid);
 
+    @DataSource(DataSourceType.EASYCALL)
+    EasyCallOutBoundVO getOutBoundInfoByUuid(@Param("uuid") String uuid);
+
 }

+ 1 - 1
fs-service/src/main/java/com/fs/company/service/ICompanyWxClientService.java

@@ -75,5 +75,5 @@ public interface ICompanyWxClientService extends IService<CompanyWxClient> {
 
     List<CompanyWxClient> getQwAddWxList(List<Long> accountIdList,Integer isWeCom);
 
-    List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(List<Long> accountIdList);
+    List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(List<Long> accountIdList,Integer cidGroupNo);
 }

+ 2 - 1
fs-service/src/main/java/com/fs/company/service/impl/CompanyWorkflowEngineImpl.java

@@ -439,7 +439,8 @@ public class CompanyWorkflowEngineImpl implements CompanyWorkflowEngine {
 
             // 检查当前工作流是否处于暂停状态
             if (!Integer.valueOf(ExecutionStatusEnum.PAUSED.getValue()).equals(currentExec.getStatus()) &&
-                !Integer.valueOf(ExecutionStatusEnum.WAITING.getValue()).equals(currentExec.getStatus())) {
+                !Integer.valueOf(ExecutionStatusEnum.WAITING.getValue()).equals(currentExec.getStatus()) &&
+                !Integer.valueOf(ExecutionStatusEnum.WAITING_DO_CALL.getValue()).equals(currentExec.getStatus())) {
                 throw new CustomException("工作流未处于暂停状态,无法唤醒: " + workflowInstanceId);
             }
 

+ 2 - 2
fs-service/src/main/java/com/fs/company/service/impl/CompanyWxClientServiceImpl.java

@@ -253,7 +253,7 @@ public class CompanyWxClientServiceImpl extends ServiceImpl<CompanyWxClientMappe
      * @return
      */
     @Override
-    public  List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(List<Long> accountIdList){
-        return baseMapper.getQwAddWxList4Workflow(accountIdList, ExecutionStatusEnum.WAITING.getValue(), NodeTypeEnum.AI_QW_ADD_WX_TASK.getValue());
+    public  List<CompanyWxClient4WorkFlowVO> getQwAddWxList4Workflow(List<Long> accountIdList,Integer cidGroupNo){
+        return baseMapper.getQwAddWxList4Workflow(accountIdList, ExecutionStatusEnum.WAITING.getValue(), NodeTypeEnum.AI_QW_ADD_WX_TASK.getValue(),cidGroupNo);
     }
 }

+ 2 - 1
fs-service/src/main/java/com/fs/company/service/impl/call/node/AbstractWorkflowNode.java

@@ -150,7 +150,8 @@ public abstract class AbstractWorkflowNode implements IWorkflowNode {
             context.setVariable("currentNode", node);
             // 允许 PAUSED 或 WAITING 状态继续执行
             if (!Integer.valueOf(ExecutionStatusEnum.PAUSED.getValue()).equals(companyAiWorkflowExec.getStatus())
-                    && !Integer.valueOf(ExecutionStatusEnum.WAITING.getValue()).equals(companyAiWorkflowExec.getStatus())) {
+                    && !Integer.valueOf(ExecutionStatusEnum.WAITING.getValue()).equals(companyAiWorkflowExec.getStatus())
+                    && !Integer.valueOf(ExecutionStatusEnum.WAITING_DO_CALL.getValue()).equals(companyAiWorkflowExec.getStatus())) {
                 log.error("工作流状态不符合 - workflowInstanceId: {}, 当前状态: {}, 期望状态: PAUSED({}) 或 WAITING({})",
                         context.getWorkflowInstanceId(), companyAiWorkflowExec.getStatus(),
                         ExecutionStatusEnum.PAUSED.getValue(), ExecutionStatusEnum.WAITING.getValue());

+ 1 - 0
fs-service/src/main/java/com/fs/company/vo/CompanyWxClient4WorkFlowVO.java

@@ -96,4 +96,5 @@ public class CompanyWxClient4WorkFlowVO extends BaseEntityTow {
     * 投流 id
     */
     private String traceId;
+    private String nodeKey;
 }

+ 52 - 0
fs-service/src/main/java/com/fs/company/vo/easycall/EasyCallOutBoundVO.java

@@ -0,0 +1,52 @@
+package com.fs.company.vo.easycall;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@Data
+@ApiModel("外呼CDR记录")
+public class EasyCallOutBoundVO {
+
+    @ApiModelProperty("主键ID")
+    private String id;
+
+    @ApiModelProperty("主叫号码")
+    private String caller;
+
+    @ApiModelProperty("工号")
+    private String opnum;
+
+    @ApiModelProperty("被叫号码")
+    private String callee;
+
+    @ApiModelProperty("开始时间(时间戳)")
+    private Long startTime;
+
+    @ApiModelProperty("接通时间(时间戳)")
+    private Long answeredTime;
+
+    @ApiModelProperty("挂断时间(时间戳)")
+    private Long endTime;
+
+    @ApiModelProperty("通话UUID")
+    private String uuid;
+
+    @ApiModelProperty("通话类型(audio/video)")
+    private String callType;
+
+    @ApiModelProperty("通话时长(秒)")
+    private Integer timeLen;
+
+    @ApiModelProperty("有效通话时长(秒,接通后)")
+    private Integer timeLenValid;
+
+    @ApiModelProperty("录音文件名")
+    private String recordFilename;
+
+    @ApiModelProperty("对话内容")
+    private String chatContent;
+
+    @ApiModelProperty("挂断原因")
+    private String hangupCause;
+}

+ 4 - 0
fs-service/src/main/java/com/fs/crm/domain/CrmCustomerAnalyze.java

@@ -67,4 +67,8 @@ public class CrmCustomerAnalyze extends BaseEntity{
     private String reserveStr;
     /** 客户集合 */
     private Long[] customerIds;
+
+    private Integer pageNum;
+
+    private Integer pageSize;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/crm/domain/CrmCustomerChatMessage.java

@@ -39,7 +39,7 @@ public class CrmCustomerChatMessage extends BaseEntity {
     private String modelName;
 
     /** 耗时 (毫秒) */
-    private Integer costTime;
+    private Long costTime;
 
     /** 状态 (1-成功 0-失败) */
     private Integer status;

+ 1 - 1
fs-service/src/main/java/com/fs/crm/mapper/CrmCustomerChatMessageMapper.java

@@ -81,6 +81,6 @@ public interface CrmCustomerChatMessageMapper {
      * 根据会话 ID 查询消息分页列表
      * @param sessionId sessionId
      */
-    @Select("SELECT * FROM crm_customer_chat_message WHERE session_id = #{sessionId} ORDER BY create_time DESC LIMIT 50")
+    @Select("SELECT * FROM crm_customer_chat_message WHERE session_id = #{sessionId} ORDER BY create_time DESC LIMIT 200")
     List<CrmCustomerChatMessage> selectChatMessageBySessionIdLimit(@Param("sessionId") Long sessionId);
 }

+ 2 - 1
fs-service/src/main/java/com/fs/crm/service/ICrmCustomerAnalyzeService.java

@@ -3,6 +3,7 @@ package com.fs.crm.service;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.crm.domain.CrmCustomerAnalyze;
+import com.fs.crm.domain.CrmCustomerChatMessage;
 import com.fs.crm.param.PolishingScriptParam;
 
 /**
@@ -70,7 +71,7 @@ public interface ICrmCustomerAnalyzeService extends IService<CrmCustomerAnalyze>
 
     String aiCustomerFocus(Long customerId, String dataJson, Long logId);
 
-    String polishingScript(PolishingScriptParam param);
+    CrmCustomerChatMessage polishingScript(PolishingScriptParam param);
 
     String aiIntentionDegree(Long customerId, String dataJson, Long logId);
 

+ 31 - 9
fs-service/src/main/java/com/fs/crm/service/impl/CrmCustomerAnalyzeServiceImpl.java

@@ -15,6 +15,7 @@ import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.entity.SysDictData;
 import com.fs.common.utils.DateUtils;
 import com.fs.crm.domain.CrmCustomerAnalyze;
+import com.fs.crm.domain.CrmCustomerChatMessage;
 import com.fs.crm.mapper.CrmCustomerAnalyzeMapper;
 import com.fs.crm.param.PolishingScriptParam;
 import com.fs.crm.service.ICrmCustomerAnalyzeService;
@@ -365,9 +366,9 @@ public class CrmCustomerAnalyzeServiceImpl extends ServiceImpl<CrmCustomerAnalyz
     }
 
     @Override
-    public String polishingScript(PolishingScriptParam param) {
+    public CrmCustomerChatMessage polishingScript(PolishingScriptParam param) {
         Map<String, Object> requestParam = new HashMap<>();
-        requestParam.put("history", param.getContent());
+        requestParam.put("userContent", param.getContent());
         requestParam.put("modelType","话术润色");
         HashMap<String, Map<String, String>> userInfo = MapUtil.of("userInfo", param.getPortrait());
         requestParam.putAll(userInfo);
@@ -375,16 +376,32 @@ public class CrmCustomerAnalyzeServiceImpl extends ServiceImpl<CrmCustomerAnalyz
         // 设置其他参数
         requestParam.put("tagInfos", Collections.emptyList());
         requestParam.put("isRepository", "");
-        requestParam.put("userContent", "");
+        requestParam.put("history", "");
         requestParam.put("aiContent", "");
         requestParam.put("likeRatio", "");
+        long startTime = System.currentTimeMillis();
         R aiResponse = CrmCustomerAiTagUtil.callAiService(requestParam, Long.valueOf(param.getChatId()),OTHER_KEY);
         System.out.println(aiResponse);
         String result = "";
+        CrmCustomerChatMessage crmCustomerChatMessage = new CrmCustomerChatMessage();
+        crmCustomerChatMessage.setContentType(1);
+//        Double runningTime;
+//        Long tokens;
         try {
 
             JsonNode rootS = mapper.readTree(JSONUtil.toJsonStr(aiResponse));
             JsonNode choices = rootS.path("data").path("choices");
+//            JsonNode responseData = rootS.path("data").path("responseData");
+//            if (responseData.isArray()) {
+//                for (JsonNode node : responseData) {
+//                    String nodeId = node.path("nodeId").asText();
+//                    String moduleName = node.path("moduleName").asText();
+//                    // 获取 runningTime
+//                    runningTime = node.path("runningTime").asDouble();
+//                    // 获取 tokens
+//                    tokens = node.path("tokens").asLong();
+//                }
+//            }
 
             if (choices.isArray() && choices.size() > 0) {
                 JsonNode contentNode = choices.get(0).path("message").path("content");
@@ -403,20 +420,25 @@ public class CrmCustomerAnalyzeServiceImpl extends ServiceImpl<CrmCustomerAnalyz
 
                             if (contentInnerNode.isTextual()) {
                                 String innerJsonStr = contentInnerNode.asText();
-//                                JsonNode innerJson = mapper.readTree(innerJsonStr);
-//                                JsonNode userInfo1 = innerJson.path("aiContent");
-//                               = userInfo1.asText();
-                                result = innerJsonStr;
+                                JsonNode innerJson = mapper.readTree(innerJsonStr);
+                                JsonNode userInfo1 = innerJson.path("aiContent");
+                                result = userInfo1.asText();
                             }
                         }
                     }
                 }
             }
-
+            crmCustomerChatMessage.setContent(result);
+            crmCustomerChatMessage.setStatus(1);
         } catch (Exception e) {
             e.printStackTrace();
+            crmCustomerChatMessage.setContent("AI请求失败:" + e.getMessage());
+            crmCustomerChatMessage.setStatus(0);
         }
-        return result;
+        //耗时时间为请求接口时间+解析数据时间
+        crmCustomerChatMessage.setCostTime(System.currentTimeMillis() - startTime);
+        crmCustomerChatMessage.setModelName("话术润色");
+        return crmCustomerChatMessage;
     }
 
     @Override

+ 5 - 18
fs-service/src/main/java/com/fs/crm/service/impl/CrmCustomerChatSessionServiceImpl.java

@@ -4,7 +4,6 @@ import com.fs.common.utils.DateUtils;
 import com.fs.crm.domain.CrmCustomerChatSession;
 import com.fs.crm.mapper.CrmCustomerChatSessionMapper;
 import com.fs.crm.service.ICrmCustomerChatSessionService;
-import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -17,7 +16,6 @@ import java.util.List;
  * @author ylrz
  * @date 2026-03-30
  */
-@Slf4j
 @Service
 public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessionService {
 
@@ -64,9 +62,7 @@ public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessio
         if (chatSession.getIsPinned() == null) {
             chatSession.setIsPinned(0);
         }
-        int result = chatSessionMapper.insertChatSession(chatSession);
-        log.info("新增会话成功,sessionId: {}", chatSession.getSessionId());
-        return result;
+        return chatSessionMapper.insertChatSession(chatSession);
     }
 
     /**
@@ -78,9 +74,7 @@ public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessio
     @Override
     public int updateChatSession(CrmCustomerChatSession chatSession) {
         chatSession.setUpdateTime(DateUtils.getNowDate());
-        int result = chatSessionMapper.updateChatSession(chatSession);
-        log.info("更新会话成功,sessionId: {}", chatSession.getSessionId());
-        return result;
+        return chatSessionMapper.updateChatSession(chatSession);
     }
 
     /**
@@ -94,11 +88,8 @@ public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessio
     @Transactional(rollbackFor = Exception.class)
     public int updateChatSessionTitle(Long sessionId, String title) {
         try {
-            int result = chatSessionMapper.updateChatSessionTitle(sessionId, title);
-            log.info("更新会话标题成功,sessionId: {}, title: {}", sessionId, title);
-            return result;
+            return chatSessionMapper.updateChatSessionTitle(sessionId, title);
         } catch (Exception e) {
-            log.error("更新会话标题失败", e);
             throw new RuntimeException("更新会话标题失败:" + e.getMessage());
         }
     }
@@ -138,9 +129,7 @@ public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessio
         if (sessionIds == null || sessionIds.length == 0) {
             return 0;
         }
-        int result = chatSessionMapper.deleteChatSessionByIds(sessionIds);
-        log.info("批量删除会话成功,删除数量:{}", sessionIds.length);
-        return result;
+        return chatSessionMapper.deleteChatSessionByIds(sessionIds);
     }
 
     /**
@@ -151,9 +140,7 @@ public class CrmCustomerChatSessionServiceImpl implements ICrmCustomerChatSessio
      */
     @Override
     public int deleteChatSessionById(Long sessionId) {
-        int result = chatSessionMapper.deleteChatSessionById(sessionId);
-        log.info("删除会话成功,sessionId: {}", sessionId);
-        return result;
+        return chatSessionMapper.deleteChatSessionById(sessionId);
     }
 
     @Override

+ 1 - 1
fs-service/src/main/resources/application-druid-hsyy.yml

@@ -163,7 +163,7 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
-    url: https://web.im.ysya.top/api
+    url: https://webim.hshsyy.com/api
 #是否使用新im
 im:
     type: OPENIM

+ 2 - 2
fs-service/src/main/resources/application-druid-mengniu.yml

@@ -168,10 +168,10 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
-    url: https://
+    url: https://mnIM.ylrzcloud.com
 #是否使用新im
 im:
-    type: NONE
+    type: OPENIM
 #是否为新商户,新商户不走mpOpenId
 isNewWxMerchant: true
 

+ 7 - 3
fs-service/src/main/resources/mapper/aiSipCall/AiSipCallUserMapper.xml

@@ -30,10 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="companyId"    column="company_id"    />
         <result property="companyUserId"    column="company_user_id"    />
+        <result property="gatewayIds"    column="gateway_ids"    />
     </resultMap>
 
     <sql id="selectAiSipCallUserVo">
-        select user_id, dept_id, login_name, user_name, user_type, email, phonenumber, sex, avatar, password, salt, status, del_flag, login_ip, login_date, pwd_update_date, remark, logo, ext_num, create_by, create_time, update_by, update_time, company_id,company_user_id from ai_sip_call_user
+        select user_id, dept_id, login_name, user_name, user_type, email, phonenumber, sex, avatar, password, salt, status, del_flag, login_ip, login_date, pwd_update_date, remark, logo, ext_num, create_by, create_time, update_by, update_time, company_id,company_user_id,gateway_ids from ai_sip_call_user
     </sql>
 
     <select id="selectAiSipCallUserList" parameterType="AiSipCallUser" resultMap="AiSipCallUserResult">
@@ -93,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="companyUserId != null">company_user_id,</if>
             <if test="extNum != null and extNum != ''">ext_num,</if>
             <if test="companyId != null ">company_id,</if>
-         </trim>
+            <if test="gatewayIds != null and gatewayIds != ''">gateway_ids,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
             <if test="deptId != null">#{deptId},</if>
@@ -120,7 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="companyUserId != null">#{companyUserId},</if>
             <if test="extNum != null and extNum != ''">#{extNum},</if>
             <if test="companyId != null">#{companyId},</if>
-         </trim>
+            <if test="gatewayIds != null and gatewayIds != ''">#{gatewayIds},</if>
+        </trim>
     </insert>
 
     <update id="updateAiSipCallUser" parameterType="AiSipCallUser">
@@ -150,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
             <if test="extNum != null and extNum != ''">ext_num = #{extNum},</if>
             <if test="companyId != null">company_id = #{companyId},</if>
+            <if test="gatewayIds != null and gatewayIds != ''">gateway_ids = #{gatewayIds},</if>
         </trim>
         where user_id = #{userId}
     </update>

+ 3 - 3
fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticCallBlacklistMapper.xml

@@ -193,9 +193,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where deleted = 0
         and status = 1
         and company_id is null
-        <if test="targetType != null and targetType != ''">
-        and target_type = #{targetType}
-        </if>
+<!--        <if test="targetType != null and targetType != ''">-->
+<!--        and target_type = #{targetType}-->
+<!--        </if>-->
         <if test="businessType != null and businessType != ''">
             and business_type = #{businessType}
         </if>

+ 2 - 0
fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticMapper.xml

@@ -26,6 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="companyAiWorkflowId"    column="company_ai_workflow_id"    />
         <result property="delFlag"    column="del_flag"    />
+        <result property="isWeCom"    column="is_we_com"    />
+
     </resultMap>
 
     <sql id="selectCompanyVoiceRoboticVo">

+ 6 - 2
fs-service/src/main/resources/mapper/company/CompanyWxClientMapper.xml

@@ -98,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="traceId != null">trace_id,</if>
             <if test="roboticId != null">robotic_id,</if>
             <if test="customerId != null">customer_id,</if>
+            <if test="isWeCom != null">is_we_com,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="roboticWxId != null">#{roboticWxId},</if>
@@ -112,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="traceId != null">#{traceId},</if>
             <if test="roboticId != null">#{roboticId},</if>
             <if test="customerId != null">#{customerId},</if>
+            <if test="isWeCom != null">#{isWeCom},</if>
          </trim>
     </insert>
 
@@ -128,6 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark = #{remark},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="dialogId != null">dialog_id = #{dialogId},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
         </trim>
         where id = #{id}
     </update>
@@ -197,12 +201,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <select id="getQwAddWxList4Workflow" resultType="com.fs.company.vo.CompanyWxClient4WorkFlowVO">
 
-        SELECT t1.*,t3.workflow_instance_id,t3.current_node_key,t3.current_node_name,t3.current_node_type,t4.node_config,t2.callee_id FROM company_wx_client t1
+        SELECT t1.*,t3.workflow_instance_id,t3.current_node_key,t3.current_node_name,t3.current_node_type,t4.node_config,t2.callee_id,t4.node_key FROM company_wx_client t1
         inner join company_voice_robotic_business t2 on t1.id = t2.wx_client_id and t1.robotic_id = t2.robotic_id
         inner join company_ai_workflow_exec t3 on t3.business_key = t2.id
         inner join company_ai_workflow_node t4 on t3.current_node_key=t4.node_key
         where t1.is_add = 0 and t1.account_id is not null and t1.is_we_com = 2
-        and t3.current_node_type = #{execNodeType} And t3.status = #{execStatus}
+        and t3.current_node_type = #{execNodeType} And t3.status = #{execStatus} and t3.cid_group_no = #{cidGroupNo}
         <if test="accountIdList != null and !accountIdList.isEmpty()">
             and t1.account_id in <foreach collection="accountIdList" open="(" separator="," close=")" item="item">#{item}</foreach>
         </if>

+ 4 - 0
fs-service/src/main/resources/mapper/company/EasyCallMapper.xml

@@ -7,5 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="getCallPhoneInfoByUuid" resultType="com.fs.company.vo.easycall.EasyCallCallPhoneVO">
         select * from cc_call_phone where uuid = #{uuid}
     </select>
+    <select id="getOutBoundInfoByUuid" resultType="com.fs.company.vo.easycall.EasyCallOutBoundVO" parameterType="java.lang.String">
+        select * from cc_outbound_cdr where uuid = #{uuid}
+    </select>
+
 
 </mapper>

+ 17 - 1
fs-wx-task/src/main/java/com/fs/app/service/WxTaskService.java

@@ -893,7 +893,7 @@ public class WxTaskService {
         log.info("==========执行申请企微加好友任务开始==========");
         try {
             // 获取需要添加微信的列表
-            List<CompanyWxClient4WorkFlowVO> list = companyWxClientService.getQwAddWxList4Workflow(accountIdList);
+            List<CompanyWxClient4WorkFlowVO> list = companyWxClientService.getQwAddWxList4Workflow(accountIdList,cidGroupNo);
             log.info("申请企微加好友任务需要添加微信的数量:{}", list.size());
             if (list.isEmpty()) {
                 return;
@@ -1054,6 +1054,13 @@ public class WxTaskService {
             log.info("ROBOTIC-ID:{},企微申请加好友任务申请成功", client.getRoboticId());
 
             asyncSaveCompanyVoiceRoboticCallLog(addLog);
+
+            //更新工作流的执行日志
+            CompanyAiWorkflowExecLog queryP = new CompanyAiWorkflowExecLog();
+            queryP.setWorkflowInstanceId(client.getWorkflowInstanceId());
+            queryP.setNodeKey(client.getNodeKey());
+            queryP.setStatus(ExecutionStatusEnum.WAITING.getValue());
+            companyAiWorkflowExecLogMapper.updateCompanyAiWorkflowExecLog(queryP);
             return addItem;
         } else {
             // 加微失败
@@ -1071,6 +1078,13 @@ public class WxTaskService {
                     client.getRoboticId(), runParam);
 
             asyncSaveCompanyVoiceRoboticCallLog(addLog);
+            //更新工作流的执行日志
+            CompanyAiWorkflowExecLog queryP = new CompanyAiWorkflowExecLog();
+
+            queryP.setWorkflowInstanceId(client.getWorkflowInstanceId());
+            queryP.setNodeKey(client.getNodeKey());
+            queryP.setStatus(ExecutionStatusEnum.FAILURE.getValue());
+            companyAiWorkflowExecLogMapper.updateCompanyAiWorkflowExecLog(queryP);
             return addItem;
         }
     }
@@ -1315,6 +1329,8 @@ public class WxTaskService {
             List<CompanyWxClient> updateList,
             Map<Long, CompanyWxClient4WorkFlowVO> clientMap) {
 
+        log.info("==========触发后续工作流步骤开始==========");
+
         for (CompanyWxClient client : updateList) {
             CompanyWxClient4WorkFlowVO vo = clientMap.get(client.getAccountId());
             IWorkflowNode node = workflowNodeFactory.createNode(