| | |
| | | package com.moon.server.entity.data; |
| | | |
| | | import com.moon.server.helper.WebHelper; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | public void setMin(Double min) { |
| | | this.min = min; |
| | | this.min = WebHelper.round(min, 3); |
| | | } |
| | | |
| | | public Double getAvg() { |
| | |
| | | } |
| | | |
| | | public void setAvg(Double avg) { |
| | | this.avg = avg; |
| | | this.avg = WebHelper.round(avg, 3); |
| | | } |
| | | |
| | | public Double getMax() { |
| | |
| | | } |
| | | |
| | | public void setMax(Double max) { |
| | | this.max = max; |
| | | this.max = WebHelper.round(max, 3); |
| | | } |
| | | |
| | | public int getCode() { |
| | |
| | | private final static Log log = LogFactory.getLog(WebHelper.class); |
| | | |
| | | /** |
| | | * 保留小数位 |
| | | */ |
| | | public static double round(double val, double size) { |
| | | double power = Math.pow(10.0, size); |
| | | |
| | | return Math.round(val * power) / power; |
| | | } |
| | | |
| | | /** |
| | | * 获取GUID |
| | | */ |
| | | public static String getGuid() { |