liusheng
8 天以前 34f78281cf395a24e1f3f1c3b861186ff8a03b7b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.ruoyi.publicity.service;
 
/**
 * 宣教业务服务:决定"要不要发、发什么"。
 *
 * <p>本接口只有两个方法,对应原 {@code PatMedInhospServiceImpl#dealOutHospInfo} 里的两段:
 * <ol>
 *   <li>{@link #dealInHospPublicity(String)} —— 原 L331-409(入院宣教:科室 type=4 / 病区 type=5);</li>
 *   <li>{@link #dealMedicalPublicity(String)} —— 原 L411-444(药品宣教,仅 sltd 站点,type=0)。</li>
 * </ol>
 *
 * <p><b>边界</b>:本接口<b>不建子任务</b>。它只负责"扫患者 + 匹配任务",
 * 建子任务整个回调 {@code ruoyi-inhospvisit}
 * (走 {@code com.ruoyi.common.core.service.PublicitySubtaskApi#generatePublicitySubtask}),
 * 以保证 {@code boxedServiceSubtask} 的 type=0/4/5 分支全仓只有一份实现。
 *
 * @see com.ruoyi.publicity.api.PublicityFacade 对外门面
 */
public interface PublicityService {
 
    /**
     * 入院宣教:科室维度(type=4)+ 病区维度(type=5)。
     * <p>
     * 受 {@code sys_config: in.helibrary.switch == "2"} 控制,不是 "2" 时整块不执行。
     *
     * @param config {@code sys_config: visit.early.day},透传给 inhospvisit(可能为 null)
     * @return 处理的记录数(仅用于日志)
     */
    int dealInHospPublicity(String config);
 
    /**
     * 药品宣教:按患者的 {@code medicalCode} 逐个药品编码匹配长期宣教任务(type=0)。
     * <p>
     * 仅 {@code spring.profiles.active == "sltd"} 时执行,其它站点直接返回 0。
     *
     * @param config {@code sys_config: visit.early.day},透传给 inhospvisit(可能为 null)
     * @return 命中并处理的药品数
     */
    int dealMedicalPublicity(String config);
}