f5412313edae1ffae3d5471e5eca8dde4695f0d2..ad53e4af4e4e238453d7613530b501540df915e1
2025-11-10 liusheng
长期任务,BUG处理
ad53e4 对比 | 目录
2025-11-10 liusheng
添加ishide
187293 对比 | 目录
2025-11-10 liusheng
代码提交
f89e03 对比 | 目录
已修改5个文件
33 ■■■■■ 文件已修改
ruoyi-admin/src/main/resources/application-druid.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml
@@ -34,7 +34,7 @@
        #        password: Hxerp2000
        #        driverClassName: com.mysql.cj.jdbc.Driver
        #  公司本地
        url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_xinhua?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: smartor
        password: Smartor.2023
        driverClassName: com.mysql.cj.jdbc.Driver
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
@@ -40,6 +40,12 @@
    private Long taskid;
    /**
     * 是否隐藏:0不隐藏    1隐藏
     */
    @ApiModelProperty(value = "是否隐藏:0不隐藏    1隐藏")
    private Long ishide;
    /**
     * 模板话术编号
     */
    @ApiModelProperty(value = "模板话术编号")
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -67,7 +67,7 @@
    }
    @Override
    public  List<PatMedInhosp> selectPatMedInhosp(PatMedInhosp patMedInhosp) {
    public List<PatMedInhosp> selectPatMedInhosp(PatMedInhosp patMedInhosp) {
        return patMedInhospMapper.selectPatMedInhosp(patMedInhosp);
    }
@@ -266,7 +266,7 @@
        }
        //根据患者所在病区,获取该病区的长期任务,新华医院可以先不用根据病区和疾病来做
        if (active.equals("xh")) {
        if (!active.equals("xh")) {
            PatMedInhosp pmbq = new PatMedInhosp();
            //获取需要出院部门随访,未处理的数据
            pmbq.setWardcheckFlag("0");
@@ -645,6 +645,7 @@
                serviceSubtask.setCreateBy(serviceTask.getCreateBy());
                serviceSubtask.setCreateTime(new Date());
                i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
                addServiceSubtaskPreachform(serviceSubtask, null);
            }
        } else {
            if (StringUtils.isEmpty(serviceSubtask.getPhone())) {
@@ -680,13 +681,15 @@
    }
    private Integer addServiceSubtaskPreachform(ServiceSubtask serviceSubtask, String sendstate) {
        //将preachform的json对象,放到list集合中
        String preachform = serviceSubtask.getPreachform();
        //将preachformDesc的json对象,放到list集合中
        ServiceTask serviceTask = serviceTaskMapper.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
        String preachformDesc = serviceTask.getPreachformDesc();
        ObjectMapper objectMapper = new ObjectMapper();
        if (org.apache.commons.lang3.StringUtils.isNotEmpty(preachform)) {
        if (org.apache.commons.lang3.StringUtils.isNotEmpty(preachformDesc)) {
            List<ServiceSubtaskPreachform> serviceSubtaskPreachformList = null;
            try {
                serviceSubtaskPreachformList = objectMapper.readValue(preachform, new TypeReference<List<ServiceSubtaskPreachform>>() {
                serviceSubtaskPreachformList = objectMapper.readValue(preachformDesc, new TypeReference<List<ServiceSubtaskPreachform>>() {
                });
            } catch (JsonProcessingException e) {
                log.error("preachform转List<ServiceSubtaskPreachform>报错了:{}", e.getMessage());
@@ -699,8 +702,7 @@
                if (StringUtils.isNotEmpty(sendstate)) serviceSubtaskPreachform.setSendstate(sendstate);
                serviceSubtaskPreachform.setOrgid(serviceSubtask.getOrgid());
                return serviceSubtaskPreachformMapper.insertServiceSubtaskPreachform(serviceSubtaskPreachform);
                serviceSubtaskPreachformMapper.insertServiceSubtaskPreachform(serviceSubtaskPreachform);
            }
        }
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -1399,7 +1399,6 @@
        SUM(pmiCount) AS pmiCount,
        SUM(pmoCount) AS pmoCount
        FROM (
        -- 随访数据
        SELECT
        <choose>
            <when test="timeType == 'day'">
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -7,6 +7,7 @@
    <resultMap type="com.smartor.domain.SvyTaskTemplateScript" id="SvyTaskTemplateScriptResult">
        <result property="id" column="id"/>
        <result property="taskid" column="taskid"/>
        <result property="ishide" column="ishide"/>
        <result property="scriptno" column="scriptno"/>
        <result property="templateID" column="templateID"/>
        <result property="scriptid" column="scriptid"/>
@@ -49,6 +50,7 @@
    <sql id="selectSvyTaskTemplateScriptVo">
        select id,
               sort,
               ishide,
               prompt,
               group_name,
               branch_flag,
@@ -70,6 +72,7 @@
        <include refid="selectSvyTaskTemplateScriptVo"/>
        <where>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="ishide != null ">and ishide = #{ishide}</if>
            <if test="scriptno != null ">and scriptno = #{scriptno}</if>
            <if test="templateID != null ">and templateID = #{templateID}</if>
            <if test="scriptid != null ">and scriptid = #{scriptid}</if>
@@ -153,6 +156,7 @@
            <if test="score != null ">score,</if>
            <if test="prompt != null ">prompt,</if>
            <if test="groupName != null ">group_name,</if>
            <if test="ishide != null ">ishide,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
@@ -192,6 +196,7 @@
            <if test="score != null ">#{score},</if>
            <if test="prompt != null ">#{prompt},</if>
            <if test="groupName != null ">#{groupName},</if>
            <if test="ishide != null ">#{ishide},</if>
        </trim>
    </insert>
@@ -237,6 +242,7 @@
            <if test="score != null">score = #{score},</if>
            <if test="prompt != null">prompt = #{prompt},</if>
            <if test="groupName != null ">group_name = #{groupName},</if>
            <if test="ishide != null ">ishide = #{ishide},</if>
        </trim>
        where id = #{d}
    </update>