liusheng
2024-05-28 500130efe30180fe635ba4482e097e848d37c7e3
代码提交
已删除7个文件
已重命名1个文件
已修改35个文件
已添加33个文件
7557 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateTargetController.java 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateController.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateScriptController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateTargetoptionController.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask2.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/ServiceFromEnum.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/config/PhoneUtils.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/config/RabbitMqCallPhoneConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/config/RobotPhoneUtils.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java 162 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTarget.java 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java 168 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTask.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java 382 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateVO.java 399 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskVO.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskcallMQ.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/QuestionMessage.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SendTaskVO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/RobotData.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/RobotDataConfig.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/RobotDataCustomVar.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/RobotIdlenumVO.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/back/RobotAIDialogBack.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/back/RobotCallBack.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/robot/back/RobotcdrInfoBack.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrLibaTemplateTargetMapper.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateScriptMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateTargetoptionMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTaskcalldetailMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTaskcallrecordMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrTasksmsMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/AIRobotPhoneCallBackService.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrLibaTemplateTargetService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateService.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateTargetoptionService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/AIRobotPhoneCallBackServiceImpl.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateTargetServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateTargetoptionServiceImpl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetMapper.xml 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml 334 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskcalldetailMapper.xml 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java
@@ -4,15 +4,17 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.Channel;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.ServiceFromEnum;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.web.task.PhoneTask;
import com.smartor.common.SendService;
import com.smartor.config.PhoneUtils;
import com.smartor.config.RabbitMqCallPhoneConfig;
import com.smartor.config.RobotPhoneUtils;
import com.smartor.domain.*;
import com.smartor.mapper.IvrTaskMapper;
import com.smartor.mapper.IvrTaskSingleMapper;
import com.smartor.service.IIvrLibaTemplateService;
import com.smartor.service.IIvrTaskTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
@@ -20,6 +22,7 @@
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@@ -32,8 +35,10 @@
@Component//监听此队列
public class RabbitMqReceiver {
    @Value("${phonePath}")
    private String phonePath;
    private static IIvrLibaTemplateService ivrLibaTemplateService;
    private static IIvrTaskTemplateService ivrTaskTemplateService;
    private static IvrTaskSingleMapper ivrTaskcallMapper;
@@ -45,13 +50,19 @@
    private static RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig;
    private static RobotPhoneUtils robotPhoneUtils;
    // åˆ›å»ºå›ºå®šå¤§å°çš„线程池
    private static final ExecutorService executorService = Executors.newFixedThreadPool(10);
    @Autowired
    public void setIIvrTaskTemplateService(IIvrTaskTemplateService ivrTaskTemplateService) {
        RabbitMqReceiver.ivrTaskTemplateService = ivrTaskTemplateService;
    }
    @Autowired
    public void setIIvrLibaTemplateService(IIvrLibaTemplateService ivrLibaTemplateService) {
        RabbitMqReceiver.ivrLibaTemplateService = ivrLibaTemplateService;
    public void setRobotPhoneUtilsService(RobotPhoneUtils robotPhoneUtils) {
        RabbitMqReceiver.robotPhoneUtils = robotPhoneUtils;
    }
    @Autowired
@@ -80,11 +91,12 @@
    }
    /**
     * ç”µè¯éšè®¿
     * ä»»åŠ¡éšè®¿
     * concurrency = "50"  å¹¶å‘数为50
     */
    @RabbitListener(queues = "phone_queue", concurrency = "50")
    @RabbitListener(queues = "task_queue", concurrency = "50")
    public void phoneVisit(String content, Message message, Channel channel) throws IOException {
        try {
            IvrTaskcallMQ ivrTaskcallMQ = null;
@@ -98,32 +110,53 @@
            } catch (JsonProcessingException e) {
                e.printStackTrace();
            }
            //通过模板ID获取模板问题
            IvrLibaTemplateVO ivrLibaTemplateVO = new IvrLibaTemplateVO();
            ivrLibaTemplateVO.setID(Long.valueOf(ivrTaskcallMQ.getTemplateid()));
            IvrLibaTemplateVO ivrLibaTemplateVO1 = ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO);
            //通过任务ID拿到患者信息
            IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
            ivrTaskcall.setTaskid(ivrTaskcallMQ.getTaskid());
            List<IvrTaskSingle> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall);
            for (IvrTaskSingle ivrTaskcall1 : ivrTaskcalls) {
                IvrTask ivrTask = ivrTaskMapper.selectIvrTaskByTaskid(ivrTaskcall1.getTaskid());
                if (StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(3) || StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(4)) {
                    //如何任务被“暂停”或“终止”
                    break;
                }
//                //通过多线程的方式去打电话
                executorService.submit(new PhoneTask(ivrTaskcall1, ivrLibaTemplateVO1, redisCache, rabbitMqCallPhoneConfig, message, sendService));
            //判断一下ivrTaskcallMQ中的stopstate是否与ivr_task中的一致,不一致,则说明是暂停了
            IvrTask ivrTask1 = ivrTaskMapper.selectIvrTaskByTaskid(ivrTaskcallMQ.getTaskid());
            if (ivrTask1.getStopState() != ivrTaskcallMQ.getStopState()) {
                //将消息从队列中剔除
                channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
                return;
            }
            //通知 MQ æ¶ˆæ¯å·²è¢«æŽ¥æ”¶,可以ACK(从队列中删除)了   ï¼ˆè¿™ä¸ªéœ€è¦æ ¹æ®ä¸šåŠ¡å†åŽ»å¤„ç†ACK)
            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
            if (StringUtils.isNotEmpty(ivrTaskcallMQ.getServicefrom())) {
                //如何任务发送方式不为空
                String[] split = ivrTaskcallMQ.getServicefrom().split(",");
                for (String serviceFrom : split) {
                    String descByCode = ServiceFromEnum.getDescByCode(Integer.valueOf(serviceFrom));
                    //这里可以考虑用策略模式优化一下,不然太难看了
                    if (descByCode.equals("电话")) {
                        //通过模板ID获取模板问题
                        IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
                        ivrTaskTemplateVO.setID(Long.valueOf(ivrTaskcallMQ.getTemplateid()));
                        IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
                        //通过任务ID拿到患者信息
                        IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
                        ivrTaskcall.setTaskid(ivrTaskcallMQ.getTaskid());
                        List<IvrTaskSingle> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall);
                        for (IvrTaskSingle ivrTaskcall1 : ivrTaskcalls) {
                            IvrTask ivrTask = ivrTaskMapper.selectIvrTaskByTaskid(ivrTaskcall1.getTaskid());
                            if (StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(3) || StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(4)) {
                                //如何任务被“暂停”或“终止”
                                break;
                            }
                            //通过多线程的方式去打电话
                            executorService.submit(new PhoneTask(ivrTaskcall1, ivrTaskTemplateVO1, redisCache, rabbitMqCallPhoneConfig, message, sendService, phonePath, robotPhoneUtils));
                        }
                    } else if (descByCode.equals("公众号")) {
                    }
                    //通知 MQ æ¶ˆæ¯å·²è¢«æŽ¥æ”¶,可以ACK(从队列中删除)了   ï¼ˆè¿™ä¸ªéœ€è¦æ ¹æ®ä¸šåŠ¡å†åŽ»å¤„ç†ACK)
                    channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
                }
            }
        } catch (Exception e) {
            log.error("============消费失败,尝试消息补发再次消费!==============");
            log.error(e.getMessage());
            channel.basicReject(message.getMessageProperties().getDeliveryTag(), true);
        }
    }
    /**
@@ -162,6 +195,7 @@
        }
    }
    @Bean
    public SimpleRabbitListenerContainerFactory jsonContainerFactory(ConnectionFactory connectionFactory) {
        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -8,6 +8,7 @@
import com.smartor.domain.*;
import com.smartor.mapper.IvrLibaExtemplatescriptMapper;
import com.smartor.service.IIvrLibaTemplateService;
import com.smartor.service.IIvrTaskTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -31,7 +32,7 @@
    private static RedisCache redisCache;
    private static IIvrLibaTemplateService ivrLibaTemplateService;
    private static IIvrTaskTemplateService ivrTaskTemplateService;
    private static IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper;
@@ -44,8 +45,8 @@
    }
    @Autowired
    public void setTodayReaderService(IIvrLibaTemplateService ivrLibaTemplateService) {
        ChatWebSocketHandler.ivrLibaTemplateService = ivrLibaTemplateService;
    public void setTodayReaderService(IIvrTaskTemplateService ivrTaskTemplateService) {
        ChatWebSocketHandler.ivrTaskTemplateService = ivrTaskTemplateService;
    }
    @Autowired
@@ -115,17 +116,17 @@
        if (session != null && session.isOpen()) {
            if (socketMessage.getTemplateId() != null) {
                //通过模板ID获取模板问题
                IvrLibaTemplateVO ivrLibaTemplateVO = new IvrLibaTemplateVO();
                ivrLibaTemplateVO.setID(socketMessage.getTemplateId());
                IvrLibaTemplateVO ivrLibaTemplateVO1 = ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO);
                redisCache.setCacheObject(userId + "ivrLibaTemplateVO1", ivrLibaTemplateVO1, 120, TimeUnit.MINUTES);
                IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
                ivrTaskTemplateVO.setID(socketMessage.getTemplateId());
                IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
                redisCache.setCacheObject(userId + "ivrTaskTemplateVO1", ivrTaskTemplateVO1, 120, TimeUnit.MINUTES);
                //将查出来的问题,放到全局变量中去
                List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList = ivrLibaTemplateVO1.getIvrLibaTemplateScriptVOList();
                List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList = ivrTaskTemplateVO1.getIvrTaskTemplateScriptVOList();
                //根据序号进行排序
                Collections.sort(ivrLibaTemplateScriptVOList, Comparator.comparing(IvrLibaTemplateScriptVO::getTargetid));
                Collections.sort(ivrTaskTemplateScriptVOList, Comparator.comparing(IvrTaskTemplateScriptVO::getTargetid));
                //将查出来的数据放到redis中
                redisCache.setCacheObject(userId + "ivrLibaTemplateScriptVOList", ivrLibaTemplateScriptVOList, 120, TimeUnit.MINUTES);
                redisCache.setCacheObject(userId + "ivrTaskTemplateScriptVOList", ivrTaskTemplateScriptVOList, 120, TimeUnit.MINUTES);
                //用来返回调查的总结果
                redisCache.setCacheObject(userId + "backQuset", new ArrayList<>(), 120, TimeUnit.MINUTES);
                //用来记录无声响应次数
@@ -138,14 +139,14 @@
                //用来返回当前需要问的问题信息
                QuestionMessage returnQues = new QuestionMessage();
                for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOList) {
                    if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO1.getFirstQuestionNum().intValue())
                for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOList) {
                    if (ivrTaskTemplateScriptVO.getTargetid() == ivrTaskTemplateVO1.getFirstQuestionNum().intValue())
                        //获取第一题的问题
                        returnQues.setNowQuestion(ivrLibaTemplateScriptVO);
//                        returnQues.setCode(ivrLibaTemplateScriptVO.getTargetid() + 1);
                        returnQues.setNowQuestion(ivrTaskTemplateScriptVO);
//                        returnQues.setCode(ivrTaskTemplateScriptVO.getTargetid() + 1);
                }
//              è®¾ç½®å¼€åœºç™½
                returnQues.setKcb(ivrLibaTemplateVO1.getRevisitBefore());
                returnQues.setKcb(ivrTaskTemplateVO1.getRevisitBefore());
                //记录响应
                redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
@@ -157,40 +158,40 @@
                }
                QuestionMessage questionMessage = socketMessage.getQuestionMessage();
                List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList = redisCache.getCacheObject(userId + "ivrLibaTemplateScriptVOList");
                List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList = redisCache.getCacheObject(userId + "ivrTaskTemplateScriptVOList");
                //根据前端传回的条件,获取当前题目
                IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = questionMessage.getNowQuestion();
                if (ivrLibaTemplateScriptVO.getID() == null) {
                IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = questionMessage.getNowQuestion();
                if (ivrTaskTemplateScriptVO.getID() == null) {
                    QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues");
                    ivrLibaTemplateScriptVO = returnQues.getNowQuestion();
                    ivrTaskTemplateScriptVO = returnQues.getNowQuestion();
                }
                //获取模板信息
                IvrLibaTemplateVO ivrLibaTemplateVO1 = redisCache.getCacheObject(userId + "ivrLibaTemplateVO1");
                IvrTaskTemplateVO ivrTaskTemplateVO1 = redisCache.getCacheObject(userId + "ivrTaskTemplateVO1");
                if (StringUtils.isEmpty(questionMessage.getContent())) {
                    //调用ivrLibaTemplateScriptVO中的slienceText(静默话术)
                    //调用ivrTaskTemplateScriptVO中的slienceText(静默话术)
                    Integer noVoice = redisCache.getCacheObject(userId + "noVoice");
                    //实际静默次数是否 ç­‰äºŽ æ¨¡æ¿ä¸­é…ç½®çš„æ¬¡æ•°
                    if (noVoice == ivrLibaTemplateVO1.getNoVoiceNum().intValue()) {
                    if (noVoice == ivrTaskTemplateVO1.getNoVoiceNum().intValue()) {
                        //用来返回调查的总结果
                        List<IvrLibaTemplateScriptVO> backQuset = new ArrayList<>();
                        backQuset.add(ivrLibaTemplateScriptVO);
                        List<IvrTaskTemplateScriptVO> backQuset = new ArrayList<>();
                        backQuset.add(ivrTaskTemplateScriptVO);
                        redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES);
                        //如果几次都没响应,就下一题(需要先判断是否有下一题)
                        if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateScriptVOList.size()) {
                        if (ivrTaskTemplateScriptVO.getTargetid() == ivrTaskTemplateScriptVOList.size()) {
                            //如果下一题没有了,就结束了
                            QuestionMessage returnQues = new QuestionMessage();
//                            returnQues.setCode(null);
                            List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                            List<IvrTaskTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                            returnQues.setContent(JSON.toJSONString(backQusetRedis));
                            returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
                            returnQues.setJsy(ivrTaskTemplateVO1.getRevisitAfter());
                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                            redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                        } else {
                            //如果有下一题,就根据当前teagetID+1 èŽ·å–ä¸‹ä¸€é¢˜
                            QuestionMessage returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO);
                            QuestionMessage returnQues = getNextQuestion(ivrTaskTemplateScriptVOList, ivrTaskTemplateScriptVO);
                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                            redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
                        }
@@ -206,27 +207,27 @@
                    }
                } else {
                    //通过valueType判断是什么题型(值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰ï¼‰
                    if (ivrLibaTemplateScriptVO.getValueType() == 2 || ivrLibaTemplateScriptVO.getValueType() == 3) {
                        ivrLibaTemplateScriptVO.setQuestionResult(questionMessage.getContent());
                    if (ivrTaskTemplateScriptVO.getValueType() == 2 || ivrTaskTemplateScriptVO.getValueType() == 3) {
                        ivrTaskTemplateScriptVO.setQuestionResult(questionMessage.getContent());
                        List<IvrLibaTemplateScriptVO> backQusetList = redisCache.getCacheObject(userId + "backQuset");
                        List<IvrTaskTemplateScriptVO> backQusetList = redisCache.getCacheObject(userId + "backQuset");
                        //匹配完成后,将结果保存到新的数组
                        backQusetList.add(ivrLibaTemplateScriptVO);
                        backQusetList.add(ivrTaskTemplateScriptVO);
                        redisCache.setCacheObject(userId + "backQuset", backQusetList, 120, TimeUnit.MINUTES);
                        //将静默置为0
                        redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
                        //获取下一题
                        Integer nextQuestion = ivrLibaTemplateScriptVO.getTargetid() + 1;
                        if (nextQuestion > ivrLibaTemplateScriptVOList.size()) {
                        Long nextQuestion = ivrTaskTemplateScriptVO.getTargetid() + 1;
                        if (nextQuestion > ivrTaskTemplateScriptVOList.size()) {
                            //如果下一题没有了,就结束了
                            QuestionMessage returnQues = new QuestionMessage();
                            List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                            List<IvrTaskTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                            returnQues.setContent(JSON.toJSONString(backQusetRedis));
                            returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
                            returnQues.setJsy(ivrTaskTemplateVO1.getRevisitAfter());
                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                            redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                        } else {
                            for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
                            for (IvrTaskTemplateScriptVO script : ivrTaskTemplateScriptVOList) {
                                if (script.getTargetid() == nextQuestion) {
                                    QuestionMessage returnQues = new QuestionMessage();
                                    returnQues.setNowQuestion(script);
@@ -235,46 +236,46 @@
                            }
                        }
                    } else if (ivrLibaTemplateScriptVO.getValueType() == 1) {
                    } else if (ivrTaskTemplateScriptVO.getValueType() == 1) {
                        //对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)x
                        for (int j = 0; j < ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size(); j++) {
                        for (int j = 0; j < ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size(); j++) {
                            //包含
                            Matcher matcher = null;
                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) {
                                Pattern pattern = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex());
                            if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
                                Pattern pattern = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex());
                                matcher = pattern.matcher(questionMessage.getContent());
                            }
                            //不包含
                            Matcher matcher2 = null;
                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) {
                                Pattern pattern2 = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
                            if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) {
                                Pattern pattern2 = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
                                matcher2 = pattern2.matcher(questionMessage.getContent());
                            }
                            log.info("==============================Targetregex的值为:{},   Targetregex2的值为:{}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
                            log.info("==============================Targetregex的值为:{},   Targetregex2的值为:{}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex(), ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                            if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                                //说明匹配正确了
                                ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
                                List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
                                ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true);
                                List<IvrTaskTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
                                //匹配完成后,将结果保存到新的数组
                                backQuset.add(ivrLibaTemplateScriptVO);
                                backQuset.add(ivrTaskTemplateScriptVO);
                                redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES);
                                //将静默置为0
                                redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
                                //获取下一题
                                Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
                                if (nextQuestion > ivrLibaTemplateScriptVOList.size()) {
                                Long nextQuestion = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion();
                                if (nextQuestion > ivrTaskTemplateScriptVOList.size()) {
                                    //如果下一题没有了,就结束了
                                    QuestionMessage returnQues = new QuestionMessage();
                                    List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                    List<IvrTaskTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                    returnQues.setContent(JSON.toJSONString(backQusetRedis));
                                    returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
                                    returnQues.setJsy(ivrTaskTemplateVO1.getRevisitAfter());
                                    redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                                    redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                                } else {
                                    for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
                                    for (IvrTaskTemplateScriptVO script : ivrTaskTemplateScriptVOList) {
                                        if (script.getTargetid() == nextQuestion) {
                                            QuestionMessage returnQues = new QuestionMessage();
                                            returnQues.setNowQuestion(script);
@@ -289,28 +290,28 @@
                                Integer mateNum = redisCache.getCacheObject(userId + "mateNum");
                                //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了
                                if (mateNum == ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) {
                                if (mateNum == ivrTaskTemplateVO1.getMateNum().intValue() && j == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1) {
                                    //问了最大询问次数后,还是没有匹配上,将结果保存到新的数组
                                    List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
                                    backQuset.add(ivrLibaTemplateScriptVO);
                                    List<IvrTaskTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
                                    backQuset.add(ivrTaskTemplateScriptVO);
                                    redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES);
                                    //如果下一题为空.则新的数据返回,并加上感谢语
                                    if (ivrLibaTemplateScriptVO.getTargetid() < ivrLibaTemplateScriptVOList.size()) {
                                        QuestionMessage returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO);
                                    if (ivrTaskTemplateScriptVO.getTargetid() < ivrTaskTemplateScriptVOList.size()) {
                                        QuestionMessage returnQues = getNextQuestion(ivrTaskTemplateScriptVOList, ivrTaskTemplateScriptVO);
                                        redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                                        redisCache.setCacheObject(userId + "mateNum", 0, 120, TimeUnit.MINUTES);
                                    } else {
                                        QuestionMessage returnQues2 = new QuestionMessage();
//                                    returnQues2.setCode(null);
                                        List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                        List<IvrTaskTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                        returnQues2.setQuestionList(backQusetRedis);
                                        returnQues2.setJsy("感谢您的耐心回答,再见");
                                        redisCache.setCacheObject(userId + "returnQues", returnQues2, 120, TimeUnit.MINUTES);
                                        redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                                        break;
                                    }
                                } else if (mateNum < ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) {
                                } else if (mateNum < ivrTaskTemplateVO1.getMateNum().intValue() && j == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1) {
                                    //没有问到规定次数
                                    mateNum = mateNum + 1;
                                    redisCache.setCacheObject(userId + "mateNum", mateNum, 120, TimeUnit.MINUTES);
@@ -319,7 +320,7 @@
                        }
                    }
                    //选项匹配完成后,需要再去通过库再进行匹配一次
                    String extemplateID = ivrLibaTemplateVO1.getSubmoduleID();
                    String extemplateID = ivrTaskTemplateVO1.getSubmoduleID();
                    String[] split = extemplateID.split(",");
                    List<String> list = Arrays.asList(split);
                    List<Long> list1 = new ArrayList<>();
@@ -344,13 +345,13 @@
                            if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
                                QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues");
                                IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
                                IvrTaskTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
                                nowQuestion.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
                                nowQuestion.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
                                redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                                if (ivrLibaExtemplatescript.getIsEnd() == 1) {
                                    //将问题置空
                                    IvrLibaTemplateScriptVO nowQuestion1 = returnQues.getNowQuestion();
                                    IvrTaskTemplateScriptVO nowQuestion1 = returnQues.getNowQuestion();
                                    nowQuestion1.setQuestionText(null);
                                    nowQuestion1.setQuestionVoice(null);
                                    returnQues.setNowQuestion(nowQuestion1);
@@ -366,19 +367,19 @@
            }
            QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues");
            List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
            List<IvrTaskTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
            returnQues.setQuestionList(backQusetRedis);
            session.sendMessage(new TextMessage(JSON.toJSONString(returnQues).getBytes(StandardCharsets.UTF_8)));
            //整个流程是否结束,将redis中的该userId下的数据删除;
            Integer isOver = redisCache.getCacheObject(userId + "isOver");
            if (isOver == 1) {
                redisCache.deleteObject(userId + "ivrLibaTemplateScriptVOList");
                redisCache.deleteObject(userId + "ivrTaskTemplateScriptVOList");
                redisCache.deleteObject(userId + "backQuset");
                redisCache.deleteObject(userId + "noVoice");
                redisCache.deleteObject(userId + "returnQues");
                redisCache.deleteObject(userId + "isOver");
                redisCache.deleteObject(userId + "ivrLibaTemplateVO1");
                redisCache.deleteObject(userId + "ivrTaskTemplateVO1");
                try {
                    //断开链接
                    afterConnectionClosed(session, null);
@@ -390,12 +391,12 @@
    }
    //获取下一题(这个方法不适合选项中的nextQuestion)
    private QuestionMessage getNextQuestion(List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO) {
    private QuestionMessage getNextQuestion(List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO) {
        QuestionMessage returnQues = new QuestionMessage();
        for (int j = 0; j < ivrLibaTemplateScriptVOList.size(); j++) {
            if (ivrLibaTemplateScriptVOList.get(j).getTargetid() == ivrLibaTemplateScriptVO.getTargetid() + 1) {
        for (int j = 0; j < ivrTaskTemplateScriptVOList.size(); j++) {
            if (ivrTaskTemplateScriptVOList.get(j).getTargetid() == ivrTaskTemplateScriptVO.getTargetid() + 1) {
                // å¯¹è¯¥æ¡templateScriptVO进行处理
                returnQues.setNowQuestion(ivrLibaTemplateScriptVOList.get(j));
                returnQues.setNowQuestion(ivrTaskTemplateScriptVOList.get(j));
            }
        }
        return returnQues;
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.ruoyi.web.controller.smartor.AIRobot;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.config.RobotPhoneUtils;
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.IvrTaskSingleVO;
import com.smartor.domain.PhoneCallBackVO;
import com.smartor.domain.SendTaskVO;
import com.smartor.domain.robot.RobotScritpTemplateVO;
import com.smartor.domain.robot.back.RobotAIDialogBack;
import com.smartor.domain.robot.back.RobotCallBack;
import com.smartor.domain.robot.back.RobotcdrInfoBack;
import com.smartor.service.AIRobotPhoneCallBackService;
import com.smartor.service.IIvrTaskSingleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * å•一任务(随访)Controller
 *
 * @author ruoyi
 * @date 2024-02-02
 */
@Slf4j
@Api(description = "AIRobot回调")
@RestController
@RequestMapping("/smartor/robot")
public class AIRobotPhoneCallBackController extends BaseController {
    @Autowired
    private AIRobotPhoneCallBackService aiRobotPhoneCallBackService;
    /**
     * AIRobot呼叫到达线路后的状态返回接口
     */
    @ApiOperation("AIRobot呼叫到达线路后的状态返回接口")
    @PostMapping("/callstatus")
    public AjaxResult callstatus(@RequestBody RobotCallBack robotCallBack) {
        log.error("AIRobot呼叫到达线路后的状态返回接口---------{}", robotCallBack);
        aiRobotPhoneCallBackService.callstatus(robotCallBack);
        return success();
    }
    /**
     * ç”¨æˆ· AI äº¤äº’数据返回接口(包括 n ç§èŠ‚ç‚¹çš„è¿”å›žæ•°æ®åŒ…)
     */
    @ApiOperation("AIRobot用户 AI äº¤äº’数据返回接口(包括 n ç§èŠ‚ç‚¹çš„è¿”å›žæ•°æ®åŒ…)")
    @PostMapping("/aidialog")
    public AjaxResult aidialog(@RequestBody RobotAIDialogBack robotAIDialogBack) {
        log.error("用户 AI äº¤äº’数据返回接口(包括 n ç§èŠ‚ç‚¹çš„è¿”å›žæ•°æ®åŒ…)-----------{}", robotAIDialogBack);
        aiRobotPhoneCallBackService.aidialog(robotAIDialogBack);
        return success();
    }
    /**
     * æŒ‚机计费信息返回数据接口
     */
    @ApiOperation("挂机计费信息返回数据接口")
    @PostMapping("/cdrinfo")
    public AjaxResult cdrinfo(@RequestBody RobotcdrInfoBack robotAIDialogBack) {
        log.error("挂机计费信息返回数据接口-----------{}", robotAIDialogBack);
        aiRobotPhoneCallBackService.cdrinfo(robotAIDialogBack);
        return success();
    }
//
//    /**
//     * å¤–呼发起请求接口(模板数据或加密模板文件路径)测试用的
//     */
//    @PostMapping("/outbound")
//    public AjaxResult outbound(RobotScritpTemplateVO robotScritpTemplateVO) {
//        RobotPhoneUtils robotPhoneUtils = new RobotPhoneUtils();
//        robotPhoneUtils.outbound(new RobotScritpTemplateVO());
//        return success();
//    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.smartor;
import com.alibaba.fastjson2.JSON;
import com.github.pagehelper.util.StringUtil;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -134,8 +135,8 @@
    @ApiOperation("查询模板详情根据条件")
    @PostMapping("/selectInfoByCondition")
    public AjaxResult selectInfoByCondition(@RequestBody IvrLibaTemplateVO ivrLibaTemplateVO) {
        if (ObjectUtils.isEmpty(ivrLibaTemplateVO)) {
            throw new BaseException("查询模板详情入参为空,请检查入参");
        if (ivrLibaTemplateVO.getID() == null) {
            return success();
        }
        return success(ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO));
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateTargetController.java
ÎļþÒÑɾ³ý
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java
@@ -13,6 +13,9 @@
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.IvrTaskSingleVO;
import com.smartor.domain.PhoneCallBackVO;
import com.smartor.domain.SendTaskVO;
import com.smartor.domain.robot.back.RobotAIDialogBack;
import com.smartor.domain.robot.back.RobotCallBack;
import com.smartor.service.IIvrTaskSingleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -98,16 +101,16 @@
    }
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     * ä»»åŠ¡çš„å‘é€æ‰§è¡Œã€æš‚åœã€ç»ˆæ­¢
     */
    @ApiOperation("任务发送执行")
    @ApiOperation("任务的发送执行、暂停、终止")
    @PostMapping("/taskSend")
    public AjaxResult heTaskSend(@RequestBody IvrTaskSingleVO ivrTaskcallVO) {
        return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO));
    public AjaxResult heTaskSend(@RequestBody SendTaskVO sendTaskVO) {
        return toAjax(ivrTaskcallService.heTaskSend(sendTaskVO));
    }
    /**
     * ç”µè¯å›žè°ƒä»»åŠ¡
     * ç”µè¯å›žè°ƒä»»åŠ¡(上海)
     */
    @ApiOperation("电话回调任务")
    @PostMapping("/phoneCallBack")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,107 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrTaskTemplate;
