zxl
2026-03-25 d1dfb6e35f38e27fd960dc3ad0130c8d0f5c39bb
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
package com.tievd.jyz.entity;
 
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
 
import java.io.Serializable;
import java.sql.Time;
import java.util.Date;
 
/**
 * <p>
 * 巡查配置表
 * </p>
 *
 * @author
 * @since 2023-08-15
 */
@Data
@Accessors(chain = true)
@TableName("t_patrol_config")
@Schema(name = "PatrolConfig", description = "巡查配置表")
public class PatrolConfig extends Model<PatrolConfig> {
 
    private static final long serialVersionUID = 1L;
 
    @TableId(value = "id")
    private Long id;
 
    @Schema(description = "算法")
    @TableField("algorithm_name")
    private String algorithmName;
 
    @Schema(description = "算法code")
    @TableField("algorithm_code")
    private String algorithmCode;
 
    @Schema(description = "机构代码")
    @TableField("org_code")
    private String orgCode;
 
    @Schema(description = "摄像头code")
    @TableField("camera_code")
    private String cameraCode;
 
    @Schema(description = "分值")
    @TableField("score")
    private Byte score;
 
    @Schema(description = "巡查时间段")
    @TableField("time_period")
    private String timePeriod;
    
    @Schema(description = "巡查开始时间")
    @TableField("time_start")
    private Time timeStart;
    
    @Schema(description = "巡查结束时间")
    @TableField("time_end")
    private Time timeEnd;
 
    @TableField("create_time")
    private Date createTime;
 
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    
    public void generateId() {
        String code = algorithmCode.substring(algorithmCode.length()-2);
        id = Long.valueOf(Math.abs((orgCode + cameraCode).hashCode()) + code);
    }
}