liusheng
2024-04-24 01c9667cfb06970564e837dc343d5cee0eb3aed7
代码提交
已修改38个文件
397 ■■■■ 文件已修改
pom.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/HttpUtil.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/config/PhoneUtils.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTarget.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTask.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchive.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatTaskRelevance.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTopic.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrLibaScriptTargetoptionMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrLibaScriptTargetoptionService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/HeTaskServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptTargetoptionServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -3,7 +3,7 @@
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi</artifactId>
    <version>3.8.5</version>
@@ -11,7 +11,7 @@
    <name>ruoyi</name>
    <url>http://www.ruoyi.vip</url>
    <description>若依管理系统</description>
    <properties>
        <ruoyi.version>3.8.5</ruoyi.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -32,7 +32,7 @@
        <velocity.version>2.3</velocity.version>
        <jwt.version>0.9.1</jwt.version>
    </properties>
    <!-- 依赖声明 -->
    <dependencyManagement>
        <dependencies>
@@ -244,4 +244,4 @@
        </pluginRepository>
    </pluginRepositories>
</project>
</project>
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
@@ -6,6 +6,7 @@
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.domain.IvrTask;
import com.smartor.domain.IvrTaskVO;
@@ -46,7 +47,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:ivrtask:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTask ivrTask) {
        startPage();
        PageUtils.startPageByPost(ivrTask.getPageNum(), ivrTask.getPageSize());
        List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask);
        List<IvrTaskVO> ivrTaskVOS = DtoConversionUtils.sourceToTarget(list, IvrTaskVO.class);
        if (CollectionUtils.isNotEmpty(ivrTaskVOS)) {
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
@@ -35,38 +35,41 @@
    @Override
    public void run() {
        try {
            //获取电话组,查看哪些电话可以使用
            PhoneUtils phoneUtils = new PhoneUtils();
            String uuid = IdUtils.randomUUID();
            Map<String, Object> objectMap = new HashMap<>();
            objectMap.put("ivrTaskcall", ivrTaskcall);
            objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO);
            //将数据放到redis中,方便在回调方法里获取
            redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES);
        synchronized (PhoneTask.class) {
            try {
                //获取电话组,查看哪些电话可以使用
                PhoneUtils phoneUtils = new PhoneUtils();
                String uuid = IdUtils.randomUUID();
                Map<String, Object> objectMap = new HashMap<>();
                objectMap.put("ivrTaskcall", ivrTaskcall);
                objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO);
                //将数据放到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(ivrLibaTemplateVO.getRevisitBefore());
                for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) {
                    if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO.getFirstQuestionNum().intValue()) {
                        returnQues.setNowQuestion(ivrLibaTemplateScriptVO);
                    }
                }
                returnQues.setQuestionList(ivrLibaTemplateScriptVO);
                //将问题,和模板信息放到redis中
                redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES);
                //调用机器人电话,开始电话(需要将回调方法传入,这个等”电话方“告诉怎么传,现在先空着,还有第一句问题话术)
//            phoneUtils.ob(uuid, null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null);
                String ob = phoneUtils.ob("", "", "", "", "", "", "", "3001", "", true);
                System.out.println("OB的值为:" + ob);
                //通知 MQ 消息已被接收,可以ACK(从队列中删除)了   (这个需要根据业务再去处理ACK)
                channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
            } catch (IOException e) {
                e.printStackTrace();
            }
            returnQues.setQuestionList(ivrLibaTemplateScriptVO);
            //将问题,和模板信息放到redis中
            redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
            redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES);
            //调用机器人电话,开始电话(需要将回调方法传入,这个等”电话方“告诉怎么传,现在先空着,还有第一句问题话术)
            phoneUtils.ob(uuid, null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null);
            //通知 MQ 消息已被接收,可以ACK(从队列中删除)了   (这个需要根据业务再去处理ACK)
            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -4,6 +4,7 @@