import com.smartor.domain.IvrTaskTemplateVO;
import com.smartor.service.IIvrTaskTemplateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“Controller
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Api(description = "随访任务随访模板库Controller")
@RestController
@RequestMapping("/smartor/ivrTaskTemplate")
public class IvrTaskTemplateController extends BaseController {
    @Autowired
    private IIvrTaskTemplateService ivrTaskTemplateService;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“åˆ—è¡¨
     */
    @ApiOperation("查询随访任务随访模板库列表")
    @PreAuthorize("@ss.hasPermi('system:template:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTaskTemplate ivrTaskTemplate) {
        startPage();
        List<IvrTaskTemplate> list = ivrTaskTemplateService.selectIvrTaskTemplateList(ivrTaskTemplate);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºéšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“åˆ—è¡¨
     */
    @PreAuthorize("@ss.hasPermi('system:template:export')")
    @ApiOperation("导出随访任务随访模板库列表")
    @PostMapping("/export")
    public void export(HttpServletResponse response, IvrTaskTemplate ivrTaskTemplate) {
        List<IvrTaskTemplate> list = ivrTaskTemplateService.selectIvrTaskTemplateList(ivrTaskTemplate);
        ExcelUtil<IvrTaskTemplate> util = new ExcelUtil<IvrTaskTemplate>(IvrTaskTemplate.class);
        util.exportExcel(response, list, "随访任务随访模板库数据");
    }
    /**
     * èŽ·å–éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“è¯¦ç»†ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('system:template:query')")
    @ApiOperation("获取随访任务随访模板库详细信息")
    @GetMapping(value = "/getInfo/{ID}")
    public AjaxResult getInfo(@PathVariable("ID") Long ID) {
        return success(ivrTaskTemplateService.selectIvrTaskTemplateByID(ID));
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    @PreAuthorize("@ss.hasPermi('system:template:add')")
    @ApiOperation("新增随访任务随访模板库")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IvrTaskTemplate ivrTaskTemplate) {
        return toAjax(ivrTaskTemplateService.insertIvrTaskTemplate(ivrTaskTemplate));
    }
    /**
     * æ–°å¢žæˆ–修改随访任务随访模板库
     */
    @PreAuthorize("@ss.hasPermi('system:template:add')")
    @ApiOperation("新增或修改随访任务随访模板库")
    @PostMapping("/saveOrUpdateTempScript")
    public AjaxResult saveOrUpdateTempScript(@RequestBody IvrTaskTemplateVO ivrTaskTemplateVO) {
        return AjaxResult.success(ivrTaskTemplateService.saveOrUpdateTempScript(ivrTaskTemplateVO));
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    @PreAuthorize("@ss.hasPermi('system:template:edit')")
    @ApiOperation("修改随访任务随访模板库")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody IvrTaskTemplate ivrTaskTemplate) {
        return toAjax(ivrTaskTemplateService.updateIvrTaskTemplate(ivrTaskTemplate));
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    @PreAuthorize("@ss.hasPermi('system:template:remove')")
    @ApiOperation("删除随访任务随访模板库")
    @GetMapping("/remove/{IDs}")
    public AjaxResult remove(@PathVariable Long[] IDs) {
        return toAjax(ivrTaskTemplateService.deleteIvrTaskTemplateByIDs(IDs));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateScriptController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrTaskTemplateScript;
import com.smartor.service.IIvrTaskTemplateScriptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“Controller
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Api(description = "随访任务模版问题话术库Controller")
@RestController
@RequestMapping("/smartor/taskTemplateScript")
public class IvrTaskTemplateScriptController extends BaseController
{
    @Autowired
    private IIvrTaskTemplateScriptService ivrTaskTemplateScriptService;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“åˆ—è¡¨
     */
    @ApiOperation("查询随访任务模版问题话术库列表")
    @PreAuthorize("@ss.hasPermi('system:script:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTaskTemplateScript ivrTaskTemplateScript)
    {
        startPage();
        List<IvrTaskTemplateScript> list = ivrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºéšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“åˆ—è¡¨
     */
    @ApiOperation("导出随访任务模版问题话术库列表")
    @PreAuthorize("@ss.hasPermi('system:script:export')")
    @Log(title = "随访任务模版问题话术库", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, IvrTaskTemplateScript ivrTaskTemplateScript)
    {
        List<IvrTaskTemplateScript> list = ivrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
        ExcelUtil<IvrTaskTemplateScript> util = new ExcelUtil<IvrTaskTemplateScript>(IvrTaskTemplateScript.class);
        util.exportExcel(response, list, "随访任务模版问题话术库数据");
    }
    /**
     * èŽ·å–éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取随访任务模版问题话术库详细信息")
    @PreAuthorize("@ss.hasPermi('system:script:query')")
    @GetMapping(value = "/getInfo/{ID}")
    public AjaxResult getInfo(@PathVariable("ID") Long ID)
    {
        return success(ivrTaskTemplateScriptService.selectIvrTaskTemplateScriptByID(ID));
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    @PreAuthorize("@ss.hasPermi('system:script:add')")
    @ApiOperation("新增随访任务模版问题话术库")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IvrTaskTemplateScript ivrTaskTemplateScript)
    {
        return toAjax(ivrTaskTemplateScriptService.insertIvrTaskTemplateScript(ivrTaskTemplateScript));
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    @PreAuthorize("@ss.hasPermi('system:script:edit')")
    @ApiOperation("修改随访任务模版问题话术库")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody IvrTaskTemplateScript ivrTaskTemplateScript)
    {
        return toAjax(ivrTaskTemplateScriptService.updateIvrTaskTemplateScript(ivrTaskTemplateScript));
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    @PreAuthorize("@ss.hasPermi('system:script:remove')")
    @ApiOperation("删除随访任务模版问题话术库")
    @GetMapping("/remove/{IDs}")
    public AjaxResult remove(@PathVariable Long[] IDs)
    {
        return toAjax(ivrTaskTemplateScriptService.deleteIvrTaskTemplateScriptByIDs(IDs));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskTemplateTargetoptionController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrTaskTemplateTargetoption;
import com.smartor.service.IIvrTaskTemplateTargetoptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“Controller
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Api(description = "随访任务模板指标选项库Controller")
@RestController
@RequestMapping("/system/taskTemplateTargetoption")
public class IvrTaskTemplateTargetoptionController extends BaseController {
    @Autowired
    private IIvrTaskTemplateTargetoptionService ivrTaskTemplateTargetoptionService;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“åˆ—è¡¨
     */
    @ApiOperation("查询随访任务模板指标选项库列表")
    @PreAuthorize("@ss.hasPermi('system:targetoption:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption) {
        startPage();
        List<IvrTaskTemplateTargetoption> list = ivrTaskTemplateTargetoptionService.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºéšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“åˆ—è¡¨
     */
    @PreAuthorize("@ss.hasPermi('system:targetoption:export')")
    @ApiOperation("导出随访任务模板指标选项库列表")
    @PostMapping("/export")
    public void export(HttpServletResponse response, IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption) {
        List<IvrTaskTemplateTargetoption> list = ivrTaskTemplateTargetoptionService.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
        ExcelUtil<IvrTaskTemplateTargetoption> util = new ExcelUtil<IvrTaskTemplateTargetoption>(IvrTaskTemplateTargetoption.class);
        util.exportExcel(response, list, "随访任务模板指标选项库数据");
    }
    /**
     * èŽ·å–éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取随访任务模板指标选项库详细信息")
    @PreAuthorize("@ss.hasPermi('system:targetoption:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(ivrTaskTemplateTargetoptionService.selectIvrTaskTemplateTargetoptionById(id));
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    @PreAuthorize("@ss.hasPermi('system:targetoption:add')")
    @ApiOperation("新增随访任务模板指标选项库")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption) {
        return toAjax(ivrTaskTemplateTargetoptionService.insertIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption));
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    @PreAuthorize("@ss.hasPermi('system:targetoption:edit')")
    @ApiOperation("修改随访任务模板指标选项库")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption) {
        return toAjax(ivrTaskTemplateTargetoptionService.updateIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption));
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    @PreAuthorize("@ss.hasPermi('system:targetoption:remove')")
    @ApiOperation("删除随访任务模板指标选项库")
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(ivrTaskTemplateTargetoptionService.deleteIvrTaskTemplateTargetoptionByIds(ids));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -1,7 +1,9 @@
package com.ruoyi.web.controller.system;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -17,14 +19,15 @@
import com.ruoyi.framework.web.service.SysPermissionService;
import com.ruoyi.system.service.ISysMenuService;
import javax.servlet.http.HttpServletResponse;
/**
 * ç™»å½•验证
 *
 *
 * @author ruoyi
 */
@RestController
public class SysLoginController
{
public class SysLoginController {
    @Autowired
    private SysLoginService loginService;
@@ -36,29 +39,38 @@
    /**
     * ç™»å½•方法
     *
     *
     * @param loginBody ç™»å½•信息
     * @return ç»“æžœ
     */
    @PostMapping("/login")
    public AjaxResult login(@RequestBody LoginBody loginBody)
    {
    public AjaxResult login(@RequestBody LoginBody loginBody) {
        AjaxResult ajax = AjaxResult.success();
        // ç”Ÿæˆä»¤ç‰Œ
        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
                loginBody.getUuid());
        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid());
        ajax.put(Constants.TOKEN, token);
        return ajax;
    }
    @GetMapping("/getToken")
    public void getToken(HttpServletResponse response) throws IOException {
        // ç”Ÿæˆæˆ–获取token
        String token = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjRiZGRkMTI0LTViNWMtNDhmMC05YjNkLTA0YjFiMzU0Nzg5NSJ9.16hHNas7jXTlHVrnlZgAJ-YViD44YkKFuoxJxMPm5QLPeSHn3wRyd9xE0Bi7YMdO3zKcZNo6ef5diZvDWN7ImA";
        // è®¾ç½®å“åº”头,前端可以从响应头获取token
        response.addHeader("Authorization", "Bearer " + token);
        // å¦‚果需要进行页面跳转,可以设置状态码为302,并设置Location头部
        response.setStatus(302);
        response.setHeader("Location", "http://localhost:8099/tool/module/classifythreea");
    }
    /**
     * èŽ·å–ç”¨æˆ·ä¿¡æ¯
     *
     *
     * @return ç”¨æˆ·ä¿¡æ¯
     */
    @GetMapping("getInfo")
    public AjaxResult getInfo()
    {
    public AjaxResult getInfo() {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        // è§’色集合
        Set<String> roles = permissionService.getRolePermission(user);
@@ -73,12 +85,11 @@
    /**
     * èŽ·å–è·¯ç”±ä¿¡æ¯
     *
     *
     * @return è·¯ç”±ä¿¡æ¯
     */
    @GetMapping("getRouters")
    public AjaxResult getRouters()
    {
    public AjaxResult getRouters() {
        Long userId = SecurityUtils.getUserId();
        List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
        return AjaxResult.success(menuService.buildMenus(menus));
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
@@ -8,91 +8,104 @@
import com.smartor.common.SendService;
import com.smartor.config.PhoneUtils;
import com.smartor.config.RabbitMqCallPhoneConfig;
import com.smartor.config.RobotPhoneUtils;
import com.smartor.domain.*;
import com.smartor.domain.robot.RobotData;
import com.smartor.domain.robot.RobotDataConfig;
import com.smartor.domain.robot.RobotIdlenumVO;
import com.smartor.domain.robot.RobotScritpTemplateVO;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.concurrent.TimeUnit;
public class PhoneTask implements Runnable {
    private IvrTaskSingle ivrTaskSingle;
    private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVO;
    private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVO;
    private RedisCache redisCache;
    private IvrLibaTemplateVO ivrLibaTemplateVO;
    private IvrTaskTemplateVO ivrTaskTemplateVO;
    private RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig;
    private Message message;
    private SendService sendService;
    private String phonePath;
    private RobotPhoneUtils robotPhoneUtils;
    public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache, RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig, Message message, SendService sendService) {
    public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrTaskTemplateVO ivrTaskTemplateVO, RedisCache redisCache, RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig, Message message, SendService sendService, String phonePath, RobotPhoneUtils robotPhoneUtils) {
        this.ivrTaskSingle = DtoConversionUtils.sourceToTarget(ivrTaskSingle, IvrTaskSingle.class);
        this.ivrLibaTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList(), IvrLibaTemplateScriptVO.class);
        this.ivrLibaTemplateVO = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO, IvrLibaTemplateVO.class);
        this.ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList(), IvrTaskTemplateScriptVO.class);
        this.ivrTaskTemplateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplateVO.class);
        this.redisCache = redisCache;
        this.rabbitMqCallPhoneConfig = rabbitMqCallPhoneConfig;
        this.message = message;
        this.sendService = sendService;
        this.phonePath = phonePath;
        this.robotPhoneUtils = robotPhoneUtils;
    }
    @Override
    public void run() {
        try {
            //获取电话组,查看哪些电话可以使用
            PhoneUtils phoneUtils = new PhoneUtils();
            final String uuid = IdUtils.randomUUID();
            //获取所有的“通配符”键值对
            ObjectMapper objectMapper = new ObjectMapper();
            Map<String, Map<String, String>> ivrTaskSingleMmap = objectMapper.readValue(ivrTaskSingle.getTextParam(), Map.class);
            List<Map<String, String>> mapList = new ArrayList<>();
            if (!Objects.isNull(ivrTaskSingleMmap)) {
                for (Map<String, String> map : ivrTaskSingleMmap.values()) {
                    mapList.add(map);
                }
                //将模板问题话术里的通配符替换
                for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) {
                    for (Map<String, String> map : mapList) {
                        for (String key : map.keySet()) {
                            ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace(key, map.get(key)));
        if (phonePath.equals("1")) {
            //上海的电话拨打
            try {
                //获取电话组,查看哪些电话可以使用
                PhoneUtils phoneUtils = new PhoneUtils();
                final String uuid = IdUtils.randomUUID();
                //获取所有的“通配符”键值对
                ObjectMapper objectMapper = new ObjectMapper();
                Map<String, Map<String, String>> ivrTaskSingleMmap = objectMapper.readValue(ivrTaskSingle.getTextParam(), Map.class);
                List<Map<String, String>> mapList = new ArrayList<>();
                if (!Objects.isNull(ivrTaskSingleMmap)) {
                    for (Map<String, String> map : ivrTaskSingleMmap.values()) {
                        mapList.add(map);
                    }
                    //将模板问题话术里的通配符替换
                    for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVO) {
                        for (Map<String, String> map : mapList) {
                            for (String key : map.keySet()) {
                                ivrTaskTemplateScriptVO.setQuestionText(ivrTaskTemplateScriptVO.getQuestionText().replace(key, map.get(key)));
                            }
                        }
                    }
                }
            }
            Map<String, Object> objectMap = new HashMap<>();
            objectMap.put("ivrTaskSingle", ivrTaskSingle);
            objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO);
            //将数据放到redis中,方便在回调方法里获取
            redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES);
                Map<String, Object> objectMap = new HashMap<>();
                objectMap.put("ivrTaskSingle", ivrTaskSingle);
                objectMap.put("ivrTaskTemplateScriptVO", ivrTaskTemplateScriptVO);
                //将数据放到redis中,方便在回调方法里获取
                redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES);
            //记录首次问题
            QuestionMessage returnQues = new QuestionMessage();
            returnQues.setKcb(ivrLibaTemplateVO.getRevisitBefore());
            for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) {
                if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO.getFirstQuestionNum().intValue()) {
                    returnQues.setNowQuestion(ivrLibaTemplateScriptVO);
                //记录首次问题
                QuestionMessage returnQues = new QuestionMessage();
                returnQues.setKcb(ivrTaskTemplateVO.getRevisitBefore());
                for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVO) {
                    if (ivrTaskTemplateScriptVO.getTargetid() == ivrTaskTemplateVO.getFirstQuestionNum().intValue()) {
                        returnQues.setNowQuestion(ivrTaskTemplateScriptVO);
                    }
                }
            }
            returnQues.setQuestionList(ivrLibaTemplateScriptVO);
            //将问题,和模板信息放到redis中
            redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
            redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES);
                returnQues.setQuestionList(ivrTaskTemplateScriptVO);
                //将问题,和模板信息放到redis中
                redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                redisCache.setCacheObject(uuid + "ivrTaskTemplateVO", ivrTaskTemplateVO, 120, TimeUnit.MINUTES);
            System.out.println("----------------uuID为 ï¼š" + uuid + "       " + ivrTaskSingle.getSendname() + "       " + returnQues.getNowQuestion().getQuestionText() + "     " + ivrTaskSingle.getPhone());
                System.out.println("----------------uuID为 ï¼š" + uuid + "       " + ivrTaskSingle.getSendname() + "       " + returnQues.getNowQuestion().getQuestionText() + "     " + ivrTaskSingle.getPhone());
            //先将话术放到ob_queue队列中
            IvrTaskcallPhoneMQ ivrTaskcallPhoneMQ = new IvrTaskcallPhoneMQ();
            ivrTaskcallPhoneMQ.setScript(ivrLibaTemplateVO.getRevisitBefore() + returnQues.getNowQuestion().getQuestionText());
            ivrTaskcallPhoneMQ.setType("1");
            ivrTaskcallPhoneMQ.setUuid(uuid);
            String data = JSON.toJSONString(ivrTaskcallPhoneMQ);
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.ob1", data, 0L);
                //先将话术放到ob_queue队列中
                IvrTaskcallPhoneMQ ivrTaskcallPhoneMQ = new IvrTaskcallPhoneMQ();
                ivrTaskcallPhoneMQ.setScript(ivrTaskTemplateVO.getRevisitBefore() + returnQues.getNowQuestion().getQuestionText());
                ivrTaskcallPhoneMQ.setType("1");
                ivrTaskcallPhoneMQ.setUuid(uuid);
                String data = JSON.toJSONString(ivrTaskcallPhoneMQ);
//            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.ob1", data, 0L);
            //调用机器人电话,开始电话
            String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskSingle.getPhone(), uuid, true);
            System.out.println("----------------uuID为 ï¼š" + uuid + "       " + ivrTaskSingle.getSendname() + "       " + returnQues.getNowQuestion().getQuestionText() + "     " + ivrTaskSingle.getPhone() + "----------已经拨打");
            Map<String, String> obMap = objectMapper.readValue(ob, Map.class);
            Thread.sleep(1000);
            redisCache.setCacheObject(uuid + "state_id", "0", 10, TimeUnit.MINUTES);
                //调用机器人电话,开始电话
                String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskSingle.getPhone(), uuid, true);
                System.out.println("----------------uuID为 ï¼š" + uuid + "       " + ivrTaskSingle.getSendname() + "       " + returnQues.getNowQuestion().getQuestionText() + "     " + ivrTaskSingle.getPhone() + "----------已经拨打");
                Map<String, String> obMap = objectMapper.readValue(ob, Map.class);
                Thread.sleep(1000);
                redisCache.setCacheObject(uuid + "state_id", "0", 10, TimeUnit.MINUTES);
                rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.ob1", data, 0L);
//这里先注释,state_id,电话那边,只能返回6,不能返回0,还需要电话那边进行修改,那边修改之后,上面两行可删除,将下面的解开注释
//            if (obMap.get("state_id").equals("0")) {
//                // è¯´æ˜Žæ‰“通了
@@ -103,12 +116,39 @@
//                    redisCache.setCacheObject(uuid + "state_id", "0", 10, TimeUnit.MINUTES);
//                }
//            }
                System.out.println("OB的值为:" + ob);
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else if (phonePath.equals("2")) {
            //杭州的电话拨打
            RobotScritpTemplateVO robotScritpTemplateVO = new RobotScritpTemplateVO();
            robotScritpTemplateVO.setNotes("aa");
            robotScritpTemplateVO.setBs_uuid(UUID.randomUUID().toString());
            robotScritpTemplateVO.setDnis(ivrTaskSingle.getPhone());
            robotScritpTemplateVO.setSpecify_ch(false);
            robotScritpTemplateVO.setTime_stamp(1566227782278333L);
            robotScritpTemplateVO.setEngine("ali");
            robotScritpTemplateVO.setAsr_sample("8000");
            robotScritpTemplateVO.setAsr_ent("ZurNHpaQLq6P55YS");
            robotScritpTemplateVO.setTts_ent("ZurNHpaQLq6P55YS");
            robotScritpTemplateVO.setTts_vcn("Aixia");
            robotScritpTemplateVO.setTts_volume(100);
            robotScritpTemplateVO.setTts_speed(-300);
            robotScritpTemplateVO.setDial_mode("呼叫对接方式,FS注册到网关、网关注册到FS、IP对接、IP校验账号对接");
            robotScritpTemplateVO.setDial_server("call_out_group,192.168.2.108:5060");
            robotScritpTemplateVO.setOutbound_codes("PCMU,PCMA,OPUS,G722");
            robotScritpTemplateVO.setAuto_test(true);
            RobotData robotData = new RobotData();
            RobotDataConfig robotDataConfig = new RobotDataConfig();
            robotDataConfig.setTemplate_name("inbound_88008001_16k_utf8.json");
            robotData.setConfig(robotDataConfig);
            robotScritpTemplateVO.setData(robotData);
            System.out.println("OB的值为:" + ob);
        } catch (Exception e) {
            e.printStackTrace();
            RobotIdlenumVO robotIdlenumVO = DtoConversionUtils.sourceToTarget(robotScritpTemplateVO, RobotIdlenumVO.class);
//            String idlenum = robotPhoneUtils.idlenum(robotIdlenumVO);
//            System.out.println(idlenum);
            robotPhoneUtils.outbound(robotScritpTemplateVO);
        }
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask2.java
ÎļþÒÑɾ³ý
ruoyi-admin/src/main/resources/application-druid.yml
@@ -1,13 +1,13 @@
# æ•°æ®æºé…ç½®
spring:
  rabbitmq:
#    host: 116.62.18.175
    host: 127.0.0.1
    host: 116.62.18.175
    #    host: 127.0.0.1
    password: guest
    port: 5672
    username: guest
    virtual-host: /
     # å¼€å¯æ¶ˆæ¯å‘送确认
    # å¼€å¯æ¶ˆæ¯å‘送确认
    publisher-confirms: true
    publisher-returns: true
    listener:
@@ -119,6 +119,21 @@
accessKeySecret: 6EIRr9uZeRobvHBRqskyGwjTLKpHYv
signName: æ­å·žåˆ©æ¹–科技
#智能呼叫
#智能呼叫(上海)
phoneIP: http://124.220.50.51
phonePort: 8001
#杭州
hzphoneIP: http://121.43.112.160
hzphonePort: 8088
#电话线路(1 ä¸Šæµ·ï¼Œ2 æ­å·žï¼‰
phonePath: 2
#自己的电话号码
phoneMySelf: 83234089
##授权 id(杭州)
#app_id: hzgs
##授权 key(已加密过的 key)(杭州)
#app_key: 605453540c4a0a692fe07e1cae1162f3
#授权 id(杭州)
app_id: hz_ali
#授权 key(已加密过的 key)(杭州)
app_key: a2f3b5799d635216aa280362fafd8c35
ruoyi-common/src/main/java/com/ruoyi/common/enums/ServiceFromEnum.java
ÎļþÃû´Ó ruoyi-common/src/main/java/com/ruoyi/common/enums/SendTypeEnum.java ÐÞ¸Ä
@@ -3,7 +3,7 @@
/**
 * å‘送类型枚举
 */
public enum SendTypeEnum {
public enum ServiceFromEnum {
    DMT(1, "多媒体"),
    ZZ(2, "纸质"),
    DH(3, "电话"),
@@ -18,15 +18,15 @@
    private Integer code;
    private String desc;
    SendTypeEnum(Integer code, String desc) {
    ServiceFromEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(Integer code) {
        SendTypeEnum[] organEnums = values();
        ServiceFromEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            SendTypeEnum organEnum = organEnums[i];
            ServiceFromEnum organEnum = organEnums[i];
            if (organEnum.getCode() == code) {
                return organEnum.getDesc();
            }
@@ -50,4 +50,4 @@
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
}
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
                // è¿‡æ»¤è¯·æ±‚
                .authorizeRequests()
                // å¯¹äºŽç™»å½•login æ³¨å†Œregister éªŒè¯ç captchaImage å…è®¸åŒ¿åè®¿é—®
                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo","/socket","/API_ESB_Service","/API_ESB_Service/Run","/magic/web/**","/smartor/tasksingle/phoneCallBack").permitAll()
                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo","/socket","/API_ESB_Service","/API_ESB_Service/Run","/magic/web/**","/smartor/tasksingle/phoneCallBack","/smartor/robot/callstatus","/smartor/robot/aidialog","/smartor/robot/cdrinfo","/getToken").permitAll()
                // é™æ€èµ„源,可匿名访问
                .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
                // é™¤ä¸Šé¢å¤–的所有请求全部需要鉴权认证
smartor/src/main/java/com/smartor/config/PhoneUtils.java
@@ -295,7 +295,7 @@
        String responseBody = null;
        try {
            responseBody = new String(stringHttpEntity.getBody().getBytes("ISO-8859-1"), "UTF-8");
            System.out.println(responseBody);
            System.out.println("电话信息返回 : " + responseBody);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
smartor/src/main/java/com/smartor/config/RabbitMqCallPhoneConfig.java
@@ -107,7 +107,7 @@
    @Bean
    public void createMq() {
        createRabbitMq("phone_exchange", "ob_queue", "phone.ob1");
        createRabbitMq("phone_exchange", "phone_queue", "phone.123");
        createRabbitMq("phone_exchange", "task_queue", "phone.123");
    }
}
smartor/src/main/java/com/smartor/config/RobotPhoneUtils.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
package com.smartor.config;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.utils.HttpUtil;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpEntity;
import com.ruoyi.common.utils.sign.Md5Utils;
import com.smartor.domain.robot.RobotData;
import com.smartor.domain.robot.RobotDataConfig;
import com.smartor.domain.robot.RobotIdlenumVO;
import com.smartor.domain.robot.RobotScritpTemplateVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import javax.mail.Multipart;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@Configuration
public class RobotPhoneUtils {
    @Value("${hzphoneIP}")
    private String hzphoneIP;
    @Value("${hzphonePort}")
    private String hzphonePort;
    @Value("${phoneMySelf}")
    private String phoneMySelf;
    @Value("${app_id}")
    private String app_id;
    @Value(value = "${app_key}")
    private String app_key;
    /**
     * çº¿è·¯ç©ºé—²æ•°é‡æŽ¥å£
     *
     * @param robotIdlenumVO
     * @return
     */
    public String idlenum(RobotIdlenumVO robotIdlenumVO) {
        robotIdlenumVO.setAni(phoneMySelf);
        robotIdlenumVO.setApp_key(app_key);
        robotIdlenumVO.setApp_id(app_id);
        //设置sign的值  md5(app_id+app_key+ani+special_ch+time_stamp) specify_ch md5 æ—¶ true ç”¨ 1 æ›¿ä»£ï¼Œfalse ç”¨ 0 æ›¿ä»£
        String signStr = robotIdlenumVO.getSpecify_ch() == true ? robotIdlenumVO.getApp_id() + robotIdlenumVO.getApp_key() + robotIdlenumVO.getAni() + 1 + robotIdlenumVO.getTime_stamp() : robotIdlenumVO.getApp_id() + robotIdlenumVO.getApp_key() + robotIdlenumVO.getAni() + 0 + robotIdlenumVO.getTime_stamp();
        robotIdlenumVO.setSign(Md5Utils.hash(signStr));
        ObjectMapper objectMapper = new ObjectMapper();
        Map<String, Object> map = null;
        try {
            map = objectMapper.readValue(JSON.toJSONString(robotIdlenumVO), Map.class);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return sendReq(map, "/aiengine/ai_api/idlenum");
    }
    /**
     * å¤–呼发起请求接口
     */
    public String outbound(RobotScritpTemplateVO robotScritpTemplateVO) {
        robotScritpTemplateVO.setAni(phoneMySelf);
        robotScritpTemplateVO.setApp_key(app_key);
        robotScritpTemplateVO.setApp_id(app_id);
        String signStr = robotScritpTemplateVO.getSpecify_ch() == true ? robotScritpTemplateVO.getApp_id() + robotScritpTemplateVO.getApp_key() + robotScritpTemplateVO.getBs_uuid() + robotScritpTemplateVO.getAni() + 1 + robotScritpTemplateVO.getTime_stamp() : robotScritpTemplateVO.getApp_id() + robotScritpTemplateVO.getApp_key() + robotScritpTemplateVO.getBs_uuid() + robotScritpTemplateVO.getAni() + 0 + robotScritpTemplateVO.getTime_stamp();
        robotScritpTemplateVO.setSign(Md5Utils.hash(signStr));
        //下面注释的这个测试用的
//        robotScritpTemplateVO.setNotes("aa");
//        robotScritpTemplateVO.setApp_id("hz_ali");
//        robotScritpTemplateVO.setApp_key("a2f3b5799d635216aa280362fafd8c35");
//        robotScritpTemplateVO.setBs_uuid(UUID.randomUUID().toString());
//        robotScritpTemplateVO.setAni("83234089");
//        robotScritpTemplateVO.setDnis("1010");
//        robotScritpTemplateVO.setSpecify_ch(false);
//        robotScritpTemplateVO.setTime_stamp(1566227782278333L);
//        robotScritpTemplateVO.setSign(null);
//        robotScritpTemplateVO.setEngine("ali");
//        robotScritpTemplateVO.setAsr_sample("8000");
//        robotScritpTemplateVO.setAsr_ent("ZurNHpaQLq6P55YS");
//        robotScritpTemplateVO.setTts_ent("ZurNHpaQLq6P55YS");
//        robotScritpTemplateVO.setTts_vcn("Aixia");
//        robotScritpTemplateVO.setTts_volume(100);
//        robotScritpTemplateVO.setTts_speed(-300);
//        robotScritpTemplateVO.setDial_mode("呼叫对接方式,FS注册到网关、网关注册到FS、IP对接、IP校验账号对接");
//        robotScritpTemplateVO.setDial_server("call_out_group,192.168.2.108:5060");
//        robotScritpTemplateVO.setOutbound_codes("PCMU,PCMA,OPUS,G722");
//        robotScritpTemplateVO.setAuto_test(true);
//        RobotData robotData = new RobotData();
//        RobotDataConfig robotDataConfig = new RobotDataConfig();
//        robotDataConfig.setTemplate_name("inbound_88008001_16k_utf8.json");
//        robotData.setConfig(robotDataConfig);
//        robotScritpTemplateVO.setData(robotData);
//        md5(app_id+app_key+bs_uuid+ani+dnis+specify_ch+time_stamp)  specify_ch md5 æ—¶ true ç”¨ 1 æ›¿ä»£ï¼Œfalse ç”¨ 0 æ›¿ä»£;
        ObjectMapper objectMapper = new ObjectMapper();
        Map<String, Object> map = null;
        try {
            map = objectMapper.readValue(JSON.toJSONString(robotScritpTemplateVO), Map.class);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return sendReq(map, "/aiengine/ai_api/outbound");
    }
    private String sendReq(Map<String, Object> map, String path) {
        HttpEntity<Map<String, Object>> req = new HttpEntity<>(getHead(), map);
        HttpEntity<String> stringHttpEntity = HttpUtil.postJsonRequestV2(hzphoneIP + ":" + hzphonePort + path, req, String.class);
        String responseBody = null;
        try {
            responseBody = new String(stringHttpEntity.getBody().getBytes("ISO-8859-1"), "UTF-8");
            System.out.println("电话信息返回 : " + responseBody);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return new String(stringHttpEntity.getBody().getBytes(StandardCharsets.UTF_8));
    }
    private Map<String, String> getHead() {
        HashMap<String, String> header = new HashMap<>();
        header.put("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko");
        header.put("Content-Type", "application/json");
        return header;
    }
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
@@ -30,19 +30,19 @@
    @ApiModelProperty(value = "主键")
    private Long ID;
    /**
     * æŒ‡æ ‡id
     */
    @Excel(name = "指标id")
    @ApiModelProperty(value = "指标id")
    private Integer targetid;
    /**
     * æŒ‡æ ‡å
     */
    @Excel(name = "指标名")
    @ApiModelProperty(value = "指标名")
    private String targetname;
//    /**
//     * æŒ‡æ ‡id
//     */
//    @Excel(name = "指标id")
//    @ApiModelProperty(value = "指标id")
//    private Integer targetid;
//
//    /**
//     * æŒ‡æ ‡å
//     */
//    @Excel(name = "指标名")
//    @ApiModelProperty(value = "指标名")
//    private String targetname;
    /**
     * æ¨¡æ¿å
@@ -57,20 +57,20 @@
    @Excel(name = "沉默时间")
    @ApiModelProperty(value = "沉默时间")
    private Long silencetime;
    /**
     * æ²‰é»˜æŒç»­æ—¶é—´
     */
    @Excel(name = "沉默持续时间")
    @ApiModelProperty(value = "沉默持续时间")
    private Long slienceRepeatTimes;
    /**
     * æ— åŒ¹é…æ—¶é—´
     */
    @Excel(name = "无匹配时间")
    @ApiModelProperty(value = "无匹配时间")
    private Long nomatchRepeatTimes;
//
//    /**
//     * æ²‰é»˜æŒç»­æ—¶é—´
//     */
//    @Excel(name = "沉默持续时间")
//    @ApiModelProperty(value = "沉默持续时间")
//    private Long slienceRepeatTimes;
//
//    /**
//     * æ— åŒ¹é…æ—¶é—´
//     */
//    @Excel(name = "无匹配时间")
//    @ApiModelProperty(value = "无匹配时间")
//    private Long nomatchRepeatTimes;
    /**
     * ç¬¬ä¸€æ¬¡é—®é¢˜ç¼–号
@@ -100,48 +100,48 @@
    @ApiModelProperty(value = "描述")
    private String note;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    /**
     * å›žå¤ï¼ˆæŒ‡é—®é¢˜çš„回复,给问答题用的)
     */
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * æ–°å¢žç”¨æˆ·ID
     */
    @Excel(name = "新增用户ID")
    @ApiModelProperty(value = "新增用户ID")
    private String addUserID;
    /**
     * æ–°å¢žæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "新增时间")
    private Date addTime;
    /**
     * ä¿®æ”¹ç”¨æˆ·ID
     */
    @Excel(name = "修改用户ID")
    @ApiModelProperty(value = "修改用户ID")
    private String modifyUserID;
    /**
     * ä¿®æ”¹æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;
//    /**
//     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
//     */
//    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
//    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
//    private Long valueType;
//
//    /**
//     * å›žå¤ï¼ˆæŒ‡é—®é¢˜çš„回复,给问答题用的)
//     */
//    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
//    private String reply;
//
//    /**
//     * æ–°å¢žç”¨æˆ·ID
//     */
//    @Excel(name = "新增用户ID")
//    @ApiModelProperty(value = "新增用户ID")
//    private String addUserID;
//
//    /**
//     * æ–°å¢žæ—¶é—´
//     */
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
//    @ApiModelProperty(value = "新增时间")
//    private Date addTime;
//
//    /**
//     * ä¿®æ”¹ç”¨æˆ·ID
//     */
//    @Excel(name = "修改用户ID")
//    @ApiModelProperty(value = "修改用户ID")
//    private String modifyUserID;
//
//    /**
//     * ä¿®æ”¹æ—¶é—´
//     */
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
//    @ApiModelProperty(value = "修改时间")
//    private Date modifyTime;
    /**
     * åˆ†ç»„ID
@@ -206,12 +206,12 @@
    @ApiModelProperty(value = "部门名称")
    private String deptNames = "";
    /**
     * F_KSDM
     */
    @Excel(name = "F_KSDM")
    @ApiModelProperty(value = "F_KSDM")
    private String fKsdm;
//    /**
//     * F_KSDM
//     */
//    @Excel(name = "F_KSDM")
//    @ApiModelProperty(value = "F_KSDM")
//    private String fKsdm;
    /**
     * åˆ é™¤æ ‡è®°
@@ -320,12 +320,12 @@
    @ApiModelProperty(value = "适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
//    /**
//     * æ ‡ç­¾
//     */
//    @Excel(name = "其它数据(存储变量)")
//    @ApiModelProperty(value = "其它数据(存储变量)")
//    private String otherdata;
    /**
     * éšè®¿å‰è¯æœ¯ï¼ˆå¼€åœºç™½ï¼‰
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
@@ -132,19 +132,19 @@
    @ApiModelProperty(value = "类别名")
    private String categoryName;
    /**
     * æŒ‡æ ‡é€‰é¡¹
     */
    @Excel(name = "指标选项")
    @ApiModelProperty(value = "指标选项")
    private String targetOptions;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
//    /**
//     * æŒ‡æ ‡é€‰é¡¹
//     */
//    @Excel(name = "指标选项")
//    @ApiModelProperty(value = "指标选项")
//    private String targetOptions;
//
//    /**
//     * è¯­è¨€
//     */
//    @Excel(name = "语言")
//    @ApiModelProperty(value = "语言")
//    private String language;
    /**
     * åªèƒ½æ’­æ”¾WAV类型
@@ -215,11 +215,11 @@
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "指标类型")
    private Integer targettype;
//    /**
//     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
//     */
//    @ApiModelProperty(value = "指标类型")
//    private Integer targettype;
    /**
     * ä¸‹ä¸€é¢˜
@@ -254,10 +254,10 @@
    @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)")
    private String isMust;
    /**
     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
     */
    @Excel(name = "问题结果(给“值类型”是文本或者数值用的)")
    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
    private String questionResult;
//    /**
//     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
//     */
//    @Excel(name = "问题结果(给“值类型”是文本或者数值用的)")
//    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
//    private String questionResult;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
@@ -132,19 +132,19 @@
    @ApiModelProperty(value = "类别名")
    private String categoryName;
    /**
     * æŒ‡æ ‡é€‰é¡¹
     */
    @Excel(name = "指标选项")
    @ApiModelProperty(value = "指标选项")
    private String targetOptions;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
//    /**
//     * æŒ‡æ ‡é€‰é¡¹
//     */
//    @Excel(name = "指标选项")
//    @ApiModelProperty(value = "指标选项")
//    private String targetOptions;
//
//    /**
//     * è¯­è¨€
//     */
//    @Excel(name = "语言")
//    @ApiModelProperty(value = "语言")
//    private String language;
    /**
     * åªèƒ½æ’­æ”¾WAV类型
@@ -208,11 +208,11 @@
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * åŸºç¡€æŒ‡æ ‡ç±»åž‹
     */
    @ApiModelProperty(value = "基础指标类型")
    private Integer targetType;
//    /**
//     * åŸºç¡€æŒ‡æ ‡ç±»åž‹
//     */
//    @ApiModelProperty(value = "基础指标类型")
//    private Integer targetType;
    /**
     * åŸºç¡€æŒ‡æ ‡id
@@ -254,12 +254,12 @@
    @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)")
    private String isMust;
    /**
     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
     */
    @Excel(name = "问题结果(给“值类型”是文本或者数值用的)")
    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
    private String questionResult;
//    /**
//     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
//     */
//    @Excel(name = "问题结果(给“值类型”是文本或者数值用的)")
//    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
//    private String questionResult;
    /**
     * è¯æœ¯é€‰é¡¹
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTarget.java
ÎļþÒÑɾ³ý
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
@@ -140,19 +140,19 @@
    @ApiModelProperty(value = "是否异常标识")
    private Long isabnormal;
    /**
     * é¢„警阀值上限
     */
    @Excel(name = "预警阀值上限")
    @ApiModelProperty(value = "预警阀值上限")
    private Long warnup;
    /**
     * é¢„警阀值下限
     */
    @Excel(name = "预警阀值下限")
    @ApiModelProperty(value = "预警阀值下限")
    private Long warndown;
//    /**
//     * é¢„警阀值上限
//     */
//    @Excel(name = "预警阀值上限")
//    @ApiModelProperty(value = "预警阀值上限")
//    private Long warnup;
//
//    /**
//     * é¢„警阀值下限
//     */
//    @Excel(name = "预警阀值下限")
//    @ApiModelProperty(value = "预警阀值下限")
//    private Long warndown;
    /**
     * åˆ é™¤æ ‡è®°
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java
@@ -36,19 +36,19 @@
    @ApiModelProperty(value = "模板名 ")
    private String templateName;
    /**
     * æŒ‡æ ‡id
     */
    @Excel(name = "指标id")
    @ApiModelProperty(value = "指标id")
    private Integer targetid;
    /**
     * æŒ‡æ ‡å
     */
    @Excel(name = "指标名")
    @ApiModelProperty(value = "指标名")
    private Integer targetname;
//    /**
//     * æŒ‡æ ‡id
//     */
//    @Excel(name = "指标id")
//    @ApiModelProperty(value = "指标id")
//    private Integer targetid;
//
//    /**
//     * æŒ‡æ ‡å
//     */
//    @Excel(name = "指标名")
//    @ApiModelProperty(value = "指标名")
//    private Integer targetname;
    /**
     * æ²‰é»˜æ—¶é—´
@@ -56,20 +56,20 @@
    @Excel(name = "沉默时间")
    @ApiModelProperty(value = "沉默时间")
    private Long silencetime;
//
//    /**
//     * æ²‰é»˜æŒç»­æ—¶é—´
//     */
//    @Excel(name = "沉默持续时间")
//    @ApiModelProperty(value = "沉默持续时间")
//    private Long slienceRepeatTimes;
    /**
     * æ²‰é»˜æŒç»­æ—¶é—´
     */
    @Excel(name = "沉默持续时间")
    @ApiModelProperty(value = "沉默持续时间")
    private Long slienceRepeatTimes;
    /**
     * æ— åŒ¹é…æ—¶é—´
     */
    @Excel(name = "无匹配时间")
    @ApiModelProperty(value = "无匹配时间")
    private Long nomatchRepeatTimes;
//    /**
//     * æ— åŒ¹é…æ—¶é—´
//     */
//    @Excel(name = "无匹配时间")
//    @ApiModelProperty(value = "无匹配时间")
//    private Long nomatchRepeatTimes;
    /**
     * ç¬¬ä¸€æ¬¡é—®é¢˜ç¼–号
@@ -99,46 +99,46 @@
    @ApiModelProperty(value = "描述")
    private String note;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
//    /**
//     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
//     */
//    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
//    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
//    private Long valueType;
//
//
//    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
//    private String reply;
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * æ–°å¢žç”¨æˆ·ID
     */
    @Excel(name = "新增用户ID")
    @ApiModelProperty(value = "新增用户ID")
    private String addUserID;
    /**
     * æ–°å¢žæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "新增时间")
    private Date addTime;
    /**
     * ä¿®æ”¹ç”¨æˆ·ID
     */
    @Excel(name = "修改用户ID")
    @ApiModelProperty(value = "修改用户ID")
    private String modifyUserID;
    /**
     * ä¿®æ”¹æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;
//    /**
//     * æ–°å¢žç”¨æˆ·ID
//     */
//    @Excel(name = "新增用户ID")
//    @ApiModelProperty(value = "新增用户ID")
//    private String addUserID;
//
//    /**
//     * æ–°å¢žæ—¶é—´
//     */
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
//    @ApiModelProperty(value = "新增时间")
//    private Date addTime;
//
//    /**
//     * ä¿®æ”¹ç”¨æˆ·ID
//     */
//    @Excel(name = "修改用户ID")
//    @ApiModelProperty(value = "修改用户ID")
//    private String modifyUserID;
//
//    /**
//     * ä¿®æ”¹æ—¶é—´
//     */
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
//    @ApiModelProperty(value = "修改时间")
//    private Date modifyTime;
    /**
     * åˆ†ç»„ID
@@ -181,13 +181,13 @@
    @Excel(name = "疾病关联名称")
    @ApiModelProperty(value = "疾病关联名称")
    private String icd10codename;
    /**
     * atuoTaskDayOffset
     */
    @Excel(name = "atuoTaskDayOffset")
    @ApiModelProperty(value = "atuoTaskDayOffset")
    private Long atuoTaskDayOffset;
//
//    /**
//     * atuoTaskDayOffset
//     */
//    @Excel(name = "atuoTaskDayOffset")
//    @ApiModelProperty(value = "atuoTaskDayOffset")
//    private Long atuoTaskDayOffset;
    /**
     * éƒ¨é—¨ID
@@ -203,12 +203,12 @@
    @ApiModelProperty(value = "部门名称")
    private String deptNames = "";
    /**
     * F_KSDM
     */
    @Excel(name = "F_KSDM")
    @ApiModelProperty(value = "F_KSDM")
    private String fKsdm;
//    /**
//     * F_KSDM
//     */
//    @Excel(name = "F_KSDM")
//    @ApiModelProperty(value = "F_KSDM")
//    private String fKsdm;
    /**
     * åˆ é™¤æ ‡è®°
@@ -329,12 +329,12 @@
    @ApiModelProperty(value = "静默次数")
    private Long noVoiceNum = 0L;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
//    /**
//     * æ ‡ç­¾
//     */
//    @Excel(name = "其它数据(存储变量)")
//    @ApiModelProperty(value = "其它数据(存储变量)")
//    private String otherdata;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
smartor/src/main/java/com/smartor/domain/IvrTask.java
@@ -38,7 +38,19 @@
     */
    @Excel(name = "模板ID ")
    @ApiModelProperty(value = "模板ID")
    private String templateid;
    private Long templateid;
    /**
     * æ¨¡æ¿åº“模版名称
     */
    @Excel(name = "模板库模版名称")
    private String libtemplatename;
    /**
     * æ¨¡æ¿åº“模版ID
     */
    @Excel(name = "模板库模版ID")
    private String libtemplateid;
    /**
     * æ¨¡æ¿åç§°
@@ -54,12 +66,12 @@
    @ApiModelProperty(value = "标签信息")
    private String labelinfo;
    /**
     * çŠ¶æ€
     */
    @Excel(name = "状态")
    @ApiModelProperty(value = "状态")
    private Long state;
//    /**
//     * çŠ¶æ€
//     */
//    @Excel(name = "状态")
//    @ApiModelProperty(value = "状态")
//    private Long state;
    /**
     * æ•°é‡
@@ -147,26 +159,34 @@
    @ApiModelProperty(value = "类型名称")
    private String typename;
    /**
     * 0.不使用播前短信 1.使用播前短信
     */
    @Excel(name = " 0.不使用播前短信 1.使用播前短信 ")
    @ApiModelProperty(value = "科室名称")
    private Long usebqsms;
    /**
     * 0.不使用播后短信 1.使用播前短信
     * ç±»åž‹åç§°
     */
    @Excel(name = " 0.不使用播后短信 1.使用播前短信 ")
    @ApiModelProperty(value = "0.不使用播前短信 1.使用播前短信 ")
    private Long usebhsms;
    @Excel(name = "发送时间段")
    @ApiModelProperty(value = "发送时间段")
    private String sendTimeSlot;
    /**
     * 0.不使用播后短信 1.使用播后短信
     */
    @Excel(name = " 0.不使用播后短信 1.使用播后短信 ")
    @ApiModelProperty(value = " 0.不使用播后短信 1.使用播后短信 ")
    private Long usesendsms;
//    /**
//     * 0.不使用播前短信 1.使用播前短信
//     */
//    @Excel(name = " 0.不使用播前短信 1.使用播前短信 ")
//    @ApiModelProperty(value = "科室名称")
//    private Long usebqsms;
//
//    /**
//     * 0.不使用播后短信 1.使用播前短信
//     */
//    @Excel(name = " 0.不使用播后短信 1.使用播前短信 ")
//    @ApiModelProperty(value = "0.不使用播前短信 1.使用播前短信 ")
//    private Long usebhsms;
//
//    /**
//     * 0.不使用播后短信 1.使用播后短信
//     */
//    @Excel(name = " 0.不使用播后短信 1.使用播后短信 ")
//    @ApiModelProperty(value = " 0.不使用播后短信 1.使用播后短信 ")
//    private Long usesendsms;
    /**
     * éƒ¨é—¨code
@@ -238,12 +258,12 @@
    @ApiModelProperty(value = "发送状态: 1创建   2执行中   3 æš‚停   4终止  5完成 ")
    private String sendState;
    /**
     * æ–‡æœ¬å˜é‡å‚æ•°
     */
    @Excel(name = " æ–‡æœ¬å˜é‡å‚æ•° ")
    @ApiModelProperty(value = "文本变量参数 ")
    private String param;
//    /**
//     * æ–‡æœ¬å˜é‡å‚æ•°
//     */
//    @Excel(name = " æ–‡æœ¬å˜é‡å‚æ•° ")
//    @ApiModelProperty(value = "文本变量参数 ")
//    private String param;
    /**
     * pageNum
@@ -264,12 +284,12 @@
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病)")
    private String hospType;
    /**
     * å°±è¯Šç¼–号(对应的outhospno、inhospno)
     */
    @Excel(name = "  å°±è¯Šç¼–号(对应的outhospno、inhospno)  ")
    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
    private String hospno;
//    /**
//     * å°±è¯Šç¼–号(对应的outhospno、inhospno)
//     */
//    @Excel(name = "  å°±è¯Šç¼–号(对应的outhospno、inhospno)  ")
//    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
//    private String hospno;
    /**
     * ä»»åŠ¡æè¿°
@@ -277,4 +297,11 @@
    @Excel(name = "任务描述")
    @ApiModelProperty(value = "任务描述")
    private String taskDesc;
    /**
     * æš‚停状态 ï¼š çŠ¶æ€å¦‚æžœå‘ç”Ÿä¿®æ”¹ï¼Œå€¼å°±åŠ 1
     */
    @Excel(name = "暂停状态 ï¼š çŠ¶æ€å¦‚æžœå‘ç”Ÿä¿®æ”¹ï¼Œå€¼å°±åŠ 1")
    @ApiModelProperty(value = "暂停状态 ï¼š çŠ¶æ€å¦‚æžœå‘ç”Ÿä¿®æ”¹ï¼Œå€¼å°±åŠ 1")
    private Long stopState = 0L;
}
smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java
@@ -3,6 +3,7 @@
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
@@ -14,9 +15,9 @@
 * @author ruoyi
 * @date 2024-02-02
 */
@ApiModel(value = "IvrTaskSingle", description = "单一随访任务")
@Data
public class IvrTaskSingle extends BaseEntity {
    @ApiModelProperty(value = "单一任务(随访)")
    private static final long serialVersionUID = 1L;
    /**
@@ -93,7 +94,7 @@
     */
    @Excel(name = "  æ¨¡æ¿ID")
    @ApiModelProperty(value = "模板ID")
    private String templateid;
    private Long templateid;
    /**
     * æ¨¡æ¿å
@@ -182,32 +183,11 @@
    private Date finishtime;
    /**
     * ç”¨æˆ·ID
     */
    @Excel(name = " ç”¨æˆ·ID ")
    @ApiModelProperty(value = "用户ID")
    private String userid;
    /**
     * ç”¨æˆ·å
     */
    @Excel(name = " ç”¨æˆ·å ")
    @ApiModelProperty(value = "用户名")
    private String username;
    /**
     * å°±è¯Šè®°å½•编号
     */
    @Excel(name = " å°±è¯Šè®°å½•编号 ")
    @ApiModelProperty(value = "就诊记录编号")
    private Long recordid;
    /**
     * é‡æ‹¨æ€»æ•°
     */
    @Excel(name = " é‡æ‹¨æ€»æ•° ")
    @ApiModelProperty(value = "重拨总数")
    private Long recallcount;
    /**
     * å½“前重拨次数
@@ -223,20 +203,6 @@
    @Excel(name = " æ‹‰å–æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "拉取时间")
    private Date pulltime;
    /**
     * bqsms
     */
    @Excel(name = " bqsms ")
    @ApiModelProperty(value = "bqsms")
    private Long bqsms;
    /**
     * bhsms
     */
    @Excel(name = " bhsms ")
    @ApiModelProperty(value = "bhsms")
    private Long bhsms;
    /**
     * éƒ¨é—¨code
@@ -316,27 +282,6 @@
    private String bedNo;
    /**
     * ç–¾ç—…名称
     */
    @Excel(name = "疾病名称")
    @ApiModelProperty(value = "疾病名称")
    private String icdName;
    /**
     * ç—…历号
     */
    @Excel(name = "病历号")
    @ApiModelProperty(value = "病历号")
    private String medicalRecordNo;
    /**
     * å®£æ•™å†…容
     */
    @Excel(name = "宣教内容")
    @ApiModelProperty(value = "宣教内容")
    private String preachcontent;
    /**
     * pageNum
     */
    @Excel(name = "pageNum")
@@ -356,14 +301,6 @@
     */
    @ApiModelProperty(value = "发送类型: 1 æ—¶é—´æ®µ   2 æ—¶é—´ç‚¹   3 å³åˆ»å‘送")
    private String sendType;
    /**
     * å‘送时间段
     */
    @Excel(name = "发送时间段")
    @ApiModelProperty(value = "发送时间段")
    private String sendTimeSlot;
    /**
     * ä»»åŠ¡åç§°
@@ -444,4 +381,19 @@
    @ApiModelProperty(value = "病房号")
    private String roomno;
    /**
     * æ¨¡æ¿åº“模版ID
     */
    @Excel(name = "模板库模版ID")
    @ApiModelProperty(value = "模板库模版ID")
    private Long libtemplateid;
    /**
     * æ¨¡æ¿åº“模版名称
     */
    @Excel(name = "模板库模版名称")
    @ApiModelProperty(value = "模板库模版名称")
    private String libtemplatename;
}
smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java
@@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -16,6 +17,7 @@
 * @author ruoyi
 * @date 2024-02-02
 */
@ApiModel(value = "IvrTaskSingleVO", description = "单一随访任务入参")
@Data
public class IvrTaskSingleVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -94,7 +96,21 @@
     */
    @Excel(name = "  æ¨¡æ¿ID")
    @ApiModelProperty(value = "模板ID")
    private String templateid;
    private Long templateid;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "  æ¨¡ç‰ˆåº“模板ID")
    @ApiModelProperty(value = "模版库模板ID")
    private Long libtemplateid;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "  æ¨¡æ¿åº“模板名称")
    @ApiModelProperty(value = "模板库模板名称")
    private String libtemplatename;
    /**
     * æ¨¡æ¿å
@@ -163,15 +179,9 @@
     * å‘送状态
     */
    @Excel(name = " å‘送状态 ")
    @ApiModelProperty(value = "发送状态 ï¼š1 å¼€å§‹  2 ä¸­æ­¢  3 ç»“束")
    @ApiModelProperty(value = "发送状态 : 1新建 2执行中 3暂停 4终止 5完成")
    private Long sendstate;
    /**
     * å‘送UUID
     */
    @Excel(name = " å‘送UUID ")
    @ApiModelProperty(value = "发送UUID")
    private String senduuid;
    /**
     * ç»“æžœ
@@ -188,20 +198,6 @@
    @ApiModelProperty(value = "完成时间")
    private Date finishtime;
    /**
     * ç”¨æˆ·ID
     */
    @Excel(name = " ç”¨æˆ·ID ")
    @ApiModelProperty(value = "用户ID")
    private String userid;
    /**
     * ç”¨æˆ·å
     */
    @Excel(name = " ç”¨æˆ·å ")
    @ApiModelProperty(value = "用户名")
    private String username;
    /**
     * å°±è¯Šè®°å½•编号
@@ -210,12 +206,6 @@
    @ApiModelProperty(value = "就诊记录编号")
    private Long recordid;
    /**
     * é‡æ‹¨æ€»æ•°
     */
    @Excel(name = " é‡æ‹¨æ€»æ•° ")
    @ApiModelProperty(value = "重拨总数")
    private Long recallcount;
    /**
     * å½“前重拨次数
smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,382 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“å¯¹è±¡ ivr_task_template
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Data
@ApiModel(value = "IvrTaskTemplate", description = "随访任务随访模板库对象")
public class IvrTaskTemplate extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®
     */
    @ApiModelProperty(value = "主键")
    private Long ID;
    /**
     * ä»»åŠ¡id
     */
    @Excel(name = "任务id")
    @ApiModelProperty(value = "任务id")
    private Long taskid;
    /**
     * ä»»åŠ¡åç§°
     */
    @Excel(name = "任务名称")
    @ApiModelProperty(value = "任务名称")
    private String taskname;
    /**
     * æŒ‡æ ‡id
     */
    @Excel(name = "指标id")
    @ApiModelProperty(value = "指标id")
    private Long targetid;
    /**
     * æŒ‡æ ‡å
     */
    @Excel(name = "指标名")
    @ApiModelProperty(value = "指标名")
    private String targetname;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "模板ID")
    @ApiModelProperty(value = "模板ID")
    private String templateName;
    /**
     * æ²‰é»˜æ—¶é—´
     */
    @Excel(name = "沉默时间")
    @ApiModelProperty(value = "沉默时间")
    private Long silencetime;
    /**
     * å…è®¸é‡æ‹¨æ¬¡æ•°
     */
    @Excel(name = "允许重拨次数")
    @ApiModelProperty(value = "允许重拨次数")
    private Long recallcount;
    /**
     * æ²‰é»˜æŒç»­æ—¶é—´
     */
    @Excel(name = "沉默持续时间")
    @ApiModelProperty(value = "沉默持续时间")
    private Long slienceRepeatTimes;
    /**
     * æ— åŒ¹é…æ—¶é—´
     */
    @Excel(name = "无匹配时间")
    @ApiModelProperty(value = "无匹配时间")
    private Long nomatchRepeatTimes;
    /**
     * ç¬¬ä¸€æ¬¡é—®é¢˜ç¼–号
     */
    @Excel(name = "第一次问题编号")
    @ApiModelProperty(value = "第一次问题编号")
    private Long firstQuestionNum;
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯
     */
    @Excel(name = "通用匹配话术")
    @ApiModelProperty(value = "通用匹配话术")
    private String submodule;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
    /**
     * æè¿°
     */
    @Excel(name = "描述")
    @ApiModelProperty(value = "描述")
    private String note;
    /**
     * å›žå¤ï¼ˆæŒ‡é—®é¢˜çš„回复,给问答题用的)
     */
    @Excel(name = "回复", readConverterExp = "指=问题的回复,给问答题用的")
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    private Long valueType;
    /**
     * æ–°å¢žç”¨æˆ·ID
     */
    @Excel(name = "新增用户ID")
    @ApiModelProperty(value = "新增用户ID")
    private String addUserID;
    /**
     * æ–°å¢žæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "新增时间")
    private Date addTime;
    /**
     * ä¿®æ”¹ç”¨æˆ·ID
     */
    @Excel(name = "修改用户ID")
    @ApiModelProperty(value = "修改用户ID")
    private String modifyUserID;
    /**
     * ä¿®æ”¹æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;
    /**
     * åˆ†ç»„ID
     */
    @Excel(name = "分组ID")
    @ApiModelProperty(value = "分组ID")
    private String groupID;
    /**
     * æ ‡ç­¾ä¿¡æ¯
     */
    @Excel(name = "标签信息")
    @ApiModelProperty(value = "标签信息")
    private String labelInfo;
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯id(通用模板ID)
     */
    @Excel(name = "通用匹配话术id", readConverterExp = "通=用模板ID")
    @ApiModelProperty(value = "通用匹配话术id(通用模板ID)")
    private String submoduleID;
    /**
     * æ’­æŠ¥ç±»åž‹ 0.语音优先 1.文字优先
     */
    @Excel(name = "播报类型 0.语音优先 1.文字优先")
    @ApiModelProperty(value = "播报类型 0.语音优先 1.文字优先")
    private Long playType;
    /**
     * ç–¾ç—…关联
     */
    @Excel(name = "疾病关联")
    @ApiModelProperty(value = "疾病关联")
    private String icd10code;
    /**
     * ç–¾ç—…关联名称
     */
    @Excel(name = "疾病关联名称")
    @ApiModelProperty(value = "疾病关联名称")
    private String icd10codename;
    /**
     * atuoTaskDayOffset
     */
    @Excel(name = "atuoTaskDayOffset")
    @ApiModelProperty(value = "atuoTaskDayOffset")
    private Long atuoTaskDayOffset;
    /**
     * éƒ¨é—¨ID
     */
    @Excel(name = "部门ID")
    @ApiModelProperty(value = "部门ID")
    private String deptIds;
    /**
     * éƒ¨é—¨åç§°
     */
    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String deptNames;
    /**
     * F_KSDM
     */
    @Excel(name = "F_KSDM")
    @ApiModelProperty(value = "科室代码")
    private String fKsdm;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * åˆ†ç±»id
     */
    @Excel(name = "分类id")
    @ApiModelProperty(value = "分类id")
    private Long assortid;
    /**
     * å‚数变量
     */
    @Excel(name = "参数变量")
    @ApiModelProperty(value = "参数变量")
    private String parameter;
    /**
     * å¯ç”¨çŠ¶æ€(0可用   1不可用)
     */
    @Excel(name = "可用状态(0可用   1不可用)")
    @ApiModelProperty(value = "可用状态(0可用   1不可用)")
    private String usestate;
    /**
     * ç‰ˆæœ¬å·
     */
    @Excel(name = "版本号")
    @ApiModelProperty(value = "版本号")
    private String version;
    /**
     * é™¢åŒº
     */
    @Excel(name = "院区")
    @ApiModelProperty(value = "院区")
    private String campus;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "标签")
    @ApiModelProperty(value = "标签")
    private String tag;
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @Excel(name = "适用方式:调查表1,智能语音2、人工3")
    @ApiModelProperty(value = "适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据", readConverterExp = "存=储变量")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
    /**
     * æ— åŒ¹é…æ¬¡æ•°
     */
    @Excel(name = "无匹配次数")
    @ApiModelProperty(value = "无匹配次数")
    private Long mateNum;
    /**
     * éšè®¿å‰
     */
    @Excel(name = "随访前")
    @ApiModelProperty(value = "随访前")
    private String revisitBefore;
    /**
     * éšè®¿åŽ
     */
    @Excel(name = "随访后")
    @ApiModelProperty(value = "随访后")
    private String revisitAfter;
    /**
     * é™é»˜æ¬¡æ•°
     */
    @Excel(name = "静默次数")
    @ApiModelProperty(value = "静默次数")
    private Long noVoiceNum;
    /**
     * å¼€åœºç™½
     */
    @Excel(name = "开场白")
    @ApiModelProperty(value = "开场白")
    private String prologue;
    /**
     * æ¨¡æ¿åº“模版ID
     */
    @Excel(name = "模板库模版ID")
    @ApiModelProperty(value = "模板库模版ID")
    private String libtemplateid;
    /**
     * æ¨¡æ¿åº“模版名称
     */
    @Excel(name = "模板库模版名称")
    @ApiModelProperty(value = "模板库模版名称")
    private String libtemplatename;
}
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,268 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“å¯¹è±¡ ivr_task_template_script
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Data
@ApiModel(value = "IvrTaskTemplateScript", description = "随访任务模版问题话术库对象")
public class IvrTaskTemplateScript extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®ID
     */
    @ApiModelProperty(value = "主键")
    private Long ID;
    /**
     * ä»»åŠ¡id
     */
    @Excel(name = "任务id")
    @ApiModelProperty(value = "任务id")
    private Long taskid;
    /**
     * æ¨¡æ¿è¯æœ¯ç¼–号
     */
    @Excel(name = "模板话术编号")
    @ApiModelProperty(value = "模板话术编号")
    private Long templateQuestionNum;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "模板ID")
    @ApiModelProperty(value = "模板ID")
    private Long templateID;
    /**
     * è¯æœ¯ID
     */
    @Excel(name = "话术ID")
    @ApiModelProperty(value = "话术ID")
    private Long scriptID;
    /**
     * é—®é¢˜ç‚¹
     */
    @Excel(name = "问题点")
    @ApiModelProperty(value = "问题点")
    private String questionPoint;
    /**
     * è¯æœ¯å†…容
     */
    @Excel(name = "话术内容")
    @ApiModelProperty(value = "话术内容")
    private String questionText;
    /**
     * è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "话术语音")
    @ApiModelProperty(value = "话术语音")
    private String questionVoice;
    /**
     * æ— åŒ¹é…è¯æœ¯
     */
    @Excel(name = "无匹配话术")
    @ApiModelProperty(value = "无匹配话术")
    private String noMatchText;
    /**
     * æ— åŒ¹é…è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "无匹配话术语音")
    @ApiModelProperty(value = "无匹配话术语音")
    private String noMatchVoice;
    /**
     * é™é»˜è¯æœ¯
     */
    @Excel(name = "静默话术")
    @ApiModelProperty(value = "静默话术")
    private String slienceText;
    /**
     * é™é»˜è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "静默话术语音")
    @ApiModelProperty(value = "静默话术语音")
    private String slienceVoice;
    /**
     * é€šç”¨åº“匹配后话术
     */
    @Excel(name = "通用库匹配后话术")
    @ApiModelProperty(value = "通用库匹配后话术")
    private String submoduleText;
    /**
     * é€šç”¨åº“匹配后话术语音
     */
    @Excel(name = "通用库匹配后话术语音")
    @ApiModelProperty(value = "通用库匹配后话术语音")
    private String submoduleVoice;
    /**
     * å¬ä¸æ¸…话术
     */
    @Excel(name = "听不清话术")
    @ApiModelProperty(value = "听不清话术")
    private String noClearlyText;
    /**
     * å¬ä¸æ¸…话术语音
     */
    @Excel(name = "听不清话术语音")
    @ApiModelProperty(value = "听不清话术语音")
    private String noClearlyVoice;
    /**
     * ç±»åˆ«å
     */
    @Excel(name = "类别名")
    @ApiModelProperty(value = "类别名")
    private String categoryName;
    /**
     * æŒ‡æ ‡é€‰é¡¹
     */
    @Excel(name = "指标选项")
    @ApiModelProperty(value = "指标选项")
    private String targetOptions;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
    /**
     * åªèƒ½æ’­æ”¾WAV类型
     */
    @Excel(name = "只能播放WAV类型")
    @ApiModelProperty(value = "只能播放WAV类型")
    private Long playWavOnly;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @Excel(name = "值类型", readConverterExp = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    @ApiModelProperty(value = "主键")
    private Long valueType;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * åŸºç¡€æŒ‡æ ‡ç±»åž‹
     */
    @Excel(name = "基础指标类型")
    @ApiModelProperty(value = "基础指标类型")
    private String targettype;
    /**
     * åŸºç¡€æŒ‡æ ‡ID(暂时当序号id)
     */
    @Excel(name = "基础指标ID(暂时当序号id)")
    @ApiModelProperty(value = "基础指标ID(暂时当序号id)")
    private Long targetid;
    /**
     * åŸºç¡€æŒ‡æ ‡å€¼
     */
    @Excel(name = "基础指标值")
    @ApiModelProperty(value = "基础指标值")
    private String targetvalue;
    /**
     * æ ‡é¢˜
     */
    @Excel(name = "标题")
    @ApiModelProperty(value = "标题")
    private String questiontitle;
    /**
     * ä¸‹ä¸€é¢˜
     */
    @Excel(name = "下一题")
    @ApiModelProperty(value = "下一题")
    private Long nextQuestion;
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据", readConverterExp = "存=储变量")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
    /**
     * æ˜¯å¦å¿…å¡«,1:必填    2:可以不填    ï¼ˆç»™äººå·¥ç”¨çš„,AI不用遵守)
     */
    @Excel(name = "是否必填,1:必填    2:可以不填    ", readConverterExp = "给=人工用的,AI不用遵守")
    @ApiModelProperty(value = "是否必填,1:必填    2:可以不填    ï¼ˆç»™äººå·¥ç”¨çš„,AI不用遵守)")
    private String isMust;
    /**
     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
     */
    @Excel(name = "问题结果", readConverterExp = "给=“值类型”是文本或者数值用的")
    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
    private String questionResult;
}
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,282 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“å¯¹è±¡ ivr_task_template_script
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Data
@ApiModel(value = "IvrTaskTemplateScriptVO", description = "随访任务模版问题话术库对象")
public class IvrTaskTemplateScriptVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®ID
     */
    @ApiModelProperty(value = "主键")
    private Long ID;
    /**
     * ä»»åŠ¡id
     */
    @Excel(name = "任务id")
    @ApiModelProperty(value = "任务id")
    private Long taskid;
    /**
     * æ¨¡æ¿è¯æœ¯ç¼–号
     */
    @Excel(name = "模板话术编号")
    @ApiModelProperty(value = "模板话术编号")
    private Long templateQuestionNum;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "模板ID")
    @ApiModelProperty(value = "模板ID")
    private Long templateID;
    /**
     * è¯æœ¯ID
     */
    @Excel(name = "话术ID")
    @ApiModelProperty(value = "话术ID")
    private Long scriptID;
    /**
     * é—®é¢˜ç‚¹
     */
    @Excel(name = "问题点")
    @ApiModelProperty(value = "问题点")
    private String questionPoint;
    /**
     * è¯æœ¯å†…容
     */
    @Excel(name = "话术内容")
    @ApiModelProperty(value = "话术内容")
    private String questionText;
    /**
     * è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "话术语音")
    @ApiModelProperty(value = "话术语音")
    private String questionVoice;
    /**
     * æ— åŒ¹é…è¯æœ¯
     */
    @Excel(name = "无匹配话术")
    @ApiModelProperty(value = "无匹配话术")
    private String noMatchText;
    /**
     * æ— åŒ¹é…è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "无匹配话术语音")
    @ApiModelProperty(value = "无匹配话术语音")
    private String noMatchVoice;
    /**
     * é™é»˜è¯æœ¯
     */
    @Excel(name = "静默话术")
    @ApiModelProperty(value = "静默话术")
    private String slienceText;
    /**
     * é™é»˜è¯æœ¯è¯­éŸ³
     */
    @Excel(name = "静默话术语音")
    @ApiModelProperty(value = "静默话术语音")
    private String slienceVoice;
    /**
     * é€šç”¨åº“匹配后话术
     */
    @Excel(name = "通用库匹配后话术")
    @ApiModelProperty(value = "通用库匹配后话术")
    private String submoduleText;
    /**
     * é€šç”¨åº“匹配后话术语音
     */
    @Excel(name = "通用库匹配后话术语音")
    @ApiModelProperty(value = "通用库匹配后话术语音")
    private String submoduleVoice;
    /**
     * å¬ä¸æ¸…话术
     */
    @Excel(name = "听不清话术")
    @ApiModelProperty(value = "听不清话术")
    private String noClearlyText;
    /**
     * å¬ä¸æ¸…话术语音
     */
    @Excel(name = "听不清话术语音")
    @ApiModelProperty(value = "听不清话术语音")
    private String noClearlyVoice;
    /**
     * ç±»åˆ«å
     */
    @Excel(name = "类别名")
    @ApiModelProperty(value = "类别名")
    private String categoryName;
    /**
     * æŒ‡æ ‡é€‰é¡¹
     */
    @Excel(name = "指标选项")
    @ApiModelProperty(value = "指标选项")
    private String targetOptions;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
    /**
     * åªèƒ½æ’­æ”¾WAV类型
     */
    @Excel(name = "只能播放WAV类型")
    @ApiModelProperty(value = "只能播放WAV类型")
    private Long playWavOnly;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @Excel(name = "值类型", readConverterExp = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    @ApiModelProperty(value = "主键")
    private Long valueType;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * åŸºç¡€æŒ‡æ ‡ç±»åž‹
     */
    @Excel(name = "基础指标类型")
    @ApiModelProperty(value = "基础指标类型")
    private String targettype;
    /**
     * åŸºç¡€æŒ‡æ ‡ID(暂时当序号id)
     */
    @Excel(name = "基础指标ID(暂时当序号id)")
    @ApiModelProperty(value = "基础指标ID(暂时当序号id)")
    private Long targetid;
    /**
     * åŸºç¡€æŒ‡æ ‡å€¼
     */
    @Excel(name = "基础指标值")
    @ApiModelProperty(value = "基础指标值")
    private String targetvalue;
    /**
     * æ ‡é¢˜
     */
    @Excel(name = "标题")
    @ApiModelProperty(value = "标题")
    private String questiontitle;
    /**
     * ä¸‹ä¸€é¢˜
     */
    @Excel(name = "下一题")
    @ApiModelProperty(value = "下一题")
    private Long nextQuestion;
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据", readConverterExp = "存=储变量")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
    /**
     * æ˜¯å¦å¿…å¡«,1:必填    2:可以不填    ï¼ˆç»™äººå·¥ç”¨çš„,AI不用遵守)
     */
    @Excel(name = "是否必填,1:必填    2:可以不填    ", readConverterExp = "给=人工用的,AI不用遵守")
    @ApiModelProperty(value = "是否必填,1:必填    2:可以不填    ï¼ˆç»™äººå·¥ç”¨çš„,AI不用遵守)")
    private String isMust;
    /**
     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
     */
    @Excel(name = "问题结果", readConverterExp = "给=“值类型”是文本或者数值用的")
    @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)")
    private String questionResult;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * è¯æœ¯é€‰é¡¹
     */
    @ApiModelProperty(value = "话术选项")
    private List<IvrTaskTemplateTargetoption> ivrTaskScriptTargetoptionList = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,239 @@
package com.smartor.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.junit.Ignore;
/**
 * éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“å¯¹è±¡ ivr_task_template_targetoption
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Data
@ApiModel(value = "IvrTaskTemplateTargetoption", description = "随访任务模板指标选项库对象")
public class IvrTaskTemplateTargetoption extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®
     */
    @ApiModelProperty(value = "主键")
    private Long id;
    /**
     * ä»»åŠ¡id
     */
    @Excel(name = "任务id")
    @ApiModelProperty(value = "任务id")
    private Long taskid;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "模板ID")
    @ApiModelProperty(value = "模板ID")
    private Long templateID;
    /**
     * æŒ‡æ ‡ID
     */
    @Excel(name = "指标ID")
    @ApiModelProperty(value = "指标ID")
    private Long targetid;
    /**
     * æŒ‡æ ‡åç§°
     */
    @Excel(name = "指标名称")
    @ApiModelProperty(value = "指标名称")
    private String targetname;
    /**
     * æ¨¡æ¿æŒ‡æ ‡ç±»åž‹
     */
    @Excel(name = "模板指标类型")
    @ApiModelProperty(value = "模板指标类型")
    private String targettype;
    /**
     * ç±»åˆ«åç§°
     */
    @Excel(name = "类别名称")
    @ApiModelProperty(value = "类别名称")
    private String categoryName;
    /**
     * æ¨¡æ¿æŒ‡æ ‡å€¼
     */
    @Excel(name = "模板指标值")
    @ApiModelProperty(value = "模板指标值")
    private String targetvalue;
    /**
     * æ¨¡æ¿æŒ‡æ ‡æ­£åˆ™2
     */
    @Excel(name = "模板指标正则2")
    @ApiModelProperty(value = "模板指标正则2")
    private String targetregex2;
    /**
     * æ¨¡æ¿æŒ‡æ ‡æ­£åˆ™
     */
    @Excel(name = "模板指标正则")
    @ApiModelProperty(value = "模板指标正则")
    private String targetregex;
    /**
     * é€‰é¡¹æè¿°
     */
    @Excel(name = "选项描述")
    @ApiModelProperty(value = "选项描述")
    private String optiondesc;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
    /**
     * ç‰ˆæœ¬
     */
    @Excel(name = "版本")
    @ApiModelProperty(value = "版本")
    private String version;
    /**
     * åˆ†ç»„ID
     */
    @Excel(name = "分组ID")
    @ApiModelProperty(value = "分组ID")
    private String groupid;
    /**
     * æ˜¯å¦å¼‚常标识
     */
    @Excel(name = "是否异常标识")
    @ApiModelProperty(value = "是否异常标识")
    private Long isabnormal;
    /**
     * é¢„警阀值上限
     */
    @Excel(name = "预警阀值上限")
    @ApiModelProperty(value = "预警阀值上限")
    private Long warnup;
    /**
     * é¢„警阀值下限
     */
    @Excel(name = "预警阀值下限")
    @ApiModelProperty(value = "预警阀值下限")
    private Long warndown;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * é—®é¢˜id
     */
    @Excel(name = "问题id")
    @ApiModelProperty(value = "问题id")
    private Long scriptid;
    /**
     * æ­£åˆ™å…³é”®å­—(含)
     */
    @Excel(name = "正则关键字(含)")
    @ApiModelProperty(value = "正则关键字(含)")
    private String nodynamiccruxsJson;
    /**
     * æ­£åˆ™å…³é”®å­—(不含)
     */
    @Excel(name = "正则关键字(不含)")
    @ApiModelProperty(value = "正则关键字(不含)")
    private String dynamiccruxsJson;
    @ApiModelProperty(value = "正则关键字(含)")
    @Excel(name = "正则关键字(含)")
    private List<String> nodynamiccruxs = new ArrayList<>();
    @ApiModelProperty(value = "正则关键字(不含)")
    @Excel(name = "正则关键字(不含)")
    private List<String> dynamiccruxs= new ArrayList<>();
    /**
     * ä¸‹ä¸€é¢˜
     */
    @Excel(name = "下一题")
    @ApiModelProperty(value = "下一题")
    private Long nextQuestion;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * æ˜¯å¦æ˜¯ç”¨æˆ·é€‰æ‹©çš„选项
     */
    @ApiModelProperty(value = "是否是用户选择的选项")
    private Boolean isUserOperation = false;
}
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,399 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“å¯¹è±¡ ivr_task_template
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Data
@ApiModel(value = "IvrTaskTemplateVO", description = "随访任务随访模板库对象")
public class IvrTaskTemplateVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®
     */
    @ApiModelProperty(value = "主键")
    private Long ID;
    /**
     * ä»»åŠ¡id
     */
    @Excel(name = "任务id")
    @ApiModelProperty(value = "任务id")
    private Long taskid;
    /**
     * ä»»åŠ¡åç§°
     */
    @Excel(name = "任务名称")
    @ApiModelProperty(value = "任务名称")
    private String taskname;
    /**
     * æŒ‡æ ‡id
     */
    @Excel(name = "指标id")
    @ApiModelProperty(value = "指标id")
    private Long targetid;
    /**
     * æŒ‡æ ‡å
     */
    @Excel(name = "指标名")
    @ApiModelProperty(value = "指标名")
    private String targetname;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = "模板ID")
    @ApiModelProperty(value = "模板ID")
    private String templateName;
    /**
     * æ²‰é»˜æ—¶é—´
     */
    @Excel(name = "沉默时间")
    @ApiModelProperty(value = "沉默时间")
    private Long silencetime;
    /**
     * æ²‰é»˜æŒç»­æ—¶é—´
     */
    @Excel(name = "沉默持续时间")
    @ApiModelProperty(value = "沉默持续时间")
    private Long slienceRepeatTimes;
    /**
     * æ— åŒ¹é…æ—¶é—´
     */
    @Excel(name = "无匹配时间")
    @ApiModelProperty(value = "无匹配时间")
    private Long nomatchRepeatTimes;
    /**
     * ç¬¬ä¸€æ¬¡é—®é¢˜ç¼–号
     */
    @Excel(name = "第一次问题编号")
    @ApiModelProperty(value = "第一次问题编号")
    private Long firstQuestionNum;
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯
     */
    @Excel(name = "通用匹配话术")
    @ApiModelProperty(value = "通用匹配话术")
    private String submodule;
    /**
     * è¯­è¨€
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;
    /**
     * æè¿°
     */
    @Excel(name = "描述")
    @ApiModelProperty(value = "描述")
    private String note;
    /**
     * å›žå¤ï¼ˆæŒ‡é—®é¢˜çš„回复,给问答题用的)
     */
    @Excel(name = "回复", readConverterExp = "指=问题的回复,给问答题用的")
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * å€¼ç±»åž‹ï¼ˆ1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰
     */
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    @ApiModelProperty(value = "值类型(1 é€‰é¡¹  2 æ–‡æœ¬  3 æ•°å€¼ï¼‰")
    private Long valueType;
    /**
     * æ–°å¢žç”¨æˆ·ID
     */
    @Excel(name = "新增用户ID")
    @ApiModelProperty(value = "新增用户ID")
    private String addUserID;
    /**
     * æ–°å¢žæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "新增时间")
    private Date addTime;
    /**
     * ä¿®æ”¹ç”¨æˆ·ID
     */
    @Excel(name = "修改用户ID")
    @ApiModelProperty(value = "修改用户ID")
    private String modifyUserID;
    /**
     * ä¿®æ”¹æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;
    /**
     * åˆ†ç»„ID
     */
    @Excel(name = "分组ID")
    @ApiModelProperty(value = "分组ID")
    private String groupID;
    /**
     * æ ‡ç­¾ä¿¡æ¯
     */
    @Excel(name = "标签信息")
    @ApiModelProperty(value = "标签信息")
    private String labelInfo;
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯id(通用模板ID)
     */
    @Excel(name = "通用匹配话术id", readConverterExp = "通=用模板ID")
    @ApiModelProperty(value = "通用匹配话术id(通用模板ID)")
    private String submoduleID;
    /**
     * æ’­æŠ¥ç±»åž‹ 0.语音优先 1.文字优先
     */
    @Excel(name = "播报类型 0.语音优先 1.文字优先")
    @ApiModelProperty(value = "播报类型 0.语音优先 1.文字优先")
    private Long playType;
    /**
     * ç–¾ç—…关联
     */
    @Excel(name = "疾病关联")
    @ApiModelProperty(value = "疾病关联")
    private String icd10code;
    /**
     * ç–¾ç—…关联名称
     */
    @Excel(name = "疾病关联名称")
    @ApiModelProperty(value = "疾病关联名称")
    private String icd10codename;
    /**
     * atuoTaskDayOffset
     */
    @Excel(name = "atuoTaskDayOffset")
    @ApiModelProperty(value = "atuoTaskDayOffset")
    private Long atuoTaskDayOffset;
    /**
     * éƒ¨é—¨ID
     */
    @Excel(name = "部门ID")
    @ApiModelProperty(value = "部门ID")
    private String deptIds;
    /**
     * éƒ¨é—¨åç§°
     */
    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String deptNames;
    /**
     * F_KSDM
     */
    @Excel(name = "F_KSDM")
    @ApiModelProperty(value = "科室代码")
    private String fKsdm;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * åˆ†ç±»id
     */
    @Excel(name = "分类id")
    @ApiModelProperty(value = "分类id")
    private Long assortid;
    /**
     * å‚数变量
     */
    @Excel(name = "参数变量")
    @ApiModelProperty(value = "参数变量")
    private String parameter;
    /**
     * å¯ç”¨çŠ¶æ€(0可用   1不可用)
     */
    @Excel(name = "可用状态(0可用   1不可用)")
    @ApiModelProperty(value = "可用状态(0可用   1不可用)")
    private String usestate;
    /**
     * ç‰ˆæœ¬å·
     */
    @Excel(name = "版本号")
    @ApiModelProperty(value = "版本号")
    private String version;
    /**
     * é™¢åŒº
     */
    @Excel(name = "院区")
    @ApiModelProperty(value = "院区")
    private String campus;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "标签")
    @ApiModelProperty(value = "标签")
    private String tag;
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @Excel(name = "适用方式:调查表1,智能语音2、人工3")
    @ApiModelProperty(value = "适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据", readConverterExp = "存=储变量")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
    /**
     * æ— åŒ¹é…æ¬¡æ•°
     */
    @Excel(name = "无匹配次数")
    @ApiModelProperty(value = "无匹配次数")
    private Long mateNum;
    /**
     * éšè®¿å‰
     */
    @Excel(name = "随访前")
    @ApiModelProperty(value = "随访前")
    private String revisitBefore;
    /**
     * éšè®¿åŽ
     */
    @Excel(name = "随访后")
    @ApiModelProperty(value = "随访后")
    private String revisitAfter;
    /**
     * é™é»˜æ¬¡æ•°
     */
    @Excel(name = "静默次数")
    @ApiModelProperty(value = "静默次数")
    private Long noVoiceNum;
    /**
     * å¼€åœºç™½
     */
    @Excel(name = "开场白")
    @ApiModelProperty(value = "开场白")
    private String prologue;
    /**
     * æ¨¡æ¿åº“模版ID
     */
    @Excel(name = "模板库模版ID")
    @ApiModelProperty(value = "模板库模版ID")
    private String libtemplateid;
    /**
     * æ¨¡æ¿åº“模版名称
     */
    @Excel(name = "模板库模版名称")
    @ApiModelProperty(value = "模板库模版名称")
    private String libtemplatename;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * å…è®¸é‡æ‹¨æ¬¡æ•°
     */
    @Excel(name = "允许重拨次数")
    @ApiModelProperty(value = "允许重拨次数")
    private String recallcount;
    @ApiModelProperty(value = "模板问题集合")
    private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList = new ArrayList<>();
