package com.moon.server.entity.data;
|
|
import com.moon.server.helper.WebHelper;
|
|
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.minList = new ArrayList<>();
|
this.avgList = new ArrayList<>();
|
this.maxList = new ArrayList<>();
|
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);
|
}
|
|
/**
|
* 添加Band值
|
*/
|
public void addBandVals(double min, double avg, double max) {
|
this.minList.add(WebHelper.round(min, 3));
|
this.avgList.add(WebHelper.round(avg, 3));
|
this.maxList.add(WebHelper.round(max, 3));
|
}
|
|
private String layerName;
|
|
private List<Double> minList;
|
|
private List<Double> avgList;
|
|
private List<Double> maxList;
|
|
private int code;
|
|
private String info;
|
|
private List<Point> points;
|
|
public String getLayerName() {
|
return layerName;
|
}
|
|
public void setLayerName(String layerName) {
|
this.layerName = layerName;
|
}
|
|
public List<Double> getMinList() {
|
return minList;
|
}
|
|
public void setMinList(List<Double> minList) {
|
this.minList = minList;
|
}
|
|
public List<Double> getAvgList() {
|
return avgList;
|
}
|
|
public void setAvgList(List<Double> avgList) {
|
this.avgList = avgList;
|
}
|
|
public List<Double> getMaxList() {
|
return maxList;
|
}
|
|
public void setMaxList(List<Double> maxList) {
|
this.maxList = maxList;
|
}
|
|
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;
|
}
|
}
|
}
|