Commit 81563edb authored by 赵啸非's avatar 赵啸非

修改校验

parent 8b37b6eb
......@@ -256,13 +256,13 @@ public class DeviceStatServiceImpl extends AbstractCRUDServiceImpl<DeviceStatDao
.filter(f -> f.getEnabled() == YesNoEnum.NO.getValue())
.count();
deviceStatEntity.setDeviceStopCount(deviceStopCount.intValue());
if (deviceStopCount > 0) {
if (deviceActiveCount > 0) {
deviceStatEntity.setDeviceStopRatio(new BigDecimal(deviceStopCount).divide(new BigDecimal(deviceActiveCount), 4, ROUND_HALF_DOWN));
}
deviceStatEntity.setDeviceUnActiveCount(deviceUnActiveCount.intValue());
if (deviceUnActiveCount > 0) {
if (deviceActiveCount > 0) {
deviceStatEntity.setDeviceUnActiveRatio(new BigDecimal(deviceUnActiveCount).divide(new BigDecimal(deviceActiveCount), 4, ROUND_HALF_DOWN));
}
......
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