liusheng
2024-04-19 111c93ba533e13d9b47660c1e68ab1f9a23cfb68
代码提交
已修改9个文件
278 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeTaskSingle.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeTaskSingleVO.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeTaskSingleMapper.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -184,7 +184,7 @@
//                            returnQues.setCode(null);
                            List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                            returnQues.setContent(JSON.toJSONString(backQusetRedis));
                            returnQues.setJsy("感谢您的耐心回答,再见");
                            returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                            redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
@@ -205,7 +205,7 @@
                        redisCache.setCacheObject(userId + "noVoice", noVoice2, 120, TimeUnit.MINUTES);
                    }
                } else {
                    //对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)
                    //对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)x
                    for (int j = 0; j < ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size(); j++) {
                        //包含
                        Matcher matcher = null;
@@ -232,6 +232,15 @@
                            redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
                            //获取下一题
                            Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
                            if (nextQuestion > ivrLibaTemplateScriptVOList.size()) {
                                //如果下一题没有了,就结束了
                                QuestionMessage returnQues = new QuestionMessage();
                                List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                returnQues.setContent(JSON.toJSONString(backQusetRedis));
                                returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
                                redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                                redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                            } else {
                            for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
                                if (script.getTargetid() == nextQuestion) {
                                    QuestionMessage returnQues = new QuestionMessage();
@@ -240,6 +249,7 @@
                                    break;
                                }
                            }
                            }
                            break;
                        } else {
                            //没有匹配到
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java
@@ -84,7 +84,6 @@
     * 新增或修改指标信息
     */
    @ApiOperation("新增或修改指标信息")
    @PreAuthorize("@ss.hasPermi('system:target:edit')")
    @Log(title = "指标选项库", businessType = BusinessType.UPDATE)
    @PostMapping("/saveOrupdateIvrLibaTarget")
    public AjaxResult saveOrupdateIvrLibaTarget(@RequestBody IvrLibaTargetVO ivrLibaTargetVO) {
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
                // 过滤请求
                .authorizeRequests()
                // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo","/socket","/API_ESB_Service","/API_ESB_Service/Run","/magic/web/**","/smartor/taskcall/phoneCallBack").permitAll()
                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo","/socket","/API_ESB_Service","/API_ESB_Service/Run","/magic/web/**","/smartor/tasksingle/phoneCallBack").permitAll()
                // 静态资源,可匿名访问
                .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
                // 除上面外的所有请求全部需要鉴权认证
smartor/src/main/java/com/smartor/domain/HeTaskSingle.java
@@ -331,4 +331,54 @@
    @Excel(name = "类型(1 宣教、2 医技)")
    @ApiModelProperty(value = "类型(1 宣教、2 医技)")
    private String type;
    /**
     * 发送日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " 发送日期 ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "发送日期")
    private Date senddate;
    /**
     * 上午开始发送时间限制
     */
    @Excel(name = " 上午开始发送时间限制 ")
    @ApiModelProperty(value = "上午开始发送时间限制")
    private String sendlimitabegin;
    /**
     * 上午结束发送时间限制
     */
    @Excel(name = " 上午结束发送时间限制 ")
    @ApiModelProperty(value = "上午结束发送时间限制")
    private String sendlimitaend;
    /**
     * 下午开始发送时间限制
     */
    @Excel(name = " 下午开始发送时间限制 ")
    @ApiModelProperty(value = "下午开始发送时间限制")
    private String sendlimitpbegin;
    /**
     * 下午结束发送时间限制
     */
    @Excel(name = " 下午结束发送时间限制 ")
    @ApiModelProperty(value = "下午结束发送时间限制")
    private String sendlimitpend;
    /**
     * 晚上开始发送时间限制
     */
    @Excel(name = " 晚上开始发送时间限制 ")
    @ApiModelProperty(value = "晚上开始发送时间限制")
    private String sendlimitnbegin;
    /**
     * 晚上结束发送时间限制
     */
    @Excel(name = " 晚上结束发送时间限制 ")
    @ApiModelProperty(value = "晚上结束发送时间限制")
    private String sendlimitnend;
}
smartor/src/main/java/com/smartor/domain/HeTaskSingleVO.java
@@ -18,7 +18,7 @@
 * @author ruoyi
 * @date 2024-04-16
 */
@ApiModel(value = "IvrTask", description = "宣教单一任务对象 ")
@ApiModel(value = "HeTaskSingleVO", description = "宣教单一任务对象 ")
@Data
public class HeTaskSingleVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -257,6 +257,56 @@
    private String type;
    /**
     * 发送日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " 发送日期 ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "发送日期")
    private Date senddate;
    /**
     * 上午开始发送时间限制
     */
    @Excel(name = " 上午开始发送时间限制 ")
    @ApiModelProperty(value = "上午开始发送时间限制")
    private String sendlimitabegin;
    /**
     * 上午结束发送时间限制
     */
    @Excel(name = " 上午结束发送时间限制 ")
    @ApiModelProperty(value = "上午结束发送时间限制")
    private String sendlimitaend;
    /**
     * 下午开始发送时间限制
     */
    @Excel(name = " 下午开始发送时间限制 ")
    @ApiModelProperty(value = "下午开始发送时间限制")
    private String sendlimitpbegin;
    /**
     * 下午结束发送时间限制
     */
    @Excel(name = " 下午结束发送时间限制 ")
    @ApiModelProperty(value = "下午结束发送时间限制")
    private String sendlimitpend;
    /**
     * 晚上开始发送时间限制
     */
    @Excel(name = " 晚上开始发送时间限制 ")
    @ApiModelProperty(value = "晚上开始发送时间限制")
    private String sendlimitnbegin;
    /**
     * 晚上结束发送时间限制
     */
    @Excel(name = " 晚上结束发送时间限制 ")
    @ApiModelProperty(value = "晚上结束发送时间限制")
    private String sendlimitnend;
    /**
     * 患者与单一任务关联表集合
     */
    @Excel(name = " 宣患者与单一任务关联表集合")
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -36,6 +36,13 @@
    private String name;
    /**
     * 疾病名称
     */
    @ApiModelProperty("疾病名称")
    @Excel(name = " 疾病名称 ")
    private String diagname;
    /**
     * 证件号码
     */
    @ApiModelProperty("证件号码")
@@ -49,6 +56,13 @@
    @ApiModelProperty("手机号码")
    @Excel(name = " 手机号码 ")
    private String telcode;
    /**
     * 手机号码
     */
    @ApiModelProperty("手机号码")
    @Excel(name = " 手机号码 ")
    private String leaveicd10code;
    /**
     * 标签ID
@@ -96,6 +110,12 @@
    private String visitno;
    /**
     *  院区名称
     */
    @ApiModelProperty(value = " 院区名称 ")
    private String hospitaldistrictname;
    /**
     * pageNum
     */
    @ApiModelProperty(value = "pageNum")
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -123,7 +123,8 @@
                patTaskRelevance.setAddr(ivrTaskcall1.getAddr());
                patTaskRelevance.setDiagname(ivrTaskcall1.getDiagname());
                patTaskRelevances.add(patTaskRelevance);
            } else if (ivrTaskcall1.getHospType().equals("2")) {
            }
            if (ivrTaskcall1.getHospType().equals("2")) {
                log.info("随访查询为出院,{}", ivrTaskcall1.getHospType());
                patTaskRelevance.setName(ivrTaskcall1.getSendname());
                patTaskRelevance.setAge(ivrTaskcall1.getAge());
smartor/src/main/resources/mapper/smartor/HeTaskSingleMapper.xml
@@ -53,6 +53,13 @@
        <result property="type" column="type"/>
        <result property="sendType" column="send_type"/>
        <result property="sendTimeSlot" column="send_time_slot"/>
        <result property="senddate" column="senddate"/>
        <result property="sendlimitabegin" column="sendlimitabegin"/>
        <result property="sendlimitaend" column="sendlimitaend"/>
        <result property="sendlimitpbegin" column="sendlimitpbegin"/>
        <result property="sendlimitpend" column="sendlimitpend"/>
        <result property="sendlimitnbegin" column="sendlimitnbegin"/>
        <result property="sendlimitnend" column="sendlimitnend"/>
    </resultMap>
    <sql id="selectHeTaskSingleVo">
@@ -103,6 +110,13 @@
               bedno,
               send_type,
               type,
               senddate,
               sendlimitabegin,
               sendlimitaend,
               sendlimitpbegin,
               sendlimitpend,
               sendlimitnbegin,
               sendlimitnend,
               send_time_slot
        from he_task_single
    </sql>
@@ -156,6 +170,13 @@
            <if test="sendType != null  and sendType != ''">and send_type = #{sendType}</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">and send_time_slot = #{sendTimeSlot}</if>
            <if test="type != null  and type != ''">and type = #{type}</if>
            <if test="senddate != null ">and senddate = #{senddate}</if>
            <if test="sendlimitabegin != null  and sendlimitabegin != ''">and sendlimitabegin = #{sendlimitabegin}</if>
            <if test="sendlimitaend != null  and sendlimitaend != ''">and sendlimitaend = #{sendlimitaend}</if>
            <if test="sendlimitpbegin != null  and sendlimitpbegin != ''">and sendlimitpbegin = #{sendlimitpbegin}</if>
            <if test="sendlimitpend != null  and sendlimitpend != ''">and sendlimitpend = #{sendlimitpend}</if>
            <if test="sendlimitnbegin != null  and sendlimitnbegin != ''">and sendlimitnbegin = #{sendlimitnbegin}</if>
            <if test="sendlimitnend != null  and sendlimitnend != ''">and sendlimitnend = #{sendlimitnend}</if>
        </where>
    </select>
@@ -215,6 +236,13 @@
            <if test="sendType != null">send_type,</if>
            <if test="sendTimeSlot != null">send_time_slot,</if>
            <if test="type != null">type,</if>
            <if test="senddate != null">senddate,</if>
            <if test="sendlimitabegin != null">sendlimitabegin,</if>
            <if test="sendlimitaend != null">sendlimitaend,</if>
            <if test="sendlimitpbegin != null">sendlimitpbegin,</if>
            <if test="sendlimitpend != null">sendlimitpend,</if>
            <if test="sendlimitnbegin != null">sendlimitnbegin,</if>
            <if test="sendlimitnend != null">sendlimitnend,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="svrtaskid != null">#{svrtaskid},</if>
@@ -264,6 +292,13 @@
            <if test="sendType != null">#{sendType},</if>
            <if test="sendTimeSlot != null">#{sendTimeSlot},</if>
            <if test="type != null">#{type},</if>
            <if test="senddate != null">#{senddate},</if>
            <if test="sendlimitabegin != null">#{sendlimitabegin},</if>
            <if test="sendlimitaend != null">#{sendlimitaend},</if>
            <if test="sendlimitpbegin != null">#{sendlimitpbegin},</if>
            <if test="sendlimitpend != null">#{sendlimitpend},</if>
            <if test="sendlimitnbegin != null">#{sendlimitnbegin},</if>
            <if test="sendlimitnend != null">#{sendlimitnend},</if>
        </trim>
    </insert>
@@ -317,6 +352,13 @@
            <if test="sendType != null">send_type = #{sendType},</if>
            <if test="sendTimeSlot != null">send_time_slot = #{sendTimeSlot},</if>
            <if test="type != null">type = #{type},</if>
            <if test="senddate != null">senddate = #{senddate},</if>
            <if test="sendlimitabegin != null">sendlimitabegin = #{sendlimitabegin},</if>
            <if test="sendlimitaend != null">sendlimitaend = #{sendlimitaend},</if>
            <if test="sendlimitpbegin != null">sendlimitpbegin = #{sendlimitpbegin},</if>
            <if test="sendlimitpend != null">sendlimitpend = #{sendlimitpend},</if>
            <if test="sendlimitnbegin != null">sendlimitnbegin = #{sendlimitnbegin},</if>
            <if test="sendlimitnend != null">sendlimitnend = #{sendlimitnend},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -269,8 +269,8 @@
            resultMap="PatArchiveResult">
        select
        c.tagname as tag,
        b.tagid as tagid,
        -- c.tagname as tag,
        -- b.tagid as tagid,
        a.patid,
        a.name,
        d.deptname,
@@ -298,22 +298,30 @@
        a.isupload,
        a.upload_time,
        a.pattype,
        d.bedno
        from pat_archive a,pat_archivetag b ,base_tag c,pat_med_inhosp d
        d.bed_no
        -- from pat_archive a,pat_archivetag b ,base_tag c,pat_med_inhosp d
        from pat_archive a,pat_med_inhosp d
        <where>
            a.patid = b.patid and b.tagid = c.tagid and a.patid = d.patid
            -- a.patid = b.patid and b.tagid = c.tagid and a.patid = d.patid
            a.patid = d.patid
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="pid != null  and pid != ''">and a.patid = #{pid}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <if test="tagIds != null  and tagIds != ''">and c.tagid in
                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
                    #{tagId}
                </foreach>
            </if>
            <!--            <if test="tagIds != null  and tagIds != ''">and c.tagid in-->
            <!--                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">-->
            <!--                    #{tagId}-->
            <!--                </foreach>-->
            <!--            </if>-->
            <if test="hospitalname != null and hospitalname != ''">
                AND d.hospitalname = #{hospitalname}
            </if>
            <if test="hospitaldistrictname != null and hospitaldistrictname != ''">
                AND d.hospitaldistrictname LIKE concat('%',#{hospitaldistrictname}, '%')
            </if>
            <if test="leaveicd10code != null and leaveicd10code != ''">
                AND d.leaveicd10code LIKE concat('%',#{leaveicd10code}, '%')
            </if>
            <if test="endtime != null">
                AND d.endtime = #{endtime}
@@ -327,10 +335,16 @@
            <if test="drname != null and drname != ''">
                AND d.drname LIKE concat('%',#{drname}, '%')
            </if>
            <if test="diagname != null and diagname != ''">
                AND d.diagname LIKE concat('%',#{diagname}, '%')
            </if>
            <if test="deptname != null and deptname != ''">
                AND d.deptname LIKE concat('%',#{deptname}, '%')
            </if>
            AND d.del_flag != 1
            AND b.del_flag != 1
            AND c.del_flag != 1
            -- AND b.del_flag != 1
            -- AND c.del_flag != 1
            AND a.del_flag != 1
        </where>
    </select>
@@ -339,8 +353,8 @@
            resultMap="PatArchiveResult">
        select
        c.tagname as tag,
        b.tagid as tagid,
        -- c.tagname as tag,
        -- b.tagid as tagid,
        a.patid,
        d.deptname,
        a.name,
@@ -368,19 +382,25 @@
        a.isupload,
        a.upload_time,
        a.pattype
        from pat_archive a,pat_archivetag b ,base_tag c, pat_med_outhosp d
        -- from pat_archive a,pat_archivetag b ,base_tag c, pat_med_outhosp d
        from pat_archive a, pat_med_outhosp d
        <where>
            a.patid = b.patid and b.tagid = c.tagid and a.patid = d.patid
            a.patid = d.patid
            <if test="pid != null  and pid != ''">and a.patid = #{pid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <if test="tagIds != null  and tagIds != ''">and c.tagid in
                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
                    #{tagId}
                </foreach>
            <!--            <if test="tagIds != null  and tagIds != ''">and c.tagid in-->
            <!--                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">-->
            <!--                    #{tagId}-->
            <!--                </foreach>-->
            <!--            </if>-->
            <if test="hospitaldistrictname != null and hospitaldistrictname != ''">
                AND d.hospitaldistrictname LIKE concat('%',#{hospitaldistrictname}, '%')
            </if>
            <if test="diagname != null and diagname != ''">
                AND d.diagname LIKE concat('%',#{diagname}, '%')
            </if>
            <if test="hospitalname != null and hospitalname != ''">
                AND d.hospitalname = #{hospitalname}
            </if>
@@ -395,8 +415,8 @@
            </if>
            AND d.del_flag != 1
            AND b.del_flag != 1
            AND c.del_flag != 1
            -- AND b.del_flag != 1
            -- AND c.del_flag != 1
            AND a.del_flag != 1
        </where>
    </select>
@@ -405,8 +425,8 @@
            resultMap="PatArchiveResult">
        select
        c.tagname as tag,
        b.tagid as tagid,
        -- c.tagname as tag,
        -- b.tagid as tagid,
        a.patid as id,
        a.name,
        a.sex,
@@ -434,19 +454,25 @@
        a.isupload,
        a.upload_time,
        a.pattype
        from pat_archive a,pat_archivetag b ,base_tag c, pat_med_physical d
        -- from pat_archive a,pat_archivetag b ,base_tag c, pat_med_physical d
        from pat_archive a, pat_med_physical d
        <where>
            a.patid = b.patid and b.tagid = c.tagid and a.patid = d.patid
            a.patid = d.patid
            <if test="pid != null  and pid != ''">and a.patid = #{pid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <if test="tagIds != null  and tagIds != ''">and c.tagid in
                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
                    #{tagId}
                </foreach>
<!--            <if test="tagIds != null  and tagIds != ''">and c.tagid in-->
<!--                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">-->
<!--                    #{tagId}-->
<!--                </foreach>-->
<!--            </if>-->
            <if test="hospitaldistrictname != null and hospitaldistrictname != ''">
                AND d.hospitaldistrictname LIKE concat('%',#{hospitaldistrictname}, '%')
            </if>
            <if test="diagname != null and diagname != ''">
                AND d.diagname LIKE concat('%',#{diagname}, '%')
            </if>
            <if test="hospitalname != null and hospitalname != ''">
                AND d.hospitalname = #{hospitalname}
            </if>
@@ -462,8 +488,8 @@
            </if>
            AND d.del_flag != 1
            AND b.del_flag != 1
            AND c.del_flag != 1
--             AND b.del_flag != 1
--             AND c.del_flag != 1
            AND a.del_flag != 1
        </where>