liusheng
2024-06-06 ef81a5cbfbb98974ed1ba54d0e47b7e74a9b96b9
代码提交
已修改6个文件
35 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java
@@ -108,7 +108,7 @@
     */
    @RabbitListener(queues = "task_queue", concurrency = "50")
    public void phoneVisit(String content, Message message, Channel channel) throws IOException {
        log.error("消息进来了--------------");
        System.out.println("消息进来了----------------");
        IvrTaskcallMQ ivrTaskcallMQ = null;
        try {
            ObjectMapper mapper = new ObjectMapper();
@@ -171,7 +171,7 @@
                            String patid = rsaPublicKeyExample.encryptedData(ivrTaskSingle.getPatid().toString(), pub_key);
                            SendMagParam sendMagParam = new SendMagParam();
                            sendMagParam.setType("4");
                            sendMagParam.setUrl("192.168.2.10:8099/followvisit/particty?param1=" + taskId + "&param2=" + patid);
                            sendMagParam.setUrl(req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid);
                            sendService.sendMsg(sendMagParam);
                        }
                    } else if (descByCode.equals("公众号")) {
ruoyi-admin/src/main/resources/application-druid.yml
@@ -1,8 +1,8 @@
# 数据源配置
spring:
  rabbitmq:
    host: 116.62.18.175
    #    host: 192.168.2.8
    #    host: 116.62.18.175
    host: 192.168.2.8
    password: guest
    port: 5672
    username: guest
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
@@ -265,4 +265,11 @@
    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
    private String questionResult;
    /**
     * 是否存在操作:1 新增 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 新增 2修改 3删除")
    private Integer isoperation;
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
@@ -208,18 +208,18 @@
        if (org.apache.commons.lang3.StringUtils.isEmpty(sendTaskVO.getSendType())) {
            sendTaskVO.setSendType(ivrTask.getSendType().toString());
        }
        Long ss = ivrTask.getStopState() + 1;
        //判断任务是否是立即发送
        if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("2")) {
            IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
            ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
            ivrTaskcallMQ.setSendType(sendTaskVO.getSendType());
            ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
            ivrTaskcallMQ.setStopState(ss);
            ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
            ivrTaskcallMQ.setStopState(ivrTask.getStopState());
            String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
            ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
            //立即发送
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
@@ -227,7 +227,6 @@
            IvrTask ivrTask2 = new IvrTask();
            ivrTask2.setTaskid(ivrTask.getTaskid());
            ivrTask2.setSendState(2);
            ivrTask2.setStopState(ss);
            updateIvrTask(ivrTask2);
        } else if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1")) {
            //时间段发送
@@ -263,6 +262,7 @@
                    ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
                    ivrTaskcallMQ.setSendTimeslot(list);
                    ivrTaskcallMQ.setStopState(ivrTask.getStopState());
                    ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
                    Long finalMilliseconds = milliseconds;
                    String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
@@ -273,7 +273,6 @@
                IvrTask ivrTask2 = new IvrTask();
                ivrTask2.setTaskid(ivrTask.getTaskid());
                ivrTask2.setSendState(2);
                ivrTask2.setStopState(ss);
                updateIvrTask(ivrTask2);
            }
        }
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -58,8 +58,6 @@
    private IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper;
    /**
     * 查询单一任务(随访)
     *
@@ -97,6 +95,7 @@
        ivrTaskVO.setShowTimeMorn(ivrTask.getShowTimeMorn());
        ivrTaskVO.setShowTimeNoon(ivrTask.getShowTimeNoon());
        ivrTaskVO.setShowTimeNight(ivrTask.getShowTimeNight());
        ivrTaskVO.setPreachform(ivrTask.getPreachform());
        String sendTimeSlot = ivrTask.getSendTimeSlot();
        ObjectMapper objectMapper = new ObjectMapper();
        try {
@@ -241,7 +240,9 @@
            //任务修改
            if (ObjectUtils.isNotEmpty(ivrTaskVO.getSendTimeslot()))
                ivrTask.setSendTimeSlot(JSON.toJSONString(ivrTaskVO.getSendTimeslot()));
            //修改操作,需要将stopState状态+1
            IvrTask ivrTask1 = ivrTaskService.selectIvrTaskByTaskid(ivrTask.getTaskid());
            ivrTask.setStopState(ivrTask1.getStopState() + 1);
            ivrTask.setTemplateid(ivrTaskVO.getLibtemplateid());
            ivrTaskService.updateIvrTask(ivrTask);
@@ -274,7 +275,6 @@
        return integer;
    }
    @Override
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
@@ -94,13 +94,15 @@
        //对模板话术和选项进行处理(话术表与指标表进行合并了,)
        if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) {
            log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()是否有数据哈:{}", ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList());
            for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) {
                if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 1) {
                if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 1 || ivrTaskTemplateScriptVO.getIsoperation() == null && ivrTaskTemplateVO.getIsoperation() == 1) {
                    //新增
                    IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class);
                    ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID());
                    ivrTaskTemplateScript.setCreateTime(new Date());
                    ivrTaskTemplateScriptMapper.insertIvrTaskTemplateScript(ivrTaskTemplateScript);
                    ivrTaskTemplateScript.setIsoperation(1);
                    //对选项目进行处理
                    dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID());
@@ -110,6 +112,7 @@
                    ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID());
                    ivrTaskTemplateScript.setUpdateTime(new Date());
                    ivrTaskTemplateScriptMapper.updateIvrTaskTemplateScript(ivrTaskTemplateScript);
                    ivrTaskTemplateScript.setIsoperation(2);
                    //对选项目进行处理
                    dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID());
@@ -232,7 +235,7 @@
        //对模板指标选项进行处理
        if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) {
            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateTargetoptionList) {
                if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 1) {
                if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 1 || ivrTaskTemplateTargetoption.getIsoperation() == null && ivrTaskTemplateScript.getIsoperation() == 1) {
                    //新增
                    ivrTaskTemplateTargetoption.setTemplateID(tmpID);
                    ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScript.getID());