diff --git a/zc-business/src/main/java/com/zc/business/domain/OnlineLog.java b/zc-business/src/main/java/com/zc/business/domain/OnlineLog.java index 417c3840..2e9ab727 100644 --- a/zc-business/src/main/java/com/zc/business/domain/OnlineLog.java +++ b/zc-business/src/main/java/com/zc/business/domain/OnlineLog.java @@ -214,7 +214,7 @@ public class OnlineLog implements Serializable { onlineLog.setLossRate(lossRate); onlineLog.setNetworkQuality(NetworkQuality.ofNetworkQuality(onlineLog.getLossRate(),onlineLog.getRttAvg())); onlineLog.setMonitorTime(LocalDateTime.now()); - onlineLog.setOnlineRate((int)lossRate==100?MathUtil.doubleTwoDecimal(100):MathUtil.doubleTwoDecimal(0)); + onlineLog.setOnlineRate(onlineLog.getReceiveCount()==0?MathUtil.doubleTwoDecimal(0):MathUtil.doubleTwoDecimal(100)); return onlineLog; } public OnlineLog buildBad(DcDevice device){