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 "其他"; } }