From 853e68c5d4414acdb2ea98c27572c534184338a3 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 07 四月 2023 14:36:55 +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