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; /** * 分析结果 * @author WWW * @date 2023-09-11 */ public class AnalysisResultEntity implements Serializable { private static final long serialVersionUID = -1237623414044281355L; public AnalysisResultEntity() { this.code = 200; this.points = new ArrayList<>(); } /** * 添加点 */ public void addPoint(Double x, Double y, List vals) { Point point = new Point(x, y, vals); this.points.add(point); } private String layerName; private Double min; private Double avg; private Double max; private int code; private String info; private List points; public String getLayerName() { return layerName; } public void setLayerName(String layerName) { this.layerName = layerName; } public Double getMin() { return min; } public void setMin(Double min) { this.min = WebHelper.round(min, 3); } public Double getAvg() { return avg; } public void setAvg(Double avg) { this.avg = avg; } public Double getMax() { return max; } 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 getPoints() { return points; } public void setPoints(List points) { this.points = points; } public static class Point { private Double x; private Double y; private List vals; public Point() { } public Point(Double x, Double y, List 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 getVals() { return vals; } public void setVals(List vals) { this.vals = vals; } } }