src/main/java/com/whyc/pojo/Battinf.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/webSocket/Tydc3DSocket.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BattInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/pojo/Battinf.java
@@ -340,4 +340,8 @@ @TableField(exist = false) @ApiModelProperty("天一电厂3D电池组对照关系") private String compareInf; @TableField(exist = false) @ApiModelProperty("天一电厂3D电池组实时告警单体编号") private String alarmNumIn3D; } src/main/java/com/whyc/webSocket/Tydc3DSocket.java
@@ -33,15 +33,15 @@ @OnOpen public void onOpen(Session session, EndpointConfig config){ this.session = session; HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession"); UserInf user = (UserInf) httpSession.getAttribute("user"); //HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession"); //UserInf user = (UserInf) httpSession.getAttribute("user"); Thread thread = new Thread() { @Override public void run() { try { Map<String, Response> res = new HashMap<>(); while (!currentThread().isInterrupted()) { Response response = battInfService.selectTydc3DRealTimeInfo(user.getUId()); Response response = battInfService.selectTydc3DRealTimeInfo(1041l); session.getBasicRemote().sendObject(response); sleep(4000); } src/main/resources/mapper/BattInfMapper.xml
@@ -676,6 +676,8 @@ <result column="compare_inf" property="compareInf"></result> <association property="rtstate" column="battgroupid" select="selectRtstate"> </association> <association property="alarmNumIn3D" column="battgroupid" select="selectAlarmNumIn3D"> </association> <collection property="monNumList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.BattRtdata" column="{battGroupId=battgroupid}" select="selectBattRtdata"> </collection> </resultMap> @@ -703,4 +705,7 @@ select DISTINCT * FROM db_ram_db.tb_batt_rtstate where BattGroupId=#{battGroupId} </select> <select id="selectAlarmNumIn3D" resultType="java.lang.String"> select GROUP_CONCAT(MonNum) from db_alarm.tb_battalarm_data where BattGroupId=#{battGroupId} and MonNum>0 </select> </mapper>