yxh
昨天 fce96ef468291fb9a0e6a4d34ab371315e9485d4
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceService.java
@@ -48,6 +48,12 @@
    QueueSequenceDO getQueueSequence(Integer id);
    /**
     * 获得指定检查类型的时间段情况
     *
     */
    List<QueueSequenceDO> selectGivenCheckTypeTimeslot(Integer checkType);
    /**
     * 获得当天序号分页
     *
     * @param pageReqVO 分页查询
@@ -59,4 +65,26 @@
    Integer distributeSeqNo(Integer checkType, Integer timeslot);
    Integer distributeVipSeqNo(Integer checkType, Integer timeslot);
    /**
     * 按【检查类型配置的规则】分配排队序号(签到时调用)。
     *
     * <p>规则来自 {@code check_type.seq_rule},取值见
     * {@link cn.lihu.jh.module.ecg.enums.SeqRuleEnum}:
     * <ul>
     *   <li>{@code 0=预约号}   —— 直接用预约系统已下发的号({@code existingSeqNo}),不再分配;</li>
     *   <li>{@code 1=签到序号} —— 当天同检查类型内连续递增,每 9 个号预留 1 个给加急;</li>
     *   <li>{@code 2=时段号}   —— 按预约时段从号池取号(改造前的原有行为,也是未配置时的默认)。</li>
     * </ul>
     *
     * @param checkType     检查类型值({@code check_type.value})
     * @param timeslot      HIS 下发的预约时段(仅规则 2 使用)
     * @param existingSeqNo 预约系统已下发的号(仅规则 0 使用;为 null 时回退到签到序号规则)
     * @param urgent        是否加急({@code jjbz=J})—— 仅规则 1 使用:加急可占用预留号
     * @return 分配给该患者的排队序号(从 1 开始)
     */
    Integer distributeSeqNoByRule(Integer checkType, Integer timeslot,
                                 Integer existingSeqNo, boolean urgent);
    void initNumber();
}