|
@@ -108,7 +108,7 @@ public class WindTowerDataParentTableServiceImpl extends ServiceImpl<WindTowerDa
|
|
|
try {
|
|
|
//所有数据
|
|
|
for (Map<String, Object> m : allData) {
|
|
|
- if(!operation.equals("DataRecalculation")){
|
|
|
+ if (!operation.equals("DataRecalculation")) {
|
|
|
this.packageOrgData(m, heightAll, simpleDateFormat, eqNo, "org");
|
|
|
}
|
|
|
//异常数据赋值为-99
|
|
@@ -196,9 +196,16 @@ public class WindTowerDataParentTableServiceImpl extends ServiceImpl<WindTowerDa
|
|
|
prophaseAnemometryPublicData.setRhAve(m.get("rhAve") == null ? null : CalculationUtil.getBigDecimal(m.get("rhAve")).setScale(2, RoundingMode.HALF_UP).floatValue());
|
|
|
prophaseAnemometryPublicData.setRhSta(m.get("rhSta") == null ? null : CalculationUtil.getBigDecimal(m.get("rhSta")).setScale(2, RoundingMode.HALF_UP).floatValue());
|
|
|
//计算空气密度 1.293*(273/(273+温度摄氏度))*气压百帕/1013
|
|
|
- if (prophaseAnemometryPublicData.getTAve() != null && prophaseAnemometryPublicData.getPaAve() != null) {
|
|
|
+ if (prophaseAnemometryPublicData.getTAve() != null && prophaseAnemometryPublicData.getPaAve() != null &&
|
|
|
+ prophaseAnemometryPublicData.getTAve() != -99 && prophaseAnemometryPublicData.getPaAve() > 0) {
|
|
|
BigDecimal airDensity = BigDecimal.valueOf(1.293).multiply(new BigDecimal(273).divide(new BigDecimal(273).add(BigDecimal.valueOf(prophaseAnemometryPublicData.getTAve())), 2, RoundingMode.HALF_UP)).multiply(BigDecimal.valueOf(prophaseAnemometryPublicData.getPaAve())).divide(new BigDecimal(1013), 2, RoundingMode.HALF_UP);
|
|
|
prophaseAnemometryPublicData.setAirDensity(airDensity.floatValue());
|
|
|
+ }else{
|
|
|
+ //随机数 上限1.28 下限1.15
|
|
|
+ Random random = new Random();
|
|
|
+ int randNumber = random.nextInt(128 - 115 + 1) + 115;
|
|
|
+ BigDecimal air = BigDecimal.valueOf(randNumber).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
|
|
|
+ prophaseAnemometryPublicData.setAirDensity(air.floatValue());
|
|
|
}
|
|
|
if (m.get("time") != null) {
|
|
|
try {
|
|
@@ -763,7 +770,7 @@ public class WindTowerDataParentTableServiceImpl extends ServiceImpl<WindTowerDa
|
|
|
.append(",").append("pa_ave")
|
|
|
.append(",").append("pa_sta");
|
|
|
//所有层高
|
|
|
- String[] height = {"200", "200A","190", "190A","180", "180A","170", "170A","160", "160A","150", "150A", "140", "140A", "120", "120A", "110", "110A", "100", "100A", "90", "90A", "80", "80A", "70", "70A", "50", "50A", "30", "30A", "10", "10A"};
|
|
|
+ String[] height = {"200", "200A", "190", "190A", "180", "180A", "170", "170A", "160", "160A", "150", "150A", "140", "140A", "120", "120A", "110", "110A", "100", "100A", "90", "90A", "80", "80A", "70", "70A", "50", "50A", "30", "30A", "10", "10A"};
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if (!mapList.isEmpty()) {
|
|
|
map = mapList.get(0);
|