import org.junit.Test;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.SpringVersion;
//@SpringBootTest
//@RunWith(SpringRunner.class)
@@ -13,6 +14,7 @@
    @Test
    public void testSend() {
        System.out.println("Spring Framework版本:" + SpringVersion.getVersion());
//        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "测试数据001");
//        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "测试数据002");
//        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.003", "测试数据003");
ruoyi-admin/src/main/resources/application-druid.yml
@@ -2,6 +2,7 @@
spring:
  rabbitmq:
    host: 116.62.18.175
#    host: 127.0.0.1
    password: guest
    port: 5672
    username: guest
@@ -119,4 +120,5 @@
signName: 杭州利湖科技
#智能呼叫
phoneIP: http://124.220.50.51:8001
phoneIP: http://124.220.50.51
phonePort: 8001
ruoyi-common/src/main/java/com/ruoyi/common/utils/HttpUtil.java
@@ -180,7 +180,7 @@
                HttpEntity<RESPBODY> rep = null;
                if (isNullOrEmpty(respStr) || null == respBodyClass) {
                    rep = new HttpEntity<RESPBODY>(respHeaders, null);
                    ;// 无响应
                    // 无响应
                } else {
                    if (respBodyClass != String.class) {
                        RESPBODY respBody = JSON.parseObject(respStr, respBodyClass);
@@ -355,4 +355,4 @@
        }
        return false;
    }
}
}
smartor/src/main/java/com/smartor/config/PhoneUtils.java
@@ -1,12 +1,18 @@
package com.smartor.config;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.HttpUtil;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpEntity;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import sun.net.www.http.HttpClient;
import javax.mail.Multipart;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
@@ -15,6 +21,9 @@
    @Value("${phoneIP}")
    private String phoneIP;
    @Value("${phonePort}")
    private String phonePort;
    /**
     * 添加分机add_user
@@ -165,7 +174,7 @@
    public String getAgentState(String name) {
        Map<String, Object> map = new HashMap<>();
        map.put("name", name);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/get_agent_state");
    }
    /**
@@ -186,7 +195,7 @@
        map.put("dnis", dnis);
        map.put("force_call", force_call);
        if (force_call == null) map.put("force_call", true);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/manual_outbound");
    }
    /**
@@ -201,7 +210,7 @@
        map.put("text", fileText);
        map.put("uuid", uuid);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/tts_playback");
    }
    /**
@@ -216,7 +225,7 @@
        map.put("wav_file", wav_file);
        map.put("uuid", uuid);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/playback");
    }
    /**
@@ -224,7 +233,7 @@
     *
     * @return
     */
    public String ob(String kg_uuid, String kg_file, String data, String app_id, String ani, String special_ch, String sign, String extension, String dnis, Boolean call_uuid, Boolean force_call) {
    public String ob(String kg_uuid, String kg_file, String data, String app_id, String ani, String special_ch, String sign, String dnis, String call_uuid, Boolean force_call) {
        Map<String, Object> map = new HashMap<>();
        map.put("kg_uuid", kg_uuid);
        map.put("kg_file", kg_file);
@@ -233,14 +242,12 @@
        map.put("ani", ani);
        map.put("special_ch", special_ch);
        map.put("sign", sign);
        map.put("extension", extension);
        map.put("dnis", dnis);
        map.put("call_uuid", call_uuid);
        map.put("force_call", force_call);
        if (force_call == null) map.put("force_call", true);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/outbound");
    }
    /**
     * 挂断通话
@@ -257,13 +264,17 @@
        map.put("sign", sign);
        map.put("dnis", dnis);
        map.put("call_uuid", call_uuid);
        return sendReq(map, "/tel/ai_api/set_agent_state");
        return sendReq(map, "/tel/ai_api/hangup");
    }
    private String sendReq(Map<String, Object> map, String path) {
        HttpEntity<Map<String, Object>> req = new HttpEntity<>(getHead(), map);
        HttpEntity<String> stringHttpEntity = HttpUtil.postJsonRequestV2(phoneIP + path, req, String.class);
        return stringHttpEntity.getBody();
        if (StringUtils.isEmpty(phoneIP)) {
            phoneIP = "http://124.220.50.51";
            phonePort = "8001";
        }
        HttpEntity<String> stringHttpEntity = HttpUtil.postJsonRequestV2(phoneIP + ":" + phonePort + path, req, String.class);
        return new String(stringHttpEntity.getBody().getBytes(StandardCharsets.UTF_8));
    }
    private Map<String, String> getHead() {
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java
@@ -215,8 +215,14 @@
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    private Long isenable;
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    /**
     * 回复(指问题的回复,给问答题用的)
     */
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * 上传时间
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java
@@ -32,8 +32,16 @@
    /**
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty("值类型(1 选项  2 文本  3 数值)")
    private Long isenable;
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    /**
     * 回复(指问题的回复,给问答题用的)
     */
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * 问题话术标题
smartor/src/main/java/com/smartor/domain/IvrLibaTarget.java
@@ -74,8 +74,8 @@
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    private Long isenable;
    @Excel(name = "值类型", readConverterExp = "1=选项,2文本,3数值")
    private Long valueType;
    /**
     * 是否异常标识
@@ -177,6 +177,9 @@
    @Excel(name = "参数变量")
    private String parameter;
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * pageNum
     */
@@ -190,7 +193,6 @@
    @ApiModelProperty(value = "pageSize")
    @Excel(name = "pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java
@@ -76,8 +76,8 @@
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    private Long isenable;
    @Excel(name = "值类型", readConverterExp = "1=选项,2文本,3数值")
    private Long valueType;
    /**
     * 是否异常标识
@@ -200,4 +200,7 @@
    @ApiModelProperty(value = "标签集合")
    private List<BaseTag> baseTagList = new ArrayList<>();
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
@@ -103,9 +103,15 @@
    /**
     * 值类型(1 选项  2 文本  3 数值)
     */
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    private Long isEnable;
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    /**
     * 回复(指问题的回复,给问答题用的)
     */
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * 新增用户ID
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
@@ -246,4 +246,11 @@
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
    /**
     * 是否必填(给人工用的,AI不用遵守)
     */
    @Excel(name = "是否必填(给人工用的,AI不用遵守)")
    @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)")
    private String isMust;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
@@ -248,6 +248,13 @@
    private String otherdata;
    /**
     * 是否必填(给人工用的,AI不用遵守)
     */
    @Excel(name = "是否必填(给人工用的,AI不用遵守)")
    @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)")
    private String isMust;
    /**
     * 话术选项
     */
    @ApiModelProperty(value = "话术选项")
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java
@@ -102,9 +102,13 @@
    /**
     * 值类型(1 选项  2 文本  3 数值)
     */
    @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值")
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    private Long isEnable;
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * 新增用户ID
smartor/src/main/java/com/smartor/domain/IvrTask.java
@@ -245,4 +245,16 @@
    @ApiModelProperty(value = "文本变量参数 ")
    private String param;
    /**
     * pageNum
     */
    @ApiModelProperty("pageNum")
    private Integer pageNum;
    /**
     * pageSize
     */
    @ApiModelProperty("pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java
@@ -412,7 +412,7 @@
     * 就诊类型(1门诊  2出院)
     */
    @Excel(name = "  就诊类型(1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病)")
    private String hospType;
smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java
@@ -413,8 +413,8 @@
    /**
     * 就诊类型(1门诊  2出院)
     */
    @Excel(name = "  就诊类型(1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院)")
    @Excel(name = "  就诊类型(1门诊  2出院   3.专病)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院   3.专病)")
    private String hospType;
    /**
smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -92,6 +92,14 @@
    private Date birthdate;
    /**
     * 入院时间
     */
    @ApiModelProperty("入院时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " 生日 ", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inhosptime;
    /**
     * 年龄
     */
    @ApiModelProperty("年龄")
smartor/src/main/java/com/smartor/domain/PatTaskRelevance.java
@@ -134,6 +134,13 @@
    private Date sendTime;
    /**
     * 入院时间
     */
    @Excel(name = "入院时间")
    @ApiModelProperty("入院时间")
    private Date inhosptime;
    /**
     * 发送时间
     */
    @Excel(name = "就诊时间")
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java
@@ -207,6 +207,17 @@
    @ApiModelProperty("其它数据(存储变量)")
    private String otherdata = "";
    /**
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    public SvyLibTitle() {
    }
smartor/src/main/java/com/smartor/domain/SvyLibTopic.java
@@ -167,6 +167,17 @@
    private List<SvyLibTopicoption> svyLibTopicoptions = new ArrayList<>();
    /**
     * 值类型(1 选项  2 文本  3 数值)
     */
    @ApiModelProperty(value = "值类型(1 选项  2 文本  3 数值)")
    @Excel(name = "值类型", readConverterExp = "1=选项,2=文本,3=数值")
    private Long valueType;
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * pageNum
     */
    @ApiModelProperty(value = "pageNum")
smartor/src/main/java/com/smartor/mapper/IvrLibaScriptTargetoptionMapper.java
@@ -51,6 +51,6 @@
     * @param id 问题话术指标选项库主键
     * @return 结果
     */
    public int deleteIvrLibaScriptTargetoptionByTargetoptionid(Long id);
    public Boolean deleteIvrLibaScriptTargetoptionByTargetoptionid(Long id);
}
smartor/src/main/java/com/smartor/service/IIvrLibaScriptTargetoptionService.java
@@ -49,6 +49,6 @@
     * @param targetoptionids 需要删除的问题话术指标选项库主键集合
     * @return 结果
     */
    public int deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids);
    public Boolean deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids);
}
smartor/src/main/java/com/smartor/service/impl/HeTaskServiceImpl.java
@@ -322,10 +322,11 @@
            }
        }
        for (PatArchive patArchive : patArchiveList) {
            PatTaskRelevance PatTaskRelevance = DtoConversionUtils.sourceToTarget(patArchive, PatTaskRelevance.class);
            PatTaskRelevance.setCreateTime(patArchive.getCreateTime());
            PatTaskRelevance.setCreateBy(patArchive.getCreateBy());
            PatTaskRelevances.add(PatTaskRelevance);
            PatTaskRelevance patTaskRelevance = DtoConversionUtils.sourceToTarget(patArchive, PatTaskRelevance.class);
            patTaskRelevance.setCreateTime(patArchive.getCreateTime());
            patTaskRelevance.setCreateBy(patArchive.getCreateBy());
            patTaskRelevance.setDeptName(patArchive.getDept());
            PatTaskRelevances.add(patTaskRelevance);
        }
        return PatTaskRelevances;
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptServiceImpl.java
@@ -162,7 +162,8 @@
                    if (ivrLibaScriptTargetoption.getId() == null) {
                        log.info("删除失败,问题指标选项id为空");
                    } else {
                        ivrLibaScriptTargetoptionMapper.deleteIvrLibaScriptTargetoptionByTargetoptionid(ivrLibaScriptTargetoption.getId());
                        Boolean aBoolean = ivrLibaScriptTargetoptionMapper.deleteIvrLibaScriptTargetoptionByTargetoptionid(ivrLibaScriptTargetoption.getId());
                        log.info("aBoolean的值为:{}", aBoolean);
                    }
                }
            }
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptTargetoptionServiceImpl.java
@@ -73,8 +73,8 @@
     * @return 结果
     */
    @Override
    public int deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids) {
        Integer i = null;
    public Boolean deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids) {
        Boolean i = null;
        for (String id : targetoptionids) {
            i = ivrLibaScriptTargetoptionMapper.deleteIvrLibaScriptTargetoptionByTargetoptionid(Long.valueOf(id));
        }
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java
@@ -165,7 +165,8 @@
                }
            }
        }
        if (CollectionUtils.isNotEmpty(ivrLibaTargetVO.getTargetoptionList())) {
        if (CollectionUtils.isNotEmpty(ivrLibaTargetVO.getTargetoptionList()) && ivrLibaTargetVO.getValueType() == 1) {
            //选项处理
            for (IvrLibaTargetoption ivrLibaTargetoption : ivrLibaTargetVO.getTargetoptionList()) {
                if (CollectionUtils.isNotEmpty(ivrLibaTargetoption.getNodynamiccruxs())) {
                    ivrLibaTargetoption.setNodynamiccruxsJson(new Gson().toJson(ivrLibaTargetoption.getNodynamiccruxs()));
@@ -187,6 +188,7 @@
                }
            }
        } else if (ivrLibaTargetVO.getValueType() == 2 || ivrLibaTargetVO.getValueType() == 3) {
        }
        return ivrLibaTarget.getId().intValue();
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -92,6 +92,9 @@
        //定义患者与单一任务关联表集合
        List<PatTaskRelevance> patTaskRelevances = new ArrayList<>();
        List<IvrTaskSingle> list = selectIvrTaskcallList(ivrTaskcall);
        if (CollectionUtils.isEmpty(list)) {
            new BaseException("该任务不存在");
        }
        //将查出来的数据倒入IvrTaskcallVO中
        IvrTaskSingleVO ivrTaskcallVO2 = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskSingleVO.class);
        String sendTimeSlot = list.get(0).getSendTimeSlot();
