yxh
昨天 fce96ef468291fb9a0e6a4d34ab371315e9485d4
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
package cn.lihu.jh.module.ecg.controller.admin.appointment.vo;
 
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
 
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
 
/**
 * 管理后台 - 预约新增/修改 Request VO
 *
 * <h3>⚠️ 关于 {@code registerDate} / {@code doctorTime} 的类型(2026-09-30 修正)</h3>
 * 这两个字段原先声明为 {@code java.sql.Date}(经 {@code import java.sql.Date;}
 * 通配到本类的 {@code Date}),而对应的 {@code AppointmentDO} 是 {@code java.util.Date}。
 *
 * <p>{@code java.sql.Date} 是**只表示日期**的 JDBC 类型。实测(写入 datetime 列):
 * <pre>
 *   setObject(java.util.Date)  → 2026-09-26 16:58:53   保留时分秒
 *   setObject(java.sql.Date)   → 2026-09-26 00:00:00   时间被丢弃
 * </pre>
 * 这正是 {@code appointment.register_date} 出现 {@code yyyy-MM-dd 00:00:00}
 * 的成因类型 —— 凡是从本 VO 取值落库的路径都会把时间截断。
 *
 * <p>现统一为 {@code java.util.Date},与 DO 及各写入路径({@code new Date()})保持一致。
 */
@Schema(description = "管理后台 - 预约新增/修改 Request VO")
@Data
public class AppointmentSaveReqVO {
 
    private Long id;
 
    @Schema(description = "预约申请号", example = "2024435")
    private String applyNo;
 
    @Schema(description = "就诊流水号", example = "2024546")
    //@NotEmpty(message = "就诊流水号")
    private String episodeId;
 
    /**
     * 患者来源类型  01问诊 02急诊 03体检 04住院
     */
    private Integer patSrc;
 
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29034")
    @NotEmpty(message = "患者编号不能为空")
    private String patId;
 
    @Schema(description = "患者姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "患者姓名不能为空")
    private String patName;
 
    @Schema(description = "患者性别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "患者性别不能为空")
    private Byte patGender;
 
    @Schema(description = "患者生日")
    private LocalDateTime patBirthday;
 
    @Schema(description = "患者手机")
    private String patMobile;
 
    @Schema(description = "患者电话")
    private String patPhone;
 
    @Schema(description = "身份证号", example = "798")
    private String patIdentityId;
 
    @Schema(description = "患者地址")
    private String patAddr;
 
    @Schema(description = "患者所在科室代码")
    private String patDeptCode;
 
    @Schema(description = "患者所在科室名称")
    private String patDeptDesc;
 
    @Schema(description = "患者所在病区代码")
    private String patWardCode;
 
    @Schema(description = "患者所在病区名称")
    private String patWardDesc;
 
    @Schema(description = "床号")
    private String patBedNo;
 
    @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "预约日期不能为空")
    private LocalDateTime bookDate;
 
    @Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "预约时间段不能为空")
    private Integer bookTimeslot;
 
    @Schema(description = "预约发生时间", requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotNull(message = "预约发生时间不能为空")
    private LocalDateTime bookTime;
 
    @Schema(description = "预约检查类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "预约检查类型不能为空")
    private Integer bookCheckType;
 
    @Schema(description = "已付款")
    private Integer paid;
 
    //    @TableField(exist = false)
    private String status;
 
    /**
     * 耐药性: 是否多耐1代表是,0代表不是
     */
    private String tolerance;
 
    /**
     * 住院号
     */
    private String hospitalNo;
 
    /**
     * 医保卡号
     */
    private String medicalCard;
 
    /**
     * 门诊号
     */
    private String outpatientNo;
 
    /**
     * 登记时间
     */
    private Date registerDate;
 
    /**
     * 开单医生
     */
    private String doctor;
 
    /**
     * 开单医生编码
     */
    private String doctorCode;
 
    /**
     * 开单时间
     */
    private Date doctorTime;
 
    // ==================== HIS 接入补充字段(2026-09-27 随表新增列一起加入) ====================
 
    /**
     * 预约排序号(HIS 报文 patient.id.item[4])
     */
    private Integer bookSeqNum;
 
    /**
     * 优先级 / 加急标记:N=常规,J=加急(HIS 报文 zdy.jjbz)
     */
    private String jjbz;
 
    /**
     * 检查方式编码(HIS 报文 methodCode.item[].code)
     */
    private String methodCode;
 
    /**
     * 检查部位编码(HIS 报文 targetSiteCode.item.code)
     */
    private String targetSiteCode;
 
    /**
     * 医嘱号(HIS 报文 observationRequest.id.item[root=2.16.156.10011.1.28].extension)。
     * 与「申请单号 applyNo」不同。
     */
    private String doctorAdviceNo;
 
    /**
     * 检查房间名称(HIS 报文 ZDY.roomname)
     */
    private String roomName;
 
    /**
     * 注意事项(HIS 报文 ZDY.remark)
     */
    private String remark;
}