//
//    @ApiModelProperty(value = "模板指标集合")
//    private List<IvrLibaTemplateTag> ivrLibaTemplateTagList = new ArrayList<>();
//
//    @ApiModelProperty(value = "模板科室关联表集合")
//    private List<TempDetpRelevance> tempDetpRelevances = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/IvrTaskVO.java
@@ -9,6 +9,7 @@
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
 * è¯­éŸ³ä»»åŠ¡å¯¹è±¡ ivr_task
@@ -42,7 +43,17 @@
     *
     */
    @Excel(name = "  ")
    private String templateid;
    private Long templateid;
    /**
     *
     */
    @Excel(name = "  ")
    private Long libtemplateid;
    /**
     *
     */
    @Excel(name = "  ")
    private String libtemplatename;
    /**
     *
@@ -210,5 +221,18 @@
    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
    private String hospno;
    /**
     * å‘送时间段
     */
    @ApiModelProperty(value = "发送时间段 ")
    private List<TaskSendTimeVO> sendTimeslot;
    /**
     * å‘送状态:  0  å¤±è´¥   1成功
     */
    @Excel(name = " å‘送状态: 1创建   2执行中   3 æš‚停   4终止  5完成 ")
    @ApiModelProperty(value = "发送状态: 1创建   2执行中   3 æš‚停   4终止  5完成 ")
    private String sendState;
}
smartor/src/main/java/com/smartor/domain/IvrTaskcallMQ.java
@@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -18,6 +19,7 @@
 * @author ruoyi
 * @date 2024-02-02
 */
