| | |
| | | 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; |
| | |
| | | @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)) { |
| | |
| | | |
| | | @Override |
| | | public void run() { |
| | | synchronized (PhoneTask.class) { |
| | | try { |
| | | //获取电话组,查看哪些电话可以使用 |
| | | PhoneUtils phoneUtils = new PhoneUtils(); |
| | |
| | | redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES); |
| | | |
| | | //调用机器人电话,开始电话(需要将回调方法传入,这个等”电话方“告诉怎么传,现在先空着,还有第一句问题话术) |
| | | phoneUtils.ob(uuid, null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null); |
| | | // 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(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | 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) |
| | |
| | | |
| | | @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"); |
| | |
| | | spring: |
| | | rabbitmq: |
| | | host: 116.62.18.175 |
| | | # host: 127.0.0.1 |
| | | password: guest |
| | | port: 5672 |
| | | username: guest |
| | |
| | | signName: 杭州利湖科技 |
| | | |
| | | #智能呼叫 |
| | | phoneIP: http://124.220.50.51:8001 |
| | | phoneIP: http://124.220.50.51 |
| | | phonePort: 8001 |
| | |
| | | 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); |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Value("${phoneIP}") |
| | | private String phoneIP; |
| | | |
| | | @Value("${phonePort}") |
| | | private String phonePort; |
| | | |
| | | /** |
| | | * 添加分机add_user |
| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @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); |
| | |
| | | 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"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 挂断通话 |
| | |
| | | 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() { |
| | |
| | | * 值类型(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; |
| | | |
| | | /** |
| | | * 上传时间 |
| | |
| | | /** |
| | | * 值类型(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; |
| | | |
| | | |
| | | /** |
| | | * 问题话术标题 |
| | |
| | | * 值类型(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; |
| | | |
| | | /** |
| | | * 是否异常标识 |
| | |
| | | @Excel(name = "参数变量") |
| | | private String parameter; |
| | | |
| | | @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)") |
| | | private String reply; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | |
| | | @ApiModelProperty(value = "pageSize") |
| | | @Excel(name = "pageSize") |
| | | private Integer pageSize; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * 值类型(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 List<BaseTag> baseTagList = new ArrayList<>(); |
| | | |
| | | @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)") |
| | | private String reply; |
| | | |
| | | } |
| | |
| | | /** |
| | | * 值类型(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 |
| | |
| | | @Excel(name = "其它数据(存储变量)") |
| | | @ApiModelProperty(value = "其它数据(存储变量)") |
| | | private String otherdata; |
| | | |
| | | /** |
| | | * 是否必填(给人工用的,AI不用遵守) |
| | | */ |
| | | @Excel(name = "是否必填(给人工用的,AI不用遵守)") |
| | | @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)") |
| | | private String isMust; |
| | | } |
| | |
| | | private String otherdata; |
| | | |
| | | /** |
| | | * 是否必填(给人工用的,AI不用遵守) |
| | | */ |
| | | @Excel(name = "是否必填(给人工用的,AI不用遵守)") |
| | | @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)") |
| | | private String isMust; |
| | | |
| | | /** |
| | | * 话术选项 |
| | | */ |
| | | @ApiModelProperty(value = "话术选项") |
| | |
| | | /** |
| | | * 值类型(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 |
| | |
| | | @ApiModelProperty(value = "文本变量参数 ") |
| | | private String param; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pageNum") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("pageSize") |
| | | private Integer pageSize; |
| | | |
| | | } |
| | |
| | | * 就诊类型(1门诊 2出院) |
| | | */ |
| | | @Excel(name = " 就诊类型(1门诊 2出院)") |
| | | @ApiModelProperty(value = "就诊类型(1门诊 2出院)") |
| | | @ApiModelProperty(value = "就诊类型(1门诊 2出院 3.专病)") |
| | | private String hospType; |
| | | |
| | | |
| | |
| | | /** |
| | | * 就诊类型(1门诊 2出院) |
| | | */ |
| | | @Excel(name = " 就诊类型(1门诊 2出院)") |
| | | @ApiModelProperty(value = "就诊类型(1门诊 2出院)") |
| | | @Excel(name = " 就诊类型(1门诊 2出院 3.专病)") |
| | | @ApiModelProperty(value = "就诊类型(1门诊 2出院 3.专病)") |
| | | private String hospType; |
| | | |
| | | /** |
| | |
| | | private Date birthdate; |
| | | |
| | | /** |
| | | * 入院时间 |
| | | */ |
| | | @ApiModelProperty("入院时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " 生日 ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inhosptime; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | @ApiModelProperty("年龄") |
| | |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 入院时间 |
| | | */ |
| | | @Excel(name = "入院时间") |
| | | @ApiModelProperty("入院时间") |
| | | private Date inhosptime; |
| | | |
| | | /** |
| | | * 发送时间 |
| | | */ |
| | | @Excel(name = "就诊时间") |
| | |
| | | @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() { |
| | | } |
| | |
| | | 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") |
| | |
| | | * @param id 问题话术指标选项库主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteIvrLibaScriptTargetoptionByTargetoptionid(Long id); |
| | | public Boolean deleteIvrLibaScriptTargetoptionByTargetoptionid(Long id); |
| | | |
| | | } |
| | |
| | | * @param targetoptionids 需要删除的问题话术指标选项库主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids); |
| | | public Boolean deleteIvrLibaScriptTargetoptionByTargetoptionids(String[] targetoptionids); |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | 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; |
| | |
| | | if (ivrLibaScriptTargetoption.getId() == null) { |
| | | log.info("删除失败,问题指标选项id为空"); |
| | | } else { |
| | | ivrLibaScriptTargetoptionMapper.deleteIvrLibaScriptTargetoptionByTargetoptionid(ivrLibaScriptTargetoption.getId()); |
| | | Boolean aBoolean = ivrLibaScriptTargetoptionMapper.deleteIvrLibaScriptTargetoptionByTargetoptionid(ivrLibaScriptTargetoption.getId()); |
| | | log.info("aBoolean的值为:{}", aBoolean); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @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)); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | 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())); |
| | |
| | | } |
| | | |
| | | } |
| | | } else if (ivrLibaTargetVO.getValueType() == 2 || ivrLibaTargetVO.getValueType() == 3) { |
| | | } |
| | | |
| | | return ivrLibaTarget.getId().intValue(); |
| | |
| | | //定义患者与单一任务关联表集合 |
| | | 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(); |
| | |
| | | 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()) { |
| | |
| | | } 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); |
| | | } |
| | | } |
| | | |
| | |
| | | <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"> |
| | |
| | | deptNames, |
| | | deptIds, |
| | | questiontitle, |
| | | isenable, |
| | | value_type, |
| | | reply, |
| | | isAvailable, |
| | | questionText, |
| | | questionvoice, |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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> |
| | |
| | | <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"/> |
| | |
| | | <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"> |
| | |
| | | <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"/> |
| | |
| | | <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> |
| | | |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | 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, |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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"/> |
| | |
| | | <sql id="selectIvrLibaTemplateVo"> |
| | | select ID, |
| | | targetid, |
| | | value_type, |
| | | reply, |
| | | revisit_before, |
| | | revisit_after, |
| | | targetname, |
| | |
| | | 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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <if test="revisitAfter != null ">#{revisitAfter}</if> |
| | | <if test="revisitBefore != null ">#{revisitBefore}</if> |
| | | <if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum}</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | 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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <result property="tag" column="tag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="inhosptime" column="inhosptime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | |
| | | resultMap="PatArchiveResult"> |
| | | |
| | | select |
| | | -- c.tagname as tag, |
| | | -- b.tagid as tagid, |
| | | a.patid, |
| | | a.name, |
| | | d.deptname, |
| | |
| | | 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} |
| | |
| | | </if> |
| | | |
| | | AND d.del_flag != 1 |
| | | -- AND b.del_flag != 1 |
| | | -- AND c.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | </where> |
| | | </select> |
| | |
| | | <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, |
| | |
| | | <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 |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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, |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |