From 4aaa82f73fc81761380b1d6ac8e512b69285ca2d Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 23 四月 2023 10:43:09 +0800
Subject: [PATCH] 1

---
 src/main/java/com/terra/coal/entity/Coal54Entity.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/terra/coal/entity/Coal54Entity.java b/src/main/java/com/terra/coal/entity/Coal54Entity.java
index 81c1384..e821470 100644
--- a/src/main/java/com/terra/coal/entity/Coal54Entity.java
+++ b/src/main/java/com/terra/coal/entity/Coal54Entity.java
@@ -47,6 +47,20 @@
     public Coal54Entity() {
     }
 
+    public Coal54Entity(BigDecimal x, BigDecimal y, BigDecimal top, BigDecimal clong, BigDecimal width, BigDecimal height, String ctype, BigDecimal density, BigDecimal gangue) {
+        this.top = top;
+        this.clong = clong;
+        this.width = width;
+        this.height = height;
+        this.ctype = ctype;
+        this.density = density;
+        this.gangue = gangue;
+
+        this.bottom = top.add(height);
+        this.volume = clong.multiply(width).multiply(height);
+        this.geom = String.format("ST_GeomFromText('POINT (%f %f)')", x.doubleValue(), y.doubleValue());
+    }
+
     public Integer getGid() {
         return gid;
     }

--
Gitblit v1.9.3