已修改4个文件
47 ■■■■ 文件已修改
ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -626,7 +626,9 @@
        b.patname,
        b.out_way_id,
        b.out_way_name,
        b.inhospstate,
        (CASE WHEN b.inhospstate = '1' THEN '1'
            WHEN b.inhospstate = '3' THEN '1'
            ELSE b.inhospstate END) AS inhospstate,
        b.patno,
        b.inhospno,
        b.serialnum,
@@ -655,7 +657,6 @@
        b.leavehospitaldistrictid,
        b.deptid,
        b.leaveldeptid
        FROM
        healthy_inhosp b
        where 1=1
@@ -885,16 +886,16 @@
        o.opdesc,
        o.oplevelcode ,
        o.opleveldesc
        from PAT_MED_OPERATION o
        from HEALTHY_PAT_MED_OPERATION o
        where 1=1
        <if test="orgid != null and orgid != ''">
            AND o.orgid = #{orgid}
        </if>
        <if test="lastStartTime != null and lastStartTime != ''">
            and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
            and to_char(o.opreqtime, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
        </if>
        <if test="lastEndTime != null and lastEndTime != ''">
            and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
            and to_char(o.opreqtime, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
        </if>
    </select>
@@ -924,19 +925,13 @@
               oi.pid,
               oi.opercheck_flag,
               oi.long_task_reason
        from PAT_MED_OPERATION_ITEM oi
        from HEALTHY_PAT_MED_OPERATION_ITEM oi
        where 1=1
        <if test="orgid != null and orgid != ''">
            AND oi.orgid = #{orgid}
        </if>
        <if test="opid != null and opid != ''">
            AND oi.opid = #{opid}
        </if>
        <if test="lastStartTime != null and lastStartTime != ''">
            and to_char(oi.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
        </if>
        <if test="lastEndTime != null and lastEndTime != ''">
            and to_char(oi.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
        </if>
    </select>
</mapper>
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -168,13 +168,13 @@
     *
     * @param serviceSubtaskVO 查询条件
     * @return Map<String, Object> 包含各状态统计数据
     * wzx: 未执行数量
     * ysf: 已随访数量
     * fssb: 发送失败数量
     * yfs: 已发送数量
     * dsf: 待随访数量
     * blq: 不理睬数量
     * yc: 异常数量
     * total: 患者服务总量
     * wxsf: 无需随访数量 sendstate != 4
     * xsf: 需随访数量 sendstate = 4
     * dsf: 待随访数量 sendstate = 1L, 2L, 3L, 5L, 7L
     * ywc: 已完成数量 sendstate = 6L
     * yc: 异常数量 excep = '1'
     * yc: 警告数量 excep = '2'
     */
    public Map<String, Object> countByCondition(ServiceSubtaskEntity serviceSubtaskVO);
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -467,13 +467,16 @@
            // MyBatis 的 SUM 在没有匹配行时会返回 null
            result.putIfAbsent("wzx", 0);
            result.putIfAbsent("ysf", 0);
            result.putIfAbsent("yc", 0);
            result.putIfAbsent("jg", 0);
            result.putIfAbsent("fssb", 0);
            result.putIfAbsent("yfs", 0);
            result.putIfAbsent("blq", 0);
            result.putIfAbsent("dsf", 0);
            result.putIfAbsent("total", 0);
            result.putIfAbsent("wxsf", 0);
            result.putIfAbsent("xsf", 0);
            result.putIfAbsent("dsf", 0);
            result.putIfAbsent("ywc", 0);
            result.putIfAbsent("yc", 0);
            result.putIfAbsent("jg", 0);
        }
        return result;
    }
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -2430,8 +2430,11 @@
        SUM(CASE WHEN sendstate != 4 AND sendstate != 2 THEN 1 ELSE 0 END) AS ysf,
        SUM(CASE WHEN sendstate = 5 THEN 1 ELSE 0 END) AS fssb,
        SUM(CASE WHEN sendstate >= 3 OR sendstate = 1 THEN 1 ELSE 0 END) AS yfs,
        SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf,
        SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq,
        SUM(CASE WHEN sendstate != 4 THEN 1 ELSE 0 END) AS wxsf,
        SUM(CASE WHEN sendstate = 4 THEN 1 ELSE 0 END) AS xsf,
        SUM(CASE WHEN (sendstate = 1 OR sendstate = 2 OR sendstate = 3 OR sendstate = 5 OR sendstate = 7 ) THEN 1 ELSE 0 END) AS dsf,
        SUM(CASE WHEN sendstate = 6 THEN 1 ELSE 0 END) AS ywc,
        SUM(CASE WHEN excep IS NOT NULL AND excep = '1' THEN 1 ELSE 0 END) AS yc,
        SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg,
        COUNT(1) as total