wuww
2025-04-25 b50aa418312034cfebf121f416e197d68aa5d0de
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
package com.se.nsl.domain.po;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.netty.util.internal.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
 
@TableName("nsl.region")
@SuppressWarnings("ALL")
@ApiModel(value = "推演区域", description = "推演区域")
public class Region {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;
 
    @ApiModelProperty("名称")
    private String name;
 
    @ApiModelProperty("类别:1-行政区划,2-重点区域,3-重点沟")
    private Integer type;
 
    @ApiModelProperty("空间位置")
    @TableField(value = "st_astext(geom)", select = true)
    private String geom;
 
    public Region() {
    }
 
    public Region(String name, int type, String geom) {
        this.name = name;
        this.type = Integer.valueOf(type);
        this.geom = geom;
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public String getGeom() {
        return geom;
    }
 
    public void setGeom(String geom) {
        this.geom = geom;
    }
 
    public void setGeomText() {
        this.geom = StringUtil.isNullOrEmpty(this.geom) ? "null" : String.format("ST_GeomFromText('%s')", this.geom.trim());
    }
}