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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package cn.lihu.jh.module.ecg.controller.admin.room.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.util.List;
 
/**
 * 「选择工位模式」- 按本机IP匹配工位的返回结果。
 *
 * <p>用于医生端登录后自动匹配工位:
 * <ul>
 *   <li>{@code clientIp}:后端实际识别到的来访IP(排查"代理未透传 X-Forwarded-For"时看这个)</li>
 *   <li>{@code ipValid}:该IP是否可用于绑定(排除空、0.0.0.0、127.0.0.1、非法格式)</li>
 *   <li>{@code matched}:是否有可直接自动入座的工位</li>
 *   <li>{@code beds}:该IP下匹配到的候选工位,已按「本人已占用 → 空闲 → 被他人占用」排好序</li>
 * </ul>
 */
@Data
@Schema(description = "管理后台 - 按IP匹配工位 Response VO")
public class RoomSelectBedRespVO {
 
    @Schema(description = "后端识别到的来访IP")
    private String clientIp;
 
    @Schema(description = "该IP是否可用于绑定(空/0.0.0.0/127.0.0.1/::1/非法格式为 false)")
    private Boolean ipValid;
 
    @Schema(description = "该IP是否是本机回环地址(127.x / ::1),用于给出「本机访问」的准确提示")
    private Boolean ipLoopback;
 
    @Schema(description = "该IP是否是 IPv6 地址(本系统工位绑定仅采用 IPv4,IPv6 不参与匹配与绑定)")
    private Boolean ipv6;
 
    @Schema(description = "该IP是否已经绑定了工位")
    private Boolean ipBound;
 
    @Schema(description = "是否有可直接入座的工位(本人已占用 或 空闲)")
    private Boolean matched;
 
    @Schema(description = "候选工位列表(按 本人已占用 → 空闲 → 被他人占用 排序)")
    private List<RoomSelectBedItem> beds;
 
    @Data
    @Schema(description = "候选工位")
    public static class RoomSelectBedItem {
 
        @Schema(description = "工位主键 clinic_room.id")
        private Integer id;
 
        @Schema(description = "诊室编号")
        private Long roomId;
 
        @Schema(description = "诊室名称")
        private String roomName;
 
        @Schema(description = "诊疗床/工位编号")
        private String bedNo;
 
        @Schema(description = "该工位绑定的IP")
        private String ip;
 
        @Schema(description = "当前占用的医生ID,空表示空闲")
        private Long docId;
 
        @Schema(description = "当前占用的医生姓名")
        private String docName;
 
        @Schema(description = "操作类型 0检查 1领用 2装机")
        private Integer opType;
 
        @Schema(description = "工位接诊的检查类型")
        private Integer[] checkTypes;
 
        @Schema(description = "开诊状态")
        private Integer status;
 
        @Schema(description = "是否已被占用(docId 非空)")
        private Boolean occupied;
 
        @Schema(description = "是否被「当前登录人」占用(刷新/重进时可直接恢复)")
        private Boolean mine;
    }
}