陈昶聿
6 天以前 2aff5798398322131164cee0ea0ab53e38494110
fix: 任务组及时率不再叠加 send_day

任务组及时率基准改为 schedule_benchmark 解析时间 + day_offset + 补偿天数 + 1 天;非任务组口径保持不变。
已修改2个文件
6 ■■■■■ 文件已修改
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -115,7 +115,7 @@
     * 非任务组(appltype != 5):endtime + send_day(缺省1) + Σ补偿天数 + 1 天;
     * 任务组(appltype = 5):按 schedule_benchmark 解析基准时间
     * (1-入院 2-出院 3-就诊 4-入组 0/其它-自定义时间) + day_offset
     * + send_day(缺省1) + Σ补偿天数 + 1 天。
     * + Σ补偿天数 + 1 天(不叠加 send_day)。
     * 补偿天数取自 service_subtask_preachform.compensate_time 按子任务求和,
     * 用子任务快照而非 service_task.preachform_desc,保证历史数据不随任务改配置而变动。
     * rateDay 参数不再参与该口径。
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -858,7 +858,7 @@
             1) 非任务组(appltype != 5):endtime + send_day(缺省1) + Σ补偿天数 + 1 天;
             2) 任务组(appltype = 5):按 schedule_benchmark 解析基准时间
                (1-入院时间 2-出院时间 3-就诊时间 4-入组时间 0/其它-自定义时间)
                + day_offset + send_day(缺省1) + Σ补偿天数 + 1 天;
                + day_offset + Σ补偿天数 + 1 天(不再叠加 send_day);
             完成时间 finishtime <= 基准时间计为及时,分母仍为应随访数。
             补偿天数只取 service_subtask_preachform.compensate_time 的汇总值一次,
             避免与补偿明细相加造成重复补偿或一对多放大分母。 -->
@@ -875,7 +875,6 @@
             AND std.day_offset IS NOT NULL
             AND ss.finishtime &lt;= DATE_ADD(
                   DATE_ADD(
                     DATE_ADD(
                       CASE sts.schedule_benchmark
                         WHEN 1 THEN ss.starttime
                         WHEN 2 THEN ss.endtime
@@ -883,7 +882,6 @@
                         WHEN 4 THEN ss.create_time
                         ELSE sts.schedule_benchmark_custom_time
                       END, INTERVAL std.day_offset DAY),
                     INTERVAL COALESCE(st.send_day, 1) DAY),
                   INTERVAL (COALESCE(cp.compensate_days, 0) + 1) DAY)
            THEN 1
            ELSE 0