jiazx0107@163.com
2023-11-06 69cd9f59a0fabf12f8c9147fcba7f69817a870b3
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
package com.ld.igds.models;
 
import com.alibaba.fastjson.annotation.JSONField;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
 
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
 
/**
 * 仓内视频图像数据表
 */
@Data
@Entity
@Table(name = "D_SEC_SNAP_DEPOT")
public class SecSnapDepot {
 
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "主键")
    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 = "所属仓库")
    private String depotId;
 
    @Column(name = "CAMERA_ID_", length = 50)
    @PropertyDef(label = "关联摄像头")
    private String cameraId;
 
    @Column(name = "RESULT_", length = 30)
    @PropertyDef(label = "抓拍结果")
    private String result = "SUCCESS";
 
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "抓拍时间")
    private Date updateTime;
 
    @Column(name = "FILE_SUFFIX_", length = 4)
    @PropertyDef(label = "图像文件后缀名")
    private String fileSuffix = "jpg";
 
    @Column(name = "FILE_NAME_", length = 100)
    @PropertyDef(label = "文件名称")
    private String fileName;
 
    @Column(name = "PRESET_ ", length = 4)
    @PropertyDef(label = "预置位编号")
    private String preset;
 
    public SecSnapDepot() {
    }
 
    public SecSnapDepot(String id, String companyId, String deptId, String depotId, String cameraId, String result, Date updateTime, String fileSuffix, String fileName, String preset) {
        this.id = id;
        this.companyId = companyId;
        this.deptId = deptId;
        this.depotId = depotId;
        this.cameraId = cameraId;
        this.result = result;
        this.updateTime = updateTime;
        this.fileSuffix = fileSuffix;
        this.fileName = fileName;
        this.preset = preset;
    }
 
    public SecSnapDepot(String tag) {
        if ("TEST".equals(tag)) {
            this.id = "TEST";
            this.fileName = "./static/images/img-fail.jpg";
            this.updateTime = new Date();
        }
    }
}