@ApiModel(value = "IvrTaskcallMQ", description = "MQ任务")
@Data
public class IvrTaskcallMQ extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -37,11 +39,11 @@
    private String templateid;
    /**
     * æ¨¡æ¿ç±»åž‹
     * ä»»åŠ¡å‘é€æ–¹å¼ï¼šâ€œç”µè¯ï¼ŒçŸ­ä¿¡ï¼Œå…¬ä¼—å·ï¼Œé“¾æŽ¥...”以逗号分隔
     */
    @Excel(name = "  æ¨¡æ¿ç±»åž‹")
    @ApiModelProperty(value = "模板类型")
    private String templateType;
    @Excel(name = "任务发送方式:电话,短信,公众号,链接...")
    @ApiModelProperty(value = "务发送方式:电话,短信,公众号,链接...   ä»¥é€—号分隔")
    private String servicefrom;
    /**
@@ -50,6 +52,12 @@
    @ApiModelProperty(value = "发送类型: 1 æ—¶é—´æ®µ   2 å³åˆ»å‘送")
    private String sendType;
    /**
     * æš‚停状态 ï¼š çŠ¶æ€å¦‚æžœå‘ç”Ÿä¿®æ”¹ï¼Œå€¼å°±åŠ 1
     */
    @ApiModelProperty(value = "暂停状态 ï¼š çŠ¶æ€å¦‚æžœå‘ç”Ÿä¿®æ”¹ï¼Œå€¼å°±åŠ 1")
    private Long stopState;
    /**
     * å‘送时间段
smartor/src/main/java/com/smartor/domain/QuestionMessage.java
@@ -19,10 +19,10 @@
    private String jsy = null;
    //当前问题
    private IvrLibaTemplateScriptVO nowQuestion = new IvrLibaTemplateScriptVO();
    private IvrTaskTemplateScriptVO nowQuestion = new IvrTaskTemplateScriptVO();
    //问题清单
    private List<IvrLibaTemplateScriptVO> questionList = new ArrayList();
    private List<IvrTaskTemplateScriptVO> questionList = new ArrayList();
}
smartor/src/main/java/com/smartor/domain/SendTaskVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.smartor.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * å‘送类型入参
 */
@ApiModel(value = "SendTaskVO", description = "发送任务入参")
@Data
public class SendTaskVO extends BaseEntity {
    @ApiModelProperty(value = "任务ID")
    private Long taskId;
    @ApiModelProperty(value = "发送类型: 1 æ—¶é—´æ®µ   2 å³åˆ»å‘送")
    private String sendType;
    /**
     * å‘送状态:  0  å¤±è´¥   1成功
     */
    @Excel(name = " å‘送状态: 1创建   2执行中   3 æš‚停   4终止  5完成 ")
    @ApiModelProperty(value = "发送状态: 1创建   2执行中   3 æš‚停   4终止  5完成 ")
    private String sendState;
}
smartor/src/main/java/com/smartor/domain/robot/RobotData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package com.smartor.domain.robot;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class RobotData {
    @ApiModelProperty(value = "配置信息")
    private RobotDataConfig config;
    @ApiModelProperty(value = "版本")
    private List<RobotDataCustomVar> custom_var;
    @ApiModelProperty(value = "第一个任务ID")
    private String first_task_id;
}
smartor/src/main/java/com/smartor/domain/robot/RobotDataConfig.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.smartor.domain.robot;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RobotDataConfig {
    @ApiModelProperty(value = "模板名")
    private String template_name;
    @ApiModelProperty(value = "版本")
    private String version;
    @ApiModelProperty(value = "第一个任务ID")
    private String first_task_id;
    @ApiModelProperty(value = "用户最大静默检测时长,单位毫秒(ms),如:5000")
    private String silence_time;
    @ApiModelProperty(value = "静默提示最大重复次数,如:3")
    private String silence_count;
    @ApiModelProperty(value = "无匹配提示最大重复次数,如:3")
    private String nomatch_count;
    @ApiModelProperty(value = "是否重新加载通用库,true、false")
    private String reload_general_template;
    @ApiModelProperty(value = "需加载的通用库模板,如: ç³–尿病模板_通用库 1.jkg;糖尿病模 + æ¿_通用库 2.jkg, å¯ç”¨åˆ†å¼€åŠ è½½å¤šä¸ª")
    private String general_template;
    @ApiModelProperty(value = "")
    private String file_type;
    @ApiModelProperty(value = "该字段暂时不用,文本交互模式的引导语,如: æ‚¨å¥½ï¼Œæˆ‘是XX åŒ»é™¢çš„医生助手,请问有什么可以帮助您的吗? ")
    private String text_chat_guide;
    @ApiModelProperty(value = "该字段暂时不用,文本交互模式的导航的菜单显示标题,如:  ä¹³è…ºç–¾ç—…")
    private String text_chat_menu_title;
    @ApiModelProperty(value = "")
    private String hangup_action;
}
smartor/src/main/java/com/smartor/domain/robot/RobotDataCustomVar.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package com.smartor.domain.robot;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RobotDataCustomVar {
    @ApiModelProperty(value = "")
    private String var_name;
    @ApiModelProperty(value = "")
    private String var_type;
    @ApiModelProperty(value = "")
    private String var_value;
    @ApiModelProperty(value = "")
    private String var_annotate;
}
smartor/src/main/java/com/smartor/domain/robot/RobotIdlenumVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
package com.smartor.domain.robot;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
/**
 * ç”µè¯è¯æœ¯æ¨¡æ¿å›žå‚
 *
 * @author ruoyi
 * @date 2024-05-23
 */
@ApiModel(value = "RobotScritpTemplateVO", description = "电话话术模板回参")
@Data
public class RobotIdlenumVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    @ApiModelProperty(value = "授权 id")
    private String app_id;
    /**
     * æŽˆæƒ key(已加密过的 key)
     */
    @ApiModelProperty(value = "授权 key(已加密过的 key)")
    private String app_key;
    /**
     * ä¸»å«å·ç å³ç”µè¯çº¿è·¯çš„号码
     */
    @ApiModelProperty(value = "主叫号码即电话线路的号码")
    private String ani;
    /**
     * æ˜¯å¦æ˜¯ç‰¹æ®Šé€šé“呼出,值为:true、false 1.模拟线路:
     * special_ch=true åªä¼šæŒ‡å®šçº¿è·¯å·ç ä¸º ani çš„一条线路呼出。
     * special_ch=false ä¼šä»Ž app_id ä¸‹é¢é€‰å–任意一条空闲的模拟线路
     * å‘¼å‡ºã€‚此时 ani ä¸èµ·ä½œç”¨ã€‚实际外呼显示的号码不一定是 ani。
     * 2.数字线路
     * è¯¥å‚数对数字线路不起作用,数字线路会从 app_id ä¸‹é¢é€‰å–ä»»
     * æ„é€šé“,以 ani ä½œä¸ºä¸»å«å·ç æ¥å¤–呼显示
     */
    @ApiModelProperty(value = "是否是特殊通道呼出,值为:true、false")
    private Boolean specify_ch;
    /**
     * æ—¶é—´æˆ³ï¼Œå¾®ç§’级
     */
    @ApiModelProperty(value = "时间戳,微秒级")
    private Long time_stamp;
    /**
     * æŒ‰é¡ºåºæ‹¼æŽ¥å­—符串后 md5 åŠ å¯†ï¼š
     * md5(app_id+app_key+bs_uuid+ani+dnis+specify_ch+time_stamp) specify_ch md5 æ—¶ true ç”¨ 1 æ›¿ä»£ï¼Œfalse ç”¨ 0 æ›¿ä»£
     */
    @ApiModelProperty(value = "按顺序拼接字符串后 md5 åŠ å¯†ï¼š")
    private String sign;
}
smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,149 @@
package com.smartor.domain.robot;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.smartor.domain.PatTaskRelevance;
import com.smartor.domain.TaskSendTimeVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * ç”µè¯è¯æœ¯æ¨¡æ¿å›žå‚
 *
 * @author ruoyi
 * @date 2024-05-23
 */
@ApiModel(value = "RobotScritpTemplateVO", description = "电话话术模板回参")
@Data
public class RobotScritpTemplateVO extends RobotIdlenumVO {
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    @ApiModelProperty(value = "授权 id")
    private String notes;
    /**
     * æŽ¥å…¥å•†è‡ªå®šä¹‰ä¸šåŠ¡ uuid,bs_uuid ç›¸åŒä¸ºåŒä¸€æ¬¡å‘¼å«çš„æ¶ˆæ¯
     */
    @ApiModelProperty(value = "接入商自定义业务 uuid,bs_uuid ç›¸åŒä¸ºåŒä¸€æ¬¡å‘¼å«çš„æ¶ˆæ¯")
    private String bs_uuid;
    /**
     * è¢«å«å·ç å³è¢«å‘¼å«çš„用户的号码
     */
    @ApiModelProperty(value = "被叫号码即被呼叫的用户的号码")
    private String dnis;
    /**
     * è¯­éŸ³å¼•擎:ali ã€ifly、sogou
     */
    @ApiModelProperty(value = "语音引擎:ali ã€ifly、sogou")
    private String engine;
    /**
     * è¯­éŸ³è¯†åˆ«æ–‡ä»¶çš„采样率:8000 æˆ– 16000,默认 8000
     */
    @ApiModelProperty(value = "语音识别文件的采样率:8000 æˆ– 16000,默认 8000")
    private String asr_sample;
    /**
     * è¯­éŸ³è¯†åˆ«å¼•擎:
     * 1.ali
     * è¯¥å€¼ä¸ºé¡¹ç›®çš„ app_key,接入商可从自己的阿里云项目管理
     * é‡Œé¢èŽ·å–ï¼Œä¾‹ï¼šoXbXcninIlII***
     * 2.Ifly
     * æ™®é€šè¯:sms8k(对应 8000 é‡‡æ ·çŽ‡å¼•æ“Ž)或 sms16k(对应
     * 16000 é‡‡æ ·çŽ‡å¼•æ“Ž)
     * ä¸Šæµ·è¯ï¼šshanghainese8k,shanghainese16k
     * æ²³å—话:henanese8k,henanese16k
     * å››å·è¯ï¼šlmz8k,lmz16k
     * ç²¤è¯­ï¼šautocant8k,autocant16k
     * å—京话:nankinese8k,nankinese16k
     * è‹±è¯­ï¼šsms-en8k,sms-en16k
     * é»˜è®¤é‡‡ç”¨ 8K çš„引擎参数
     */
    @ApiModelProperty(value = "语音识别引擎")
    private String asr_ent;
    /**
     * ali
     * å¦‚:oXbXcninIlII***
     * ifly tts å£°æºå¼•擎
     * intp65:普通话
     * intp65_en:英语
     */
    @ApiModelProperty(value = "")
    private String tts_ent;
    /**
     * ali
     * è¯­éŸ³å‘音人:Aixia ç­‰ï¼Œå…·ä½“参见阿里 tts ç›¸å…³æ–‡æ¡£
     * ifly
     * è¯­éŸ³å‘音人
     * ä¸­æ–‡ï¼šxiaoyan,x_xiaoyuan,jiuxu,xiaofeng,x_yifeng ç­‰
     * è‹±æ–‡ï¼šx_catherine ç­‰
     */
    @ApiModelProperty(value = "")
    private String tts_vcn;
    /**
     *
     */
    @ApiModelProperty(value = "")
    private Integer tts_volume;
    /**
     *
     */
    @ApiModelProperty(value = "")
    private Integer tts_speed;
    /**
     * æ˜¯å¦ä¸ºæµ‹è¯•模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼
     */
    @ApiModelProperty(value = "是否为测试模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼")
    private String dial_mode;
    /**
     * æ˜¯å¦ä¸ºæµ‹è¯•模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼
     */
    @ApiModelProperty(value = "是否为测试模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼")
    private String dial_server;
    /**
     * æ˜¯å¦ä¸ºæµ‹è¯•模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼
     */
    @ApiModelProperty(value = "是否为测试模式,true、false ä¸º true æ—¶ä¸æ ¡éªŒ sign å€¼")
    private Boolean auto_test;
    /**
     *
     */
    @ApiModelProperty(value = "")
    private String outbound_codes;
    /**
     * å˜é‡åˆ—表,变量数量 0-n ä¸ª
     */
    @ApiModelProperty(value = "变量列表,变量数量 0-n ä¸ª")
    private Map<String, String> var_params;
    /**
     * ä¸Šåˆç»“束发送时间限制
     */
    @ApiModelProperty(value = "上午结束发送时间限制")
    private RobotData data;
}
smartor/src/main/java/com/smartor/domain/robot/back/RobotAIDialogBack.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.smartor.domain.robot.back;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RobotAIDialogBack {
    @ApiModelProperty(value = "本次通话交互信息的序号 0-n")
    private String package_id;
    @ApiModelProperty(value = "授权 id")
    private String app_id;
    @ApiModelProperty(value = "接入商自定义业务 uuid,bs_uuid ç›¸åŒä¸ºåŒä¸€æ¬¡å‘¼å«çš„æ¶ˆæ¯")
    private String bs_uuid;
    @ApiModelProperty(value = "通话 uuid")
    private String call_uuid;
    @ApiModelProperty(value = "呼叫方向:1 å‘¼å…¥,2 å‘¼å‡º")
    private String call_direction;
    @ApiModelProperty(value = "节点类型:1")
    private String task_type;
    /**
     * é—®é¢˜çš„类型:
     * 0:只放音,无问题
     * 1:常规问题,不作为判断意向的标准
     * 2:业务问题,作为判断意向的标准
     */
    @ApiModelProperty(value = "问题的类型")
    private String question_type;
    @ApiModelProperty(value = "节点编号")
    private String task_id;
    /**
     * èŠ‚ç‚¹æç¤ºéŸ³ï¼šè¯­éŸ³æˆ–æ–‡æœ¬æ–‡ä»¶æˆ–æ··åˆï¼Œå¦‚ï¼šbye.wav;再见
     */
    @ApiModelProperty(value = "节点提示音")
    private String task_voc;
    @ApiModelProperty(value = "节点描述")
    private String task_desc;
    @ApiModelProperty(value = "放音是否允许打断:true å…è®¸æ‰“断,false ä¸å…è®¸æ‰“æ–­")
    private String interrupt;
    @ApiModelProperty(value = "tts æ–‡æœ¬å¯¹åº”的语音合成文件路径+文件名")
    private String ai_audio;
    @ApiModelProperty(value = "tts æ–‡æœ¬")
    private String ai_tts;
    @ApiModelProperty(value = "该模板第一个节点开始的日期,防止跨天文件夹对应不上")
    private String date_time;
    @ApiModelProperty(value = "-1 æ— åŒ¹é…å¤„理分支,-2 æ— å£°å¤„理分支,-3 é€šç”¨åº“有匹配处理分支,其他分支定义:1-n")
    private String task_switch_type;
    @ApiModelProperty(value = "通用库有返回结果则为通用库名称,否则为”")
    private String general_template_name;
    @ApiModelProperty(value = "处理分支 id")
    private String switch_id;
    @ApiModelProperty(value = "处理分支提示音")
    private String switch_voc;
    @ApiModelProperty(value = "处理分支描述")
    private String switch_desc;
    @ApiModelProperty(value = "用户回答的文件相对路径如")
    private String asr_audio;
    @ApiModelProperty(value = "用户回答的语音识别结果")
    private String asr_result;
    @ApiModelProperty(value = "用户回答的语音长度")
    private String asr_audio_len;
    @ApiModelProperty(value = "asr è¯†åˆ«æ‰€èŠ±çš„æ—¶é•¿å•ä½ï¼šæ¯«ç§’")
    private String asr_duration_ms;
    @ApiModelProperty(value = "用户意图名称")
    private String intention_name;
    @ApiModelProperty(value = "用户回答的意图值")
    private String intention_value;
    @ApiModelProperty(value = "节点内跳转的下一个处理分支的 id æˆ–-10 æˆ–其他任务节点的 task_id")
    private String next_switch_id;
    @ApiModelProperty(value = "执行跳转的下一个节点的 id")
    private String next_task_id;
    @ApiModelProperty(value = "time_stamp å¯¹åº”的时间")
    private String time;
    @ApiModelProperty(value = "时间戳,微秒级")
    private String time_stamp;
}
smartor/src/main/java/com/smartor/domain/robot/back/RobotCallBack.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
package com.smartor.domain.robot.back;
import com.smartor.domain.robot.RobotDataConfig;
import com.smartor.domain.robot.RobotDataCustomVar;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class RobotCallBack {
    @ApiModelProperty(value = "所属的用户")
    private String app_id;
    @ApiModelProperty(value = "接入商自定义业务 uuid,bs_uuid ç›¸åŒä¸ºåŒä¸€æ¬¡å‘¼å«çš„æ¶ˆæ¯")
    private String bs_uuid;
    @ApiModelProperty(value = "通话 uuid")
    private String call_uuid;
    @ApiModelProperty(value = "主叫号码")
    private String ani;
    @ApiModelProperty(value = "被叫号码")
    private String dnis;
    @ApiModelProperty(value = "呼叫方向:1 å‘¼å…¥,2 å‘¼å‡º")
    private String call_direction;
    @ApiModelProperty(value = "本次通话的录音文件路径+名称,人工手动外呼且电话接通状态时才会有该参数")
    private String record_file;
    @ApiModelProperty(value = "呼叫状态 ID,0-n æŒ‰é¡ºåºé€’增")
    private String state_id;
    @ApiModelProperty(value = "呼叫状态描述:")
    private String state_desc;
    @ApiModelProperty(value = "时间戳,微秒级")
    private String time_stamp;
}
smartor/src/main/java/com/smartor/domain/robot/back/RobotcdrInfoBack.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.smartor.domain.robot.back;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RobotcdrInfoBack {
    @ApiModelProperty(value = "授权 id")
    private String app_id;
    @ApiModelProperty(value = "接入商自定义业务 uuid,bs_uuid ç›¸åŒä¸ºåŒä¸€æ¬¡å‘¼å«çš„æ¶ˆæ¯")
    private String bs_uuid;
    @ApiModelProperty(value = "通话 uuid")
    private String call_uuid;
    @ApiModelProperty(value = "呼叫方向:1 å‘¼å…¥,2 å‘¼å‡º")
    private String call_direction;
    @ApiModelProperty(value = "主叫号码")
    private String ani;
    @ApiModelProperty(value = " è¢«å«å·ç ")
    private String dnis;
    /**
     * æŒ‚机原因:
     * NORMAL_CLEARING ç­‰ï¼Œä»…供记录用
     */
    @ApiModelProperty(value = "挂机原因")
    private String hangup_cause;
    /**
     * æŒ‚机时终端所处的状态
     * EARLY MEDIA
     * ANSWER
     * DELAYED NEGOTIATION
     * ç­‰ï¼Œä»…供记录用
     */
    @ApiModelProperty(value = "挂机时终端所处的状态")
    private String endpoint_disposition;
    @ApiModelProperty(value = "等待时间")
    private String wait_ms;
    @ApiModelProperty(value = "呼叫过程耗时(从发起呼叫到结束所有的时间)")
    private String duration_ms;
    @ApiModelProperty(value = "等待应答耗时(发起到接通的时间)")
    private String answer_ms;
    @ApiModelProperty(value = "计费时长(真正的通话时长)")
    private String bill_ms;
    @ApiModelProperty(value = "呼叫开始时间")
    private String start_stamp;
    @ApiModelProperty(value = "应答开始时间 G")
    private String answer_stamp;
    @ApiModelProperty(value = "结束时间")
    private String end_stamp;
    @ApiModelProperty(value = "时间戳,微秒级")
    private String time_stamp;
}
smartor/src/main/java/com/smartor/mapper/IvrLibaTemplateTargetMapper.java
ÎļþÒÑɾ³ý
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.smartor.mapper;
import com.smartor.domain.IvrTaskTemplate;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Mapper
public interface IvrTaskTemplateMapper {
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    public IvrTaskTemplate selectIvrTaskTemplateByID(Long ID);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“é›†åˆ
     */
    public List<IvrTaskTemplate> selectIvrTaskTemplateList(IvrTaskTemplate ivrTaskTemplate);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateByID(Long ID);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateByIDs(Long[] IDs);
}
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateScriptMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.smartor.mapper;
import com.smartor.domain.IvrTaskTemplateScript;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Mapper
public interface IvrTaskTemplateScriptMapper {
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    public IvrTaskTemplateScript selectIvrTaskTemplateScriptByID(Long ID);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“é›†åˆ
     */
    public List<IvrTaskTemplateScript> selectIvrTaskTemplateScriptList(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateScriptByID(Long ID);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateScriptByIDs(Long[] IDs);
}
smartor/src/main/java/com/smartor/mapper/IvrTaskTemplateTargetoptionMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.smartor.mapper;
import com.smartor.domain.IvrTaskTemplateTargetoption;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Mapper
public interface IvrTaskTemplateTargetoptionMapper {
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    public IvrTaskTemplateTargetoption selectIvrTaskTemplateTargetoptionById(Long id);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“é›†åˆ
     */
    public List<IvrTaskTemplateTargetoption> selectIvrTaskTemplateTargetoptionList(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateTargetoptionById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateTargetoptionByIds(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/IvrTaskcalldetailMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.smartor.domain.IvrTaskcalldetail;
import org.apache.ibatis.annotations.Mapper;
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†Mapper接口
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
public interface IvrTaskcalldetailMapper
@Mapper
public interface IvrTaskcalldetailMapper
{
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     */
@@ -21,7 +23,7 @@
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†åˆ—è¡¨
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†é›†åˆ
     */
@@ -29,7 +31,7 @@
    /**
     * æ–°å¢žè¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
@@ -37,7 +39,7 @@
    /**
     * ä¿®æ”¹è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
@@ -45,7 +47,7 @@
    /**
     * åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return ç»“æžœ
     */
@@ -53,7 +55,7 @@
    /**
     * æ‰¹é‡åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
smartor/src/main/java/com/smartor/mapper/IvrTaskcallrecordMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.smartor.domain.IvrTaskcallrecord;
import org.apache.ibatis.annotations.Mapper;
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•Mapper接口
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
public interface IvrTaskcallrecordMapper
@Mapper
public interface IvrTaskcallrecordMapper
{
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     *
     *
     * @param uuid è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•ä¸»é”®
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     */
@@ -21,7 +23,7 @@
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•åˆ—è¡¨
     *
     *
     * @param ivrTaskcallrecord è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•é›†åˆ
     */
@@ -29,7 +31,7 @@
    /**
     * æ–°å¢žè¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     *
     *
     * @param ivrTaskcallrecord è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     * @return ç»“æžœ
     */
@@ -37,7 +39,7 @@
    /**
     * ä¿®æ”¹è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     *
     *
     * @param ivrTaskcallrecord è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     * @return ç»“æžœ
     */
@@ -45,7 +47,7 @@
    /**
     * åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     *
     *
     * @param uuid è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•ä¸»é”®
     * @return ç»“æžœ
     */
@@ -53,7 +55,7 @@
    /**
     * æ‰¹é‡åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«è®°å½•
     *
     *
     * @param uuids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
smartor/src/main/java/com/smartor/mapper/IvrTasksmsMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.smartor.domain.IvrTasksms;
import org.apache.ibatis.annotations.Mapper;
/**
 * è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡Mapper接口
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
public interface IvrTasksmsMapper
@Mapper
public interface IvrTasksmsMapper
{
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     *
     *
     * @param id è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡ä¸»é”®
     * @return è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     */
@@ -21,7 +23,7 @@
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡åˆ—è¡¨
     *
     *
     * @param ivrTasksms è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     * @return è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡é›†åˆ
     */
@@ -29,7 +31,7 @@
    /**
     * æ–°å¢žè¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     *
     *
     * @param ivrTasksms è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     * @return ç»“æžœ
     */
@@ -37,7 +39,7 @@
    /**
     * ä¿®æ”¹è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     *
     *
     * @param ivrTasksms è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     * @return ç»“æžœ
     */
@@ -45,7 +47,7 @@
    /**
     * åˆ é™¤è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     *
     *
     * @param id è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡ä¸»é”®
     * @return ç»“æžœ
     */
@@ -53,7 +55,7 @@
    /**
     * æ‰¹é‡åˆ é™¤è¯­éŸ³ä»»åŠ¡çŸ­ä¿¡
     *
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
smartor/src/main/java/com/smartor/service/AIRobotPhoneCallBackService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
package com.smartor.service;
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.IvrTaskSingleVO;
import com.smartor.domain.PhoneCallBackVO;
import com.smartor.domain.SendTaskVO;
import com.smartor.domain.robot.back.RobotAIDialogBack;
import com.smartor.domain.robot.back.RobotCallBack;
import com.smartor.domain.robot.back.RobotcdrInfoBack;
import java.util.List;
/**
 * æœåŠ¡å›žè°ƒService接口
 *
 * @author ruoyi
 * @date 2024-05-24
 */
public interface AIRobotPhoneCallBackService {
    /**
     * AIRobot呼叫到达线路后的状态返回接口
     *
     * @param robotCallBack
     * @return ç»“æžœ
     */
    public String callstatus(RobotCallBack robotCallBack);
    /**
     * AIRobot呼叫到达线路后的状态返回接口
     *
     * @param robotAIDialogBack
     * @return ç»“æžœ
     */
    public String aidialog(RobotAIDialogBack robotAIDialogBack);
    /**
     * æŒ‚机计费信息返回数据接口
     * @param robotcdrInfoBack
     * @return
     */
    public String cdrinfo(RobotcdrInfoBack robotcdrInfoBack);
}
smartor/src/main/java/com/smartor/service/IIvrLibaTemplateTargetService.java
ÎļþÒÑɾ³ý
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
@@ -1,6 +1,8 @@
package com.smartor.service;
import com.smartor.domain.*;
import com.smartor.domain.robot.back.RobotAIDialogBack;
import com.smartor.domain.robot.back.RobotCallBack;
import java.util.List;
@@ -75,13 +77,13 @@
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     *
     * @param ivrTaskcallVO
     * @param sendTaskVO
     * @return ç»“æžœ
     */
    public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO);
    public int heTaskSend(SendTaskVO sendTaskVO);
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     * ç”µè¯å›žè°ƒä»»åŠ¡
     *
     * @param phoneCallBackVO
     * @return ç»“æžœ
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.smartor.service;
import com.smartor.domain.IvrTaskTemplateScript;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“Service接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
public interface IIvrTaskTemplateScriptService
{
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    public IvrTaskTemplateScript selectIvrTaskTemplateScriptByID(Long ID);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“é›†åˆ
     */
    public List<IvrTaskTemplateScript> selectIvrTaskTemplateScriptList(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„随访任务模版问题话术库主键集合
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateScriptByIDs(Long[] IDs);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¿¡æ¯
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateScriptByID(Long ID);
}
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
package com.smartor.service;
import com.smartor.domain.IvrLibaTemplateVO;
import com.smartor.domain.IvrTaskTemplate;
import com.smartor.domain.IvrTaskTemplateVO;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“Service接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
public interface IIvrTaskTemplateService {
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    public IvrTaskTemplate selectIvrTaskTemplateByID(Long ID);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“é›†åˆ
     */
    public List<IvrTaskTemplate> selectIvrTaskTemplateList(IvrTaskTemplate ivrTaskTemplate);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate);
    /**
     * æ–°å¢žæˆ–修改
     *
     * @param ivrTaskTemplateVO
     * @return
     */
    public int saveOrUpdateTempScript(IvrTaskTemplateVO ivrTaskTemplateVO);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„随访任务随访模板库主键集合
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateByIDs(Long[] IDs);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¿¡æ¯
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateByID(Long ID);
    /**
     * æŸ¥è¯¢æ¨¡æ¿è¯¦æƒ…根据条件
     */
    public IvrTaskTemplateVO selectInfoByCondition(IvrTaskTemplateVO ivrTaskTemplateVO);
}
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateTargetoptionService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.smartor.service;
import com.smartor.domain.IvrTaskTemplateTargetoption;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“Service接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
public interface IIvrTaskTemplateTargetoptionService
{
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    public IvrTaskTemplateTargetoption selectIvrTaskTemplateTargetoptionById(Long id);
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“é›†åˆ
     */
    public List<IvrTaskTemplateTargetoption> selectIvrTaskTemplateTargetoptionList(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    public int insertIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    public int updateIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption);
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ids éœ€è¦åˆ é™¤çš„随访任务模板指标选项库主键集合
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateTargetoptionByIds(Long[] ids);
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¿¡æ¯
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskTemplateTargetoptionById(Long id);
}
smartor/src/main/java/com/smartor/service/impl/AIRobotPhoneCallBackServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
package com.smartor.service.impl;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.smartor.config.PhoneUtils;
import com.smartor.config.RabbitMqCallPhoneConfig;
import com.smartor.domain.*;
import com.smartor.domain.robot.back.RobotAIDialogBack;
import com.smartor.domain.robot.back.RobotCallBack;
import com.smartor.domain.robot.back.RobotcdrInfoBack;
import com.smartor.mapper.*;
import com.smartor.service.AIRobotPhoneCallBackService;
import com.smartor.service.IIvrTaskService;
import com.smartor.service.IIvrTaskSingleService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * å•一任务(随访)Service业务层处理
 *
 * @author ruoyi
 * @date 2024-02-02
 */
@Slf4j
@Service
public class AIRobotPhoneCallBackServiceImpl implements AIRobotPhoneCallBackService {
    /**
     * å‘¼å«åˆ°è¾¾çº¿è·¯åŽçš„状态返回接口
     *
     * @param robotCallBack
     * @return
     */
    @Override
    public String callstatus(RobotCallBack robotCallBack) {
        return null;
    }
    @Override
    public String aidialog(RobotAIDialogBack robotAIDialogBack) {
        return null;
    }
    @Override
    public String cdrinfo(RobotcdrInfoBack robotcdrInfoBack) {
        return null;
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
@@ -34,9 +34,6 @@
    private IvrLibaTemplateTagMapper ivrLibaTemplateTagMapper;
    @Autowired
    private IvrLibaTemplateTargetMapper ivrLibaTemplateTargetMapper;
    @Autowired
    private IvrLibaTemplateTargetoptionMapper ivrLibaTemplateTargetOptionMapper;
    @Autowired
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateTargetServiceImpl.java
ÎļþÒÑɾ³ý
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -44,10 +44,10 @@
    private IIvrTaskService ivrTaskService;
    @Autowired
    private IvrLibaTemplateTargetoptionMapper ivrLibaScriptTargetoptionMapper;
    private IvrTaskTemplateTargetoptionMapper ivrTaskScriptTargetoptionMapper;
    @Autowired
    private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper;
    private IvrLibaTemplateScriptMapper ivrTaskTemplateScriptMapper;
    @Autowired
    private IvrTaskVisitResultMapper ivrTaskVisitResultMapper;
@@ -92,20 +92,21 @@
        if (CollectionUtils.isEmpty(list)) {
            new BaseException("该任务不存在");
        }
        //将查出来的数据倒入IvrTaskcallVO中
        IvrTaskSingleVO ivrTaskcallVO2 = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskSingleVO.class);
        String sendTimeSlot = list.get(0).getSendTimeSlot();
        IvrTask ivrTask = ivrTaskService.selectIvrTaskByTaskid(ivrTaskcall.getTaskid());
        //将查出来的数据倒入ivrTasksingleVO中
        IvrTaskSingleVO ivrTasksingleVO2 = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskSingleVO.class);
        String sendTimeSlot = ivrTask.getSendTimeSlot();
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            //获取到发送时间的集合
            if (com.ruoyi.common.utils.StringUtils.isNotEmpty(sendTimeSlot)) {
                List<TaskSendTimeVO> taskSendTimeVOList = objectMapper.readValue(sendTimeSlot, List.class);
                ivrTaskcallVO2.setSendTimeslot(taskSendTimeVOList);
                ivrTasksingleVO2.setSendTimeslot(taskSendTimeVOList);
            }
            //文本变量参数
            if (com.ruoyi.common.utils.StringUtils.isNotEmpty(list.get(0).getTextParam())) {
                Map<String, Map<String, String>> textParam = objectMapper.readValue(list.get(0).getTextParam(), Map.class);
                ivrTaskcallVO2.setTextParam(textParam);
                ivrTasksingleVO2.setTextParam(textParam);
            }
        } catch (JsonProcessingException e) {
            e.printStackTrace();
@@ -138,8 +139,8 @@
            }
        }
        ivrTaskcallVO2.setPatTaskRelevances(patTaskRelevances);
        return ivrTaskcallVO2;
        ivrTasksingleVO2.setPatTaskRelevances(patTaskRelevances);
        return ivrTasksingleVO2;
    }
    @Override
@@ -194,23 +195,24 @@
     */
    @Transactional(rollbackFor = Exception.class)
    @Override
    public int insertOrUpdateTask(IvrTaskSingleVO ivrTaskcallVO) {
        if (ObjectUtils.isEmpty(ivrTaskcallVO)) {
    public int insertOrUpdateTask(IvrTaskSingleVO ivrTasksingleVO) {
        if (ObjectUtils.isEmpty(ivrTasksingleVO)) {
            log.info("任务入参为空,请检查入参");
            throw new BaseException("任务入参为空,请检查入参");
        }
        Integer integer = 0;
        if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 1) {
        if (ivrTasksingleVO.getIsoperation() != null && ivrTasksingleVO.getIsoperation() == 1) {
            //往任务表中,新增任务
            IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class);
            IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTasksingleVO, IvrTask.class);
            if (ObjectUtils.isNotEmpty(ivrTasksingleVO.getSendTimeslot()))
                ivrTask.setSendTimeSlot(JSON.toJSONString(ivrTasksingleVO.getSendTimeslot()));
            ivrTaskService.insertIvrTask(ivrTask);
            ivrTaskcallVO.setTaskid(ivrTask.getTaskid().longValue());
            ivrTasksingleVO.setTaskid(ivrTask.getTaskid().longValue());
            //新增
            if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : ivrTaskcallVO.getPatTaskRelevances()) {
                    //将任务信息新增到宣教任务表中
                    IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class);
            if (CollectionUtils.isNotEmpty(ivrTasksingleVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : ivrTasksingleVO.getPatTaskRelevances()) {
                    //将任务信息新增到随访服务表中
                    IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTasksingleVO, IvrTaskSingle.class);
                    ivrTaskcall.setSendname(patTaskRelevance.getName());
                    ivrTaskcall.setAge(patTaskRelevance.getAge());
                    ivrTaskcall.setSfzh(patTaskRelevance.getSfzh());
@@ -218,43 +220,42 @@
                    ivrTaskcall.setAddr(patTaskRelevance.getAddr());
                    ivrTaskcall.setCreateTime(DateUtils.getNowDate());
                    ivrTaskcall.setTextParam(new Gson().toJson(patTaskRelevance.getTextParam()));
                    if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) {
                        ivrTaskcall.setSendTimeSlot(ivrTaskcallVO.getSendTimeslot().toString());
                    }
                    ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall);
                    integer = ivrTaskcall.getId().intValue();
                }
            }
        } else if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 2) {
        } else if (ivrTasksingleVO.getIsoperation() != null && ivrTasksingleVO.getIsoperation() == 2) {
            //任务修改
            IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class);
            IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTasksingleVO, IvrTask.class);
            if (ObjectUtils.isNotEmpty(ivrTasksingleVO.getSendTimeslot()))
                ivrTask.setSendTimeSlot(JSON.toJSONString(ivrTasksingleVO.getSendTimeslot()));
            //获取表里的stopState数值  + 1
            IvrTask ivrTask1 = ivrTaskService.selectIvrTaskByTaskid(ivrTask.getTaskid());
            ivrTask.setStopState(ivrTask1.getStopState() + 1);
            ivrTaskService.updateIvrTask(ivrTask);
            if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : ivrTaskcallVO.getPatTaskRelevances()) {
            if (CollectionUtils.isNotEmpty(ivrTasksingleVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : ivrTasksingleVO.getPatTaskRelevances()) {
                    IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class);
                    IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTasksingleVO, IvrTaskSingle.class);
                    ivrTaskcall.setSendname(patTaskRelevance.getName());
                    ivrTaskcall.setAge(patTaskRelevance.getAge());
                    ivrTaskcall.setSfzh(patTaskRelevance.getSfzh());
                    ivrTaskcall.setPhone(patTaskRelevance.getPhone());
                    ivrTaskcall.setAddr(patTaskRelevance.getAddr());
                    ivrTaskcall.setCreateTime(DateUtils.getNowDate());
                    if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) {
                        ivrTaskcall.setSendTimeSlot(ivrTaskcallVO.getSendTimeslot().toString());
                    }
                    ivrTaskcall.setTextParam(new Gson().toJson(ivrTaskcallVO.getTextParam()));
                    ivrTaskcall.setTextParam(new Gson().toJson(ivrTasksingleVO.getTextParam()));
                    if (patTaskRelevance.getIsoperation() == 2) ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
                    if (patTaskRelevance.getIsoperation() == 1) ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall);
                    integer = ivrTaskcall.getId().intValue();
                }
            }
        } else if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 3) {
            ivrTaskSingleMapper.deleteIvrTaskcallById(ivrTaskcallVO.getId());
        } else if (ivrTasksingleVO.getIsoperation() != null && ivrTasksingleVO.getIsoperation() == 3) {
            ivrTaskSingleMapper.deleteIvrTaskcallById(ivrTasksingleVO.getId());
            integer = ivrTaskcallVO.getId().intValue();
            integer = ivrTasksingleVO.getId().intValue();
        }
        return integer;
    }
