CropLand.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. package com.sysu.admin.controller.crop;
  2. import com.alibaba.fastjson.annotation.JSONField;
  3. import com.sysu.admin.controller.crop.images.CropImage;
  4. import lombok.Data;
  5. import lombok.EqualsAndHashCode;
  6. import lombok.experimental.Accessors;
  7. import lombok.experimental.FieldNameConstants;
  8. import org.hibernate.annotations.DynamicInsert;
  9. import org.hibernate.annotations.DynamicUpdate;
  10. import org.locationtech.jts.geom.MultiPolygon;
  11. import org.locationtech.jts.geom.Point;
  12. import javax.persistence.*;
  13. import java.util.Date;
  14. @Data
  15. @Accessors(chain = true)
  16. @EqualsAndHashCode(callSuper = false)
  17. @FieldNameConstants(innerTypeName = "FIELDS")
  18. @Table(name = "p_crop")
  19. @Entity
  20. @DynamicInsert
  21. @DynamicUpdate
  22. public class CropLand {
  23. public CropLand(){
  24. }
  25. public CropLand(Long id, Integer cropType, Integer growingPeriod, Integer confirm, Integer district, String name, String address, String desc) {
  26. this.id = id;
  27. this.cropType = cropType;
  28. this.growingPeriod = growingPeriod;
  29. this.confirm = confirm;
  30. this.district = district;
  31. this.name = name;
  32. this.address = address;
  33. this.desc = desc;
  34. }
  35. /**
  36. * 主键
  37. */
  38. @Id
  39. @GeneratedValue(strategy = GenerationType.IDENTITY)
  40. private Long id;
  41. @Column(name = "gridcode")
  42. private Long gridcode;
  43. @JSONField(serialize = false)
  44. @Column(columnDefinition = "geom")
  45. private MultiPolygon geom;
  46. @JSONField(serialize = false)
  47. @Column(columnDefinition = "center_point")
  48. private Point centerPoint;
  49. @Transient
  50. private String wkt;
  51. @Transient
  52. private String geojson;
  53. /**
  54. * 耕地类型
  55. */
  56. @Column
  57. private Integer cropType;
  58. /**
  59. * 生长期
  60. */
  61. @Column
  62. private Integer growingPeriod;
  63. /**
  64. * 采集经度
  65. */
  66. @Column
  67. private Double pickLongitude;
  68. /**
  69. * 采集纬度
  70. */
  71. @Column
  72. private Double pickLatitude;
  73. /**
  74. * 产量
  75. */
  76. @Column
  77. private Integer yield;
  78. @Column(nullable = false)
  79. private Date createDate;
  80. @Column(nullable = false)
  81. private Date updateDate;
  82. @Column(nullable = false)
  83. private Date receiveDate;
  84. @Column(nullable = false)
  85. private Long receiver;
  86. @Column(nullable = false)
  87. private Date pickDate;
  88. /**
  89. * 创建人
  90. */
  91. @Column( nullable = false)
  92. private Long creator;
  93. /**
  94. */
  95. @Column(nullable = false)
  96. private Long executor;
  97. /**
  98. * 状态
  99. */
  100. @Column
  101. private Integer status;
  102. @Column
  103. private Integer confirm;
  104. /**
  105. * 描述
  106. */
  107. @Column(name = "\"desc\"")
  108. private String desc;
  109. @Transient
  110. private CropImage fay;
  111. @Transient
  112. private CropImage center;
  113. @Transient
  114. private CropImage near;
  115. @Column
  116. private Integer province;
  117. @Column
  118. private Integer city;
  119. @Column
  120. private Integer district;
  121. @Column
  122. private String name;
  123. @Column
  124. private String address;
  125. }