月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-09-14 236b037b0d8d2673bb8f1f00013983459c6e669c
src/main/java/com/moon/server/entity/data/AnalysisResultEntity.java
@@ -1,6 +1,11 @@
package com.moon.server.entity.data;
import com.moon.server.helper.WebHelper;
import java.io.DataOutput;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * 分析结果
@@ -11,6 +16,16 @@
    private static final long serialVersionUID = -1237623414044281355L;
    public AnalysisResultEntity() {
        this.code = 200;
        this.points = new ArrayList<>();
    }
    /**
     * 添加点
     */
    public void addPoint(Double x, Double y, List<Double> vals) {
        Point point = new Point(x, y, vals);
        this.points.add(point);
    }
    private String layerName;
@@ -20,6 +35,12 @@
    private Double avg;
    private Double max;
    private int code;
    private String info;
    private List<Point> points;
    public String getLayerName() {
        return layerName;
@@ -34,7 +55,7 @@
    }
    public void setMin(Double min) {
        this.min = min;
        this.min = WebHelper.round(min, 3);
    }
    public Double getAvg() {
@@ -52,4 +73,69 @@
    public void setMax(Double max) {
        this.max = max;
    }
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public String getInfo() {
        return info;
    }
    public void setInfo(String info) {
        this.info = info;
    }
    public List<Point> getPoints() {
        return points;
    }
    public void setPoints(List<Point> points) {
        this.points = points;
    }
    public static class Point {
        private Double x;
        private Double y;
        private List<Double> vals;
        public Point() {
        }
        public Point(Double x, Double y, List<Double> vals) {
            this.x = x;
            this.y = y;
            this.vals = vals;
        }
        public Double getX() {
            return x;
        }
        public void setX(Double x) {
            this.x = x;
        }
        public Double getY() {
            return y;
        }
        public void setY(Double y) {
            this.y = y;
        }
        public List<Double> getVals() {
            return vals;
        }
        public void setVals(List<Double> vals) {
            this.vals = vals;
        }
    }
}