Commit 8234caa5 authored by tianchao's avatar tianchao

1光伏预测调整,预测算法页面

parent d8fdc167
......@@ -69,7 +69,7 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
PlantPowerDataEnt lastEnt = powerDataMapper.selectOne(queryWrapper);
//获取同比 = 当前/同期
BigDecimal compare = new BigDecimal(1);
if(lastEnt.getPower().compareTo(BigDecimal.ZERO) > 0)
if(lastEnt.getPower().compareTo(BigDecimal.ZERO) > 0 && currentEnt.getPower().compareTo(BigDecimal.ZERO) != 0)
compare = currentEnt.getPower().divide(lastEnt.getPower() , 6 , BigDecimal.ROUND_HALF_UP );
//获取同期30天数据
queryWrapper.clear();
......@@ -115,4 +115,7 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
}
return XServiceResult.OK;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment