liusheng
2024-04-30 01a79d5b431b71cc79cf5f6cc92cd4f3432781dd
代码提交
已添加6个文件
已修改34个文件
1833 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/logback.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/config/PhoneUtils.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTask.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskVO.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchive.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveOut.java 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedPhysical.java 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PhoneCallBackVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/QuestionMessage.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/PatArchiveOutMapper.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrLibaTargetService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IPatArchiveOutService.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 356 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatArchiveOutServiceImpl.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -253,7 +253,8 @@
                            }
                            log.info("==============================Targetregex的值为:{},   Targetregex2的值为:{}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                                //说明匹配正确了
                                ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
                                List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java
@@ -125,4 +125,14 @@
        return rspData;
    }
    /**
     * æŒ‡æ ‡æµ‹è¯•问题匹配
     */
    @ApiOperation("指标测试问题匹配")
    @PostMapping("/targetQuesMate")
    public AjaxResult targetQuesMate(@RequestBody IvrLibaTargetVO ivrLibaTarget) {
        return success(ivrLibaTargetService.targetQuesMate(ivrLibaTarget));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java
@@ -8,10 +8,13 @@
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.*;
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.IvrTaskSingleVO;
import com.smartor.domain.PhoneCallBackVO;
import com.smartor.service.IIvrTaskSingleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -25,13 +28,13 @@
 * @author ruoyi
 * @date 2024-02-02
 */
@Slf4j
@Api(description = "单一任务(随访宣教)")
@RestController
@RequestMapping("/smartor/tasksingle")
public class IvrTaskSingleController extends BaseController {
    @Autowired
    private IIvrTaskSingleService ivrTaskcallService;
    /**
     * æŸ¥è¯¢æ‚£è€…随访信息
@@ -88,7 +91,6 @@
        return success(ivrTaskSingleVO);
    }
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     */
@@ -98,15 +100,15 @@
        return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO));
    }
    /**
     * ç”µè¯å›žè°ƒä»»åŠ¡
     */
    @ApiOperation("电话回调任务")
    @PostMapping("/phoneCallBack")
    public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) {
        //如果uuid在redis中找不到,那就直接报异常
        return success(ivrTaskcallService.phoneCallBack(phoneCallBackVO));
        log.error("电话回调任务成功了不?{}", phoneCallBackVO);
        ivrTaskcallService.phoneCallBack(phoneCallBackVO);
        return success();
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.PatArchiveOut;
import com.smartor.service.IPatArchiveOutService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * å¤–部患者档案Controller
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Api(description = "外部患者档案")
@RestController
@RequestMapping("/smartor/patarchiveout")
public class PatArchiveOutController extends BaseController {
    @Autowired
    private IPatArchiveOutService patArchiveOutService;
    /**
     * æŸ¥è¯¢å¤–部患者档案列表
     */
    @ApiOperation("查询外部患者档案列表")
    @PostMapping("/list")
    public TableDataInfo list(PatArchiveOut patArchiveOut) {
        startPage();
        List<PatArchiveOut> list = patArchiveOutService.selectPatArchiveOutList(patArchiveOut);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºå¤–部患者档案列表
     */
    @ApiOperation("导出外部患者档案列表")
    @PostMapping("/export")
    public void export(HttpServletResponse response, PatArchiveOut patArchiveOut) {
        List<PatArchiveOut> list = patArchiveOutService.selectPatArchiveOutList(patArchiveOut);
        ExcelUtil<PatArchiveOut> util = new ExcelUtil<PatArchiveOut>(PatArchiveOut.class);
        util.exportExcel(response, list, "外部患者档案数据");
    }
    /**
     * èŽ·å–å¤–éƒ¨æ‚£è€…æ¡£æ¡ˆè¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取外部患者档案详细信息")
    @GetMapping(value = "/getInfo/{patid}")
    public AjaxResult getInfo(@PathVariable("patid") Long patid) {
        return success(patArchiveOutService.selectPatArchiveOutByPatid(patid));
    }
    /**
     * æ–°å¢žå¤–部患者档案
     */
    @ApiOperation("新增外部患者档案")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatArchiveOut patArchiveOut) {
        return toAjax(patArchiveOutService.insertPatArchiveOut(patArchiveOut));
    }
    /**
     * ä¿®æ”¹å¤–部患者档案
     */
    @ApiOperation("修改外部患者档案")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody PatArchiveOut patArchiveOut) {
        return toAjax(patArchiveOutService.updatePatArchiveOut(patArchiveOut));
    }
    /**
     * åˆ é™¤å¤–部患者档案
     */
    @ApiOperation("删除外部患者档案")
    @GetMapping("/remove/{patids}")
    public AjaxResult remove(@PathVariable Long[] patids) {
        return toAjax(patArchiveOutService.deletePatArchiveOutByPatids(patids));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
@@ -82,7 +82,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:menu:add')")
    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    public AjaxResult add(@Validated @RequestBody SysMenu menu)
    {
        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
@@ -126,7 +126,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:menu:remove')")
    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{menuId}")
    @GetMapping("/remove/{menuId}")
    public AjaxResult remove(@PathVariable("menuId") Long menuId)
    {
        if (menuService.hasChildByMenuId(menuId))
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
@@ -1,5 +1,7 @@
package com.ruoyi.web.task;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.Channel;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.uuid.IdUtils;
@@ -8,6 +10,7 @@
import com.smartor.domain.IvrLibaTemplateVO;
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.QuestionMessage;
import com.smartor.mapper.IvrTaskSingleMapper;
import org.springframework.amqp.core.Message;
import java.io.IOException;
@@ -60,9 +63,11 @@
                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);
                String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskcall.getPhone(), uuid, true);
                System.out.println("OB的值为:" + ob);
                //通了之后,立马去调开场白
                phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitBefore()+returnQues.getNowQuestion().getQuestionText(), uuid);
                //通知 MQ æ¶ˆæ¯å·²è¢«æŽ¥æ”¶,可以ACK(从队列中删除)了   ï¼ˆè¿™ä¸ªéœ€è¦æ ¹æ®ä¸šåŠ¡å†åŽ»å¤„ç†ACK)
                channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -6,6 +6,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.SpringVersion;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
//@SpringBootTest
//@RunWith(SpringRunner.class)
public class MQTest {
@@ -14,6 +17,11 @@
    @Test
    public void testSend() {
        Pattern pattern = Pattern.compile("(?=.*(?:还行|挺好|可以|不错)).*$");
        Matcher matcher = pattern.matcher("还行吧,就是还有点疼");
        System.out.println(matcher.matches());
        System.out.println("Spring Framework版本:" + SpringVersion.getVersion());
//        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "测试数据001");
//        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "测试数据002");
ruoyi-admin/src/main/resources/application-druid.yml
@@ -1,8 +1,8 @@
# æ•°æ®æºé…ç½®
spring:
  rabbitmq:
    host: 116.62.18.175
#    host: 127.0.0.1
#    host: 116.62.18.175
    host: 127.0.0.1
    password: guest
    port: 5672
    username: guest
ruoyi-admin/src/main/resources/logback.xml
@@ -81,7 +81,7 @@
    </root>
    <!--系统操作日志-->
    <root level="debug">
    <root level="info">
        <appender-ref ref="file_info" />
        <appender-ref ref="file_error" />
    </root>
smartor/src/main/java/com/smartor/config/PhoneUtils.java
@@ -251,7 +251,7 @@
     *
     * @return
     */
    public String hangup(String kg_uuid, String dnis, String data, String app_id, String ani, String special_ch, String sign, Boolean call_uuid) {
    public String hangup(String kg_uuid, String dnis, String data, String app_id, String ani, String special_ch, String sign, String call_uuid) {
        Map<String, Object> map = new HashMap<>();
        map.put("kg_uuid", kg_uuid);
        map.put("data", data);
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java
@@ -54,7 +54,7 @@
     */
    @ApiModelProperty("无匹配话术")
    @Excel(name = "无匹配话术")
    private String nomatchtext;
    private String noMatchText;
    /**
     * æ— åŒ¹é…è¯æœ¯è¯­éŸ³
@@ -68,7 +68,7 @@
     */
    @ApiModelProperty("静默话术")
    @Excel(name = "静默话术")
    private String sliencetext;
    private String slienceText;
    /**
     * é™é»˜è¯æœ¯è¯­éŸ³
@@ -96,7 +96,7 @@
     */
    @ApiModelProperty("听不清话术")
    @Excel(name = "听不清话术")
    private String noclearlytext;
    private String noClearlyText;
    /**
     * å¬ä¸æ¸…话术语音
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java
@@ -69,7 +69,7 @@
     */
    @ApiModelProperty("无匹配话术")
    @Excel(name = "无匹配话术")
    private String nomatchtext;
    private String noMatchText;
    /**
     * æ— åŒ¹é…è¯æœ¯è¯­éŸ³
@@ -83,7 +83,7 @@
     */
    @ApiModelProperty("静默话术")
    @Excel(name = "静默话术")
    private String sliencetext;
    private String slienceText;
    /**
     * é™é»˜è¯æœ¯è¯­éŸ³
@@ -111,7 +111,7 @@
     */
    @ApiModelProperty("听不清话术")
    @Excel(name = "听不清话术")
    private String noclearlytext;
    private String noClearlyText;
    /**
     * å¬ä¸æ¸…话术语音
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java
@@ -203,4 +203,11 @@
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
    /**
     * è¯´è¯å†…容
     */
    @Excel(name = "说话内容")
    @ApiModelProperty(value = "说话内容")
    private String content;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
@@ -21,6 +21,7 @@
 * @author ruoyi
 * @date 2023-12-14
 */
@Data
@ApiModel(value = "IvrLibaTargetoption", description = "指标选项库对象")
public class IvrLibaTargetoption extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -174,232 +175,4 @@
    @Excel(name = "pageSize")
    private Integer pageSize;
    public Long getTargetoptionid() {
        return targetoptionid;
    }
    public void setTargetoptionid(Long targetoptionid) {
        this.targetoptionid = targetoptionid;
    }
    public Long getTargetid() {
        return targetid;
    }
    public void setTargetid(Long targetid) {
        this.targetid = targetid;
    }
    public String getTargettype() {
        return targettype;
    }
    public void setTargettype(String targettype) {
        this.targettype = targettype;
    }
    public String getCategoryName() {
        return categoryName;
    }
    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }
    public String getTargetvalue() {
        return targetvalue;
    }
    public void setTargetvalue(String targetvalue) {
        this.targetvalue = targetvalue;
    }
    public String getTargetregex() {
        return targetregex;
    }
    public void setTargetregex(String targetregex) {
        this.targetregex = targetregex;
    }
    public String getTargetregex2() {
        return targetregex2;
    }
    public void setTargetregex2(String targetregex2) {
        this.targetregex2 = targetregex2;
    }
    public String getNodynamiccruxsJson() {
        return nodynamiccruxsJson;
    }
    public void setNodynamiccruxsJson(String nodynamiccruxsJson) {
        this.nodynamiccruxsJson = nodynamiccruxsJson;
    }
    public String getDynamiccruxsJson() {
        return dynamiccruxsJson;
    }
    public void setDynamiccruxsJson(String dynamiccruxsJson) {
        this.dynamiccruxsJson = dynamiccruxsJson;
    }
    public List<String> getNodynamiccruxs() {
        return nodynamiccruxs;
    }
    public void setNodynamiccruxs(List<String> nodynamiccruxs) {
        this.nodynamiccruxs = nodynamiccruxs;
    }
    public List<String> getDynamiccruxs() {
        return dynamiccruxs;
    }
    public void setDynamiccruxs(List<String> dynamiccruxs) {
        this.dynamiccruxs = dynamiccruxs;
    }
    public String getOptiondesc() {
        return optiondesc;
    }
    public void setOptiondesc(String optiondesc) {
        this.optiondesc = optiondesc;
    }
    public String getLanguage() {
        return language;
    }
    public void setLanguage(String language) {
        this.language = language;
    }
    public Long getVersion() {
        return version;
    }
    public void setVersion(Long version) {
        this.version = version;
    }
    public String getGroupid() {
        return groupid;
    }
    public void setGroupid(String groupid) {
        this.groupid = groupid;
    }
    public Long getIsabnormal() {
        return isabnormal;
    }
    public void setIsabnormal(Long isabnormal) {
        this.isabnormal = isabnormal;
    }
    public Long getWarnup() {
        return warnup;
    }
    public void setWarnup(Long warnup) {
        this.warnup = warnup;
    }
    public Long getWarndown() {
        return warndown;
    }
    public void setWarndown(Long warndown) {
        this.warndown = warndown;
    }
    public String getDelFlag() {
        return delFlag;
    }
    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }
    public Long getIsupload() {
        return isupload;
    }
    public void setIsupload(Long isupload) {
        this.isupload = isupload;
    }
    public Date getUploadTime() {
        return uploadTime;
    }
    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }
    public String getOrgid() {
        return orgid;
    }
    public void setOrgid(String orgid) {
        this.orgid = orgid;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    public String getGuid() {
        return guid;
    }
    public void setGuid(String guid) {
        this.guid = guid;
    }
    public Integer getIsoperation() {
        return isoperation;
    }
    public void setIsoperation(Integer isoperation) {
        this.isoperation = isoperation;
    }
    public Integer getAllitems() {
        return allitems;
    }
    public void setAllitems(Integer allitems) {
        this.allitems = allitems;
    }
    public Integer getPageNum() {
        return pageNum;
    }
    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }
    public Integer getPageSize() {
        return pageSize;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("targetoptionid", getTargetoptionid()).append("targetid", getTargetid()).append("targettype", getTargettype()).append("categoryName", getCategoryName()).append("targetvalue", getTargetvalue()).append("targetregex", getTargetregex()).append("optiondesc", getOptiondesc()).append("language", getLanguage()).append("version", getVersion()).append("groupid", getGroupid()).append("isabnormal", getIsabnormal()).append("warnup", getWarnup()).append("warndown", getWarndown()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).append("orgid", getOrgid()).append("pid", getPid()).append("guid", getGuid()).toString();
    }
}
smartor/src/main/java/com/smartor/domain/IvrTask.java
@@ -257,4 +257,19 @@
    @ApiModelProperty("pageSize")
    private Integer pageSize;
    /**
     * å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)
     */
    @Excel(name = "  å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病)")
    private String hospType;
    /**
     * å°±è¯Šç¼–号(对应的outhospno、inhospno)
     */
    @Excel(name = "  å°±è¯Šç¼–号(对应的outhospno、inhospno)  ")
    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
    private String hospno;
}
smartor/src/main/java/com/smartor/domain/IvrTaskVO.java
@@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -188,5 +189,19 @@
    @Excel(name = " æœªå‘送 ")
    private Long wfs;
    /**
     * å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)
     */
    @Excel(name = "  å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病)")
    private String hospType;
    /**
     * å°±è¯Šç¼–号(对应的outhospno、inhospno)
     */
    @Excel(name = "  å°±è¯Šç¼–号(对应的outhospno、inhospno)  ")
    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
    private String hospno;
}
smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -118,6 +118,7 @@
     */
    @ApiModelProperty("建档时间")
    @Excel(name = " å»ºæ¡£æ—¶é—´ ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date archivetime;
    /**
@@ -226,6 +227,13 @@
    @Excel(name = " ç§‘室 ")
    private String bedNo;
    /**
     * ä¼šå‘˜å±žæ€§:0非会员,1一般会员、2重要会员
     */
    @ApiModelProperty("会员属性:0非会员,1一般会员、2重要会员")
    @Excel(name = " ä¼šå‘˜å±žæ€§:0非会员,1一般会员、2重要会员 ")
    private String membertype;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("idcardno", getIdcardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("idcardtype", getIdcardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString();
smartor/src/main/java/com/smartor/domain/PatArchiveOut.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,216 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
 * å¤–部患者档案对象 pat_archive_out
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@ApiModel(value = "PatArchiveOut", description = "外部患者档案对象")
@Data
public class PatArchiveOut extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * è‡ªå¢žID
     */
    @ApiModelProperty("问题话术id(主键)")
    private Long patid;
    /**
     * æ‚£è€…编号
     */
    @Excel(name = "患者编号")
    @ApiModelProperty("患者编号")
    private String patientno;
    /**
     * æ‚£è€…类型:1、门诊、2、住院、3、体检
     */
    @Excel(name = "患者类型:1、门诊、2、住院、3、体检")
    @ApiModelProperty("患者类型:1、门诊、2、住院、3、体检")
    private String pattype;
    /**
     * å§“名
     */
    @Excel(name = " å§“名 ")
    @ApiModelProperty("姓名")
    private String name;
    /**
     * æ€§åˆ«   1:男  2:女
     */
    @Excel(name = " æ€§åˆ«   1:男  2:女")
    @ApiModelProperty("性别   1:男  2:女")
    private Long sex;
    /**
     * æ°‘族
     */
    @Excel(name = "民族")
    @ApiModelProperty("民族")
    private String nation;
    /**
     * ç±è´¯
     */
    @Excel(name = "籍贯")
    @ApiModelProperty("籍贯")
    private String nativePlace;
    /**
     * å±…住地
     */
    @Excel(name = "居住地")
    @ApiModelProperty("居住地")
    private String placeOfResidence;
    /**
     * å‡ºç”Ÿåœ°
     */
    @Excel(name = "出生地")
    @ApiModelProperty("出生地")
    private String birthplace;
    /**
     * è¯ä»¶å·ç 
     */
    @Excel(name = " è¯ä»¶å·ç  ")
    @ApiModelProperty("证件号码")
    private String idcardno;
    /**
     * ç”Ÿæ—¥
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ç”Ÿæ—¥ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("生日")
    private Date birthdate;
    /**
     * å¹´é¾„
     */
    @Excel(name = " å¹´é¾„ ")
    @ApiModelProperty("年龄")
    private Long age;
    /**
     * å»ºæ¡£æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " å»ºæ¡£æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("建档时间")
    private Date archivetime;
    /**
     * å»ºæ¡£äºº
     */
    @Excel(name = " å»ºæ¡£äºº ")
    @ApiModelProperty("建档人")
    private String archiveby;
    /**
     * æ‰‹æœºå·ç 
     */
    @Excel(name = " æ‰‹æœºå·ç  ")
    @ApiModelProperty("手机号码")
    private String telcode;
    /**
     * äº²å±žå·ç 
     */
    @Excel(name = " äº²å±žå·ç  ")
    @ApiModelProperty("亲属号码")
    private String relativetelcode;
    /**
     * è¯ä»¶ç±»åž‹
     */
    @Excel(name = "证件类型 ")
    @ApiModelProperty("证件类型")
    private String idcardtype;
    /**
     * æœºæž„ID
     */
    @Excel(name = "机构ID ")
    @ApiModelProperty("机构ID")
    private String orgid;
    /**
     * å¾®ä¿¡openid
     */
    @Excel(name = "微信openid ")
    @ApiModelProperty("微信openid")
    private String openid;
    /**
     * é’‰é’‰å·
     */
    @Excel(name = "钉钉号")
    @ApiModelProperty("钉钉号")
    private String dduserid;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty("删除标记")
    private String delFlag;
    /**
     * æ¥æº(1:HIS;2:数据平台;3:文件导入)
     */
    @Excel(name = " æ¥æº(1:HIS;2:数据平台;3:文件导入)")
    @ApiModelProperty("来源(1:HIS;2:数据平台;3:文件导入)")
    private Long source;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty("上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("上传时间")
    private Date uploadTime;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty("父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty("GUID")
    private String guid;
    /**
     * ä¼šå‘˜å±žæ€§ï¼š0非会员,1一般会员、2重要会员
     */
    @Excel(name = "会员属性:0非会员,1一般会员、2重要会员")
    @ApiModelProperty("会员属性:0非会员,1一般会员、2重要会员")
    private String membertype;
}
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -244,4 +244,16 @@
    @ApiModelProperty(value = "方案状态操作时间")
    private Date schemetime;
    /**
     * æ‚£è€…姓名
     */
    @ApiModelProperty(value = "患者姓名")
    private String patname;
    /**
     * æ‚£è€…编号
     */
    @ApiModelProperty(value = "患者编号")
    private String patno;
}
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -47,6 +47,12 @@
    private Long patid;
    /**
     * ç—…人姓名
     */
    @ApiModelProperty(value = " ç—…人姓名")
    private String patname;
    /**
     * åŒ»é™¢åç§°
     */
    @ApiModelProperty(value = "医院名称")
smartor/src/main/java/com/smartor/domain/PatMedPhysical.java
@@ -4,6 +4,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -15,6 +16,7 @@
 * @author smartor
 * @date 2023-03-04
 */
@Data
@ApiModel(value = "PatMedPhysical", description = "患者体检记录对象")
public class PatMedPhysical extends BaseEntity
{
@@ -83,6 +85,18 @@
    @Excel(name = " ç§‘室名称 ")
    private String deptname;
    /**  ç—…人姓名  */
    @ApiModelProperty(value = "病人姓名")
    @Excel(name = " ç—…人姓名 ")
    private String patname;
    /**   æ‚£è€…档案编号  */
    @ApiModelProperty(value = " æ‚£è€…档案编号")
    @Excel(name = "  æ‚£è€…档案编号 ")
    private String patno;
    /**  ä½“检项目名称  */
    @ApiModelProperty(value = "体检项目名称")
    @Excel(name = " ä½“检项目名称 ")
@@ -116,234 +130,5 @@
    @ApiModelProperty(value = "方案状态操作时间")
    private Date schemetime;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setSerialnum(String serialnum)
    {
        this.serialnum = serialnum;
    }
    public String getSerialnum()
    {
        return serialnum;
    }
    public void setPatid(Long patid)
    {
        this.patid = patid;
    }
    public Long getPatid()
    {
        return patid;
    }
    public void setDrcode(String drcode)
    {
        this.drcode = drcode;
    }
    public String getDrcode()
    {
        return drcode;
    }
    public void setDrname(String drname)
    {
        this.drname = drname;
    }
    public String getDrname()
    {
        return drname;
    }
    public void setHospitalcode(String hospitalcode)
    {
        this.hospitalcode = hospitalcode;
    }
    public String getHospitalcode()
    {
        return hospitalcode;
    }
    public void setHospitalname(String hospitalname)
    {
        this.hospitalname = hospitalname;
    }
    public String getHospitalname()
    {
        return hospitalname;
    }
    public void setPhysicaldate(Date physicaldate)
    {
        this.physicaldate = physicaldate;
    }
    public Date getPhysicaldate()
    {
        return physicaldate;
    }
    public void setOrgid(String orgid)
    {
        this.orgid = orgid;
    }
    public String getOrgid()
    {
        return orgid;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }
    public String getDelFlag()
    {
        return delFlag;
    }
    public void setIsupload(Long isupload)
    {
        this.isupload = isupload;
    }
    public Long getIsupload()
    {
        return isupload;
    }
    public void setUploadTime(Date uploadTime)
    {
        this.uploadTime = uploadTime;
    }
    public Date getUploadTime()
    {
        return uploadTime;
    }
    public void setDeptcode(String deptcode)
    {
        this.deptcode = deptcode;
    }
    public String getDeptcode()
    {
        return deptcode;
    }
    public void setDeptname(String deptname)
    {
        this.deptname = deptname;
    }
    public String getDeptname()
    {
        return deptname;
    }
    public void setProjectname(String projectname)
    {
        this.projectname = projectname;
    }
    public String getProjectname()
    {
        return projectname;
    }
    public void setProjectcode(String projectcode)
    {
        this.projectcode = projectcode;
    }
    public String getProjectcode()
    {
        return projectcode;
    }
    public void setState(Long state)
    {
        this.state = state;
    }
    public Long getState()
    {
        return state;
    }
    public void setSchemestatus(Long schemestatus)
    {
        this.schemestatus = schemestatus;
    }
    public Long getSchemestatus()
    {
        return schemestatus;
    }
    public void setGeneralschemestatus(Long generalschemestatus)
    {
        this.generalschemestatus = generalschemestatus;
    }
    public Long getGeneralschemestatus()
    {
        return generalschemestatus;
    }
    public void setDeptid(Long deptid)
    {
        this.deptid = deptid;
    }
    public Long getDeptid()
    {
        return deptid;
    }
    public void setProjectid(Long projectid)
    {
        this.projectid = projectid;
    }
    public Long getProjectid()
    {
        return projectid;
    }
    public void setSchemetime(Date schemetime)
    {
        this.schemetime = schemetime;
    }
    public Date getSchemetime()
    {
        return schemetime;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("serialnum", getSerialnum())
            .append("patid", getPatid())
            .append("drcode", getDrcode())
            .append("drname", getDrname())
            .append("hospitalcode", getHospitalcode())
            .append("hospitalname", getHospitalname())
            .append("physicaldate", getPhysicaldate())
            .append("orgid", getOrgid())
            .append("delFlag", getDelFlag())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("isupload", getIsupload())
            .append("uploadTime", getUploadTime())
            .append("deptcode", getDeptcode())
            .append("deptname", getDeptname())
            .append("projectname", getProjectname())
            .append("projectcode", getProjectcode())
            .append("state", getState())
            .append("schemestatus", getSchemestatus())
            .append("generalschemestatus", getGeneralschemestatus())
            .append("deptid", getDeptid())
            .append("projectid", getProjectid())
            .append("schemetime", getSchemetime())
            .toString();
    }
}
smartor/src/main/java/com/smartor/domain/PhoneCallBackVO.java
@@ -47,7 +47,6 @@
    /**
     * è¯­éŸ³è¯†åˆ«ç»“果上报接口
     */
    //语音识别结果文本
    @ApiModelProperty(value = "语音识别结果文本")
    private String textResult;
smartor/src/main/java/com/smartor/domain/QuestionMessage.java
@@ -12,10 +12,10 @@
    //返回的内容
    private String content;
    //开场白
    //开场白(给测试功能用的)
    private String kcb = null;
    //结束语
    //结束语(给测试功能用的)
    private String jsy = null;
    //当前问题
smartor/src/main/java/com/smartor/mapper/PatArchiveOutMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
package com.smartor.mapper;
import com.smartor.domain.PatArchiveOut;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * å¤–部患者档案Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Mapper
public interface PatArchiveOutMapper
{
    /**
     * æŸ¥è¯¢å¤–部患者档案
     *
     * @param patid å¤–部患者档案主键
     * @return å¤–部患者档案
     */
    public PatArchiveOut selectPatArchiveOutByPatid(Long patid);
    /**
     * æŸ¥è¯¢å¤–部患者档案列表
     *
     * @param patArchiveOut å¤–部患者档案
     * @return å¤–部患者档案集合
     */
    public List<PatArchiveOut> selectPatArchiveOutList(PatArchiveOut patArchiveOut);
    /**
     * æ–°å¢žå¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    public int insertPatArchiveOut(PatArchiveOut patArchiveOut);
    /**
     * ä¿®æ”¹å¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    public int updatePatArchiveOut(PatArchiveOut patArchiveOut);
    /**
     * åˆ é™¤å¤–部患者档案
     *
     * @param patid å¤–部患者档案主键
     * @return ç»“æžœ
     */
    public int deletePatArchiveOutByPatid(Long patid);
}
smartor/src/main/java/com/smartor/service/IIvrLibaTargetService.java
@@ -15,7 +15,7 @@
    /**
     * æŸ¥è¯¢æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @param id æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return æŒ‡æ ‡é€‰é¡¹åº“
     */
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long id);
@@ -56,7 +56,7 @@
    /**
     * æ‰¹é‡åˆ é™¤æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param targetIDs éœ€è¦åˆ é™¤çš„æŒ‡æ ‡é€‰é¡¹åº“主键集合
     * @param ids éœ€è¦åˆ é™¤çš„æŒ‡æ ‡é€‰é¡¹åº“主键集合
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetIDs(Long[] ids);
@@ -64,8 +64,13 @@
    /**
     * åˆ é™¤æŒ‡æ ‡é€‰é¡¹åº“信息
     *
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @param id æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetID(Long id);
    /**
     * æŒ‡æ ‡æµ‹è¯•问题匹配
     */
    public String targetQuesMate(IvrLibaTargetVO ivrLibaTargetVO);
}
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
@@ -86,6 +86,6 @@
     * @param phoneCallBackVO
     * @return ç»“æžœ
     */
    public PhoneCallBackVO phoneCallBack(PhoneCallBackVO phoneCallBackVO);
    public void phoneCallBack(PhoneCallBackVO phoneCallBackVO);
}
smartor/src/main/java/com/smartor/service/IPatArchiveOutService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package com.smartor.service;
import com.smartor.domain.PatArchiveOut;
import java.util.List;
/**
 * å¤–部患者档案Service接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface IPatArchiveOutService
{
    /**
     * æŸ¥è¯¢å¤–部患者档案
     *
     * @param patid å¤–部患者档案主键
     * @return å¤–部患者档案
     */
    public PatArchiveOut selectPatArchiveOutByPatid(Long patid);
    /**
     * æŸ¥è¯¢å¤–部患者档案列表
     *
     * @param patArchiveOut å¤–部患者档案
     * @return å¤–部患者档案集合
     */
    public List<PatArchiveOut> selectPatArchiveOutList(PatArchiveOut patArchiveOut);
    /**
     * æ–°å¢žå¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    public int insertPatArchiveOut(PatArchiveOut patArchiveOut);
    /**
     * ä¿®æ”¹å¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    public int updatePatArchiveOut(PatArchiveOut patArchiveOut);
    /**
     * æ‰¹é‡åˆ é™¤å¤–部患者档案
     *
     * @param patids éœ€è¦åˆ é™¤çš„外部患者档案主键集合
     * @return ç»“æžœ
     */
    public int deletePatArchiveOutByPatids(Long[] patids);
}
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java
@@ -19,6 +19,8 @@
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * æŒ‡æ ‡é€‰é¡¹åº“Service业务层处理
@@ -214,4 +216,31 @@
    public int deleteIvrLibaTargetByTargetID(Long id) {
        return ivrLibaTargetMapper.deleteIvrLibaTargetByTargetID(id);
    }
    /**
     * æŒ‡æ ‡æµ‹è¯•问题匹配
     */
    @Override
    public String targetQuesMate(IvrLibaTargetVO ivrLibaTargetVO) {
        for (IvrLibaTargetoption ivrLibaTargetoption : ivrLibaTargetVO.getTargetoptionList()) {
            Matcher matcher = null;
            if (StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex())) {
                Pattern pattern = Pattern.compile(ivrLibaTargetoption.getTargetregex());
                matcher = pattern.matcher(ivrLibaTargetVO.getContent());
            }
            //不包含
            Matcher matcher2 = null;
            if (StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex2())) {
                Pattern pattern2 = Pattern.compile(ivrLibaTargetoption.getTargetregex2());
                matcher2 = pattern2.matcher(ivrLibaTargetVO.getContent());
            }
            if (StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTargetoption.getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex()) && matcher.matches()) {
                return ivrLibaTargetoption.getOptiondesc();
            }
        }
        return null;
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -326,30 +326,24 @@
    }
    @Override
    public PhoneCallBackVO phoneCallBack(PhoneCallBackVO phoneCallBackVO) {
        log.info("phoneCallBackVO的入参:{},{},{},{},{},{},{}", phoneCallBackVO.getResultType(), phoneCallBackVO.getUuid(), phoneCallBackVO.getErrResult(), phoneCallBackVO.getTextResult(), phoneCallBackVO.getHangUpResult(), phoneCallBackVO.getEnumState(), phoneCallBackVO.getUint8());
    public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) {phoneCallBackVO.setTextResult(phoneCallBackVO.getTextResult().substring(0, phoneCallBackVO.getTextResult().length() - 1));
        //获取数据
        Boolean aBoolean = redisCache.hasKey(phoneCallBackVO.getUuid());
        if (!aBoolean) {
            new BaseException("该uuid不存在");
            throw new BaseException("该uuid不存在");
        }
        Integer hangupValue = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "hangup");
        if (hangupValue != null && hangupValue == 1) {
            //hangupValue == 1  éšè®¿ç»“束,直接可以挂电话
            PhoneUtils phoneUtils = new PhoneUtils();
            phoneUtils.hangup(phoneCallBackVO.getUuid(), null, null, null, null, null, null, null);
        if (hangupValue != null && hangupValue == 1) {
            log.info("电话要挂断了");
            //hangupValue == 1  éšè®¿ç»“束,直接可以挂电话
            phoneUtils.hangup(null, null, null, null, null, null, null, phoneCallBackVO.getUuid());
            log.info("电话挂断----------------------------");
            return;
        }
        String cacheObject = redisCache.getCacheObject(phoneCallBackVO.getUuid());
        ObjectMapper objectMapper = new ObjectMapper();
        Map<String, Object> map = null;
        try {
            map = objectMapper.readValue(cacheObject, Map.class);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid());
        IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall");
        List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO");
        //将uuid更新到数据库中
@@ -359,64 +353,15 @@
        //获取模板信息
        IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO");
        //首先判断resultType
        if (phoneCallBackVO.getResultType() == 1) {
            //呼叫结果接口: 1
            if (phoneCallBackVO.getUint8() == 1) {
                //呼叫失败,去redis中记录一下失败次数,进行再次呼叫
                Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "uint8");
                if (integer != null) {
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", integer + 1, 120, TimeUnit.MINUTES);
                } else {
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", 1, 120, TimeUnit.MINUTES);
                }
                if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) {
                    log.info("无人接听:{},   {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid());
                    //连续打规定次,如果要没人接,那就结束
                    ivrTaskcall.setResult(phoneCallBackVO.getErrResult());
                    ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
                    redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8");
                } else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
                    //进行重拨
                    PhoneUtils phoneUtils = new PhoneUtils();
                    phoneUtils.ob(null, null, null, null, null, null, null, ivrTaskcall.getPhone(), phoneCallBackVO.getUuid(), true);
                }
            }
        } else if (phoneCallBackVO.getResultType() == 2) {
            //通话状态更新接口: 2
            if (phoneCallBackVO.getEnumState() == 0) {
                // 0-振铃
                Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "enumState");
                if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", integer + 1, 120, TimeUnit.MINUTES);
                } else if (integer == null) {
                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", 1, 120, TimeUnit.MINUTES);
                } else if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) {
                    ivrTaskcall.setResult("无人接听");
                    ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
                    redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
                }
            } else if (phoneCallBackVO.getEnumState() == 2) {
                //患者挂断电话
                log.info("患者挂断电话:{}", phoneCallBackVO.getUuid());
                ivrTaskcall.setResult(phoneCallBackVO.getHangUpResult());
                ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
                redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
            }
        } else if (phoneCallBackVO.getResultType() == 3) {
            //语音识别结果上报接口: 3
            Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice");
            QuestionMessage returnQues = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
            IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
            PhoneUtils phoneUtils = new PhoneUtils();
        //将传回的结果放到回复对象中
        returnQues.setContent(phoneCallBackVO.getTextResult());
            if (StringUtils.isEmpty(phoneCallBackVO.getTextResult())) {
        IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
        if (StringUtils.isEmpty(returnQues.getContent())) {
                //无回话
                //判断noVoice是否已经到了最大值
                if (noVoice == ivrLibaTemplateVO.getNoVoiceNum().intValue()) {
@@ -425,6 +370,7 @@
                        //没有下一题了,就挂断电话,播放结束语
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                        phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                    return;
                    } else {
                        //有下一题
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
@@ -438,7 +384,7 @@
                    String slienceText = nowQuestion.getSlienceText();
                    //静默话术  + é—®é¢˜ï¼Œ  åŽ»è°ƒç”¨â€œtts合成和播放”接口
                    phoneUtils.ttsPlayback(slienceText + nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
                    return new PhoneCallBackVO();
                return;
                }
            } else {
@@ -463,7 +409,6 @@
                        nowQuestion.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
                        ivrLibaScriptTargetoptionMapper.updateIvrLibaTemplateTargetoption(nowQuestion.getIvrLibaScriptTargetoptionList().get(j));
                        //将静默置为0
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
@@ -475,13 +420,21 @@
                                questionMessage.setNowQuestion(script);
                                questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
                                break;
                            phoneUtils.ttsPlayback(script.getQuestionText(), phoneCallBackVO.getUuid());
                            return;
                        } else if (nextQuestion > ivrLibaTemplateScriptVOs.size()) {
                            //没有下一题了,就结束了
                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                            phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                            phoneUtils.hangup(null, null, null, null, null, null, null, phoneCallBackVO.getUuid());
                            return;
                            }
                        }
                        break;
                    return;
                    } else {
                        //没有匹配到
                        Integer mateNum = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "mateNum");
                    if (mateNum == null) mateNum = 0;
                        //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了
                        if (mateNum == ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
                            //如果下一题为空.则新的数据返回,并加上感谢语
@@ -492,19 +445,22 @@
                                questionMessage.setNowQuestion(nextQuestion);
                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
                            phoneUtils.ttsPlayback(nextQuestion.getQuestionText(), phoneCallBackVO.getUuid());
                            return;
                            } else {
                                //就可以挂断电话了
                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
                                phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
                                break;
                            phoneUtils.hangup(null, null, null, null, null, null, null, phoneCallBackVO.getUuid());
                            return;
                            }
                        } else if (mateNum < ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
                            //没有问到规定次数
                            mateNum = mateNum + 1;
                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", mateNum, 120, TimeUnit.MINUTES);
                        }
                    }
                    }
                }
                }
                //选项匹配完成后,需要再去通过库再进行匹配一次
                String extemplateID = ivrLibaTemplateVO.getSubmoduleID();
@@ -545,19 +501,251 @@
                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES);
                            }
                            //调用“15、tts合成和播放, tts_playback”将结果传回
                        phoneUtils.ttsPlayback(nowQuestion.getQuestionText() + ivrLibaTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid());
                        }
                        break;
                    }
                phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
            }
        }
                }
            }
        }
        return phoneCallBackVO;
    }
    //下面的代码不能删除,上面的方法只是配合电话端联调用的,
//    @Override
//    public PhoneCallBackVO phoneCallBack(PhoneCallBackVO phoneCallBackVO) {
//        log.error("phoneCallBackVO的入参:{},{},{},{},{},{},{}", phoneCallBackVO.getResultType(), phoneCallBackVO.getUuid(), phoneCallBackVO.getErrResult(), phoneCallBackVO.getTextResult(), phoneCallBackVO.getHangUpResult(), phoneCallBackVO.getEnumState(), phoneCallBackVO.getUint8());
//        //获取数据
//        Boolean aBoolean = redisCache.hasKey(phoneCallBackVO.getUuid());
//        if (!aBoolean) {
//            throw new BaseException("该uuid不存在");
//        }
//        Integer hangupValue = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "hangup");
//        if (hangupValue != null && hangupValue == 1) {
//            //hangupValue == 1  éšè®¿ç»“束,直接可以挂电话
//            PhoneUtils phoneUtils = new PhoneUtils();
//            phoneUtils.hangup(phoneCallBackVO.getUuid(), null, null, null, null, null, null, null);
//
//        }
//
//        Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid());
////        ObjectMapper objectMapper = new ObjectMapper();
////        Map<String, Object> map = null;
////        try {
////            map = objectMapper.readValue(cacheObject, Map.class);
////        } catch (JsonProcessingException e) {
////            e.printStackTrace();
////        }
//
//        IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall");
//        List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO");
//        //将uuid更新到数据库中
//        ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid());
//        ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
//
//        //获取模板信息
//        IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO");
//
//
//        //首先判断resultType
//        if (phoneCallBackVO.getResultType() == 1) {
//            //呼叫结果接口: 1
//            if (phoneCallBackVO.getUint8() == 1) {
//                //呼叫失败,去redis中记录一下失败次数,进行再次呼叫
//                Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "uint8");
//                if (integer != null) {
//                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", integer + 1, 120, TimeUnit.MINUTES);
//                } else {
//                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", 1, 120, TimeUnit.MINUTES);
//                }
//
//                if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) {
//                    log.info("无人接听:{},   {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid());
//                    //连续打规定次,如果要没人接,那就结束
//                    ivrTaskcall.setResult(phoneCallBackVO.getErrResult());
//                    ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
//                    redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8");
//                } else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
//                    //进行重拨
//                    PhoneUtils phoneUtils = new PhoneUtils();
//                    phoneUtils.ob(null, null, null, null, null, null, null, ivrTaskcall.getPhone(), phoneCallBackVO.getUuid(), true);
//                }
//            }
//
//        } else if (phoneCallBackVO.getResultType() == 2) {
//            //通话状态更新接口: 2
//            if (phoneCallBackVO.getEnumState() == 0) {
//                // 0-振铃
//                Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "enumState");
//
//                if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
//                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", integer + 1, 120, TimeUnit.MINUTES);
//                } else if (integer == null) {
//                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", 1, 120, TimeUnit.MINUTES);
//                } else if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) {
//                    ivrTaskcall.setResult("无人接听");
//                    ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
//                    redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
//                }
//            } else if (phoneCallBackVO.getEnumState() == 2) {
//                //患者挂断电话
//                log.info("患者挂断电话:{}", phoneCallBackVO.getUuid());
//                ivrTaskcall.setResult(phoneCallBackVO.getHangUpResult());
//                ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
//                redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
//            }
//
//
//        } else if (phoneCallBackVO.getResultType() == 3) {
//            //语音识别结果上报接口: 3
//            Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice");
//            QuestionMessage returnQues = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
//            IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
//            PhoneUtils phoneUtils = new PhoneUtils();
//
//            if (StringUtils.isEmpty(phoneCallBackVO.getTextResult())) {
//                //无回话
//                //判断noVoice是否已经到了最大值
//                if (noVoice == ivrLibaTemplateVO.getNoVoiceNum().intValue()) {
//                    //已经问了对应的遍数,就判断是否还有下一题
//                    if (nowQuestion.getTargetid() == ivrLibaTemplateScriptVOs.size()) {
//                        //没有下一题了,就挂断电话,播放结束语
//                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
//                        phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
//                    } else {
//                        //有下一题
//                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
//                        IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
//                        // é—®é¢˜ï¼Œ  åŽ»è°ƒç”¨â€œtts合成和播放”接口
//                        phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
//                    }
//                } else {
//                    redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", noVoice + 1, 120, TimeUnit.MINUTES);
//                    //调用ivrLibaTemplateScriptVO中的slienceText(静默话术)
//                    String slienceText = nowQuestion.getSlienceText();
//                    //静默话术  + é—®é¢˜ï¼Œ  åŽ»è°ƒç”¨â€œtts合成和播放”接口
//                    phoneUtils.ttsPlayback(slienceText + nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
//                    return new PhoneCallBackVO();
//                }
//
//            } else {
//                //有回话,对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)
//                for (int j = 0; j < nowQuestion.getIvrLibaScriptTargetoptionList().size(); j++) {
//                    //包含
//                    Matcher matcher = null;
//                    if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) {
//                        Pattern pattern = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex());
//                        matcher = pattern.matcher(phoneCallBackVO.getTextResult());
//                    }
//                    //不包含
//                    Matcher matcher2 = null;
//                    if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) {
//                        Pattern pattern2 = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
//                        matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult());
//                    }
//                    log.info("phoneCallBack--Targetregex的值为:{}, phoneCallBack--Targetregex2的值为:{}", nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
//                    if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
//                        //说明匹配正确了
//                        //这里应该先判断类型,去再修改,设置IsUserOperation是单选题的改法
//                        nowQuestion.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
//                        ivrLibaScriptTargetoptionMapper.updateIvrLibaTemplateTargetoption(nowQuestion.getIvrLibaScriptTargetoptionList().get(j));
//
//
//                        //将静默置为0
//                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
//                        redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
//                        //获取下一题
//                        Integer nextQuestion = nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
//                        for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOs) {
//                            if (script.getTargetid() == nextQuestion) {
//                                QuestionMessage questionMessage = new QuestionMessage();
//                                questionMessage.setNowQuestion(script);
//                                questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
//                                break;
//                            }
//                        }
//                        break;
//                    } else {
//                        //没有匹配到
//                        Integer mateNum = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "mateNum");
//                        //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了
//                        if (mateNum == ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
//                            //如果下一题为空.则新的数据返回,并加上感谢语
//                            if (nowQuestion.getTargetid() < ivrLibaTemplateScriptVOs.size()) {
//                                QuestionMessage questionMessage = new QuestionMessage();
//                                IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
//                                questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
//                                questionMessage.setNowQuestion(nextQuestion);
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
//                            } else {
//                                //就可以挂断电话了
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
//                                phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
//                                break;
//                            }
//                        } else if (mateNum < ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
//                            //没有问到规定次数
//                            mateNum = mateNum + 1;
//                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", mateNum, 120, TimeUnit.MINUTES);
//                        }
//                    }
//
//                }
//                //选项匹配完成后,需要再去通过库再进行匹配一次
//                String extemplateID = ivrLibaTemplateVO.getSubmoduleID();
//                String[] split = extemplateID.split(",");
//                List<String> list = Arrays.asList(split);
//                List<Long> list1 = new ArrayList<>();
//                if (StringUtils.isNotEmpty(extemplateID)) {
//                    for (String str : list) {
//                        list1.add(Long.valueOf(str));
//                    }
//                    List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1);
//                    for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) {
//                        Matcher matcher = null;
//                        if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) {
//                            Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex());
//                            matcher = pattern.matcher(returnQues.getContent());
//                        }
//
//                        Matcher matcher2 = null;
//                        if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) {
//                            Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2());
//                            matcher2 = pattern2.matcher(returnQues.getContent());
//                        }
//                        log.info("++++++++++++++++++++++++++通用库是否为空:selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2());
//                        if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
//                            QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
//                            IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = returnQues.getNowQuestion();
//                            ivrLibaTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
//                            ivrLibaTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
//                            redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
//                            if (ivrLibaExtemplatescript.getIsEnd() == 1) {
//                                //将问题置空
//                                IvrLibaTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion();
//                                nowQuestion1.setQuestionText(null);
//                                nowQuestion1.setQuestionVoice(null);
//                                questionMessage.setNowQuestion(nowQuestion1);
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
//
//                                redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES);
//                            }
//
//                            //调用“15、tts合成和播放, tts_playback”将结果传回
//
//
//                        }
//                        break;
//                    }
//                }
//
//            }
//        }
//        return phoneCallBackVO;
//    }
    private IvrLibaTemplateScriptVO getNextQuestion(List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO) {
smartor/src/main/java/com/smartor/service/impl/PatArchiveOutServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,83 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.PatArchiveOut;
import com.smartor.mapper.PatArchiveOutMapper;
import com.smartor.service.IPatArchiveOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * å¤–部患者档案Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Service
public class PatArchiveOutServiceImpl implements IPatArchiveOutService {
    @Autowired
    private PatArchiveOutMapper patArchiveOutMapper;
    /**
     * æŸ¥è¯¢å¤–部患者档案
     *
     * @param patid å¤–部患者档案主键
     * @return å¤–部患者档案
     */
    @Override
    public PatArchiveOut selectPatArchiveOutByPatid(Long patid) {
        return patArchiveOutMapper.selectPatArchiveOutByPatid(patid);
    }
    /**
     * æŸ¥è¯¢å¤–部患者档案列表
     *
     * @param patArchiveOut å¤–部患者档案
     * @return å¤–部患者档案
     */
    @Override
    public List<PatArchiveOut> selectPatArchiveOutList(PatArchiveOut patArchiveOut) {
        return patArchiveOutMapper.selectPatArchiveOutList(patArchiveOut);
    }
    /**
     * æ–°å¢žå¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    @Override
    public int insertPatArchiveOut(PatArchiveOut patArchiveOut) {
        patArchiveOut.setCreateTime(DateUtils.getNowDate());
        return patArchiveOutMapper.insertPatArchiveOut(patArchiveOut);
    }
    /**
     * ä¿®æ”¹å¤–部患者档案
     *
     * @param patArchiveOut å¤–部患者档案
     * @return ç»“æžœ
     */
    @Override
    public int updatePatArchiveOut(PatArchiveOut patArchiveOut) {
        patArchiveOut.setUpdateTime(DateUtils.getNowDate());
        return patArchiveOutMapper.updatePatArchiveOut(patArchiveOut);
    }
    /**
     * æ‰¹é‡åˆ é™¤å¤–部患者档案
     *
     * @param patids éœ€è¦åˆ é™¤çš„外部患者档案主键
     * @return ç»“æžœ
     */
    @Override
    public int deletePatArchiveOutByPatids(Long[] patids) {
        for (Long patid : patids) {
            patArchiveOutMapper.deletePatArchiveOutByPatid(patid);
        }
        return 1;
    }
}
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
@@ -9,13 +9,13 @@
        <result property="questiontitle" column="questiontitle"/>
        <result property="questionText" column="questionText"/>
        <result property="questionvoice" column="questionvoice"/>
        <result property="nomatchtext" column="nomatchtext"/>
        <result property="noMatchText" column="nomatchtext"/>
        <result property="nomatchvoice" column="nomatchvoice"/>
        <result property="sliencetext" column="sliencetext"/>
        <result property="slienceText" column="sliencetext"/>
        <result property="sliencevoice" column="sliencevoice"/>
        <result property="submoduletext" column="submoduletext"/>
        <result property="submodulevoice" column="submodulevoice"/>
        <result property="noclearlytext" column="noclearlytext"/>
        <result property="noClearlyText" column="noclearlytext"/>
        <result property="noclearlyvoice" column="noclearlyvoice"/>
        <result property="questiontype" column="questiontype"/>
        <result property="targetid" column="targetid"/>
@@ -84,9 +84,9 @@
        <include refid="selectIvrLibaScriptVo"/>
        <where>
            <if test="id != null ">and id = #{id}</if>
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle = #{questiontitle}</if>
            <if test="deptIds != null  and deptIds != ''">and deptIds = #{deptIds}</if>
            <if test="deptNames != null  and deptNames != ''">and deptNames like concat('%', #{deptNames}, '%')</if>
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle like concat('%', #{questiontitle}, '%')</if>
            <if test="campus != null  and campus != ''">and campus = #{campus}</if>
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
@@ -94,13 +94,13 @@
            <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="noMatchText != null  and noMatchText != ''">and nomatchtext = #{noMatchText}</if>
            <if test="nomatchvoice != null  and nomatchvoice != ''">and nomatchvoice = #{nomatchvoice}</if>
            <if test="sliencetext != null  and sliencetext != ''">and sliencetext = #{sliencetext}</if>
            <if test="slienceText != null  and slienceText != ''">and sliencetext = #{slienceText}</if>
            <if test="sliencevoice != null  and sliencevoice != ''">and sliencevoice = #{sliencevoice}</if>
            <if test="submoduletext != null  and submoduletext != ''">and submoduletext = #{submoduletext}</if>
            <if test="submodulevoice != null  and submodulevoice != ''">and submodulevoice = #{submodulevoice}</if>
            <if test="noclearlytext != null  and noclearlytext != ''">and noclearlytext = #{noclearlytext}</if>
            <if test="noClearlyText != null  and noClearlyText != ''">and noclearlytext = #{noClearlyText}</if>
            <if test="noclearlyvoice != null  and noclearlyvoice != ''">and noclearlyvoice = #{noclearlyvoice}</if>
            <if test="questiontype != null  and questiontype != ''">and questiontype = #{questiontype}</if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
@@ -142,13 +142,13 @@
            <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="noMatchText != null">nomatchtext,</if>
            <if test="nomatchvoice != null">nomatchvoice,</if>
            <if test="sliencetext != null">sliencetext,</if>
            <if test="slienceText != null">sliencetext,</if>
            <if test="sliencevoice != null">sliencevoice,</if>
            <if test="submoduletext != null">submoduletext,</if>
            <if test="submodulevoice != null">submodulevoice,</if>
            <if test="noclearlytext != null">noclearlytext,</if>
            <if test="noClearlyText != null">noclearlytext,</if>
            <if test="noclearlyvoice != null">noclearlyvoice,</if>
            <if test="questiontype != null">questiontype,</if>
            <if test="targetid != null">targetid,</if>
@@ -188,13 +188,13 @@
            <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="noMatchText != null">#{noMatchText},</if>
            <if test="nomatchvoice != null">#{nomatchvoice},</if>
            <if test="sliencetext != null">#{sliencetext},</if>
            <if test="slienceText != null">#{slienceText},</if>
            <if test="sliencevoice != null">#{sliencevoice},</if>
            <if test="submoduletext != null">#{submoduletext},</if>
            <if test="submodulevoice != null">#{submodulevoice},</if>
            <if test="noclearlytext != null">#{noclearlytext},</if>
            <if test="noClearlyText != null">#{noClearlyText},</if>
            <if test="noclearlyvoice != null">#{noclearlyvoice},</if>
            <if test="questiontype != null">#{questiontype},</if>
            <if test="targetid != null">#{targetid},</if>
@@ -235,13 +235,13 @@
            <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="noMatchText != null">nomatchtext = #{noMatchText},</if>
            <if test="nomatchvoice != null">nomatchvoice = #{nomatchvoice},</if>
            <if test="sliencetext != null">sliencetext = #{sliencetext},</if>
            <if test="slienceText != null">sliencetext = #{slienceText},</if>
            <if test="sliencevoice != null">sliencevoice = #{sliencevoice},</if>
            <if test="submoduletext != null">submoduletext = #{submoduletext},</if>
            <if test="submodulevoice != null">submodulevoice = #{submodulevoice},</if>
            <if test="noclearlytext != null">noclearlytext = #{noclearlytext},</if>
            <if test="noClearlyText != null">noclearlytext = #{noClearlyText},</if>
            <if test="noclearlyvoice != null">noclearlyvoice = #{noclearlyvoice},</if>
            <if test="questiontype != null">questiontype = #{questiontype},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -92,12 +92,14 @@
            <if test="submoduleVoice != null  and submoduleVoice != ''">and submoduleVoice = #{submoduleVoice}</if>
            <if test="noClearlyText != null  and noClearlyText != ''">and noClearlyText = #{noClearlyText}</if>
            <if test="noClearlyVoice != null  and noClearlyVoice != ''">and noClearlyVoice = #{noClearlyVoice}</if>
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle = #{questiontitle}</if>
            <if test="nextQuestion != null  and nextQuestion != ''">and next_question = #{nextQuestion}</if>
            <if test="questionResult != null  and questionResult != ''">and question_result = #{questionResult}</if>
            <if test="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
                '%')
            </if>
            <if test="questiontitle != null  and questiontitle != ''">and questiontitle like concat('%', #{questiontitle},
                '%')
            </if>
            <if test="targetOptions != null  and targetOptions != ''">and targetOptions = #{targetOptions}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="playWavOnly != null ">and playWavOnly = #{playWavOnly}</if>
smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
@@ -39,6 +39,8 @@
        <result property="isSend" column="is_send"/>
        <result property="sendState" column="send_state"/>
        <result property="param" column="param"/>
        <result property="hospType" column="hosp_type"/>
        <result property="hospno" column="hospno"/>
    </resultMap>
    <sql id="selectIvrTaskVo">
@@ -57,6 +59,8 @@
               checkusername,
               checktime,
               type,
               hosp_type,
               hospno,
               typename,
               usebqsms,
               usebhsms,
@@ -108,6 +112,8 @@
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="hospType != null  and hospType != ''">and hosp_type = #{hospType}</if>
            <if test="hospno != null  and hospno != ''">and orgid = #{hospno}</if>
        </where>
        order by update_time desc,taskid desc
    </select>
@@ -154,6 +160,8 @@
            <if test="isSend != null">is_send,</if>
            <if test="sendState != null">send_state,</if>
            <if test="param != null">param,</if>
            <if test="hospType != null  and hospType != ''">hosp_type,</if>
            <if test="hospno != null  and hospno != ''">hospno,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskName != null">#{taskName},</if>
@@ -189,6 +197,8 @@
            <if test="isSend != null">#{isSend},</if>
            <if test="sendState != null">#{sendState},</if>
            <if test="param != null">#{param},</if>
            <if test="hospType != null  and hospType != ''">#{hospType},</if>
            <if test="hospno != null  and hospno != ''">#{hospno},</if>
        </trim>
    </insert>
@@ -228,6 +238,8 @@
            <if test="isSend != null">is_send = #{isSend},</if>
            <if test="sendState != null">send_state = #{sendState},</if>
            <if test="param != null">param = #{param},</if>
            <if test="hospType != null  and hospType != ''">hosp_type = #{hospType},</if>
            <if test="hospno != null  and hospno != ''">hospno = #{hospno},</if>
        </trim>
        where taskid = #{taskid}
    </update>
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
@@ -140,6 +140,7 @@
    <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskSingle" resultMap="IvrTaskcallResult">
        <include refid="selectIvrTaskcallVo"/>
        <where>
            del_flag=0
            <if test="sendname != null  and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="sex != null  and sex != ''">and sex = #{sex}</if>
@@ -481,6 +482,7 @@
        WHERE jt.begantime > #{beganTime}
          AND jt.begantime &lt;= #{endTime}
          AND sendstate IS NULL
          AND del_flag = 0
    </select>
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -35,6 +35,7 @@
        <result property="pattype" column="pattype"/>
        <result property="bedNo" column="bedno"/>
        <result property="inhosptime" column="inhosptime"/>
        <result property="membertype" column="membertype"/>
    </resultMap>
    <sql id="selectPatArchiveVo">
@@ -63,6 +64,7 @@
               create_time,
               isupload,
               pattype,
               membertype,
               upload_time
        from pat_archive
    </sql>
@@ -78,6 +80,7 @@
            <if test="patid != null  and patid != ''">and patid = #{patid}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="membertype != null ">and membertype = #{membertype}</if>
        </where>
    </select>
@@ -94,6 +97,7 @@
        a.telcode,
        a.create_time,
        a.update_time,
        a.membertype,
        a.birthdate
        from pat_archive a,pat_archivetag b ,base_tag c
        <where>
@@ -165,10 +169,10 @@
        <!--        </trim>-->
        insert into
        pat_archive(name,sex,idcardno,birthdate,age,source,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
        pat_archive(name,membertype,sex,idcardno,birthdate,age,source,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
        ,create_by,create_time,isupload,upload_time,pattype,place_of_residence,nation,birthplace,native_place) values
        <foreach item="item" index="index" collection="list" separator=",">
            (#{item.name},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.age},#{item.source},#{item.archivetime},#{item.archiveby}
            (#{item.name},#{item.membertype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.age},#{item.source},#{item.archivetime},#{item.archiveby}
            ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy},
            #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.placeOfResidence},#{item.nation},#{item.birthplace},#{item.nativePlace}
            )
@@ -198,6 +202,7 @@
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="membertype != null">membertype = #{membertype},</if>
        </trim>
        where patid = #{patid}
    </update>
@@ -246,6 +251,7 @@
        a.create_time,
        a.isupload,
        a.upload_time,
        a.membertype,
        a.pattype
        from pat_archive a,pat_archivetag b ,base_tag c
        <where>
@@ -288,6 +294,7 @@
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
        a.membertype,
        a.openid,
        a.del_flag,
        a.update_by,
@@ -357,6 +364,7 @@
        a.idcardno,
        a.birthdate,
        a.age,
        a.membertype,
        a.source,
        a.archivetime,
        a.archiveby,
@@ -426,6 +434,7 @@
        a.native_place,
        a.place_of_residence,
        a.birthplace,
        a.membertype,
        a.idcardno,
        a.birthdate,
        a.age,
smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,230 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.PatArchiveOutMapper">
    <resultMap type="com.smartor.domain.PatArchiveOut" id="PatArchiveOutResult">
        <result property="patid" column="patid"/>
        <result property="patientno" column="patientno"/>
        <result property="pattype" column="pattype"/>
        <result property="name" column="name"/>
        <result property="sex" column="sex"/>
        <result property="nation" column="nation"/>
        <result property="nativePlace" column="native_place"/>
        <result property="placeOfResidence" column="place_of_residence"/>
        <result property="birthplace" column="birthplace"/>
        <result property="idcardno" column="idcardno"/>
        <result property="birthdate" column="birthdate"/>
        <result property="age" column="age"/>
        <result property="archivetime" column="archivetime"/>
        <result property="archiveby" column="archiveby"/>
        <result property="telcode" column="telcode"/>
        <result property="relativetelcode" column="relativetelcode"/>
        <result property="idcardtype" column="idcardtype"/>
        <result property="orgid" column="orgid"/>
        <result property="openid" column="openid"/>
        <result property="dduserid" column="dduserid"/>
        <result property="delFlag" column="del_flag"/>
        <result property="source" column="source"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="membertype" column="membertype"/>
    </resultMap>
    <sql id="selectPatArchiveOutVo">
        select patid,
               patientno,
               pattype,
               name,
               sex,
               nation,
               native_place,
               place_of_residence,
               birthplace,
               idcardno,
               birthdate,
               age,
               archivetime,
               archiveby,
               telcode,
               relativetelcode,
               idcardtype,
               orgid,
               openid,
               dduserid,
               del_flag,
               source,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               pid,
               guid,
               membertype
        from pat_archive_out
    </sql>
    <select id="selectPatArchiveOutList" parameterType="com.smartor.domain.PatArchiveOut"
            resultMap="PatArchiveOutResult">
        <include refid="selectPatArchiveOutVo"/>
        <where>
            <if test="patientno != null  and patientno != ''">and patientno = #{patientno}</if>
            <if test="pattype != null  and pattype != ''">and pattype = #{pattype}</if>
            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
            <if test="sex != null ">and sex = #{sex}</if>
            <if test="nation != null  and nation != ''">and nation = #{nation}</if>
            <if test="nativePlace != null  and nativePlace != ''">and native_place = #{nativePlace}</if>
            <if test="placeOfResidence != null  and placeOfResidence != ''">and place_of_residence =
                #{placeOfResidence}
            </if>
            <if test="birthplace != null  and birthplace != ''">and birthplace = #{birthplace}</if>
            <if test="idcardno != null  and idcardno != ''">and idcardno = #{idcardno}</if>
            <if test="birthdate != null ">and birthdate = #{birthdate}</if>
            <if test="age != null ">and age = #{age}</if>
            <if test="archivetime != null ">and archivetime = #{archivetime}</if>
            <if test="archiveby != null  and archiveby != ''">and archiveby = #{archiveby}</if>
            <if test="telcode != null  and telcode != ''">and telcode = #{telcode}</if>
            <if test="relativetelcode != null  and relativetelcode != ''">and relativetelcode = #{relativetelcode}</if>
            <if test="idcardtype != null  and idcardtype != ''">and idcardtype = #{idcardtype}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="openid != null  and openid != ''">and openid = #{openid}</if>
            <if test="dduserid != null  and dduserid != ''">and dduserid = #{dduserid}</if>
            <if test="source != null ">and source = #{source}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="membertype != null  and membertype != ''">and membertype = #{membertype}</if>
        </where>
    </select>
    <select id="selectPatArchiveOutByPatid" parameterType="Long" resultMap="PatArchiveOutResult">
        <include refid="selectPatArchiveOutVo"/>
        where patid = #{patid}
    </select>
    <insert id="insertPatArchiveOut" parameterType="com.smartor.domain.PatArchiveOut" useGeneratedKeys="true"
            keyProperty="patid">
        insert into pat_archive_out
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="patientno != null">patientno,</if>
            <if test="pattype != null">pattype,</if>
            <if test="name != null">name,</if>
            <if test="sex != null">sex,</if>
            <if test="nation != null">nation,</if>
            <if test="nativePlace != null">native_place,</if>
            <if test="placeOfResidence != null">place_of_residence,</if>
            <if test="birthplace != null">birthplace,</if>
            <if test="idcardno != null">idcardno,</if>
            <if test="birthdate != null">birthdate,</if>
            <if test="age != null">age,</if>
            <if test="archivetime != null">archivetime,</if>
            <if test="archiveby != null">archiveby,</if>
            <if test="telcode != null">telcode,</if>
            <if test="relativetelcode != null">relativetelcode,</if>
            <if test="idcardtype != null">idcardtype,</if>
            <if test="orgid != null">orgid,</if>
            <if test="openid != null">openid,</if>
            <if test="dduserid != null">dduserid,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="source != null">source,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="membertype != null">membertype,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="patientno != null">#{patientno},</if>
            <if test="pattype != null">#{pattype},</if>
            <if test="name != null">#{name},</if>
            <if test="sex != null">#{sex},</if>
            <if test="nation != null">#{nation},</if>
            <if test="nativePlace != null">#{nativePlace},</if>
            <if test="placeOfResidence != null">#{placeOfResidence},</if>
            <if test="birthplace != null">#{birthplace},</if>
            <if test="idcardno != null">#{idcardno},</if>
            <if test="birthdate != null">#{birthdate},</if>
            <if test="age != null">#{age},</if>
            <if test="archivetime != null">#{archivetime},</if>
            <if test="archiveby != null">#{archiveby},</if>
            <if test="telcode != null">#{telcode},</if>
            <if test="relativetelcode != null">#{relativetelcode},</if>
            <if test="idcardtype != null">#{idcardtype},</if>
            <if test="orgid != null">#{orgid},</if>
            <if test="openid != null">#{openid},</if>
            <if test="dduserid != null">#{dduserid},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="source != null">#{source},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="membertype != null">#{membertype},</if>
        </trim>
    </insert>
    <update id="updatePatArchiveOut" parameterType="com.smartor.domain.PatArchiveOut">
        update pat_archive_out
        <trim prefix="SET" suffixOverrides=",">
            <if test="patientno != null">patientno = #{patientno},</if>
            <if test="pattype != null">pattype = #{pattype},</if>
            <if test="name != null">name = #{name},</if>
            <if test="sex != null">sex = #{sex},</if>
            <if test="nation != null">nation = #{nation},</if>
            <if test="nativePlace != null">native_place = #{nativePlace},</if>
            <if test="placeOfResidence != null">place_of_residence = #{placeOfResidence},</if>
            <if test="birthplace != null">birthplace = #{birthplace},</if>
            <if test="idcardno != null">idcardno = #{idcardno},</if>
            <if test="birthdate != null">birthdate = #{birthdate},</if>
            <if test="age != null">age = #{age},</if>
            <if test="archivetime != null">archivetime = #{archivetime},</if>
            <if test="archiveby != null">archiveby = #{archiveby},</if>
            <if test="telcode != null">telcode = #{telcode},</if>
            <if test="relativetelcode != null">relativetelcode = #{relativetelcode},</if>
            <if test="idcardtype != null">idcardtype = #{idcardtype},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="openid != null">openid = #{openid},</if>
            <if test="dduserid != null">dduserid = #{dduserid},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="source != null">source = #{source},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="membertype != null">membertype = #{membertype},</if>
        </trim>
        where patid = #{patid}
    </update>
    <update id="deletePatArchiveOutByPatid" parameterType="Long">
        update pat_archive_out
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where patid = #{patid}
    </update>
</mapper>
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -44,6 +44,8 @@
        <result property="deptid"    column="deptid"    />
        <result property="leaveldeptid"    column="leaveldeptid"    />
        <result property="schemetime"    column="schemetime"    />
        <result property="patname"    column="patname"    />
        <result property="patno"    column="patno"    />
    </resultMap>
    <sql id="selectPatMedInhospVo">
@@ -54,8 +56,10 @@
        <include refid="selectPatMedInhospVo"/>
        <where>
            <if test="hospitalname != null  and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if>
            <if test="patname != null  and patname != ''"> and patname like concat('%', #{patname}, '%')</if>
            <if test="hospitaldistrictname != null  and hospitaldistrictname != ''"> and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')</if>
            <if test="endtime != null "> and endtime = #{endtime}</if>
            <if test="patno != null "> and patno = #{patno}</if>
            <if test="leavediagname != null  and leavediagname != ''"> and leavediagname like concat('%', #{leavediagname}, '%')</if>
            <if test="drname != null  and drname != ''"> and drname like concat('%', #{drname}, '%')</if>
            <if test="leaveldeptname != null  and leaveldeptname != ''"> and leaveldeptname like concat('%', #{leaveldeptname}, '%')</if>
@@ -108,6 +112,8 @@
            <if test="deptid != null">deptid,</if>
            <if test="leaveldeptid != null">leaveldeptid,</if>
            <if test="schemetime != null">schemetime,</if>
            <if test="patname!= null">patname,</if>
            <if test="patno != null">patno,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="serialnum != null">#{serialnum},</if>
@@ -147,6 +153,8 @@
            <if test="deptid != null">#{deptid},</if>
            <if test="leaveldeptid != null">#{leaveldeptid},</if>
            <if test="schemetime != null">#{schemetime},</if>
            <if test="patname!= null">#{patname},</if>
            <if test="patno != null">#{patno},</if>
         </trim>
    </insert>
@@ -190,6 +198,8 @@
            <if test="deptid != null">deptid = #{deptid},</if>
            <if test="leaveldeptid != null">leaveldeptid = #{leaveldeptid},</if>
            <if test="schemetime != null">schemetime = #{schemetime},</if>
            <if test="patname!= null">patname = #{patname},</if>
            <if test="patno != null">patno = #{patno},</if>
        </trim>
        where inhospid = #{inhospid}
    </update>
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -31,6 +31,7 @@
        <result property="hpi" column="hpi"/>
        <result property="mainsuit" column="mainsuit"/>
        <result property="outhospno" column="outhospno"/>
        <result property="patname" column="patname"/>
    </resultMap>
    <sql id="selectPatMedOuthospVo">
@@ -59,6 +60,7 @@
               deptid,
               schemetime,
               hpi,
               patname,
               mainsuit
        from pat_med_outhosp
    </sql>
@@ -112,6 +114,7 @@
            <if test="hpi != null">hpi,</if>
            <if test="mainsuit != null">mainsuit,</if>
            <if test="outhospno != null">outhospno,</if>
            <if test="patname != null">patname,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="serialnum != null">#{serialnum},</if>
@@ -139,6 +142,7 @@
            <if test="hpi != null">#{hpi},</if>
            <if test="mainsuit != null">#{mainsuit},</if>
            <if test="outhospno != null">#{outhospno},</if>
            <if test="patname != null">#{patname},</if>
        </trim>
    </insert>
@@ -170,6 +174,7 @@
            <if test="hpi != null">hpi = #{hpi},</if>
            <if test="mainsuit != null">mainsuit = #{mainsuit},</if>
            <if test="outhospno != null">outhospno = #{outhospno},</if>
            <if test="patname != null">patname = #{patname},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.PatMedPhysicalMapper">
    
    <resultMap type="PatMedPhysical" id="PatMedPhysicalResult">
    <resultMap type="com.smartor.domain.PatMedPhysical" id="PatMedPhysicalResult">
        <result property="id"    column="id"    />
        <result property="serialnum"    column="serialnum"    />
        <result property="patid"    column="patid"    />
@@ -31,19 +31,23 @@
        <result property="deptid"    column="deptid"    />
        <result property="projectid"    column="projectid"    />
        <result property="schemetime"    column="schemetime"    />
        <result property="patname"    column="patname"    />
        <result property="patno"    column="patno"    />
    </resultMap>
    <sql id="selectPatMedPhysicalVo">
        select id, serialnum, patid, drcode, drname, hospitalcode, hospitalname, physicaldate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, deptcode, deptname, projectname, projectcode, state, schemestatus, generalschemestatus, deptid, projectid, schemetime from pat_med_physical
        select id, serialnum, patid, patname, patno, drcode, drname, hospitalcode, hospitalname, physicaldate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, deptcode, deptname, projectname, projectcode, state, schemestatus, generalschemestatus, deptid, projectid, schemetime from pat_med_physical
    </sql>
    <select id="selectPatMedPhysicalList" parameterType="PatMedPhysical" resultMap="PatMedPhysicalResult">
    <select id="selectPatMedPhysicalList" parameterType="com.smartor.domain.PatMedPhysical" resultMap="PatMedPhysicalResult">
        <include refid="selectPatMedPhysicalVo"/>
        <where>  
            <if test="hospitalname != null  and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if>
            <if test="physicaldate != null "> and physicaldate = #{physicaldate}</if>
            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
            <if test="patno != null  and patno != ''"> and patno = #{patno}</if>
            <if test="deptname != null  and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if>
            <if test="patname != null  and patname != ''"> and patname like concat('%', #{patname}, '%')</if>
            <if test="projectname != null  and projectname != ''"> and projectname like concat('%', #{projectname}, '%')</if>
        </where>
    </select>
@@ -81,6 +85,8 @@
            <if test="deptid != null">deptid,</if>
            <if test="projectid != null">projectid,</if>
            <if test="schemetime != null">schemetime,</if>
            <if test="patname != null">patname,</if>
            <if test="patno != null">patno,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="serialnum != null">#{serialnum},</if>
@@ -108,6 +114,8 @@
            <if test="deptid != null">#{deptid},</if>
            <if test="projectid != null">#{projectid},</if>
            <if test="schemetime != null">#{schemetime},</if>
            <if test="patname != null">#{patname},</if>
            <if test="patno != null">#{patno},</if>
         </trim>
    </insert>
@@ -139,6 +147,8 @@
            <if test="deptid != null">deptid = #{deptid},</if>
            <if test="projectid != null">projectid = #{projectid},</if>
            <if test="schemetime != null">schemetime = #{schemetime},</if>
            <if test="patname != null">patname = #{patname},</if>
            <if test="patno != null">patno = #{patno},</if>
        </trim>
        where id = #{id}
    </update>