@@ -205,7 +208,7 @@
            IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class);
            Integer taskId = ivrTaskService.insertIvrTask(ivrTask);
            ivrTaskcallVO.setTaskid(taskId.longValue());
            ivrTaskcallVO.setTaskid(ivrTask.getTaskid().longValue());
            //新增
            if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : ivrTaskcallVO.getPatTaskRelevances()) {
@@ -378,7 +381,7 @@
                } else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
                    //进行重拨
                    PhoneUtils phoneUtils = new PhoneUtils();
                    phoneUtils.ob(phoneCallBackVO.getUuid(), null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null);
                    phoneUtils.ob(null, null, null, null, null, null, null, ivrTaskcall.getPhone(), phoneCallBackVO.getUuid(), true);
                }
            }
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
@@ -47,6 +47,8 @@
        <result property="deptNames" column="deptNames"/>
        <result property="deptIds" column="deptIds"/>
        <result property="tag" column="tag"/>
        <result property="valueType" column="value_type"/>
        <result property="reply" column="reply"/>
    </resultMap>
    <sql id="selectIvrLibaScriptVo">
@@ -56,7 +58,8 @@
               deptNames,
               deptIds,
               questiontitle,
               isenable,
               value_type,
               reply,
               isAvailable,
               questionText,
               questionvoice,
@@ -88,7 +91,7 @@
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
            <if test="isAvailable != null  and isAvailable != ''">and isAvailable = #{isAvailable}</if>
            <if test="isenable != null ">and isenable = #{isenable}</if>
            <if test="valueType != null ">and value_type = #{valueType}</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>
@@ -136,7 +139,7 @@
            <if test="deptNames != null">deptNames,</if>
            <if test="tag != null">tag,</if>
            <if test="isAvailable != null">isAvailable,</if>
            <if test="isenable != null">isenable,</if>
            <if test="reply != null">reply,</if>
            <if test="questionText != null">questionText,</if>
            <if test="questionvoice != null">questionvoice,</if>
            <if test="nomatchtext != null">nomatchtext,</if>
@@ -171,6 +174,8 @@
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="valueType != null">value_type,</if>
            <if test="reply != null">reply,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="questiontitle != null">#{questiontitle},</if>
@@ -180,7 +185,7 @@
            <if test="deptNames != null">#{deptNames},</if>
            <if test="tag != null">#{tag},</if>
            <if test="isAvailable != null">#{isAvailable},</if>
            <if test="isenable != null">#{isenable},</if>
            <if test="reply != null">#{reply},</if>
            <if test="questionText != null">#{questionText},</if>
            <if test="questionvoice != null">#{questionvoice},</if>
            <if test="nomatchtext != null">#{nomatchtext},</if>
@@ -215,6 +220,8 @@
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="reply != null">#{reply},</if>
        </trim>
    </insert>
@@ -224,7 +231,8 @@
            <if test="questiontitle != null">questiontitle = #{questiontitle},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="isAvailable != null">isAvailable = #{isAvailable},</if>
            <if test="isenable != null">isenable = #{isenable},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="reply != null">reply = #{reply},</if>
            <if test="questionText != null">questionText = #{questionText},</if>
            <if test="questionvoice != null">questionvoice = #{questionvoice},</if>
            <if test="nomatchtext != null">nomatchtext = #{nomatchtext},</if>
@@ -263,6 +271,8 @@
            <if test="deptIds != null">deptIds = #{deptIds},</if>
            <if test="campus != null">campus = #{campus},</if>
            <if test="tag != null">tag = #{tag},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="reply != null">reply = #{reply},</if>
        </trim>
        where id = #{id}
    </update>
@@ -275,4 +285,4 @@
        where id = #{id}
    </update>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
@@ -55,6 +55,7 @@
            resultMap="IvrLibaScriptTargetoptionResult">
        <include refid="selectIvrLibaScriptTargetoptionVo"/>
        <where>
            del_flag=0
            <if test="targetid != null  and targetid != ''">and targetid = #{targetid}</if>
            <if test="targetname != null  and targetname != ''">and targetname = #{targetname}</if>
            <if test="scriptid != null ">and scriptid = #{scriptid}</if>
@@ -194,4 +195,4 @@
        where id = #{id}
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml
@@ -12,7 +12,7 @@
        <result property="targetdesc" column="targetdesc"/>
        <result property="language" column="language"/>
        <result property="version" column="version"/>
        <result property="isenable" column="isenable"/>
        <result property="valueType" column="value_type"/>
        <result property="isabnormal" column="isabnormal"/>
        <result property="warnup" column="warnup"/>
        <result property="warndown" column="warndown"/>
@@ -31,6 +31,7 @@
        <result property="suitDisease" column="suitDisease"/>
        <result property="suitWay" column="suitWay"/>
        <result property="parameter" column="parameter"/>
        <result property="reply" column="reply"/>
    </resultMap>
    <resultMap type="com.smartor.domain.IvrLibaTargetVO" id="IvrLibaTargetVOResult">
@@ -41,7 +42,7 @@
        <result property="targetdesc" column="targetdesc"/>
        <result property="language" column="language"/>
        <result property="version" column="version"/>
        <result property="isenable" column="isenable"/>
        <result property="valueType" column="value_type"/>
        <result property="isabnormal" column="isabnormal"/>
        <result property="warnup" column="warnup"/>
        <result property="warndown" column="warndown"/>
@@ -56,6 +57,7 @@
        <result property="suitDisease" column="suitDisease"/>
        <result property="suitWay" column="suitWay"/>
        <result property="parameter" column="parameter"/>
        <result property="reply" column="reply"/>
        <collection property="targetoptionList" javaType="java.util.List" resultMap="IvrLibaTargetoptionResult"/>
    </resultMap>
@@ -90,7 +92,8 @@
               groupid,
               targettype,
               targetname,
               targetdesc, language, version, isenable, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid,
               reply,
               targetdesc, language, version, value_type, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid,
            isAvailable, suitDisease, suitWay, parameter
        from ivr_liba_target
    </sql>
@@ -107,7 +110,7 @@
            <if test="targetdesc != null  and targetdesc != ''">and targetdesc = #{targetdesc}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="version != null ">and version = #{version}</if>
            <if test="isenable != null ">and isenable = #{isenable}</if>
            <if test="valueType != null ">and value_type = #{valueType}</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>
@@ -133,13 +136,14 @@
        a.targetdesc,
        a.language,
        a.version,
        a.isenable,
        a.value_type,
        a.isabnormal,
        a.warnup,
        a.warndown,
        a.orgid,
        a.pid,
        a.guid,
        a.reply,
        a.assortid,
        a.isAvailable,
        a.suitDisease,
@@ -163,7 +167,7 @@
            <if test="targetdesc != null  and targetdesc != ''">and a.targetdesc = #{targetdesc}</if>
            <if test="language != null  and language != ''">and a.language = #{language}</if>
            <if test="version != null ">and a.version = #{version}</if>
            <if test="isenable != null ">and a.isenable = #{isenable}</if>
            <if test="valueType != null ">and a.valueType = #{value_type}</if>
            <if test="isabnormal != null ">and a.isabnormal = #{isabnormal}</if>
            <if test="warnup != null ">and a.warnup = #{warnup}</if>
            <if test="warndown != null ">and a.warndown = #{warndown}</if>
@@ -196,7 +200,7 @@
            <if test="targetdesc != null">targetdesc,</if>
            <if test="language != null and language != ''">language,</if>
            <if test="version != null">version,</if>
            <if test="isenable != null">isenable,</if>
            <if test="valueType != null">value_type,</if>
            <if test="isabnormal != null">isabnormal,</if>
            <if test="warnup != null">warnup,</if>
            <if test="warndown != null">warndown,</if>
@@ -215,6 +219,7 @@
            <if test="suitDisease != null and suitDisease != ''">suitDisease,</if>
            <if test="suitWay != null and suitWay != ''">suitWay,</if>
            <if test="parameter != null and parameter != ''">parameter,</if>
            <if test="reply != null and reply != ''">reply,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="groupid != null">#{groupid},</if>
@@ -223,10 +228,12 @@
            <if test="targetdesc != null">#{targetdesc},</if>
            <if test="language != null and language != ''">#{language},</if>
            <if test="version != null">#{version},</if>
            <if test="isenable != null">#{isenable},</if>
            <if test="valueType != null">#{valueType},</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="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
@@ -242,6 +249,7 @@
            <if test="suitDisease != null and suitDisease != ''">#{suitDisease},</if>
            <if test="suitWay != null and suitWay != ''">#{suitWay},</if>
            <if test="parameter != null and parameter != ''">#{parameter},</if>
            <if test="reply != null and reply != ''">#{reply},</if>
        </trim>
    </insert>
@@ -254,7 +262,7 @@
            <if test="targetdesc != null">targetdesc = #{targetdesc},</if>
            <if test="language != null and language != ''">language = #{language},</if>
            <if test="version != null">version = #{version},</if>
            <if test="isenable != null">isenable = #{isenable},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
            <if test="warnup != null">warnup = #{warnup},</if>
            <if test="warndown != null">warndown = #{warndown},</if>