@@ -265,23 +266,54 @@
     * @return
     */
    @Override
    public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO) {
    public int heTaskSend(SendTaskVO sendTaskVO) {
        if (sendTaskVO.getTaskId() == null) throw new BaseException("任务ID不能为空,请检查后,再进行执行");
        IvrTask ivrTask = ivrTaskService.selectIvrTaskByTaskid(sendTaskVO.getTaskId());
        if (StringUtils.isNotEmpty(sendTaskVO.getSendState()) && sendTaskVO.getSendState().equals("3") || StringUtils.isNotEmpty(sendTaskVO.getSendState()) && sendTaskVO.getSendState().equals("4")) {
            //任务暂停或终止
            IvrTask ivrTask3 = new IvrTask();
            ivrTask3.setTaskid(sendTaskVO.getTaskId());
            ivrTask3.setStopState(ivrTask.getStopState() + 1);
            ivrTask3.setSendState(sendTaskVO.getSendState());
            ivrTaskService.updateIvrTask(ivrTask3);
            return 0;
        }
        //判断发送状态是否为空
        if (StringUtils.isEmpty(sendTaskVO.getSendType())) {
            sendTaskVO.setSendType(ivrTask.getSendType().toString());
        }
        //判断任务是否是立即发送
        if (ivrTaskcallVO.getSendType().equals("2")) {
        if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("2")) {
            IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
            ivrTaskcallMQ.setTaskid(ivrTaskcallVO.getTaskid());
            ivrTaskcallMQ.setSendType("1");
            ivrTaskcallMQ.setTemplateid(ivrTaskcallVO.getTemplateid());
            ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
            ivrTaskcallMQ.setSendType(sendTaskVO.getSendType());
            ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
            ivrTaskcallMQ.setStopState(ivrTask.getStopState());
            String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
            ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
            //立即发送
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
        } else if (ivrTaskcallVO.getSendType().equals("1")) {
            //将任务状态修改成执行中
            IvrTask ivrTask2 = new IvrTask();
            ivrTask2.setTaskid(ivrTask.getTaskid());
            ivrTask2.setSendState("2");
            ivrTask2.setStopState(ivrTask.getStopState() + 1);
            ivrTaskService.updateIvrTask(ivrTask2);
        } else if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1")) {
            //时间段发送
            if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) {
                for (TaskSendTimeVO taskSendTimeVO : ivrTaskcallVO.getSendTimeslot()) {
            ObjectMapper objectMapper = new ObjectMapper();
            if (StringUtils.isNotEmpty(ivrTask.getSendTimeSlot())) {
                List<TaskSendTimeVO> taskSendTimeVOList = null;
                try {
                    taskSendTimeVOList = objectMapper.readValue(ivrTask.getSendTimeSlot(), List.class);
                } catch (JsonProcessingException e) {
                    log.error("JsonProcessingException报错了:{}", e.getMessage());
                }
                for (TaskSendTimeVO taskSendTimeVO : taskSendTimeVOList) {
                    //去SendTimeslot中,获取所有的时间段
                    List<TaskSendTimeVO> list = new ArrayList<>();
                    list.add(taskSendTimeVO);
@@ -299,10 +331,11 @@
                        e.printStackTrace();
                    }
                    IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
                    ivrTaskcallMQ.setTaskid(ivrTaskcallVO.getTaskid());
                    ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
                    ivrTaskcallMQ.setSendType("1");
                    ivrTaskcallMQ.setTemplateid(ivrTaskcallVO.getTemplateid());
                    ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
                    ivrTaskcallMQ.setSendTimeslot(list);
                    ivrTaskcallMQ.setStopState(ivrTask.getStopState());
                    Long finalMilliseconds = milliseconds;
                    String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
@@ -310,13 +343,13 @@
                    rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
                }
                //将任务状态修改成执行中
                IvrTask ivrTask = new IvrTask();
                ivrTask.setTaskid(ivrTaskcallVO.getTaskid());
                ivrTask.setSendState("2");
                ivrTaskService.updateIvrTask(ivrTask);
                IvrTask ivrTask2 = new IvrTask();
                ivrTask2.setTaskid(ivrTask.getTaskid());
                ivrTask2.setSendState("2");
                ivrTask2.setStopState(ivrTask.getStopState() + 1);
                ivrTaskService.updateIvrTask(ivrTask2);
            }
        }
        return 0;
    }
@@ -343,13 +376,13 @@
        Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid());
        IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskSingle");
        List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO");
        List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOs = (List<IvrTaskTemplateScriptVO>) map.get("ivrTaskTemplateScriptVO");
        //将uuid更新到数据库中
        ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid());
        ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
        //获取模板信息
        IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO");
        IvrTaskTemplateVO ivrTaskTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrTaskTemplateVO");
        //语音识别结果上报接口: 3
        Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice");
@@ -357,22 +390,22 @@
        //将传回的结果放到回复对象中
        returnQues.setContent(phoneCallBackVO.getTextResult());
        IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
        IvrTaskTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
        if (StringUtils.isEmpty(returnQues.getContent())) {
            //无回话
            //判断noVoice是否已经到了最大值
            if (noVoice == ivrLibaTemplateVO.getNoVoiceNum().intValue()) {
            if (noVoice == ivrTaskTemplateVO.getNoVoiceNum().intValue()) {
                //已经问了对应的遍数,就判断是否还有下一题
                if (nowQuestion.getTargetid() == ivrLibaTemplateScriptVOs.size()) {
                if (nowQuestion.getTargetid() == ivrTaskTemplateScriptVOs.size()) {
                    //没有下一题了,就挂断电话,播放结束语
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                    phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                    phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                    return;
                } else {
                    //有下一题
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
                    IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
                    IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(ivrTaskTemplateScriptVOs, nowQuestion);
                    // é—®é¢˜ï¼Œ  åŽ»è°ƒç”¨â€œtts合成和播放”接口
                    String date = simpleDateFormat1.format(new Date());
                    log.info("去调用tts合成和播放接口: {},uuid为:{}", date, phoneCallBackVO.getUuid());
@@ -393,25 +426,25 @@
            //isppd用来记录是否匹配到
            Boolean isppd = false;
            //有回话,对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)
            for (int j = 0; j < nowQuestion.getIvrLibaScriptTargetoptionList().size(); j++) {
            for (int j = 0; j < nowQuestion.getIvrTaskScriptTargetoptionList().size(); j++) {
                //包含
                Matcher matcher = null;
                if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) {
                    Pattern pattern = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex());
                if (StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
                    Pattern pattern = Pattern.compile(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex());
                    matcher = pattern.matcher(phoneCallBackVO.getTextResult());
                }
                //不包含
                Matcher matcher2 = null;
                if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) {
                    Pattern pattern2 = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
                if (StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) {
                    Pattern pattern2 = Pattern.compile(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
                    matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult());
                }
                log.error("PCB--getQuestionText问题为:{},UUID:{}", nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
                if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                if (StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                    //说明匹配正确了
                    //这里应该先判断类型,去再修改,设置IsUserOperation是单选题的改法
                    nowQuestion.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
                    ivrLibaScriptTargetoptionMapper.updateIvrLibaTemplateTargetoption(nowQuestion.getIvrLibaScriptTargetoptionList().get(j));
                    nowQuestion.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true);
                    ivrTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(nowQuestion.getIvrTaskScriptTargetoptionList().get(j));
                    //将静默置为0
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
@@ -423,34 +456,34 @@
                    ivrTaskVisitResult.setQuestion(nowQuestion.getQuestionText());
                    ivrTaskVisitResult.setPatientAnswer(phoneCallBackVO.getTextResult());
                    ivrTaskVisitResult.setCreateTime(new Date());
                    ivrTaskVisitResult.setOptionResult(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetvalue());
                    ivrTaskVisitResult.setOptionResult(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue());
                    ivrTaskVisitResultMapper.insertIvrTaskVisitResult(ivrTaskVisitResult);
                    //将匹配到的标识改成true
                    isppd = true;
                    //获取下一题
                    Integer nextQuestion = nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
                    for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOs) {
                    Long nextQuestion = nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion();
                    for (IvrTaskTemplateScriptVO script : ivrTaskTemplateScriptVOs) {
                        if (script.getTargetid() == nextQuestion) {
                            QuestionMessage questionMessage = new QuestionMessage();
                            questionMessage.setNowQuestion(script);
                            questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
                            questionMessage.setQuestionList(ivrTaskTemplateScriptVOs);
                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
                            phoneUtils.ttsPlayback(script.getQuestionText(), phoneCallBackVO.getUuid());
                            return;
                        } else if (nextQuestion > ivrLibaTemplateScriptVOs.size()) {
                        } else if (nextQuestion > ivrTaskTemplateScriptVOs.size()) {
                            //没有下一题了,就结束了
                            String date = simpleDateFormat1.format(new Date());
                            log.error("没有下一题了,就结束了: {},uuid为:{}", date, phoneCallBackVO.getUuid());
                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                            phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                            phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                            try {
                                Thread.sleep(3000);
                            } catch (InterruptedException e) {
                                e.printStackTrace();
                            }
                            phoneUtils.hangup("", "", ivrLibaTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid());
                            phoneUtils.hangup("", "", ivrTaskTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid());
                            return;
                        }
                    }
@@ -467,12 +500,12 @@
                Integer mateNum = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "mateNum");
                if (mateNum == null) mateNum = 0;
                //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了
                if (mateNum == ivrLibaTemplateVO.getMateNum().intValue()) {
                if (mateNum == ivrTaskTemplateVO.getMateNum().intValue()) {
                    //如果下一题为空.则新的数据返回,并加上感谢语
                    if (nowQuestion.getTargetid() < ivrLibaTemplateScriptVOs.size()) {
                    if (nowQuestion.getTargetid() < ivrTaskTemplateScriptVOs.size()) {
                        QuestionMessage questionMessage = new QuestionMessage();
                        IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
                        questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
                        IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(ivrTaskTemplateScriptVOs, nowQuestion);
                        questionMessage.setQuestionList(ivrTaskTemplateScriptVOs);
                        questionMessage.setNowQuestion(nextQuestion);
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
@@ -485,23 +518,23 @@
                        String date = simpleDateFormat1.format(new Date());
                        log.info("就可以挂断电话了------: {},uuid为:{}", date, phoneCallBackVO.getUuid());
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                        phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                        phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                        try {
                            Thread.sleep(3000);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        phoneUtils.hangup("", "", ivrLibaTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid());
                        phoneUtils.hangup("", "", ivrTaskTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid());
                        return;
                    }
                } else if (mateNum < ivrLibaTemplateVO.getMateNum().intValue()) {
                } else if (mateNum < ivrTaskTemplateVO.getMateNum().intValue()) {
                    //没有问到规定次数
                    mateNum = mateNum + 1;
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", mateNum, 120, TimeUnit.MINUTES);
                }
            }
            //选项匹配完成后,需要再去通过库再进行匹配一次
            String extemplateID = ivrLibaTemplateVO.getSubmoduleID();
            String extemplateID = ivrTaskTemplateVO.getSubmoduleID();
            String[] split = extemplateID.split(",");
            List<String> list = Arrays.asList(split);
            List<Long> list1 = new ArrayList<>();
@@ -525,13 +558,13 @@
                    log.info("++++++++++++++++++++++++++通用库是否为空:selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2());
                    if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
                        QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
                        IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = returnQues.getNowQuestion();
                        ivrLibaTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
                        ivrLibaTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
                        IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = returnQues.getNowQuestion();
                        ivrTaskTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
                        ivrTaskTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
                        if (ivrLibaExtemplatescript.getIsEnd() == 1) {
                            //将问题置空
                            IvrLibaTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion();
                            IvrTaskTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion();
                            nowQuestion1.setQuestionText(null);
                            nowQuestion1.setQuestionVoice(null);
                            questionMessage.setNowQuestion(nowQuestion1);
@@ -542,7 +575,7 @@
                        //调用“15、tts合成和播放, tts_playback”将结果传回
                        String date = simpleDateFormat1.format(new Date());
                        log.info("调用“15、tts合成和播放------: {},uuid为:{}", date, phoneCallBackVO.getUuid());
                        phoneUtils.ttsPlayback(nowQuestion.getQuestionText() + ivrLibaTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid());
                        phoneUtils.ttsPlayback(nowQuestion.getQuestionText() + ivrTaskTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid());
                    }
                    break;
                }
@@ -552,7 +585,6 @@
            }
        }
    }
    //下面的代码不能删除,上面的方法只是配合电话端联调用的,
//    @Override
@@ -789,12 +821,13 @@
//        return phoneCallBackVO;
//    }
    private IvrLibaTemplateScriptVO getNextQuestion(List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO) {
        for (int j = 0; j < ivrLibaTemplateScriptVOList.size(); j++) {
            if (ivrLibaTemplateScriptVOList.get(j).getTargetid() == ivrLibaTemplateScriptVO.getTargetid() + 1) {
    private IvrTaskTemplateScriptVO getNextQuestion(List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO) {
        for (int j = 0; j < ivrTaskTemplateScriptVOList.size(); j++) {
            if (ivrTaskTemplateScriptVOList.get(j).getTargetid() == ivrTaskTemplateScriptVO.getTargetid() + 1) {
                // å¯¹è¯¥æ¡templateScriptVO进行处理
                return ivrLibaTemplateScriptVOList.get(j);
                return ivrTaskTemplateScriptVOList.get(j);
            }
        }
        return null;
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.IvrTaskTemplateScript;
import com.smartor.mapper.IvrTaskTemplateScriptMapper;
import com.smartor.service.IIvrTaskTemplateScriptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Service
public class IvrTaskTemplateScriptServiceImpl implements IIvrTaskTemplateScriptService {
    @Autowired
    private IvrTaskTemplateScriptMapper ivrTaskTemplateScriptMapper;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    @Override
    public IvrTaskTemplateScript selectIvrTaskTemplateScriptByID(Long ID) {
        return ivrTaskTemplateScriptMapper.selectIvrTaskTemplateScriptByID(ID);
    }
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     */
    @Override
    public List<IvrTaskTemplateScript> selectIvrTaskTemplateScriptList(IvrTaskTemplateScript ivrTaskTemplateScript) {
        return ivrTaskTemplateScriptMapper.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    @Override
    public int insertIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript) {
        ivrTaskTemplateScript.setCreateTime(DateUtils.getNowDate());
        return ivrTaskTemplateScriptMapper.insertIvrTaskTemplateScript(ivrTaskTemplateScript);
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param ivrTaskTemplateScript éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     * @return ç»“æžœ
     */
    @Override
    public int updateIvrTaskTemplateScript(IvrTaskTemplateScript ivrTaskTemplateScript) {
        ivrTaskTemplateScript.setUpdateTime(DateUtils.getNowDate());
        return ivrTaskTemplateScriptMapper.updateIvrTaskTemplateScript(ivrTaskTemplateScript);
    }
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„随访任务模版问题话术库主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateScriptByIDs(Long[] IDs) {
        return ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByIDs(IDs);
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¿¡æ¯
     *
     * @param ID éšè®¿ä»»åŠ¡æ¨¡ç‰ˆé—®é¢˜è¯æœ¯åº“ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateScriptByID(Long ID) {
        return ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ID);
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,265 @@
package com.smartor.service.impl;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.smartor.domain.*;
import com.smartor.mapper.IvrTaskTemplateMapper;
import com.smartor.mapper.IvrTaskTemplateScriptMapper;
import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper;
import com.smartor.service.IIvrTaskTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Slf4j
@Service
public class IvrTaskTemplateServiceImpl implements IIvrTaskTemplateService {
    @Autowired
    private IvrTaskTemplateMapper ivrTaskTemplateMapper;
    @Autowired
    private IvrTaskTemplateScriptMapper ivrTaskTemplateScriptMapper;
    @Autowired
    private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    @Override
    public IvrTaskTemplate selectIvrTaskTemplateByID(Long ID) {
        return ivrTaskTemplateMapper.selectIvrTaskTemplateByID(ID);
    }
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     */
    @Override
    public List<IvrTaskTemplate> selectIvrTaskTemplateList(IvrTaskTemplate ivrTaskTemplate) {
        return ivrTaskTemplateMapper.selectIvrTaskTemplateList(ivrTaskTemplate);
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    @Override
    public int insertIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate) {
        ivrTaskTemplate.setCreateTime(DateUtils.getNowDate());
        return ivrTaskTemplateMapper.insertIvrTaskTemplate(ivrTaskTemplate);
    }
    @Override
    public int saveOrUpdateTempScript(IvrTaskTemplateVO ivrTaskTemplateVO) {
        Integer i = null;
        IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class);
        if (ivrTaskTemplateVO.getIsoperation() != null && ivrTaskTemplateVO.getIsoperation() == 1) {
            //新增
            ivrTaskTemplate.setCreateTime(new Date());
            insertIvrTaskTemplate(ivrTaskTemplate);
            i = ivrTaskTemplate.getID().intValue();
        } else if (ivrTaskTemplateVO.getIsoperation() != null && ivrTaskTemplateVO.getIsoperation() == 2) {
            //修改
            ivrTaskTemplate.setUpdateTime(new Date());
            updateIvrTaskTemplate(ivrTaskTemplate);
            i = ivrTaskTemplate.getID().intValue();
        }
        log.info("新增随访任务随访模板的id为:{}", ivrTaskTemplate.getID());
        //对模板话术和选项进行处理(话术表与指标表进行合并了,)
        if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) {
            for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) {
                if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 1) {
                    //新增
                    IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class);
                    ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID());
                    ivrTaskTemplateScript.setCreateTime(new Date());
                    ivrTaskTemplateScriptMapper.insertIvrTaskTemplateScript(ivrTaskTemplateScript);
                    //对选项目进行处理
                    dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID());
                } else if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 2) {
                    //修改
                    IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class);
                    ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID());
                    ivrTaskTemplateScript.setUpdateTime(new Date());
                    ivrTaskTemplateScriptMapper.updateIvrTaskTemplateScript(ivrTaskTemplateScript);
                    //对选项目进行处理
                    dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID());
                } else if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 3) {
                    //删除
                    if (ivrTaskTemplateScriptVO.getID() == null) {
                        log.info("删除失败,模板话术id为空");
                    } else {
                        ivrTaskTemplateScriptVO.setUpdateTime(new Date());
                        ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getID());
                    }
                }
            }
        }
        return ivrTaskTemplate.getID().intValue();
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param ivrTaskTemplate éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     * @return ç»“æžœ
     */
    @Override
    public int updateIvrTaskTemplate(IvrTaskTemplate ivrTaskTemplate) {
        ivrTaskTemplate.setUpdateTime(DateUtils.getNowDate());
        return ivrTaskTemplateMapper.updateIvrTaskTemplate(ivrTaskTemplate);
    }
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“
     *
     * @param IDs éœ€è¦åˆ é™¤çš„随访任务随访模板库主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateByIDs(Long[] IDs) {
        return ivrTaskTemplateMapper.deleteIvrTaskTemplateByIDs(IDs);
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¿¡æ¯
     *
     * @param ID éšè®¿ä»»åŠ¡éšè®¿æ¨¡æ¿åº“ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateByID(Long ID) {
        return ivrTaskTemplateMapper.deleteIvrTaskTemplateByID(ID);
    }
    /**
     * æŸ¥è¯¢æ¨¡æ¿è¯¦æƒ…根据条件
     */
    @Override
    public IvrTaskTemplateVO selectInfoByCondition(IvrTaskTemplateVO ivrTaskTemplateVO) {
        log.info("查询模板详情根据条件的入参为 : {}", ivrTaskTemplateVO);
        //先根据条件查询问题表信息
        IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class);
        List<IvrTaskTemplate> ivrTaskTemplates = selectIvrTaskTemplateList(ivrTaskTemplate);
        if (CollectionUtils.isEmpty(ivrTaskTemplates)) {
            log.info("提供的条件,查询模板详情数据为空:{}", ivrTaskTemplates);
            throw new BaseException("提供的条件,查询模板详情数据为空");
        }
        log.info("ivrLibaTemplates的查询结果为:{},数量为 : {}", ivrTaskTemplates.get(0), ivrTaskTemplates.size());
        //定义IvrLibaTemplateVO ç”¨äºŽè¿”参
        IvrTaskTemplateVO templateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplates.get(0), IvrTaskTemplateVO.class);
//
//        //获取tag信息
//        IvrLibaTemplateTag ivrLibaTemplateTag = new IvrLibaTemplateTag();
//        ivrLibaTemplateTag.setTemplateid(ivrTaskTemplates.get(0).getID());
//        List<IvrLibaTemplateTag> ivrLibaTemplateTags = ivrLibaTemplateTagMapper.selectIvrLibaTemplateTagList(ivrLibaTemplateTag);
        //查询话术
        IvrTaskTemplateScript ivrTaskTemplateScript = new IvrTaskTemplateScript();
        ivrTaskTemplateScript.setTemplateID(ivrTaskTemplates.get(0).getID());
        List<IvrTaskTemplateScript> ivrTaskTemplateScripts = ivrTaskTemplateScriptMapper.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
        List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOS = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScripts, IvrTaskTemplateScriptVO.class);
        //通过话术ID获取选项
        for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) {
            log.info("ivrLibaTemplateScriptVO的主键id为:{}", ivrTaskTemplateScriptVO.getID());
            IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption();
            ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getID());
            List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption1 : ivrTaskTemplateTargetoptions) {
                ObjectMapper mapper = new ObjectMapper();
                if (!StringUtils.isEmpty(ivrTaskTemplateTargetoption1.getDynamiccruxs())) {
                    try {
                        ivrTaskTemplateTargetoption1.setDynamiccruxs(mapper.readValue(ivrTaskTemplateTargetoption1.getDynamiccruxsJson(), List.class));
                    } catch (JsonProcessingException e) {
                        e.printStackTrace();
                    }
                }
                if (!StringUtils.isEmpty(ivrTaskTemplateTargetoption1.getNodynamiccruxs())) {
                    try {
                        ivrTaskTemplateTargetoption1.setNodynamiccruxs(mapper.readValue(ivrTaskTemplateTargetoption1.getNodynamiccruxsJson(), List.class));
                    } catch (JsonProcessingException e) {
                        e.printStackTrace();
                    }
                }
            }
            ivrTaskTemplateScriptVO.setIvrTaskScriptTargetoptionList(ivrTaskTemplateTargetoptions);
        }
        Collections.sort(ivrTaskTemplateScriptVOS, Comparator.comparing(IvrTaskTemplateScriptVO::getTargetid));
        //数据组装
