|
@@ -0,0 +1,161 @@
|
|
|
+package com.sysu.admin.controller.aland;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.annotation.JSONField;
|
|
|
+import com.sysu.admin.controller.crop.images.CropImage;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.EqualsAndHashCode;
|
|
|
+import lombok.experimental.Accessors;
|
|
|
+import lombok.experimental.FieldNameConstants;
|
|
|
+import org.hibernate.annotations.DynamicInsert;
|
|
|
+import org.hibernate.annotations.DynamicUpdate;
|
|
|
+import org.locationtech.jts.geom.MultiPolygon;
|
|
|
+import org.locationtech.jts.geom.Point;
|
|
|
+
|
|
|
+import javax.persistence.*;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+@Data
|
|
|
+@Accessors(chain = true)
|
|
|
+@EqualsAndHashCode(callSuper = false)
|
|
|
+@FieldNameConstants(innerTypeName = "FIELDS")
|
|
|
+@Table(name = "p_a_crop")
|
|
|
+@Entity
|
|
|
+@DynamicInsert
|
|
|
+@DynamicUpdate
|
|
|
+public class Land {
|
|
|
+
|
|
|
+ public Land(){
|
|
|
+ }
|
|
|
+
|
|
|
+ public Land(Long id, Integer cropType, Integer growingPeriod, Integer confirm, Integer district, String name, String address, String desc) {
|
|
|
+ this.id = id;
|
|
|
+ this.cropType = cropType;
|
|
|
+ this.growingPeriod = growingPeriod;
|
|
|
+ this.confirm = confirm;
|
|
|
+ this.district = district;
|
|
|
+ this.name = name;
|
|
|
+ this.address = address;
|
|
|
+ this.desc = desc;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 主键
|
|
|
+ */
|
|
|
+ @Id
|
|
|
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * [{"filter":0,"title":"其他","fill":"#6E7F85","opacity":0.8},
|
|
|
+ * {"filter":1,"title":"湿地","fill":"#7B9CFB","opacity":0.8},
|
|
|
+ * {"filter":2,"title":"耕地","fill":"#979B49","opacity":0.8},
|
|
|
+ * {"filter":3,"title":"园地","fill":"#E99209","opacity":0.8},
|
|
|
+ * {"filter":4,"title":"林地","fill":"#182F13","opacity":0.8},
|
|
|
+ * {"filter":5,"title":"草地","fill":"#307913","opacity":0.8},
|
|
|
+ * {"filter":6,"title":"水域","fill":"#0D53AF","opacity":0.8}]
|
|
|
+ */
|
|
|
+ @Column(name = "gridcode")
|
|
|
+ private Long gridcode;
|
|
|
+
|
|
|
+ @JSONField(serialize = false)
|
|
|
+ @Column(columnDefinition = "geom")
|
|
|
+ private MultiPolygon geom;
|
|
|
+
|
|
|
+ @JSONField(serialize = false)
|
|
|
+ @Column(columnDefinition = "center_point")
|
|
|
+ private Point centerPoint;
|
|
|
+
|
|
|
+ @Transient
|
|
|
+ private String wkt;
|
|
|
+ @Transient
|
|
|
+ private String geojson;
|
|
|
+ /**
|
|
|
+ * 耕地类型
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Integer cropType;
|
|
|
+ /**
|
|
|
+ * 生长期
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Integer growingPeriod;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 采集经度
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Double pickLongitude;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 采集纬度
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Double pickLatitude;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 产量
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Integer yield;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Date createDate;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Date updateDate;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Date receiveDate;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Long receiver;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Date pickDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建人
|
|
|
+ */
|
|
|
+ @Column( nullable = false)
|
|
|
+ private Long creator;
|
|
|
+
|
|
|
+ /**
|
|
|
+ */
|
|
|
+ @Column(nullable = false)
|
|
|
+ private Long executor;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 状态
|
|
|
+ */
|
|
|
+ @Column
|
|
|
+ private Integer status;
|
|
|
+
|
|
|
+ @Column
|
|
|
+ private Integer confirm;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 描述
|
|
|
+ */
|
|
|
+ @Column(name = "\"desc\"")
|
|
|
+ private String desc;
|
|
|
+
|
|
|
+ @Transient
|
|
|
+ private CropImage fay;
|
|
|
+ @Transient
|
|
|
+ private CropImage center;
|
|
|
+ @Transient
|
|
|
+ private CropImage near;
|
|
|
+
|
|
|
+ @Column
|
|
|
+ private Integer province;
|
|
|
+ @Column
|
|
|
+ private Integer city;
|
|
|
+ @Column
|
|
|
+ private Integer district;
|
|
|
+ @Column
|
|
|
+ private String name;
|
|
|
+ @Column
|
|
|
+ private String address;
|
|
|
+
|
|
|
+}
|