@@ -273,6 +281,7 @@
            <if test="suitWay != null and suitWay != ''">suitWay = #{suitWay},</if>
            <if test="isAvailable != null and isAvailable != ''">isAvailable = #{isAvailable},</if>
            <if test="parameter != null and parameter != ''">parameter = #{parameter},</if>
            <if test="reply != null and reply != ''">reply = #{reply},</if>
        </trim>
        where id = #{id}
    </update>
@@ -289,4 +298,4 @@
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
@@ -16,7 +16,8 @@
        <result property="submodule" column="submodule"/>
        <result property="language" column="language"/>
        <result property="note" column="note"/>
        <result property="isEnable" column="isEnable"/>
        <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"/>
@@ -58,6 +59,8 @@
    <sql id="selectIvrLibaTemplateVo">
        select ID,
               targetid,
               value_type,
               reply,
               revisit_before,
               revisit_after,
               targetname,
@@ -74,7 +77,7 @@
               suitway,
               mate_num,
               no_voice_num,
               submodule, language, note, isEnable, 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, 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
        from ivr_liba_template
    </sql>
@@ -102,7 +105,6 @@
            <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="isEnable != null ">and isEnable = #{isEnable}</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>
@@ -156,7 +158,8 @@
            <if test="submodule != null">submodule,</if>
            <if test="language != null and language != ''">language,</if>
            <if test="note != null">note,</if>
            <if test="isEnable != null">isEnable,</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>
@@ -205,7 +208,8 @@
            <if test="submodule != null">#{submodule},</if>
            <if test="language != null and language != ''">#{language},</if>
            <if test="note != null">#{note},</if>
            <if test="isEnable != null">#{isEnable},</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>
@@ -239,6 +243,7 @@
            <if test="revisitAfter != null ">#{revisitAfter}</if>
            <if test="revisitBefore != null ">#{revisitBefore}</if>
            <if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum}</if>
        </trim>
    </insert>
@@ -258,7 +263,8 @@
            <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="isEnable != null">isEnable = #{isEnable},</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>
@@ -310,4 +316,4 @@
            #{ID}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -41,6 +41,7 @@
        <result property="questiontitle" column="questiontitle"/>
        <result property="nextQuestion" column="next_question"/>
        <result property="otherdata" column="otherdata"/>
        <result property="isMust" column="is_must"/>
    </resultMap>
    <sql id="selectIvrLibaTemplateScriptVo">
@@ -66,6 +67,7 @@
               questiontitle,
               next_question,
               otherdata,
               is_must,
               targetOptions, language, playWavOnly, isEnable, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
        from ivr_liba_template_script
    </sql>
@@ -105,6 +107,7 @@
            <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>
    </select>
@@ -153,6 +156,7 @@
            <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>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="templateQuestionNum != null">#{templateQuestionNum},</if>
@@ -190,6 +194,7 @@
            <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>
        </trim>
    </insert>
@@ -231,6 +236,7 @@
            <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>
        </trim>
        where ID = #{ID}
    </update>
@@ -249,4 +255,4 @@
            #{ID}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
@@ -191,6 +191,7 @@
            <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>
        </where>
        order by update_time desc,id desc
    </select>
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -34,6 +34,7 @@
        <result property="tag" column="tag"/>
        <result property="pattype" column="pattype"/>
        <result property="bedNo" column="bedno"/>
        <result property="inhosptime" column="inhosptime"/>
    </resultMap>
    <sql id="selectPatArchiveVo">
@@ -269,8 +270,6 @@
            resultMap="PatArchiveResult">
        select
        -- c.tagname as tag,
        -- b.tagid as tagid,
        a.patid,
        a.name,
        d.deptname,
@@ -298,21 +297,15 @@
        a.isupload,
        a.upload_time,
        a.pattype,
        d.bed_no
        -- from pat_archive a,pat_archivetag b ,base_tag c,pat_med_inhosp d
        d.bed_no,
        d.starttime as inhosptime
        from pat_archive a,pat_med_inhosp d
        <where>
            -- a.patid = b.patid and b.tagid = c.tagid and a.patid = d.patid
            a.patid = d.patid
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="pid != null  and pid != ''">and a.patid = #{pid}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <!--            <if test="tagIds != null  and tagIds != ''">and c.tagid in-->
            <!--                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">-->
            <!--                    #{tagId}-->
            <!--                </foreach>-->
            <!--            </if>-->
            <if test="hospitalname != null and hospitalname != ''">
                AND d.hospitalname = #{hospitalname}
