src/main/java/com/whyc/dto/Real/TopDto.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/webSocket/RealTimeSocket.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/dto/Real/TopDto.java
@@ -13,7 +13,7 @@ private Integer battALmNum;//电池组实时告警数 private Integer devALmNum; //设备实时告警数 private Integer pwrALmNum; //电源实时告警数 private Integer allALmNum; //电源实时告警数 private Integer allALmNum; //总实时告警数 //仅在设备状态为核容测试有效 private Float captestGroupvol; //组端电压 private Float captestCurr; //电池电流 @@ -21,6 +21,7 @@ private Float captestCap; //测试容量 private Float restCap; //预估剩余容量 private Float restTime; //预估剩余续航时间 private String recordtime; //更新时间 public TopDto() { this.systemState = 0; @@ -39,5 +40,6 @@ this.restCap = 0.0f; this.restTime = 0.0f; this.allALmNum = 0; this.recordtime = "1972-01-01 00:00:00"; } } src/main/java/com/whyc/webSocket/RealTimeSocket.java
@@ -12,6 +12,7 @@ import com.whyc.pojo.db_user.User; import com.whyc.service.*; import com.whyc.util.ActionUtil; import com.whyc.util.ThreadLocalUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -162,6 +163,7 @@ topDto.setBattState(battRtstate.getBattState()); topDto.setVbusVol(battRtstate.getVbusVol()); topDto.setOnlineVol(battRtstate.getOnlineVol()); topDto.setRecordtime(ThreadLocalUtil.format(battRtstate.getRecDatetime(),1)); } //实时获取设备信息 DeviceState deviceState = deviceStateService.getDevRealInfo(realDto.getDevId());