yxh
7 天以前 68ff33beff11310e830b0615b5a81f83fad0f683
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 cn.lihu.jh.module.ecg.dal.dataobject.queuesequence;
 
import lombok.Data;
 
/**
 * 签到序号计数器(对应 {@code seq_counter} 表)。
 *
 * <p>仅用于「排队序号规则 = 签到序号」时读取两个计数器:
 * <ul>
 *   <li>{@code normalNext} —— 下一个**普通号**(1..9、11..19…,跳过 10 的倍数);</li>
 *   <li>{@code reservedNext} —— 下一个**预留号**(10、20、30…,留给加急患者)。</li>
 * </ul>
 *
 * <p>之所以分成两个计数器:单个计数器在"跳过预留号"时必然与后续号撞车
 * (candidate=10 跳过得 11,下一个 candidate=11 也得 11)。详见
 * {@code QueueSequenceMapper} 中的踩坑记录。
 *
 * <p>该表按 {@code (check_type, seq_date)} 唯一,故**每天自动重置**
 * (第一次取号时以 {@code normal_next=1, reserved_next=10} 插入)。
 *
 * @author 心电排队装机系统
 */
@Data
public class SeqCounterDO {
 
    private Integer id;
 
    /** 检查类型值(check_type.value) */
    private Integer checkType;
 
    /** 日期(按天重置) */
    private java.time.LocalDate seqDate;
 
    /** 下一个普通号 */
    private Integer normalNext;
 
    /** 下一个预留号(加急用) */
    private Integer reservedNext;
 
}