@@ -343,8 +336,6 @@
            </if>
            AND d.del_flag != 1
            -- AND b.del_flag != 1
            -- AND c.del_flag != 1
            AND a.del_flag != 1
        </where>
    </select>
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml
@@ -31,11 +31,15 @@
        <result property="campus" column="campus"/>
        <result property="suitway" column="suitway"/>
        <result property="otherdata" column="otherdata"/>
        <result property="valueType" column="value_type"/>
        <result property="reply" column="reply"/>
    </resultMap>
    <sql id="selectSvyLibTitleVo">
        select svyid,
               categoryid,
               value_type,
               reply,
               svycode,
               svyname,
               description,
@@ -66,7 +70,8 @@
    <select id="selectSvyLibTitleList" parameterType="com.smartor.domain.SvyLibTitleReq" resultMap="SvyLibTitleResult">
        select a.svyid, a.categoryid, a.svycode, a.svyname, a.description, a.introduce,a.submitprompt, a.templateid,
        a.version,a.centerlibrarycode, a.centerlibraryid, a.islocal, a.isenable, a.orgid, a.del_flag, a.create_by,
        a.create_time, a.update_by, a.update_time, a.isupload, a.upload_time,a.dept_names,a.label_info,
        a.create_time, a.update_by, a.update_time, a.isupload,
        a.upload_time,a.dept_names,a.value_type,a.label_info,a.reply,
        a.campus,a.suitway,a.otherdata
        ,c.icdname from svy_lib_title
        a,icd10_association b,icd10 c
@@ -115,6 +120,10 @@
            <if test="campus != null">campus,</if>
            <if test="suitway != null">suitway,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="valueType != null">value_type,</if>
            <if test="reply != null">reply,</if>
            value_type,
            reply,
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="categoryid != null">#{categoryid},</if>
@@ -142,6 +151,8 @@
            <if test="campus != null">#{campus},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="valueType != null">#{valueType},</if>
            <if test="reply != null">#{reply},</if>
        </trim>
    </insert>
@@ -173,6 +184,8 @@
            <if test="campus != null">campus=#{campus},</if>
            <if test="suitway != null">suitway=#{suitway},</if>
            <if test="otherdata != null">otherdata=#{otherdata},</if>
            <if test="valueType != null">value_type = #{valueType},</if>
            <if test="reply != null">reply = #{reply},</if>
        </trim>
        where svyid = #{svyid}
    </update>
@@ -189,4 +202,4 @@
            #{svyid}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml
@@ -29,11 +29,15 @@
        <result property="isavailable" column="isavailable"/>
        <result property="language" column="language"/>
        <result property="otherdata" column="otherdata"/>
        <result property="valueType" column="value_type"/>
        <result property="reply" column="reply"/>
    </resultMap>
    <sql id="selectSvyLibTopicVo">
        select topicid,
               oldid,
               value_type,
               reply,
               svyid,
               topictype,
               topiccode,
@@ -55,7 +59,7 @@
               suitway,
               isavailable,
               otherdata,
               language,
            language,
            svy_topicid as svyTopicId
        from svy_lib_topic
    </sql>
@@ -112,6 +116,8 @@
            <if test="isavailable != null and isavailable != ''">isavailable,</if>
            <if test="language != null and language!=''">language,</if>
            <if test="otherdata != null and otherdata!=''">otherdata,</if>
            <if test="valueType != null and valueType!=''">value_type,</if>
            <if test="reply != null and reply!=''">otherdata,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="oldid != null">#{oldid},</if>
@@ -138,6 +144,8 @@
            <if test="isavailable != null and isavailable != ''">#{isavailable},</if>
            <if test="language != null  and language!=''">#{language},</if>
            <if test="otherdata != null and otherdata!=''">#{otherdata},</if>
            <if test="valueType != null and valueType!=''">#{valueType},</if>
            <if test="reply != null and reply!=''">#{therdata},</if>
        </trim>
    </insert>
@@ -167,6 +175,8 @@
            <if test="tag != null">tag = #{tag},</if>
            <if test="language != null and language!=''">language = #{language},</if>
            <if test="otherdata != null and otherdata!=''">otherdata = #{otherdata},</if>
            <if test="valueType != null and valueType!=''">value_type = #{valueType},</if>
            <if test="reply != null and reply!=''">therdata =#{therdata},</if>
        </trim>
        where topicid = #{topicid}
    </update>
@@ -187,4 +197,4 @@
    </delete>
</mapper>
</mapper>