//        templateVO.setIvrTaskTemplateTagList(ivrLibaTemplateTags);
        templateVO.setIvrTaskTemplateScriptVOList(ivrTaskTemplateScriptVOS);
        return templateVO;
    }
    private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID) {
        log.info("ivrLibaTemplateScript的值为:{}", ivrTaskTemplateScript);
        //对模板指标选项进行处理
        if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) {
            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateTargetoptionList) {
                if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 1) {
                    //新增
                    ivrTaskTemplateTargetoption.setTemplateID(tmpID);
                    ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScript.getID());
                    if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getDynamiccruxs()))
                        ivrTaskTemplateTargetoption.setDynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getDynamiccruxs()));
                    if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getNodynamiccruxs()))
                        ivrTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getNodynamiccruxs()));
                    ivrTaskTemplateTargetoptionMapper.insertIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption);
                } else if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 2) {
                    //修改
                    ivrTaskTemplateTargetoption.setTemplateID(tmpID);
                    ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScript.getID());
                    if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getDynamiccruxs()))
                        ivrTaskTemplateTargetoption.setDynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getDynamiccruxs()));
                    if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getNodynamiccruxs()))
                        ivrTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getNodynamiccruxs()));
                    ivrTaskTemplateTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption);
                } else if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 3) {
                    //删除
                    if (ivrTaskTemplateTargetoption.getId() == null) {
                        log.info("删除失败,模板指标选项id为空");
                    } else {
                        ivrTaskTemplateTargetoptionMapper.deleteIvrTaskTemplateTargetoptionById(ivrTaskTemplateTargetoption.getId());
                    }
                }
            }
        }
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateTargetoptionServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.IvrTaskTemplateTargetoption;
import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper;
import com.smartor.service.IIvrTaskTemplateTargetoptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Service
public class IvrTaskTemplateTargetoptionServiceImpl implements IIvrTaskTemplateTargetoptionService
{
    @Autowired
    private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper;
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    @Override
    public IvrTaskTemplateTargetoption selectIvrTaskTemplateTargetoptionById(Long id)
    {
        return ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionById(id);
    }
    /**
     * æŸ¥è¯¢éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“åˆ—è¡¨
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     */
    @Override
    public List<IvrTaskTemplateTargetoption> selectIvrTaskTemplateTargetoptionList(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption)
    {
        return ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
    }
    /**
     * æ–°å¢žéšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    @Override
    public int insertIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption)
    {
        ivrTaskTemplateTargetoption.setCreateTime(DateUtils.getNowDate());
        return ivrTaskTemplateTargetoptionMapper.insertIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption);
    }
    /**
     * ä¿®æ”¹éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ivrTaskTemplateTargetoption éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     * @return ç»“æžœ
     */
    @Override
    public int updateIvrTaskTemplateTargetoption(IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption)
    {
        ivrTaskTemplateTargetoption.setUpdateTime(DateUtils.getNowDate());
        return ivrTaskTemplateTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption);
    }
    /**
     * æ‰¹é‡åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param ids éœ€è¦åˆ é™¤çš„随访任务模板指标选项库主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateTargetoptionByIds(Long[] ids)
    {
        return ivrTaskTemplateTargetoptionMapper.deleteIvrTaskTemplateTargetoptionByIds(ids);
    }
    /**
     * åˆ é™¤éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¿¡æ¯
     *
     * @param id éšè®¿ä»»åŠ¡æ¨¡æ¿æŒ‡æ ‡é€‰é¡¹åº“ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskTemplateTargetoptionById(Long id)
    {
        return ivrTaskTemplateTargetoptionMapper.deleteIvrTaskTemplateTargetoptionById(id);
    }
}
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
@@ -6,32 +6,19 @@
    <resultMap type="com.smartor.domain.IvrLibaTemplate" id="IvrLibaTemplateResult">
        <result property="ID" column="ID"/>
        <result property="targetid" column="targetid"/>
        <result property="targetname" column="targetname"/>
        <result property="templateName" column="templateName"/>
        <result property="silencetime" column="silencetime"/>
        <result property="slienceRepeatTimes" column="slienceRepeatTimes"/>
        <result property="nomatchRepeatTimes" column="nomatchRepeatTimes"/>
        <result property="firstQuestionNum" column="firstQuestionNum"/>
        <result property="submodule" column="submodule"/>
        <result property="language" column="language"/>
        <result property="note" column="note"/>
        <result property="valueType" column="value_type"/>
        <result property="reply" column="reply"/>
        <result property="addUserID" column="addUserID"/>
        <result property="addTime" column="addTime"/>
        <result property="modifyUserID" column="modifyUserID"/>
        <result property="modifyTime" column="modifyTime"/>
        <result property="groupID" column="groupID"/>
        <result property="labelInfo" column="label_info"/>
        <result property="submoduleID" column="submoduleID"/>
        <result property="playType" column="playType"/>
        <result property="icd10code" column="icd10code"/>
        <result property="icd10codename" column="icd10codename"/>
        <result property="atuoTaskDayOffset" column="atuoTaskDayOffset"/>
        <result property="deptIds" column="deptIds"/>
        <result property="deptNames" column="dept_names"/>
        <result property="fKsdm" column="F_KSDM"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
@@ -49,35 +36,29 @@
        <result property="campus" column="campus"/>
        <result property="tag" column="tag"/>
        <result property="suitway" column="suitway"/>
        <result property="otherdata" column="otherdata"/>
        <result property="mateNum" column="mate_num"/>
        <result property="revisitBefore" column="revisit_before"/>
        <result property="revisitAfter" column="revisit_after"/>
        <result property="noVoiceNum" column="no_voice_num"/>
        <result property="silencetime" column="silencetime"/>
    </resultMap>
    <sql id="selectIvrLibaTemplateVo">
        select ID,
               targetid,
               value_type,
               reply,
               revisit_before,
               revisit_after,
               targetname,
               templateName,
               silencetime,
               slienceRepeatTimes,
               nomatchRepeatTimes,
               firstQuestionNum,
               version,
               silencetime,
               usestate,
               campus,
               tag,
               otherdata,
               suitway,
               mate_num,
               no_voice_num,
               submodule, language, note, addUserID, addTime, modifyUserID, modifyTime, groupID, label_info, submoduleID, playType, icd10code, icd10codename, atuoTaskDayOffset, deptIds, dept_names, F_KSDM, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid, parameter
               submodule, language, note,
            groupID, label_info, submoduleID, playType, icd10code, icd10codename, deptIds, dept_names, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid, parameter
        from ivr_liba_template
    </sql>
@@ -89,26 +70,16 @@
            <if test="templateName != null  and templateName != ''">and templateName like concat('%', #{templateName},
                '%')
            </if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="ID != null ">and id = #{ID}</if>
            <if test="revisitAfter != null ">and revisit_after = #{revisitAfter}</if>
            <if test="revisitBefore != null ">and revisit_before = #{revisitBefore}</if>
            <if test="mateNum != null and mateNum > 0">and mate_num = #{mateNum}</if>
            <if test="suitway != null ">and suitway = #{suitway}</if>
            <if test="targetname != null and targetname !='' ">and targetname = #{targetname}</if>
            <if test="version != null and version !='' ">and version = #{version}</if>
            <if test="usestate != null and usestate !='' ">and usestate = #{usestate}</if>
            <if test="silencetime != null ">and silencetime = #{silencetime}</if>
            <if test="slienceRepeatTimes != null ">and slienceRepeatTimes = #{slienceRepeatTimes}</if>
            <if test="nomatchRepeatTimes != null ">and nomatchRepeatTimes = #{nomatchRepeatTimes}</if>
            <if test="firstQuestionNum != null ">and firstQuestionNum = #{firstQuestionNum}</if>
            <if test="submodule != null  and submodule != ''">and submodule = #{submodule}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="note != null  and note != ''">and note = #{note}</if>
            <if test="addUserID != null  and addUserID != ''">and addUserID = #{addUserID}</if>
            <if test="addTime != null ">and addTime = #{addTime}</if>
            <if test="modifyUserID != null  and modifyUserID != ''">and modifyUserID = #{modifyUserID}</if>
            <if test="modifyTime != null ">and modifyTime = #{modifyTime}</if>
            <if test="groupID != null  and groupID != ''">and groupID = #{groupID}</if>
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="submoduleID != null  and submoduleID != ''">and submoduleID = #{submoduleID}</if>
@@ -121,9 +92,7 @@
            <if test="deptNames != null  and deptNames != ''">and dept_names like concat('%',
                #{deptNames}, '%')
            </if>
            <if test="atuoTaskDayOffset != null ">and atuoTaskDayOffset = #{atuoTaskDayOffset}</if>
            <if test="deptIds != null  and deptIds != ''">and deptIds = #{deptIds}</if>
            <if test="fKsdm != null  and fKsdm != ''">and F_KSDM = #{fKsdm}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
@@ -133,6 +102,7 @@
            <if test="parameter != null  and parameter != ''">and parameter = #{parameter}</if>
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="noVoiceNum != null and noVoiceNum > 0">and no_voice_num = #{noVoiceNum}</if>
            <if test="silencetime != null">and silencetime = #{silencetime}</if>
        </where>
    </select>
@@ -146,34 +116,21 @@
        insert into ivr_liba_template
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="templateName != null and templateName != ''">templateName,</if>
            <if test="targetid != null">targetid,</if>
            <if test="targetname != null and targetname != ''">targetname,</if>
            <if test="version != null and version != ''">version,</if>
            <if test="campus != null and campus != ''">campus,</if>
            <if test="usestate != null and usestate != ''">usestate,</if>
            <if test="silencetime != null">silencetime,</if>
            <if test="slienceRepeatTimes != null">slienceRepeatTimes,</if>
            <if test="nomatchRepeatTimes != null">nomatchRepeatTimes,</if>
            <if test="firstQuestionNum != null">firstQuestionNum,</if>
            <if test="submodule != null">submodule,</if>
            <if test="language != null and language != ''">language,</if>
            <if test="note != null">note,</if>
            <if test="valueType != null">value_type,</if>
            <if test="reply != null">reply,</if>
            <if test="addUserID != null">addUserID,</if>
            <if test="addTime != null">addTime,</if>
            <if test="modifyUserID != null">modifyUserID,</if>
            <if test="modifyTime != null">modifyTime,</if>
            <if test="groupID != null">groupID,</if>
            <if test="labelInfo != null">label_info,</if>
            <if test="submoduleID != null">submoduleID,</if>
            <if test="playType != null">playType,</if>
            <if test="icd10code != null">icd10code,</if>
            <if test="icd10codename != null">icd10codename,</if>
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset,</if>
            <if test="deptIds != null">deptIds,</if>
            <if test="deptNames != null">dept_names,</if>
            <if test="fKsdm != null">F_KSDM,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
@@ -188,42 +145,29 @@
            <if test="parameter != null">parameter,</if>
            <if test="tag != null">tag,</if>
            <if test="suitway != null">suitway,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="mateNum != null ">mate_num</if>
            <if test="revisitAfter != null ">revisit_after</if>
            <if test="revisitBefore != null ">revisit_before</if>
            <if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num</if>
            <if test="mateNum != null ">mate_num,</if>
            <if test="revisitAfter != null ">revisit_after,</if>
            <if test="revisitBefore != null ">revisit_before,</if>
            <if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num,</if>
            <if test="silencetime != null  ">silencetime,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="templateName != null and templateName != ''">#{templateName},</if>
            <if test="targetid != null ">#{targetid},</if>
            <if test="targetname != null and targetname != ''">#{targetname},</if>
            <if test="version != null and version != ''">#{version},</if>
            <if test="campus != null and campus != ''">#{campus},</if>
            <if test="usestate != null and usestate != ''">#{usestate},</if>
            <if test="silencetime != null">#{silencetime},</if>
            <if test="slienceRepeatTimes != null">#{slienceRepeatTimes},</if>
            <if test="nomatchRepeatTimes != null">#{nomatchRepeatTimes},</if>
            <if test="firstQuestionNum != null">#{firstQuestionNum},</if>
            <if test="submodule != null">#{submodule},</if>
            <if test="language != null and language != ''">#{language},</if>
            <if test="note != null">#{note},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="reply != null">#{reply},</if>
            <if test="addUserID != null">#{addUserID},</if>
            <if test="addTime != null">#{addTime},</if>
            <if test="modifyUserID != null">#{modifyUserID},</if>
            <if test="modifyTime != null">#{modifyTime},</if>
            <if test="groupID != null">#{groupID},</if>
            <if test="labelInfo != null">#{labelInfo},</if>
            <if test="submoduleID != null">#{submoduleID},</if>
            <if test="playType != null">#{playType},</if>
            <if test="icd10code != null">#{icd10code},</if>
            <if test="icd10codename != null">#{icd10codename},</if>
            <if test="atuoTaskDayOffset != null">#{atuoTaskDayOffset},</if>
            <if test="deptIds != null">#{deptIds},</if>
            <if test="deptNames != null">#{deptNames},</if>
            <if test="fKsdm != null">#{fKsdm},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
@@ -238,11 +182,11 @@
            <if test="parameter != null">#{parameter},</if>
            <if test="tag != null">#{tag},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="mateNum != null ">#{mateNum}</if>
            <if test="revisitAfter != null ">#{revisitAfter}</if>
            <if test="revisitBefore != null ">#{revisitBefore}</if>
            <if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum}</if>
            <if test="mateNum != null ">#{mateNum},</if>
            <if test="revisitAfter != null ">#{revisitAfter},</if>
            <if test="revisitBefore != null ">#{revisitBefore},</if>
            <if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum},</if>
            <if test="silencetime != null ">#{silencetime},</if>
        </trim>
    </insert>
@@ -251,24 +195,13 @@
        update ivr_liba_template
        <trim prefix="SET" suffixOverrides=",">
            <if test="templateName != null and templateName != ''">templateName = #{templateName},</if>
            <if test="targetid != null ">targetid = #{targetid},</if>
            <if test="targetname != null and targetname != ''">targetname = #{targetname},</if>
            <if test="version != null and version != ''">version = #{version},</if>
            <if test="campus != null and campus != ''">campus = #{campus},</if>
            <if test="usestate != null and usestate != ''">usestate = #{usestate},</if>
            <if test="silencetime != null">silencetime = #{silencetime},</if>
            <if test="slienceRepeatTimes != null">slienceRepeatTimes = #{slienceRepeatTimes},</if>
            <if test="nomatchRepeatTimes != null">nomatchRepeatTimes = #{nomatchRepeatTimes},</if>
            <if test="firstQuestionNum != null">firstQuestionNum = #{firstQuestionNum},</if>
            <if test="submodule != null">submodule = #{submodule},</if>
            <if test="language != null and language != ''">language = #{language},</if>
            <if test="note != null">note = #{note},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="reply != null">reply = #{reply},</if>
            <if test="addUserID != null">addUserID = #{addUserID},</if>
            <if test="addTime != null">addTime = #{addTime},</if>
            <if test="modifyUserID != null">modifyUserID = #{modifyUserID},</if>
            <if test="modifyTime != null">modifyTime = #{modifyTime},</if>
            <if test="groupID != null">groupID = #{groupID},</if>
            <if test="labelInfo != null">label_info = #{labelInfo},</if>
            <if test="submoduleID != null">submoduleID = #{submoduleID},</if>
@@ -278,7 +211,6 @@
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset = #{atuoTaskDayOffset},</if>
            <if test="deptIds != null">deptIds = #{deptIds},</if>
            <if test="deptNames != null">dept_names = #{deptNames},</if>
            <if test="fKsdm != null">F_KSDM = #{fKsdm},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
@@ -293,11 +225,11 @@
            <if test="parameter != null">parameter = #{parameter},</if>
            <if test="tag != null">tag = #{tag},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
            <if test="mateNum != null ">mate_num = #{mateNum},</if>
            <if test="revisitAfter != null ">revisit_after = #{revisitAfter},</if>
            <if test="revisitBefore != null ">revisit_before = #{revisitBefore},</if>
            <if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num = #{noVoiceNum}</if>
            <if test="silencetime != null">silencetime = #{silencetime}</if>
        </trim>
        where ID = #{ID}
    </update>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -21,8 +21,6 @@
        <result property="noClearlyText" column="noClearlyText"/>
        <result property="noClearlyVoice" column="noClearlyVoice"/>
        <result property="categoryName" column="categoryName"/>
        <result property="targetOptions" column="targetOptions"/>
        <result property="language" column="language"/>
        <result property="playWavOnly" column="playWavOnly"/>
        <result property="valueType" column="value_type"/>
        <result property="delFlag" column="del_flag"/>
@@ -36,13 +34,11 @@
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="targetid" column="targetid"/>
        <result property="targettype" column="targettype"/>
        <result property="targetvalue" column="targettalue"/>
        <result property="questiontitle" column="questiontitle"/>
        <result property="nextQuestion" column="next_question"/>
        <result property="otherdata" column="otherdata"/>
        <result property="isMust" column="is_must"/>
        <result property="questionResult" column="question_result"/>
    </resultMap>
    <sql id="selectIvrLibaTemplateScriptVo">
@@ -63,14 +59,23 @@
               noClearlyVoice,
               categoryName,
               targetid,
               targettype,
               value_type,
               targetvalue,
               questiontitle,
               next_question,
               otherdata,
               is_must,
               question_result,
               targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
               playWavOnly,
               del_flag,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               orgid,
               pid,
               guid
        from ivr_liba_template_script
    </sql>
@@ -93,15 +98,13 @@
            <if test="noClearlyText != null  and noClearlyText != ''">and noClearlyText = #{noClearlyText}</if>
            <if test="noClearlyVoice != null  and noClearlyVoice != ''">and noClearlyVoice = #{noClearlyVoice}</if>
            <if test="nextQuestion != null  and nextQuestion != ''">and next_question = #{nextQuestion}</if>
            <if test="questionResult != null  and questionResult != ''">and question_result = #{questionResult}</if>
            <if test="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
                '%')
            </if>
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle like concat('%', #{questiontitle},
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle like concat('%',
                #{questiontitle},
                '%')
            </if>
            <if test="targetOptions != null  and targetOptions != ''">and targetOptions = #{targetOptions}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="playWavOnly != null ">and playWavOnly = #{playWavOnly}</if>
            <if test="valueType != null ">and value_type = #{valueType}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
@@ -110,7 +113,6 @@
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
            <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
            <if test="isMust != null  and isMust != ''">and is_must = #{isMust}</if>
        </where>
@@ -141,8 +143,6 @@
            <if test="noClearlyText != null">noClearlyText,</if>
            <if test="noClearlyVoice != null">noClearlyVoice,</if>
            <if test="categoryName != null">categoryName,</if>
            <if test="targetOptions != null">targetOptions,</if>
            <if test="language != null and language != ''">language,</if>
            <if test="playWavOnly != null">playWavOnly,</if>
            <if test="valueType != null">value_type,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
@@ -156,13 +156,11 @@
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="targetvalue != null">targetvalue,</if>
            <if test="targettype != null">targettype,</if>
            <if test="targetid != null">targetid,</if>
            <if test="questiontitle != null">questiontitle,</if>
            <if test="nextQuestion != null">next_question,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="isMust != null  and isMust != ''">is_must,</if>
            <if test="questionResult != null  and questionResult != ''">question_result,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="templateQuestionNum != null">#{templateQuestionNum},</if>
@@ -180,8 +178,6 @@
            <if test="noClearlyText != null">#{noClearlyText},</if>
            <if test="noClearlyVoice != null">#{noClearlyVoice},</if>
            <if test="categoryName != null">#{categoryName},</if>
            <if test="targetOptions != null">#{targetOptions},</if>
            <if test="language != null and language != ''">#{language},</if>
            <if test="playWavOnly != null">#{playWavOnly},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
@@ -195,13 +191,11 @@
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="targetvalue != null">#{targetvalue},</if>
            <if test="targettype != null">#{targettype},</if>
            <if test="targetid != null">#{targetid},</if>
            <if test="questiontitle != null">#{questiontitle},</if>
            <if test="nextQuestion != null">#{nextQuestion},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="isMust != null  and isMust != ''">#{isMust},</if>
            <if test="questionResult != null  and questionResult != ''">#{questionResult},</if>
        </trim>
    </insert>
@@ -223,8 +217,6 @@
            <if test="noClearlyText != null">noClearlyText = #{noClearlyText},</if>
            <if test="noClearlyVoice != null">noClearlyVoice = #{noClearlyVoice},</if>
            <if test="categoryName != null">categoryName = #{categoryName},</if>
            <if test="targetOptions != null">targetOptions = #{targetOptions},</if>
            <if test="language != null and language != ''">language = #{language},</if>
            <if test="playWavOnly != null">playWavOnly = #{playWavOnly},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
@@ -237,14 +229,11 @@
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
            <if test="targettype != null">targettype = #{targettype},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
            <if test="questiontitle != null">questiontitle = #{questiontitle},</if>
            <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
            <if test="isMust != null  and isMust != ''">is_must = #{isMust}</if>
            <if test="questionResult != null  and questionResult != ''">question_result = #{questionResult},</if>
        </trim>
        where ID = #{ID}
    </update>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetMapper.xml
ÎļþÒÑɾ³ý
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
@@ -21,8 +21,6 @@
        <result property="version" column="version"/>
        <result property="groupid" column="groupid"/>
        <result property="isabnormal" column="isabnormal"/>
        <result property="warnup" column="warnup"/>
        <result property="warndown" column="warndown"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
@@ -52,7 +50,7 @@
               dynamiccruxs,
               targetid,
               next_question,
               optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
               optiondesc, language, version, groupid, isabnormal,  del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
        from ivr_liba_template_targetoption
    </sql>
@@ -77,8 +75,6 @@
            <if test="version != null  and version != ''">and version = #{version}</if>
            <if test="groupid != null  and groupid != ''">and groupid = #{groupid}</if>
            <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
            <if test="warnup != null ">and warnup = #{warnup}</if>
            <if test="warndown != null ">and warndown = #{warndown}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
@@ -113,8 +109,6 @@
            <if test="version != null and version != ''">version,</if>
            <if test="groupid != null">groupid,</if>
            <if test="isabnormal != null">isabnormal,</if>
            <if test="warnup != null">warnup,</if>
            <if test="warndown != null">warndown,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
@@ -144,8 +138,6 @@
            <if test="version != null and version != ''">#{version},</if>
            <if test="groupid != null">#{groupid},</if>
            <if test="isabnormal != null">#{isabnormal},</if>
            <if test="warnup != null">#{warnup},</if>
            <if test="warndown != null">#{warndown},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
@@ -179,8 +171,6 @@
            <if test="version != null and version != ''">version = #{version},</if>
            <if test="groupid != null">groupid = #{groupid},</if>
            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
            <if test="warnup != null">warnup = #{warnup},</if>
            <if test="warndown != null">warndown = #{warndown},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
@@ -212,4 +202,4 @@
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
@@ -10,20 +10,15 @@
        <result property="templateid" column="templateid"/>
        <result property="templatename" column="templatename"/>
        <result property="labelinfo" column="labelinfo"/>
        <result property="state" column="state"/>
        <result property="count" column="count"/>
        <result property="executed" column="executed"/>
        <result property="unexecuted" column="unexecuted"/>
        <result property="fail" column="fail"/>
        <result property="addtime" column="addtime"/>
        <result property="checkuserid" column="checkuserid"/>
        <result property="checkusername" column="checkusername"/>
        <result property="checktime" column="checktime"/>
        <result property="type" column="type"/>
        <result property="typename" column="typename"/>
        <result property="usebqsms" column="usebqsms"/>
        <result property="usebhsms" column="usebhsms"/>
        <result property="usesendsms" column="usesendsms"/>
        <result property="deptcode" column="deptcode"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
@@ -38,35 +33,36 @@
        <result property="preachform" column="preachform"/>
        <result property="sendType" column="send_type"/>
        <result property="sendState" column="send_state"/>
        <result property="param" column="param"/>
        <result property="hospType" column="hosp_type"/>
        <result property="hospno" column="hospno"/>
        <result property="taskDesc" column="task_desc"/>
        <result property="libtemplateid" column="libtemplateid"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="sendTimeSlot" column="send_time_slot"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="stopState" column="stop_state"/>
    </resultMap>
    <sql id="selectIvrTaskVo">
        select taskid,
               task_name,
               libtemplateid,
               libtemplatename,
               stop_state,
               templateid,
               templatename,
               labelinfo,
               state,
               count,
               executed,
               unexecuted,
               fail,
               addtime,
               checkuserid,
               checkusername,
               checktime,
               type,
               task_desc,
               hosp_type,
               hospno,
               typename,
               usebqsms,
               usebhsms,
               usesendsms,
               deptcode,
               del_flag,
               update_by,
@@ -80,7 +76,7 @@
               preachform,
               send_type,
               send_state,
               param,
               send_time_slot,
               orgid
        from ivr_task
    </sql>
@@ -89,17 +85,18 @@
        <include refid="selectIvrTaskVo"/>
        <where>
            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">and sendTimeSlot like concat('%', #{sendTimeSlot},
                '%')
            </if>
            <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
            <if test="templatename != null  and templatename != ''">and templatename like concat('%', #{templatename},
                '%')
            </if>
            <if test="labelinfo != null  and labelinfo != ''">and labelinfo = #{labelinfo}</if>
            <if test="state != null ">and state = #{state}</if>
            <if test="count != null ">and count = #{count}</if>
            <if test="executed != null ">and executed = #{executed}</if>
            <if test="unexecuted != null ">and unexecuted = #{unexecuted}</if>
            <if test="fail != null ">and fail = #{fail}</if>
            <if test="addtime != null ">and addtime = #{addtime}</if>
            <if test="checkuserid != null  and checkuserid != ''">and checkuserid = #{checkuserid}</if>
            <if test="checkusername != null  and checkusername != ''">and checkusername like concat('%',
                #{checkusername}, '%')
@@ -107,15 +104,14 @@
            <if test="checktime != null ">and checktime = #{checktime}</if>
            <if test="type != null  and type != ''">and type = #{type}</if>
            <if test="typename != null  and typename != ''">and typename like concat('%', #{typename}, '%')</if>
            <if test="usebqsms != null ">and usebqsms = #{usebqsms}</if>
            <if test="usebhsms != null ">and usebhsms = #{usebhsms}</if>
            <if test="usesendsms != null ">and usesendsms = #{usesendsms}</if>
            <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="hospType != null  and hospType != ''">and hosp_type = #{hospType}</if>
            <if test="hospno != null  and hospno != ''">and orgid = #{hospno}</if>
            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
            <if test="libtemplatename != null  and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if>
            <if test="stopState != null  ">and stop_state = #{stopState}</if>
        </where>
        order by update_time desc,taskid desc
    </select>
@@ -133,20 +129,15 @@
            <if test="templateid != null">templateid,</if>
            <if test="templatename != null">templatename,</if>
            <if test="labelinfo != null">labelinfo,</if>
            <if test="state != null">state,</if>
            <if test="count != null">count,</if>
            <if test="executed != null">executed,</if>
            <if test="unexecuted != null">unexecuted,</if>
            <if test="fail != null">fail,</if>
            <if test="addtime != null">addtime,</if>
            <if test="checkuserid != null">checkuserid,</if>
            <if test="checkusername != null">checkusername,</if>
            <if test="checktime != null">checktime,</if>
            <if test="type != null">type,</if>
            <if test="typename != null">typename,</if>
            <if test="usebqsms != null">usebqsms,</if>
            <if test="usebhsms != null">usebhsms,</if>
            <if test="usesendsms != null">usesendsms,</if>
            <if test="deptcode != null">deptcode,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
@@ -161,30 +152,28 @@
            <if test="preachform != null">preachform,</if>
            <if test="sendType != null">send_type,</if>
            <if test="sendState != null">send_state,</if>
            <if test="param != null">param,</if>
            <if test="hospType != null  and hospType != ''">hosp_type,</if>
            <if test="hospno != null  and hospno != ''">hospno,</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc,</if>
            <if test="libtemplateid != null ">libtemplateid,</if>
            <if test="libtemplatename != null  and libtemplatename != ''">libtemplatename,</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">sendTimeSlot,</if>
            <if test="stopState != null">stop_state,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskName != null">#{taskName},</if>
            <if test="templateid != null">#{templateid},</if>
            <if test="templatename != null">#{templatename},</if>
            <if test="labelinfo != null">#{labelinfo},</if>
            <if test="state != null">#{state},</if>
            <if test="count != null">#{count},</if>
            <if test="executed != null">#{executed},</if>
            <if test="unexecuted != null">#{unexecuted},</if>
            <if test="fail != null">#{fail},</if>
            <if test="addtime != null">#{addtime},</if>
            <if test="checkuserid != null">#{checkuserid},</if>
            <if test="checkusername != null">#{checkusername},</if>
            <if test="checktime != null">#{checktime},</if>
            <if test="type != null">#{type},</if>
            <if test="typename != null">#{typename},</if>
            <if test="usebqsms != null">#{usebqsms},</if>
            <if test="usebhsms != null">#{usebhsms},</if>
            <if test="usesendsms != null">#{usesendsms},</if>
            <if test="deptcode != null">#{deptcode},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
@@ -199,10 +188,12 @@
            <if test="preachform != null">#{preachform},</if>
            <if test="sendType != null">#{sendType},</if>
            <if test="sendState != null">#{sendState},</if>
            <if test="param != null">#{param},</if>
            <if test="hospType != null  and hospType != ''">#{hospType},</if>
            <if test="hospno != null  and hospno != ''">#{hospno},</if>
            <if test="taskDesc != null  and taskDesc != ''">#{taskDesc},</if>
            <if test="libtemplateid != null ">#{libtemplateid},</if>
            <if test="libtemplatename != null  and libtemplatename != ''">#{libtemplatename},</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">#{sendTimeSlot},</if>
            <if test="stopState != null">#{stopState},</if>
        </trim>
    </insert>
@@ -213,20 +204,15 @@
            <if test="templateid != null">templateid = #{templateid},</if>
            <if test="templatename != null">templatename = #{templatename},</if>
            <if test="labelinfo != null">labelinfo = #{labelinfo},</if>
            <if test="state != null">state = #{state},</if>
            <if test="count != null">count = #{count},</if>
            <if test="executed != null">executed = #{executed},</if>
            <if test="unexecuted != null">unexecuted = #{unexecuted},</if>
            <if test="fail != null">fail = #{fail},</if>
            <if test="addtime != null">addtime = #{addtime},</if>
            <if test="checkuserid != null">checkuserid = #{checkuserid},</if>
            <if test="checkusername != null">checkusername = #{checkusername},</if>
            <if test="checktime != null">checktime = #{checktime},</if>
            <if test="type != null">type = #{type},</if>
            <if test="typename != null">typename = #{typename},</if>
            <if test="usebqsms != null">usebqsms = #{usebqsms},</if>
            <if test="usebhsms != null">usebhsms = #{usebhsms},</if>
            <if test="usesendsms != null">usesendsms = #{usesendsms},</if>
            <if test="deptcode != null">deptcode = #{deptcode},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -241,10 +227,12 @@
            <if test="preachform != null">preachform = #{preachform},</if>
            <if test="sendType != null">send_type = #{sendType},</if>
            <if test="sendState != null">send_state = #{sendState},</if>
            <if test="param != null">param = #{param},</if>
            <if test="hospType != null  and hospType != ''">hosp_type = #{hospType},</if>
            <if test="hospno != null  and hospno != ''">hospno = #{hospno},</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc= #{taskDesc},</if>
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null  and libtemplatename != ''">libtemplatename = #{libtemplatename},</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">send_time_slot=#{sendTimeSlot},</if>
            <if test="stopState != null ">stop_state=#{stopState},</if>
        </trim>
        where taskid = #{taskid}
    </update>
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
@@ -27,14 +27,9 @@
        <result property="senduuid" column="senduuid"/>
        <result property="result" column="result"/>
        <result property="finishtime" column="finishtime"/>
        <result property="userid" column="userid"/>
        <result property="username" column="username"/>
        <result property="recordid" column="recordid"/>
        <result property="recallcount" column="recallcount"/>
        <result property="exrecallcount" column="exrecallcount"/>
        <result property="pulltime" column="pulltime"/>
        <result property="bqsms" column="bqsms"/>
        <result property="bhsms" column="bhsms"/>
        <result property="deptcode" column="deptcode"/>
        <result property="labelstatus" column="labelstatus"/>
        <result property="delFlag" column="del_flag"/>
@@ -50,11 +45,7 @@
        <result property="textParam" column="text_param"/>
        <result property="serviceform" column="serviceform"/>
        <result property="bedNo" column="bed_no"/>
        <result property="icdName" column="icd_name"/>
        <result property="medicalRecordNo" column="medical_record_no"/>
        <result property="preachcontent" column="preachcontent"/>
        <result property="sendType" column="send_type"/>
        <result property="sendTimeSlot" column="send_time_slot"/>
        <result property="taskName" column="task_name"/>
        <result property="taskDesc" column="task_desc"/>
        <result property="operator" column="operator"/>
@@ -66,11 +57,15 @@
        <result property="deptname" column="deptname"/>
        <result property="admindate" column="admindate"/>
        <result property="roomno" column="roomno"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="libtemplateid" column="libtemplateid"/>
    </resultMap>
    <sql id="selectIvrTaskcallVo">
        select id,
               hosp_type,
               libtemplateid,
               libtemplatename,
               hospno,
               phone,
               sex,
@@ -92,14 +87,9 @@
               senduuid,
               result,
               finishtime,
               userid,
               username,
               recordid,
               recallcount,
               exrecallcount,
               pulltime,
               bqsms,
               bhsms,
               deptcode,
               labelstatus,
               del_flag,
@@ -115,10 +105,7 @@
               text_param,
               serviceform,
               bed_no,
               icd_name,
               send_type,
               medical_record_no,
               send_time_slot,
               task_name,
               task_desc,
               operator_no,
@@ -128,8 +115,7 @@
               roomno,
               admindate,
               deptname,
               diagname,
               preachcontent
               diagname
        from ivr_task_single
    </sql>
@@ -160,14 +146,9 @@
            <if test="senduuid != null  and senduuid != ''">and senduuid = #{senduuid}</if>
            <if test="result != null  and result != ''">and result = #{result}</if>
            <if test="finishtime != null ">and finishtime = #{finishtime}</if>
            <if test="userid != null  and userid != ''">and userid = #{userid}</if>
            <if test="username != null  and username != ''">and username like concat('%', #{username}, '%')</if>
            <if test="recordid != null ">and recordid = #{recordid}</if>
            <if test="recallcount != null ">and recallcount = #{recallcount}</if>
            <if test="exrecallcount != null ">and exrecallcount = #{exrecallcount}</if>
            <if test="pulltime != null ">and pulltime = #{pulltime}</if>
            <if test="bqsms != null ">and bqsms = #{bqsms}</if>
            <if test="bhsms != null ">and bhsms = #{bhsms}</if>
            <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
            <if test="labelstatus != null ">and labelstatus = #{labelstatus}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
@@ -178,15 +159,13 @@
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="textParam != null  and textParam != ''">and text_param = #{textParam}</if>
            <if test="bedNo != null">and bed_no = #{bedNo}</if>
            <if test="icdName != null  and icdName != ''">and icd_name = #{icdName}</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">and medical_record_no = #{medicalRecordNo}
            </if>
            <if test="preachcontent != null  and preachcontent != ''">and preachcontent = #{preachcontent}</if>
            <if test="sendType != null  and sendType != ''">and send_type = #{sendType}</if>
            <if test="operator != null  and operator != ''">and operator = #{operator}</if>
            <if test="operatorNo != null  and operatorNo != ''">and operator_no = #{operatorNo}</if>
            <if test="wechat != null  and wechat != ''">and wechat = #{wechat}</if>
            <if test="hospType != null  and hospType != ''">and hosp_type = #{hospType}</if>
            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename},</if>
        </where>
        order by update_time desc,id desc
    </select>
@@ -221,14 +200,9 @@
            <if test="senduuid != null">senduuid,</if>
            <if test="result != null">result,</if>
            <if test="finishtime != null">finishtime,</if>
            <if test="userid != null">userid,</if>
            <if test="username != null">username,</if>
            <if test="recordid != null">recordid,</if>
            <if test="recallcount != null">recallcount,</if>
            <if test="exrecallcount != null">exrecallcount,</if>
            <if test="pulltime != null">pulltime,</if>
            <if test="bqsms != null">bqsms,</if>
            <if test="bhsms != null">bhsms,</if>
            <if test="deptcode != null">deptcode,</if>
            <if test="labelstatus != null">labelstatus,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
@@ -244,9 +218,6 @@
            <if test="textParam != null">text_param,</if>
            <if test="serviceform != null">serviceform,</if>
            <if test="bedNo != null">bed_no,</if>
            <if test="icdName != null  and icdName != ''">icd_name,</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">medical_record_no,</if>
            <if test="preachcontent != null  and preachcontent != ''">preachcontent,</if>
            <if test="sendType != null  and sendType != ''">send_type,</if>
            <if test="taskName != null  and taskName != ''">task_name,</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc,</if>
@@ -259,6 +230,8 @@
            <if test="admindate != null  and admindate != ''">admindate,</if>
            <if test="deptname != null  and deptname != ''">deptname,</if>
            <if test="diagname != null  and diagname != ''">diagname,</if>
            <if test="libtemplateid != null ">libtemplateid,</if>
            <if test="libtemplatename != null ">libtemplatename,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sendname != null">#{sendname},</if>
@@ -282,14 +255,9 @@
            <if test="senduuid != null">#{senduuid},</if>
            <if test="result != null">#{result},</if>
            <if test="finishtime != null">#{finishtime},</if>
            <if test="userid != null">#{userid},</if>
            <if test="username != null">#{username},</if>
            <if test="recordid != null">#{recordid},</if>
            <if test="recallcount != null">#{recallcount},</if>
            <if test="exrecallcount != null">#{exrecallcount},</if>
            <if test="pulltime != null">#{pulltime},</if>
            <if test="bqsms != null">#{bqsms},</if>
            <if test="bhsms != null">#{bhsms},</if>
            <if test="deptcode != null">#{deptcode},</if>
            <if test="labelstatus != null">#{labelstatus},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
@@ -305,9 +273,6 @@
            <if test="textParam != null">#{textParam},</if>
            <if test="serviceform != null">#{serviceform},</if>
            <if test="bedNo != null">#{bedNo},</if>
            <if test="icdName != null  and icdName != ''">#{icdName},</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">#{medicalRecordNo},</if>
            <if test="preachcontent != null  and preachcontent != ''">#{preachcontent},</if>
            <if test="sendType != null  and sendType != ''">#{sendType},</if>
            <if test="taskName != null  and taskName != ''">#{taskName},</if>
            <if test="taskDesc != null  and taskDesc != ''">#{taskDesc},</if>
@@ -320,6 +285,9 @@
            <if test="admindate != null  and admindate != ''">#{admindate},</if>
            <if test="deptname != null  and deptname != ''">#{deptname},</if>
            <if test="diagname != null  and diagname != ''">#{diagname},</if>
            <if test="libtemplateid != null ">#{libtemplateid},</if>
            <if test="libtemplatename != null ">#{libtemplatename},</if>
            <if test="stopState != null ">#{stopState},</if>
        </trim>
    </insert>
@@ -347,14 +315,9 @@
            <if test="senduuid != null">senduuid = #{senduuid},</if>
            <if test="result != null">result = #{result},</if>
            <if test="finishtime != null">finishtime = #{finishtime},</if>
            <if test="userid != null">userid = #{userid},</if>
            <if test="username != null">username = #{username},</if>
            <if test="recordid != null">recordid = #{recordid},</if>
            <if test="recallcount != null">recallcount = #{recallcount},</if>
            <if test="exrecallcount != null">exrecallcount = #{exrecallcount},</if>
            <if test="pulltime != null">pulltime = #{pulltime},</if>
            <if test="bqsms != null">bqsms = #{bqsms},</if>
            <if test="bhsms != null">bhsms = #{bhsms},</if>
            <if test="deptcode != null">deptcode = #{deptcode},</if>
            <if test="labelstatus != null">labelstatus = #{labelstatus},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
@@ -370,9 +333,6 @@
            <if test="textParam != null">text_param = #{textParam},</if>
            <if test="serviceform != null">serviceform = #{serviceform},</if>
            <if test="bedNo != null">bed_no = #{bedNo},</if>
            <if test="icdName != null  and icdName != ''">icd_name = #{icdName},</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">medical_record_no = #{medicalRecordNo},</if>
            <if test="preachcontent != null  and preachcontent != ''">preachcontent = #{preachcontent},</if>
            <if test="sendType != null  and sendType != ''">send_type = #{sendType},</if>
            <if test="taskName != null  and taskName != ''">task_name = #{taskName},</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc = #{taskDesc},</if>
@@ -385,6 +345,8 @@
            <if test="admindate != null  and admindate != ''">admindate = #{admindate},</if>
            <if test="deptname != null  and deptname != ''">deptname = #{deptname},</if>
            <if test="diagname != null  and diagname != ''">diagname = #{diagname},</if>
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
        </trim>
        where id = #{id}
    </update>
@@ -421,14 +383,9 @@
               senduuid,
               result,
               finishtime,
               userid,
               username,
               recordid,
               recallcount,
               exrecallcount,
               pulltime,
               bqsms,
               bhsms,
               deptcode,
               labelstatus,
               del_flag,
@@ -444,10 +401,7 @@
               text_param,
               serviceform,
               bed_no,
               icd_name,
               send_type,
               medical_record_no,
               preachcontent,
               task_name,
               task_desc,
               operator_no,
@@ -458,8 +412,7 @@
               roomno,
               admindate,
               deptname,
               diagname,
               send_time_slot
               diagname
        FROM ivr_task_single,
             JSON_TABLE(send_time_slot, '$[*]' COLUMNS (
        begantime DATETIME PATH '$.begantime',
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,334 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskTemplateMapper">
    <resultMap type="com.smartor.domain.IvrTaskTemplate" id="IvrTaskTemplateResult">
        <result property="ID" column="ID"/>
        <result property="taskid" column="taskid"/>
        <result property="taskname" column="taskname"/>
        <result property="targetid" column="targetid"/>
        <result property="targetname" column="targetname"/>
        <result property="templateName" column="templateName"/>
        <result property="silencetime" column="silencetime"/>
        <result property="slienceRepeatTimes" column="slienceRepeatTimes"/>
        <result property="nomatchRepeatTimes" column="nomatchRepeatTimes"/>
        <result property="firstQuestionNum" column="firstQuestionNum"/>
        <result property="submodule" column="submodule"/>
        <result property="language" column="language"/>
        <result property="note" column="note"/>
        <result property="reply" column="reply"/>
        <result property="valueType" column="value_type"/>
        <result property="addUserID" column="addUserID"/>
        <result property="addTime" column="addTime"/>
        <result property="modifyUserID" column="modifyUserID"/>
        <result property="modifyTime" column="modifyTime"/>
        <result property="groupID" column="groupID"/>
        <result property="labelInfo" column="label_info"/>
        <result property="submoduleID" column="submoduleID"/>
        <result property="playType" column="playType"/>
        <result property="icd10code" column="icd10code"/>
        <result property="icd10codename" column="icd10codename"/>
        <result property="atuoTaskDayOffset" column="atuoTaskDayOffset"/>
        <result property="deptIds" column="deptIds"/>
        <result property="deptNames" column="dept_names"/>
        <result property="fKsdm" column="F_KSDM"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="orgid" column="orgid"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="assortid" column="assortid"/>
        <result property="parameter" column="parameter"/>
        <result property="usestate" column="usestate"/>
        <result property="version" column="version"/>
        <result property="campus" column="campus"/>
        <result property="tag" column="tag"/>
        <result property="suitway" column="suitway"/>
        <result property="otherdata" column="otherdata"/>
        <result property="mateNum" column="mate_num"/>
        <result property="revisitBefore" column="revisit_before"/>
        <result property="revisitAfter" column="revisit_after"/>
        <result property="noVoiceNum" column="no_voice_num"/>
        <result property="libtemplateid" column="libtemplateid"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="recallcount" column="recallcount"/>
    </resultMap>
    <sql id="selectIvrTaskTemplateVo">
        select ID,
               taskid,
               recallcount,
               libtemplateid,
               libtemplatename,
               taskname,
               targetid,
               targetname,
               templateName,
               silencetime,
               slienceRepeatTimes,
               nomatchRepeatTimes,
               firstQuestionNum,
               submodule, language, note, reply, value_type, addUserID, addTime, modifyUserID, modifyTime, groupID, label_info, submoduleID, playType, icd10code, icd10codename, atuoTaskDayOffset, deptIds, dept_names, F_KSDM, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid, parameter, usestate, version, campus, tag, suitway, otherdata, mate_num, revisit_before, revisit_after, no_voice_num
        from ivr_task_template
    </sql>
    <select id="selectIvrTaskTemplateList" parameterType="com.smartor.domain.IvrTaskTemplate"
            resultMap="IvrTaskTemplateResult">
        <include refid="selectIvrTaskTemplateVo"/>
        <where>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="taskname != null  and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="targetname != null  and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
            <if test="templateName != null  and templateName != ''">and templateName like concat('%', #{templateName},
                '%')
            </if>
            <if test="silencetime != null ">and silencetime = #{silencetime}</if>
            <if test="recallcount != null ">and recallcount = #{recallcount}</if>
            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
            <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if>
            <if test="slienceRepeatTimes != null ">and slienceRepeatTimes = #{slienceRepeatTimes}</if>
            <if test="nomatchRepeatTimes != null ">and nomatchRepeatTimes = #{nomatchRepeatTimes}</if>
            <if test="firstQuestionNum != null ">and firstQuestionNum = #{firstQuestionNum}</if>
            <if test="submodule != null  and submodule != ''">and submodule = #{submodule}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="note != null  and note != ''">and note = #{note}</if>
            <if test="reply != null  and reply != ''">and reply = #{reply}</if>
            <if test="valueType != null ">and value_type = #{valueType}</if>
            <if test="addUserID != null  and addUserID != ''">and addUserID = #{addUserID}</if>
            <if test="addTime != null ">and addTime = #{addTime}</if>
            <if test="modifyUserID != null  and modifyUserID != ''">and modifyUserID = #{modifyUserID}</if>
            <if test="modifyTime != null ">and modifyTime = #{modifyTime}</if>
            <if test="groupID != null  and groupID != ''">and groupID = #{groupID}</if>
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="submoduleID != null  and submoduleID != ''">and submoduleID = #{submoduleID}</if>
            <if test="playType != null ">and playType = #{playType}</if>
            <if test="icd10code != null  and icd10code != ''">and icd10code = #{icd10code}</if>
            <if test="icd10codename != null  and icd10codename != ''">and icd10codename like concat('%',
                #{icd10codename}, '%')
            </if>
            <if test="atuoTaskDayOffset != null ">and atuoTaskDayOffset = #{atuoTaskDayOffset}</if>
            <if test="deptIds != null  and deptIds != ''">and deptIds = #{deptIds}</if>
            <if test="deptNames != null  and deptNames != ''">and dept_names = #{deptNames}</if>
            <if test="fKsdm != null  and fKsdm != ''">and F_KSDM = #{fKsdm}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="assortid != null ">and assortid = #{assortid}</if>
            <if test="parameter != null  and parameter != ''">and parameter = #{parameter}</if>
            <if test="usestate != null  and usestate != ''">and usestate = #{usestate}</if>
            <if test="version != null  and version != ''">and version = #{version}</if>
            <if test="campus != null  and campus != ''">and campus = #{campus}</if>
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
            <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
            <if test="mateNum != null ">and mate_num = #{mateNum}</if>
            <if test="revisitBefore != null  and revisitBefore != ''">and revisit_before = #{revisitBefore}</if>
            <if test="revisitAfter != null  and revisitAfter != ''">and revisit_after = #{revisitAfter}</if>
            <if test="noVoiceNum != null ">and no_voice_num = #{noVoiceNum}</if>
            <if test="recallcount != null">and recallcount = #{prologrecallcountue}</if>
        </where>
    </select>
    <select id="selectIvrTaskTemplateByID" parameterType="Long" resultMap="IvrTaskTemplateResult">
        <include refid="selectIvrTaskTemplateVo"/>
        where ID = #{ID}
    </select>
    <insert id="insertIvrTaskTemplate" parameterType="com.smartor.domain.IvrTaskTemplate" useGeneratedKeys="true"
            keyProperty="ID">
        insert into ivr_task_template
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="taskid != null">taskid,</if>
            <if test="taskname != null">taskname,</if>
            <if test="targetid != null">targetid,</if>
            <if test="targetname != null">targetname,</if>
            <if test="templateName != null and templateName != ''">templateName,</if>
            <if test="silencetime != null">silencetime,</if>
            <if test="slienceRepeatTimes != null">slienceRepeatTimes,</if>
            <if test="nomatchRepeatTimes != null">nomatchRepeatTimes,</if>
            <if test="firstQuestionNum != null">firstQuestionNum,</if>
            <if test="submodule != null">submodule,</if>
            <if test="language != null and language != ''">language,</if>
            <if test="note != null">note,</if>
            <if test="reply != null">reply,</if>
            <if test="valueType != null">value_type,</if>
            <if test="addUserID != null">addUserID,</if>
            <if test="addTime != null">addTime,</if>
            <if test="modifyUserID != null">modifyUserID,</if>
            <if test="modifyTime != null">modifyTime,</if>
            <if test="groupID != null">groupID,</if>
            <if test="labelInfo != null">label_info,</if>
            <if test="submoduleID != null">submoduleID,</if>
            <if test="playType != null">playType,</if>
            <if test="icd10code != null">icd10code,</if>
            <if test="icd10codename != null">icd10codename,</if>
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset,</if>
            <if test="deptIds != null">deptIds,</if>
            <if test="deptNames != null">dept_names,</if>
            <if test="fKsdm != null">F_KSDM,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="orgid != null">orgid,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="assortid != null">assortid,</if>
            <if test="parameter != null">parameter,</if>
            <if test="usestate != null">usestate,</if>
            <if test="version != null">version,</if>
            <if test="campus != null">campus,</if>
            <if test="tag != null">tag,</if>
            <if test="suitway != null">suitway,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="mateNum != null">mate_num,</if>
            <if test="revisitBefore != null">revisit_before,</if>
            <if test="revisitAfter != null">revisit_after,</if>
            <if test="noVoiceNum != null">no_voice_num,</if>
            <if test="recallcount != null">recallcount,</if>
            <if test="libtemplateid != null ">libtemplateid,</if>
            <if test="libtemplatename != null ">libtemplatename,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
            <if test="taskname != null">#{taskname},</if>
            <if test="targetid != null">#{targetid},</if>
            <if test="targetname != null">#{targetname},</if>
            <if test="templateName != null and templateName != ''">#{templateName},</if>
            <if test="silencetime != null">#{silencetime},</if>
            <if test="slienceRepeatTimes != null">#{slienceRepeatTimes},</if>
            <if test="nomatchRepeatTimes != null">#{nomatchRepeatTimes},</if>
            <if test="firstQuestionNum != null">#{firstQuestionNum},</if>
            <if test="submodule != null">#{submodule},</if>
            <if test="language != null and language != ''">#{language},</if>
            <if test="note != null">#{note},</if>
            <if test="reply != null">#{reply},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="addUserID != null">#{addUserID},</if>
            <if test="addTime != null">#{addTime},</if>
            <if test="modifyUserID != null">#{modifyUserID},</if>
            <if test="modifyTime != null">#{modifyTime},</if>
            <if test="groupID != null">#{groupID},</if>
            <if test="labelInfo != null">#{labelInfo},</if>
            <if test="submoduleID != null">#{submoduleID},</if>
            <if test="playType != null">#{playType},</if>
            <if test="icd10code != null">#{icd10code},</if>
            <if test="icd10codename != null">#{icd10codename},</if>
            <if test="atuoTaskDayOffset != null">#{atuoTaskDayOffset},</if>
            <if test="deptIds != null">#{deptIds},</if>
            <if test="deptNames != null">#{deptNames},</if>
            <if test="fKsdm != null">#{fKsdm},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="orgid != null">#{orgid},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="assortid != null">#{assortid},</if>
            <if test="parameter != null">#{parameter},</if>
            <if test="usestate != null">#{usestate},</if>
            <if test="version != null">#{version},</if>
            <if test="campus != null">#{campus},</if>
            <if test="tag != null">#{tag},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="mateNum != null">#{mateNum},</if>
            <if test="revisitBefore != null">#{revisitBefore},</if>
            <if test="revisitAfter != null">#{revisitAfter},</if>
            <if test="noVoiceNum != null">#{noVoiceNum},</if>
            <if test="recallcount != null">#{recallcount},</if>
            <if test="libtemplateid != null ">#{libtemplateid},</if>
            <if test="libtemplatename != null ">#{libtemplatename},</if>
        </trim>
    </insert>
    <update id="updateIvrTaskTemplate" parameterType="com.smartor.domain.IvrTaskTemplate">
        update ivr_task_template
        <trim prefix="SET" suffixOverrides=",">
            <if test="taskid != null">taskid = #{taskid},</if>
            <if test="taskname != null">taskname = #{taskname},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
            <if test="targetname != null">targetname = #{targetname},</if>
            <if test="templateName != null and templateName != ''">templateName = #{templateName},</if>
            <if test="silencetime != null">silencetime = #{silencetime},</if>
            <if test="slienceRepeatTimes != null">slienceRepeatTimes = #{slienceRepeatTimes},</if>
            <if test="nomatchRepeatTimes != null">nomatchRepeatTimes = #{nomatchRepeatTimes},</if>
            <if test="firstQuestionNum != null">firstQuestionNum = #{firstQuestionNum},</if>
            <if test="submodule != null">submodule = #{submodule},</if>
            <if test="language != null and language != ''">language = #{language},</if>
            <if test="note != null">note = #{note},</if>
            <if test="reply != null">reply = #{reply},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="addUserID != null">addUserID = #{addUserID},</if>
            <if test="addTime != null">addTime = #{addTime},</if>
            <if test="modifyUserID != null">modifyUserID = #{modifyUserID},</if>
            <if test="modifyTime != null">modifyTime = #{modifyTime},</if>
            <if test="groupID != null">groupID = #{groupID},</if>
            <if test="labelInfo != null">label_info = #{labelInfo},</if>
            <if test="submoduleID != null">submoduleID = #{submoduleID},</if>
            <if test="playType != null">playType = #{playType},</if>
            <if test="icd10code != null">icd10code = #{icd10code},</if>
            <if test="icd10codename != null">icd10codename = #{icd10codename},</if>
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset = #{atuoTaskDayOffset},</if>
            <if test="deptIds != null">deptIds = #{deptIds},</if>
            <if test="deptNames != null">dept_names = #{deptNames},</if>
            <if test="fKsdm != null">F_KSDM = #{fKsdm},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="assortid != null">assortid = #{assortid},</if>
            <if test="parameter != null">parameter = #{parameter},</if>
            <if test="usestate != null">usestate = #{usestate},</if>
            <if test="version != null">version = #{version},</if>
            <if test="campus != null">campus = #{campus},</if>
            <if test="tag != null">tag = #{tag},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
            <if test="mateNum != null">mate_num = #{mateNum},</if>
            <if test="revisitBefore != null">revisit_before = #{revisitBefore},</if>
            <if test="revisitAfter != null">revisit_after = #{revisitAfter},</if>
            <if test="noVoiceNum != null">no_voice_num = #{noVoiceNum},</if>
            <if test="recallcount != null">recallcount = #{recallcount},</if>
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
        </trim>
        where ID = #{ID}
    </update>
    <delete id="deleteIvrTaskTemplateByID" parameterType="Long">
        delete
        from ivr_task_template
        where ID = #{ID}
    </delete>
    <delete id="deleteIvrTaskTemplateByIDs" parameterType="String">
        delete from ivr_task_template where ID in
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskTemplateScriptMapper">
    <resultMap type="com.smartor.domain.IvrTaskTemplateScript" id="IvrTaskTemplateScriptResult">
        <result property="ID"    column="ID"    />
        <result property="taskid"    column="taskid"    />
        <result property="templateQuestionNum"    column="templateQuestionNum"    />
        <result property="templateID"    column="templateID"    />
        <result property="scriptID"    column="scriptID"    />
        <result property="questionPoint"    column="questionPoint"    />
        <result property="questionText"    column="questionText"    />
        <result property="questionVoice"    column="questionVoice"    />
        <result property="noMatchText"    column="noMatchText"    />
        <result property="noMatchVoice"    column="noMatchVoice"    />
        <result property="slienceText"    column="slienceText"    />
        <result property="slienceVoice"    column="slienceVoice"    />
        <result property="submoduleText"    column="submoduleText"    />
        <result property="submoduleVoice"    column="submoduleVoice"    />
        <result property="noClearlyText"    column="noClearlyText"    />
        <result property="noClearlyVoice"    column="noClearlyVoice"    />
        <result property="categoryName"    column="categoryName"    />
        <result property="targetOptions"    column="targetOptions"    />
        <result property="language"    column="language"    />
        <result property="playWavOnly"    column="playWavOnly"    />
        <result property="valueType"    column="value_type"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="isupload"    column="isupload"    />
        <result property="uploadTime"    column="upload_time"    />
        <result property="orgid"    column="orgid"    />
        <result property="pid"    column="pid"    />
        <result property="guid"    column="guid"    />
        <result property="targettype"    column="targettype"    />
        <result property="targetid"    column="targetid"    />
        <result property="targetvalue"    column="targetvalue"    />
        <result property="questiontitle"    column="questiontitle"    />
        <result property="nextQuestion"    column="next_question"    />
        <result property="otherdata"    column="otherdata"    />
        <result property="isMust"    column="is_must"    />
        <result property="questionResult"    column="question_result"    />
    </resultMap>
    <sql id="selectIvrTaskTemplateScriptVo">
        select ID, taskid, templateQuestionNum, templateID, scriptID, questionPoint, questionText, questionVoice, noMatchText, noMatchVoice, slienceText, slienceVoice, submoduleText, submoduleVoice, noClearlyText, noClearlyVoice, categoryName, targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue, questiontitle, next_question, otherdata, is_must, question_result from ivr_task_template_script
    </sql>
    <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" resultMap="IvrTaskTemplateScriptResult">
        <include refid="selectIvrTaskTemplateScriptVo"/>
        <where>
            <if test="taskid != null "> and taskid = #{taskid}</if>
            <if test="templateQuestionNum != null "> and templateQuestionNum = #{templateQuestionNum}</if>
            <if test="templateID != null "> and templateID = #{templateID}</if>
            <if test="scriptID != null "> and scriptID = #{scriptID}</if>
            <if test="questionPoint != null  and questionPoint != ''"> and questionPoint = #{questionPoint}</if>
            <if test="questionText != null  and questionText != ''"> and questionText = #{questionText}</if>
            <if test="questionVoice != null  and questionVoice != ''"> and questionVoice = #{questionVoice}</if>
            <if test="noMatchText != null  and noMatchText != ''"> and noMatchText = #{noMatchText}</if>
            <if test="noMatchVoice != null  and noMatchVoice != ''"> and noMatchVoice = #{noMatchVoice}</if>
            <if test="slienceText != null  and slienceText != ''"> and slienceText = #{slienceText}</if>
            <if test="slienceVoice != null  and slienceVoice != ''"> and slienceVoice = #{slienceVoice}</if>
            <if test="submoduleText != null  and submoduleText != ''"> and submoduleText = #{submoduleText}</if>
            <if test="submoduleVoice != null  and submoduleVoice != ''"> and submoduleVoice = #{submoduleVoice}</if>
            <if test="noClearlyText != null  and noClearlyText != ''"> and noClearlyText = #{noClearlyText}</if>
            <if test="noClearlyVoice != null  and noClearlyVoice != ''"> and noClearlyVoice = #{noClearlyVoice}</if>
            <if test="categoryName != null  and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if>
            <if test="targetOptions != null  and targetOptions != ''"> and targetOptions = #{targetOptions}</if>
            <if test="language != null  and language != ''"> and language = #{language}</if>
            <if test="playWavOnly != null "> and playWavOnly = #{playWavOnly}</if>
            <if test="valueType != null "> and value_type = #{valueType}</if>
            <if test="isupload != null "> and isupload = #{isupload}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
            <if test="pid != null "> and pid = #{pid}</if>
            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
            <if test="targettype != null  and targettype != ''"> and targettype = #{targettype}</if>
            <if test="targetid != null "> and targetid = #{targetid}</if>
            <if test="targetvalue != null  and targetvalue != ''"> and targetvalue = #{targetvalue}</if>
            <if test="questiontitle != null  and questiontitle != ''"> and questiontitle = #{questiontitle}</if>
            <if test="nextQuestion != null "> and next_question = #{nextQuestion}</if>
            <if test="otherdata != null  and otherdata != ''"> and otherdata = #{otherdata}</if>
            <if test="isMust != null  and isMust != ''"> and is_must = #{isMust}</if>
            <if test="questionResult != null  and questionResult != ''"> and question_result = #{questionResult}</if>
        </where>
    </select>
    <select id="selectIvrTaskTemplateScriptByID" parameterType="Long" resultMap="IvrTaskTemplateScriptResult">
        <include refid="selectIvrTaskTemplateScriptVo"/>
        where ID = #{ID}
    </select>
    <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript" useGeneratedKeys="true" keyProperty="ID">
        insert into ivr_task_template_script
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="taskid != null">taskid,</if>
            <if test="templateQuestionNum != null">templateQuestionNum,</if>
            <if test="templateID != null">templateID,</if>
            <if test="scriptID != null">scriptID,</if>
            <if test="questionPoint != null">questionPoint,</if>
            <if test="questionText != null">questionText,</if>
            <if test="questionVoice != null">questionVoice,</if>
            <if test="noMatchText != null">noMatchText,</if>
            <if test="noMatchVoice != null">noMatchVoice,</if>
            <if test="slienceText != null">slienceText,</if>
            <if test="slienceVoice != null">slienceVoice,</if>
            <if test="submoduleText != null">submoduleText,</if>
            <if test="submoduleVoice != null">submoduleVoice,</if>
            <if test="noClearlyText != null">noClearlyText,</if>
            <if test="noClearlyVoice != null">noClearlyVoice,</if>
            <if test="categoryName != null">categoryName,</if>
            <if test="targetOptions != null">targetOptions,</if>
            <if test="language != null">language,</if>
            <if test="playWavOnly != null">playWavOnly,</if>
            <if test="valueType != null">value_type,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="orgid != null">orgid,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="targettype != null">targettype,</if>
            <if test="targetid != null">targetid,</if>
            <if test="targetvalue != null">targetvalue,</if>
            <if test="questiontitle != null">questiontitle,</if>
            <if test="nextQuestion != null">next_question,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="isMust != null">is_must,</if>
            <if test="questionResult != null">question_result,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
            <if test="templateQuestionNum != null">#{templateQuestionNum},</if>
            <if test="templateID != null">#{templateID},</if>
            <if test="scriptID != null">#{scriptID},</if>
            <if test="questionPoint != null">#{questionPoint},</if>
            <if test="questionText != null">#{questionText},</if>
            <if test="questionVoice != null">#{questionVoice},</if>
            <if test="noMatchText != null">#{noMatchText},</if>
            <if test="noMatchVoice != null">#{noMatchVoice},</if>
            <if test="slienceText != null">#{slienceText},</if>
            <if test="slienceVoice != null">#{slienceVoice},</if>
            <if test="submoduleText != null">#{submoduleText},</if>
            <if test="submoduleVoice != null">#{submoduleVoice},</if>
            <if test="noClearlyText != null">#{noClearlyText},</if>
            <if test="noClearlyVoice != null">#{noClearlyVoice},</if>
            <if test="categoryName != null">#{categoryName},</if>
            <if test="targetOptions != null">#{targetOptions},</if>
            <if test="language != null">#{language},</if>
            <if test="playWavOnly != null">#{playWavOnly},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="orgid != null">#{orgid},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="targettype != null">#{targettype},</if>
            <if test="targetid != null">#{targetid},</if>
            <if test="targetvalue != null">#{targetvalue},</if>
            <if test="questiontitle != null">#{questiontitle},</if>
            <if test="nextQuestion != null">#{nextQuestion},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="isMust != null">#{isMust},</if>
            <if test="questionResult != null">#{questionResult},</if>
         </trim>
    </insert>
    <update id="updateIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript">
        update ivr_task_template_script
        <trim prefix="SET" suffixOverrides=",">
            <if test="taskid != null">taskid = #{taskid},</if>
            <if test="templateQuestionNum != null">templateQuestionNum = #{templateQuestionNum},</if>
            <if test="templateID != null">templateID = #{templateID},</if>
            <if test="scriptID != null">scriptID = #{scriptID},</if>
            <if test="questionPoint != null">questionPoint = #{questionPoint},</if>
            <if test="questionText != null">questionText = #{questionText},</if>
            <if test="questionVoice != null">questionVoice = #{questionVoice},</if>
            <if test="noMatchText != null">noMatchText = #{noMatchText},</if>
            <if test="noMatchVoice != null">noMatchVoice = #{noMatchVoice},</if>
            <if test="slienceText != null">slienceText = #{slienceText},</if>
            <if test="slienceVoice != null">slienceVoice = #{slienceVoice},</if>
            <if test="submoduleText != null">submoduleText = #{submoduleText},</if>
            <if test="submoduleVoice != null">submoduleVoice = #{submoduleVoice},</if>
            <if test="noClearlyText != null">noClearlyText = #{noClearlyText},</if>
            <if test="noClearlyVoice != null">noClearlyVoice = #{noClearlyVoice},</if>
            <if test="categoryName != null">categoryName = #{categoryName},</if>
            <if test="targetOptions != null">targetOptions = #{targetOptions},</if>
            <if test="language != null">language = #{language},</if>
            <if test="playWavOnly != null">playWavOnly = #{playWavOnly},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="targettype != null">targettype = #{targettype},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
            <if test="questiontitle != null">questiontitle = #{questiontitle},</if>
            <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
            <if test="isMust != null">is_must = #{isMust},</if>
            <if test="questionResult != null">question_result = #{questionResult},</if>
        </trim>
        where ID = #{ID}
    </update>
    <delete id="deleteIvrTaskTemplateScriptByID" parameterType="Long">
        delete from ivr_task_template_script where ID = #{ID}
    </delete>
    <delete id="deleteIvrTaskTemplateScriptByIDs" parameterType="String">
        delete from ivr_task_template_script where ID in
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskTemplateTargetoptionMapper">
    <resultMap type="com.smartor.domain.IvrTaskTemplateTargetoption" id="IvrTaskTemplateTargetoptionResult">
        <result property="id" column="id"/>
        <result property="taskid" column="taskid"/>
        <result property="templateID" column="templateID"/>
        <result property="targetid" column="targetid"/>
        <result property="targetname" column="targetname"/>
        <result property="targettype" column="targettype"/>
        <result property="categoryName" column="categoryName"/>
        <result property="targetvalue" column="targetvalue"/>
        <result property="targetregex2" column="targetregex2"/>
        <result property="targetregex" column="targetregex"/>
        <result property="optiondesc" column="optiondesc"/>
        <result property="language" column="language"/>
        <result property="version" column="version"/>
        <result property="groupid" column="groupid"/>
        <result property="isabnormal" column="isabnormal"/>
        <result property="warnup" column="warnup"/>
        <result property="warndown" column="warndown"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="orgid" column="orgid"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="scriptid" column="scriptid"/>
        <result property="nodynamiccruxsJson" column="nodynamiccruxs"/>
        <result property="dynamiccruxsJson" column="dynamiccruxs"/>
        <result property="nextQuestion" column="next_question"/>
    </resultMap>
    <sql id="selectIvrTaskTemplateTargetoptionVo">
        select id,
               taskid,
               templateID,
               targetid,
               targetname,
               targettype,
               categoryName,
               targetvalue,
               targetregex2,
               targetregex,
               optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, scriptid, nodynamiccruxs, dynamiccruxs, next_question
        from ivr_task_template_targetoption
    </sql>
    <select id="selectIvrTaskTemplateTargetoptionList" parameterType="com.smartor.domain.IvrTaskTemplateTargetoption"
            resultMap="IvrTaskTemplateTargetoptionResult">
        <include refid="selectIvrTaskTemplateTargetoptionVo"/>
        <where>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="templateID != null ">and templateID = #{templateID}</if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="targetname != null  and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
            <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
            <if test="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
                '%')
            </if>
            <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
            <if test="targetregex2 != null  and targetregex2 != ''">and targetregex2 = #{targetregex2}</if>
            <if test="targetregex != null  and targetregex != ''">and targetregex = #{targetregex}</if>
            <if test="optiondesc != null  and optiondesc != ''">and optiondesc = #{optiondesc}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="version != null  and version != ''">and version = #{version}</if>
            <if test="groupid != null  and groupid != ''">and groupid = #{groupid}</if>
            <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
            <if test="warnup != null ">and warnup = #{warnup}</if>
            <if test="warndown != null ">and warndown = #{warndown}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="scriptid != null ">and scriptid = #{scriptid}</if>
            <if test="nodynamiccruxsJson != null  and nodynamiccruxsJson != ''">and nodynamiccruxs =
                #{nodynamiccruxsJson}
            </if>
            <if test="dynamiccruxsJson != null  and dynamiccruxsJson != ''">and dynamiccruxs = #{dynamiccruxsJson}</if>
            <if test="nextQuestion != null ">and next_question = #{nextQuestion}</if>
        </where>
    </select>
    <select id="selectIvrTaskTemplateTargetoptionById" parameterType="Long"
            resultMap="IvrTaskTemplateTargetoptionResult">
        <include refid="selectIvrTaskTemplateTargetoptionVo"/>
        where id = #{id}
    </select>
    <insert id="insertIvrTaskTemplateTargetoption" parameterType="com.smartor.domain.IvrTaskTemplateTargetoption"
            useGeneratedKeys="true" keyProperty="id">
        insert into ivr_task_template_targetoption
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="taskid != null">taskid,</if>
            <if test="templateID != null">templateID,</if>
            <if test="targetid != null">targetid,</if>
            <if test="targetname != null">targetname,</if>
            <if test="targettype != null">targettype,</if>
            <if test="categoryName != null">categoryName,</if>
            <if test="targetvalue != null">targetvalue,</if>
            <if test="targetregex2 != null">targetregex2,</if>
            <if test="targetregex != null">targetregex,</if>
            <if test="optiondesc != null">optiondesc,</if>
            <if test="language != null">language,</if>
            <if test="version != null">version,</if>
            <if test="groupid != null">groupid,</if>
            <if test="isabnormal != null">isabnormal,</if>
            <if test="warnup != null">warnup,</if>
            <if test="warndown != null">warndown,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="orgid != null">orgid,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="scriptid != null">scriptid,</if>
            <if test="nodynamiccruxsJson != null">nodynamiccruxs,</if>
            <if test="dynamiccruxsJson != null">dynamiccruxs,</if>
            <if test="nextQuestion != null">next_question,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
            <if test="templateID != null">#{templateID},</if>
            <if test="targetid != null">#{targetid},</if>
            <if test="targetname != null">#{targetname},</if>
            <if test="targettype != null">#{targettype},</if>
            <if test="categoryName != null">#{categoryName},</if>
            <if test="targetvalue != null">#{targetvalue},</if>
            <if test="targetregex2 != null">#{targetregex2},</if>
            <if test="targetregex != null">#{targetregex},</if>
            <if test="optiondesc != null">#{optiondesc},</if>
            <if test="language != null">#{language},</if>
            <if test="version != null">#{version},</if>
            <if test="groupid != null">#{groupid},</if>
            <if test="isabnormal != null">#{isabnormal},</if>
            <if test="warnup != null">#{warnup},</if>
            <if test="warndown != null">#{warndown},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="orgid != null">#{orgid},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="scriptid != null">#{scriptid},</if>
            <if test="nodynamiccruxsJson != null">#{nodynamiccruxsJson},</if>
            <if test="dynamiccruxsJson != null">#{dynamiccruxsJson},</if>
            <if test="nextQuestion != null">#{nextQuestion},</if>
        </trim>
    </insert>
    <update id="updateIvrTaskTemplateTargetoption" parameterType="com.smartor.domain.IvrTaskTemplateTargetoption">
        update ivr_task_template_targetoption
        <trim prefix="SET" suffixOverrides=",">
            <if test="taskid != null">taskid = #{taskid},</if>
            <if test="templateID != null">templateID = #{templateID},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
            <if test="targetname != null">targetname = #{targetname},</if>
            <if test="targettype != null">targettype = #{targettype},</if>
            <if test="categoryName != null">categoryName = #{categoryName},</if>
            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
            <if test="targetregex2 != null">targetregex2 = #{targetregex2},</if>
            <if test="targetregex != null">targetregex = #{targetregex},</if>
            <if test="optiondesc != null">optiondesc = #{optiondesc},</if>
            <if test="language != null">language = #{language},</if>
            <if test="version != null">version = #{version},</if>
            <if test="groupid != null">groupid = #{groupid},</if>
            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
            <if test="warnup != null">warnup = #{warnup},</if>
            <if test="warndown != null">warndown = #{warndown},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="scriptid != null">scriptid = #{scriptid},</if>
            <if test="nodynamiccruxsJson != null">nodynamiccruxs = #{nodynamiccruxsJson},</if>
            <if test="dynamiccruxsJson != null">dynamiccruxs = #{dynamiccruxsJson},</if>
            <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteIvrTaskTemplateTargetoptionById" parameterType="Long">
        delete
        from ivr_task_template_targetoption
        where id = #{id}
    </delete>
    <delete id="deleteIvrTaskTemplateTargetoptionByIds" parameterType="String">
        delete from ivr_task_template_targetoption where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskcalldetailMapper.xml
@@ -1,102 +1,145 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskcalldetailMapper">
    <resultMap type="IvrTaskcalldetail" id="IvrTaskcalldetailResult">
        <result property="calldetailid"    column="calldetailid"    />
        <result property="callid"    column="callid"    />
        <result property="uuid"    column="uuid"    />
        <result property="phone"    column="phone"    />
        <result property="operate"    column="operate"    />
        <result property="displayno"    column="displayno"    />
        <result property="inbound"    column="inbound"    />
        <result property="incoming"    column="incoming"    />
        <result property="assigntime"    column="assigntime"    />
        <result property="starttime"    column="starttime"    />
        <result property="answertime"    column="answertime"    />
        <result property="silent"    column="silent"    />
        <result property="dtmfKey"    column="dtmf_key"    />
        <result property="musicpath"    column="musicpath"    />
        <result property="sentIndex"    column="sent_index"    />
        <result property="sentBegin"    column="sent_begin"    />
        <result property="asrtext"    column="asrtext"    />
        <result property="beginTime"    column="begin_time"    />
        <result property="endTime"    column="end_time"    />
        <result property="sentEnd"    column="sent_end"    />
        <result property="recordpath"    column="recordpath"    />
        <result property="recordurl"    column="recordurl"    />
        <result property="templateid"    column="templateid"    />
        <result property="templatequestionnum"    column="templatequestionnum"    />
        <result property="switchid"    column="switchid"    />
        <result property="questiontext"    column="questiontext"    />
        <result property="questionvoice"    column="questionvoice"    />
        <result property="categoryname"    column="categoryname"    />
        <result property="targetoptions"    column="targetoptions"    />
        <result property="targetvalue"    column="targetvalue"    />
        <result property="matchedtext"    column="matchedtext"    />
        <result property="addtime"    column="addtime"    />
        <result property="isupload"    column="isupload"    />
        <result property="uploadTime"    column="upload_time"    />
        <result property="orgid"    column="orgid"    />
        <result property="createTime"    column="create_time"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
    <resultMap type="com.smartor.domain.IvrTaskcalldetail" id="IvrTaskcalldetailResult">
        <result property="calldetailid" column="calldetailid"/>
        <result property="callid" column="callid"/>
        <result property="uuid" column="uuid"/>
        <result property="phone" column="phone"/>
        <result property="operate" column="operate"/>
        <result property="displayno" column="displayno"/>
        <result property="inbound" column="inbound"/>
        <result property="incoming" column="incoming"/>
        <result property="assigntime" column="assigntime"/>
        <result property="starttime" column="starttime"/>
        <result property="answertime" column="answertime"/>
        <result property="silent" column="silent"/>
        <result property="dtmfKey" column="dtmf_key"/>
        <result property="musicpath" column="musicpath"/>
        <result property="sentIndex" column="sent_index"/>
        <result property="sentBegin" column="sent_begin"/>
        <result property="asrtext" column="asrtext"/>
        <result property="beginTime" column="begin_time"/>
        <result property="endTime" column="end_time"/>
        <result property="sentEnd" column="sent_end"/>
        <result property="recordpath" column="recordpath"/>
        <result property="recordurl" column="recordurl"/>
        <result property="templateid" column="templateid"/>
        <result property="templatequestionnum" column="templatequestionnum"/>
        <result property="switchid" column="switchid"/>
        <result property="questiontext" column="questiontext"/>
        <result property="questionvoice" column="questionvoice"/>
        <result property="categoryname" column="categoryname"/>
        <result property="targetoptions" column="targetoptions"/>
        <result property="targetvalue" column="targetvalue"/>
        <result property="matchedtext" column="matchedtext"/>
        <result property="addtime" column="addtime"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="orgid" column="orgid"/>
        <result property="createTime" column="create_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
    </resultMap>
    <sql id="selectIvrTaskcalldetailVo">
        select calldetailid, callid, uuid, phone, operate, displayno, inbound, incoming, assigntime, starttime, answertime, silent, dtmf_key, musicpath, sent_index, sent_begin, asrtext, begin_time, end_time, sent_end, recordpath, recordurl, templateid, templatequestionnum, switchid, questiontext, questionvoice, categoryname, targetoptions, targetvalue, matchedtext, addtime, isupload, upload_time, orgid, create_time, del_flag, update_by, update_time, create_by from ivr_taskcalldetail
        select calldetailid,
               callid,
               uuid,
               phone,
               operate,
               displayno,
               inbound,
               incoming,
               assigntime,
               starttime,
               answertime,
               silent,
               dtmf_key,
               musicpath,
               sent_index,
               sent_begin,
               asrtext,
               begin_time,
               end_time,
               sent_end,
               recordpath,
               recordurl,
               templateid,
               templatequestionnum,
               switchid,
               questiontext,
               questionvoice,
               categoryname,
               targetoptions,
               targetvalue,
               matchedtext,
               addtime,
               isupload,
               upload_time,
               orgid,
               create_time,
               del_flag,
               update_by,
               update_time,
               create_by
        from ivr_taskcalldetail
    </sql>
    <select id="selectIvrTaskcalldetailList" parameterType="IvrTaskcalldetail" resultMap="IvrTaskcalldetailResult">
    <select id="selectIvrTaskcalldetailList" parameterType="com.smartor.domain.IvrTaskcalldetail"
            resultMap="IvrTaskcalldetailResult">
        <include refid="selectIvrTaskcalldetailVo"/>
        <where>
            <if test="callid != null  and callid != ''"> and callid = #{callid}</if>
            <if test="uuid != null  and uuid != ''"> and uuid = #{uuid}</if>
            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
            <if test="operate != null  and operate != ''"> and operate = #{operate}</if>
            <if test="displayno != null  and displayno != ''"> and displayno = #{displayno}</if>
            <if test="inbound != null "> and inbound = #{inbound}</if>
            <if test="incoming != null "> and incoming = #{incoming}</if>
            <if test="assigntime != null "> and assigntime = #{assigntime}</if>
            <if test="starttime != null "> and starttime = #{starttime}</if>
            <if test="answertime != null "> and answertime = #{answertime}</if>
            <if test="silent != null "> and silent = #{silent}</if>
            <if test="dtmfKey != null  and dtmfKey != ''"> and dtmf_key = #{dtmfKey}</if>
            <if test="musicpath != null  and musicpath != ''"> and musicpath = #{musicpath}</if>
            <if test="sentIndex != null "> and sent_index = #{sentIndex}</if>
            <if test="sentBegin != null "> and sent_begin = #{sentBegin}</if>
            <if test="asrtext != null  and asrtext != ''"> and asrtext = #{asrtext}</if>
            <if test="beginTime != null "> and begin_time = #{beginTime}</if>
            <if test="endTime != null "> and end_time = #{endTime}</if>
            <if test="sentEnd != null "> and sent_end = #{sentEnd}</if>
            <if test="recordpath != null  and recordpath != ''"> and recordpath = #{recordpath}</if>
            <if test="recordurl != null  and recordurl != ''"> and recordurl = #{recordurl}</if>
            <if test="templateid != null  and templateid != ''"> and templateid = #{templateid}</if>
            <if test="templatequestionnum != null "> and templatequestionnum = #{templatequestionnum}</if>
            <if test="switchid != null "> and switchid = #{switchid}</if>
            <if test="questiontext != null  and questiontext != ''"> and questiontext = #{questiontext}</if>
            <if test="questionvoice != null  and questionvoice != ''"> and questionvoice = #{questionvoice}</if>
            <if test="categoryname != null  and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
            <if test="targetoptions != null  and targetoptions != ''"> and targetoptions = #{targetoptions}</if>
            <if test="targetvalue != null  and targetvalue != ''"> and targetvalue = #{targetvalue}</if>
            <if test="matchedtext != null  and matchedtext != ''"> and matchedtext = #{matchedtext}</if>
            <if test="addtime != null "> and addtime = #{addtime}</if>
            <if test="isupload != null "> and isupload = #{isupload}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
        <where>
            <if test="callid != null  and callid != ''">and callid = #{callid}</if>
            <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="operate != null  and operate != ''">and operate = #{operate}</if>
            <if test="displayno != null  and displayno != ''">and displayno = #{displayno}</if>
            <if test="inbound != null ">and inbound = #{inbound}</if>
            <if test="incoming != null ">and incoming = #{incoming}</if>
            <if test="assigntime != null ">and assigntime = #{assigntime}</if>
            <if test="starttime != null ">and starttime = #{starttime}</if>
            <if test="answertime != null ">and answertime = #{answertime}</if>
            <if test="silent != null ">and silent = #{silent}</if>
            <if test="dtmfKey != null  and dtmfKey != ''">and dtmf_key = #{dtmfKey}</if>
            <if test="musicpath != null  and musicpath != ''">and musicpath = #{musicpath}</if>
            <if test="sentIndex != null ">and sent_index = #{sentIndex}</if>
            <if test="sentBegin != null ">and sent_begin = #{sentBegin}</if>
            <if test="asrtext != null  and asrtext != ''">and asrtext = #{asrtext}</if>
            <if test="beginTime != null ">and begin_time = #{beginTime}</if>
            <if test="endTime != null ">and end_time = #{endTime}</if>
            <if test="sentEnd != null ">and sent_end = #{sentEnd}</if>
            <if test="recordpath != null  and recordpath != ''">and recordpath = #{recordpath}</if>
            <if test="recordurl != null  and recordurl != ''">and recordurl = #{recordurl}</if>
            <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
            <if test="templatequestionnum != null ">and templatequestionnum = #{templatequestionnum}</if>
            <if test="switchid != null ">and switchid = #{switchid}</if>
            <if test="questiontext != null  and questiontext != ''">and questiontext = #{questiontext}</if>
            <if test="questionvoice != null  and questionvoice != ''">and questionvoice = #{questionvoice}</if>
            <if test="categoryname != null  and categoryname != ''">and categoryname like concat('%', #{categoryname},
                '%')
            </if>
            <if test="targetoptions != null  and targetoptions != ''">and targetoptions = #{targetoptions}</if>
            <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
            <if test="matchedtext != null  and matchedtext != ''">and matchedtext = #{matchedtext}</if>
            <if test="addtime != null ">and addtime = #{addtime}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        </where>
    </select>
    <select id="selectIvrTaskcalldetailByCalldetailid" parameterType="String" resultMap="IvrTaskcalldetailResult">
        <include refid="selectIvrTaskcalldetailVo"/>
        where calldetailid = #{calldetailid}
    </select>
    <insert id="insertIvrTaskcalldetail" parameterType="IvrTaskcalldetail">
    <insert id="insertIvrTaskcalldetail" parameterType="com.smartor.domain.IvrTaskcalldetail">
        insert into ivr_taskcalldetail
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="calldetailid != null">calldetailid,</if>
@@ -139,7 +182,7 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="calldetailid != null">#{calldetailid},</if>
            <if test="callid != null">#{callid},</if>
@@ -181,10 +224,10 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
         </trim>
        </trim>
    </insert>
    <update id="updateIvrTaskcalldetail" parameterType="IvrTaskcalldetail">
    <update id="updateIvrTaskcalldetail" parameterType="com.smartor.domain.IvrTaskcalldetail">
        update ivr_taskcalldetail
        <trim prefix="SET" suffixOverrides=",">
            <if test="callid != null">callid = #{callid},</if>
@@ -231,13 +274,15 @@
    </update>
    <delete id="deleteIvrTaskcalldetailByCalldetailid" parameterType="String">
        delete from ivr_taskcalldetail where calldetailid = #{calldetailid}
        delete
        from ivr_taskcalldetail
        where calldetailid = #{calldetailid}
    </delete>
    <delete id="deleteIvrTaskcalldetailByCalldetailids" parameterType="String">
        delete from ivr_taskcalldetail where calldetailid in
        delete from ivr_taskcalldetail where calldetailid in
        <foreach item="calldetailid" collection="array" open="(" separator="," close=")">
            #{calldetailid}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml
@@ -1,90 +1,125 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskcallrecordMapper">
    <resultMap type="IvrTaskcallrecord" id="IvrTaskcallrecordResult">
        <result property="uuid"    column="uuid"    />
        <result property="displayno"    column="displayno"    />
        <result property="phone"    column="phone"    />
        <result property="taskid"    column="taskid"    />
        <result property="extension"    column="extension"    />
        <result property="inbound"    column="inbound"    />
        <result property="direct"    column="direct"    />
        <result property="answered"    column="answered"    />
        <result property="assignTime"    column="assign_time"    />
        <result property="startTime"    column="start_time"    />
        <result property="answerTime"    column="answer_time"    />
        <result property="hangupTime"    column="hangup_time"    />
        <result property="endTime"    column="end_time"    />
        <result property="recordPath"    column="record_path"    />
        <result property="recordUrl"    column="record_url"    />
        <result property="hangupSipcode"    column="hangup_sipcode"    />
        <result property="hangupCause"    column="hangup_cause"    />
        <result property="transfered"    column="transfered"    />
        <result property="transUuid"    column="trans_uuid"    />
        <result property="transPhone"    column="trans_phone"    />
        <result property="transAnswered"    column="trans_answered"    />
        <result property="transStartTime"    column="trans_start_time"    />
        <result property="transAnswerTime"    column="trans_answer_time"    />
        <result property="earlyAsrtext"    column="early_asrtext"    />
        <result property="earlyPath"    column="early_path"    />
        <result property="earlyUrl"    column="early_url"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="isupload"    column="isupload"    />
        <result property="uploadTime"    column="upload_time"    />
        <result property="orgid"    column="orgid"    />
    <resultMap type="com.smartor.domain.IvrTaskcallrecord" id="IvrTaskcallrecordResult">
        <result property="uuid" column="uuid"/>
        <result property="displayno" column="displayno"/>
        <result property="phone" column="phone"/>
        <result property="taskid" column="taskid"/>
        <result property="extension" column="extension"/>
        <result property="inbound" column="inbound"/>
        <result property="direct" column="direct"/>
        <result property="answered" column="answered"/>
        <result property="assignTime" column="assign_time"/>
        <result property="startTime" column="start_time"/>
        <result property="answerTime" column="answer_time"/>
        <result property="hangupTime" column="hangup_time"/>
        <result property="endTime" column="end_time"/>
        <result property="recordPath" column="record_path"/>
        <result property="recordUrl" column="record_url"/>
        <result property="hangupSipcode" column="hangup_sipcode"/>
        <result property="hangupCause" column="hangup_cause"/>
        <result property="transfered" column="transfered"/>
        <result property="transUuid" column="trans_uuid"/>
        <result property="transPhone" column="trans_phone"/>
        <result property="transAnswered" column="trans_answered"/>
        <result property="transStartTime" column="trans_start_time"/>
        <result property="transAnswerTime" column="trans_answer_time"/>
        <result property="earlyAsrtext" column="early_asrtext"/>
        <result property="earlyPath" column="early_path"/>
        <result property="earlyUrl" column="early_url"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="orgid" column="orgid"/>
    </resultMap>
    <sql id="selectIvrTaskcallrecordVo">
        select uuid, displayno, phone, taskid, extension, inbound, direct, answered, assign_time, start_time, answer_time, hangup_time, end_time, record_path, record_url, hangup_sipcode, hangup_cause, transfered, trans_uuid, trans_phone, trans_answered, trans_start_time, trans_answer_time, early_asrtext, early_path, early_url, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid from ivr_taskcallrecord
        select uuid,
               displayno,
               phone,
               taskid,
               extension,
               inbound,
               direct,
               answered,
               assign_time,
               start_time,
               answer_time,
               hangup_time,
               end_time,
               record_path,
               record_url,
               hangup_sipcode,
               hangup_cause,
               transfered,
               trans_uuid,
               trans_phone,
               trans_answered,
               trans_start_time,
               trans_answer_time,
               early_asrtext,
               early_path,
               early_url,
               del_flag,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               orgid
        from ivr_taskcallrecord
    </sql>
    <select id="selectIvrTaskcallrecordList" parameterType="IvrTaskcallrecord" resultMap="IvrTaskcallrecordResult">
    <select id="selectIvrTaskcallrecordList" parameterType="com.smartor.domain.IvrTaskcallrecord"
            resultMap="IvrTaskcallrecordResult">
        <include refid="selectIvrTaskcallrecordVo"/>
        <where>
            <if test="displayno != null  and displayno != ''"> and displayno = #{displayno}</if>
            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
            <if test="taskid != null  and taskid != ''"> and taskid = #{taskid}</if>
            <if test="extension != null  and extension != ''"> and extension = #{extension}</if>
            <if test="inbound != null "> and inbound = #{inbound}</if>
            <if test="direct != null "> and direct = #{direct}</if>
            <if test="answered != null "> and answered = #{answered}</if>
            <if test="assignTime != null "> and assign_time = #{assignTime}</if>
            <if test="startTime != null "> and start_time = #{startTime}</if>
            <if test="answerTime != null "> and answer_time = #{answerTime}</if>
            <if test="hangupTime != null "> and hangup_time = #{hangupTime}</if>
            <if test="endTime != null "> and end_time = #{endTime}</if>
            <if test="recordPath != null  and recordPath != ''"> and record_path = #{recordPath}</if>
            <if test="recordUrl != null  and recordUrl != ''"> and record_url = #{recordUrl}</if>
            <if test="hangupSipcode != null "> and hangup_sipcode = #{hangupSipcode}</if>
            <if test="hangupCause != null  and hangupCause != ''"> and hangup_cause = #{hangupCause}</if>
            <if test="transfered != null "> and transfered = #{transfered}</if>
            <if test="transUuid != null  and transUuid != ''"> and trans_uuid = #{transUuid}</if>
            <if test="transPhone != null  and transPhone != ''"> and trans_phone = #{transPhone}</if>
            <if test="transAnswered != null "> and trans_answered = #{transAnswered}</if>
            <if test="transStartTime != null "> and trans_start_time = #{transStartTime}</if>
            <if test="transAnswerTime != null "> and trans_answer_time = #{transAnswerTime}</if>
            <if test="earlyAsrtext != null  and earlyAsrtext != ''"> and early_asrtext = #{earlyAsrtext}</if>
            <if test="earlyPath != null  and earlyPath != ''"> and early_path = #{earlyPath}</if>
            <if test="earlyUrl != null  and earlyUrl != ''"> and early_url = #{earlyUrl}</if>
            <if test="isupload != null "> and isupload = #{isupload}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
        <where>
            <if test="displayno != null  and displayno != ''">and displayno = #{displayno}</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="taskid != null  and taskid != ''">and taskid = #{taskid}</if>
            <if test="extension != null  and extension != ''">and extension = #{extension}</if>
            <if test="inbound != null ">and inbound = #{inbound}</if>
            <if test="direct != null ">and direct = #{direct}</if>
            <if test="answered != null ">and answered = #{answered}</if>
            <if test="assignTime != null ">and assign_time = #{assignTime}</if>
            <if test="startTime != null ">and start_time = #{startTime}</if>
            <if test="answerTime != null ">and answer_time = #{answerTime}</if>
            <if test="hangupTime != null ">and hangup_time = #{hangupTime}</if>
            <if test="endTime != null ">and end_time = #{endTime}</if>
            <if test="recordPath != null  and recordPath != ''">and record_path = #{recordPath}</if>
            <if test="recordUrl != null  and recordUrl != ''">and record_url = #{recordUrl}</if>
            <if test="hangupSipcode != null ">and hangup_sipcode = #{hangupSipcode}</if>
            <if test="hangupCause != null  and hangupCause != ''">and hangup_cause = #{hangupCause}</if>
            <if test="transfered != null ">and transfered = #{transfered}</if>
            <if test="transUuid != null  and transUuid != ''">and trans_uuid = #{transUuid}</if>
            <if test="transPhone != null  and transPhone != ''">and trans_phone = #{transPhone}</if>
            <if test="transAnswered != null ">and trans_answered = #{transAnswered}</if>
            <if test="transStartTime != null ">and trans_start_time = #{transStartTime}</if>
            <if test="transAnswerTime != null ">and trans_answer_time = #{transAnswerTime}</if>
            <if test="earlyAsrtext != null  and earlyAsrtext != ''">and early_asrtext = #{earlyAsrtext}</if>
            <if test="earlyPath != null  and earlyPath != ''">and early_path = #{earlyPath}</if>
            <if test="earlyUrl != null  and earlyUrl != ''">and early_url = #{earlyUrl}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        </where>
    </select>
    <select id="selectIvrTaskcallrecordByUuid" parameterType="String" resultMap="IvrTaskcallrecordResult">
        <include refid="selectIvrTaskcallrecordVo"/>
        where uuid = #{uuid}
    </select>
    <insert id="insertIvrTaskcallrecord" parameterType="IvrTaskcallrecord">
    <insert id="insertIvrTaskcallrecord" parameterType="com.smartor.domain.IvrTaskcallrecord">
        insert into ivr_taskcallrecord
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="uuid != null">uuid,</if>
@@ -121,7 +156,7 @@
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="orgid != null">orgid,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="uuid != null">#{uuid},</if>
            <if test="displayno != null">#{displayno},</if>
@@ -157,10 +192,10 @@
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="orgid != null">#{orgid},</if>
         </trim>
        </trim>
    </insert>
    <update id="updateIvrTaskcallrecord" parameterType="IvrTaskcallrecord">
    <update id="updateIvrTaskcallrecord" parameterType="com.smartor.domain.IvrTaskcallrecord">
        update ivr_taskcallrecord
        <trim prefix="SET" suffixOverrides=",">
            <if test="displayno != null">displayno = #{displayno},</if>
@@ -201,13 +236,15 @@
    </update>
    <delete id="deleteIvrTaskcallrecordByUuid" parameterType="String">
        delete from ivr_taskcallrecord where uuid = #{uuid}
        delete
        from ivr_taskcallrecord
        where uuid = #{uuid}
    </delete>
    <delete id="deleteIvrTaskcallrecordByUuids" parameterType="String">
        delete from ivr_taskcallrecord where uuid in
        delete from ivr_taskcallrecord where uuid in
        <foreach item="uuid" collection="array" open="(" separator="," close=")">
            #{uuid}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml
@@ -1,58 +1,80 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTasksmsMapper">
    <resultMap type="IvrTasksms" id="IvrTasksmsResult">
        <result property="id"    column="id"    />
        <result property="taskid"    column="taskid"    />
        <result property="type"    column="type"    />
        <result property="smstemplateid"    column="smstemplateid"    />
        <result property="phonestatusid"    column="phonestatusid"    />
        <result property="smstemplatename"    column="smstemplatename"    />
        <result property="phonestatusname"    column="phonestatusname"    />
        <result property="isdel"    column="isdel"    />
        <result property="content"    column="content"    />
        <result property="tagid"    column="tagid"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="isupload"    column="isupload"    />
        <result property="uploadTime"    column="upload_time"    />
        <result property="orgid"    column="orgid"    />
    <resultMap type="com.smartor.domain.IvrTasksms" id="IvrTasksmsResult">
        <result property="id" column="id"/>
        <result property="taskid" column="taskid"/>
        <result property="type" column="type"/>
        <result property="smstemplateid" column="smstemplateid"/>
        <result property="phonestatusid" column="phonestatusid"/>
        <result property="smstemplatename" column="smstemplatename"/>
        <result property="phonestatusname" column="phonestatusname"/>
        <result property="isdel" column="isdel"/>
        <result property="content" column="content"/>
        <result property="tagid" column="tagid"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="orgid" column="orgid"/>
    </resultMap>
    <sql id="selectIvrTasksmsVo">
        select id, taskid, type, smstemplateid, phonestatusid, smstemplatename, phonestatusname, isdel, content, tagid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid from ivr_tasksms
        select id,
               taskid,
               type,
               smstemplateid,
               phonestatusid,
               smstemplatename,
               phonestatusname,
               isdel,
               content,
               tagid,
               del_flag,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               orgid
        from ivr_tasksms
    </sql>
    <select id="selectIvrTasksmsList" parameterType="IvrTasksms" resultMap="IvrTasksmsResult">
    <select id="selectIvrTasksmsList" parameterType="com.smartor.domain.IvrTasksms" resultMap="IvrTasksmsResult">
        <include refid="selectIvrTasksmsVo"/>
        <where>
            <if test="taskid != null "> and taskid = #{taskid}</if>
            <if test="type != null "> and type = #{type}</if>
            <if test="smstemplateid != null "> and smstemplateid = #{smstemplateid}</if>
            <if test="phonestatusid != null  and phonestatusid != ''"> and phonestatusid = #{phonestatusid}</if>
            <if test="smstemplatename != null  and smstemplatename != ''"> and smstemplatename like concat('%', #{smstemplatename}, '%')</if>
            <if test="phonestatusname != null  and phonestatusname != ''"> and phonestatusname like concat('%', #{phonestatusname}, '%')</if>
            <if test="isdel != null "> and isdel = #{isdel}</if>
            <if test="content != null  and content != ''"> and content = #{content}</if>
            <if test="tagid != null "> and tagid = #{tagid}</if>
            <if test="isupload != null "> and isupload = #{isupload}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
        <where>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="type != null ">and type = #{type}</if>
            <if test="smstemplateid != null ">and smstemplateid = #{smstemplateid}</if>
            <if test="phonestatusid != null  and phonestatusid != ''">and phonestatusid = #{phonestatusid}</if>
            <if test="smstemplatename != null  and smstemplatename != ''">and smstemplatename like concat('%',
                #{smstemplatename}, '%')
            </if>
            <if test="phonestatusname != null  and phonestatusname != ''">and phonestatusname like concat('%',
                #{phonestatusname}, '%')
            </if>
            <if test="isdel != null ">and isdel = #{isdel}</if>
            <if test="content != null  and content != ''">and content = #{content}</if>
            <if test="tagid != null ">and tagid = #{tagid}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        </where>
    </select>
    <select id="selectIvrTasksmsById" parameterType="Long" resultMap="IvrTasksmsResult">
        <include refid="selectIvrTasksmsVo"/>
        where id = #{id}
    </select>
    <insert id="insertIvrTasksms" parameterType="IvrTasksms">
    <insert id="insertIvrTasksms" parameterType="com.smartor.domain.IvrTasksms">
        insert into ivr_tasksms
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
@@ -73,7 +95,7 @@
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="orgid != null">orgid,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="taskid != null">#{taskid},</if>
@@ -93,10 +115,10 @@
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="orgid != null">#{orgid},</if>
         </trim>
        </trim>
    </insert>
    <update id="updateIvrTasksms" parameterType="IvrTasksms">
    <update id="updateIvrTasksms" parameterType="com.smartor.domain.IvrTasksms">
        update ivr_tasksms
        <trim prefix="SET" suffixOverrides=",">
            <if test="taskid != null">taskid = #{taskid},</if>
@@ -121,13 +143,15 @@
    </update>
    <delete id="deleteIvrTasksmsById" parameterType="Long">
        delete from ivr_tasksms where id = #{id}
        delete
        from ivr_tasksms
        where id = #{id}
    </delete>
    <delete id="deleteIvrTasksmsByIds" parameterType="String">
        delete from ivr_tasksms where id in
        delete from ivr_tasksms where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>