czt
2025-06-09 13b6ad41f0b057f8405f7976a990e9057547443a
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
package com.fzzy.igds.dzhwk.domain;
 
import com.bstek.dorado.annotation.PropertyDef;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
import org.apache.commons.lang3.time.DateFormatUtils;
 
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
 
/**
 * @Description 门禁记录
 * @Author CZT
 * @Date 2025/6/06 09:23
 */
@Data
@Entity
@Table(name = "H_DOOR_RECORD")
public class DoorRecord implements Serializable {
 
    /**
     *
     */
    private static final long serialVersionUID = 1L;
 
    public static String SORT_PROP = "id";
 
    @Id
    @Column(name = "ID_")
    private String id;
 
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
 
    @Column(name = "DEPT_ID_", length = 30)
    @PropertyDef(label = "所属分库")
    private String deptId;
 
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "所属仓库", description = "仓库编号")
    private String depotId;
 
    @Column(name = "DOOR_ID_", length = 50)
    @PropertyDef(label = "门禁设备ID")
    private String doorId;
 
    @Column(name = "USER_NAME_", length = 30)
    @PropertyDef(label = "开门人")
    private String userName;
 
    @Column(name = "DOOR_TYPE_", length = 10)
    @PropertyDef(label = "开门方式", description = "01-刷卡,02-指纹识别,03-人脸识别,04-密码输入,05-远程授权,09-其他")
    private String doorType;
 
    @Column(name = "TIME_")
    @PropertyDef(label = "开门时间")
    private Date time;
 
    @Column(name = "INFO_", length = 100)
    @PropertyDef(label = "开门说明")
    private String info;
 
    @Column(name = "IS_NORMAL", length = 10)
    @PropertyDef(label = "是否正常开门", description = "01-正常,02-警告")
    private String isNormal;
 
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "更新时间")
    private Date updateTime;
 
    @Transient
    private String doorTypeName;
 
    @Transient
    private String timeStr;
 
    public String getTimeStr() {
        if(null == this.time){
            return "";
        }
        return DateFormatUtils.format(this.time, "MM/dd HH:mm");
    }
 
    public String getDoorTypeName() {
        if(StringUtils.isEmpty(doorType)){
            return "其他";
        }
        if("01".equals(doorType)){
            return "刷卡";
        }
        if("02".equals(doorType)){
            return "指纹识别";
        }
        if("03".equals(doorType)){
            return "人脸识别";
        }
        if("04".equals(doorType)){
            return "密码输入";
        }
        if("05".equals(doorType)){
            return "远程授权";
        }
        return "其他";
    }
}