New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="NewModuleRootManager" inherit-compiler-output="true"> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$" /> |
| | | <orderEntry type="inheritedJdk" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | </component> |
| | | </module> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ProjectModuleManager"> |
| | | <modules> |
| | | <module fileurl="file://$PROJECT_DIR$/.idea/DyEnvir_system.iml" filepath="$PROJECT_DIR$/.idea/DyEnvir_system.iml" /> |
| | | </modules> |
| | | </component> |
| | | </project> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="" vcs="Git" /> |
| | | </component> |
| | | </project> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ChangeListManager"> |
| | | <list default="true" id="1a3d2627-2253-4d2b-b79a-14608a0c1f0f" name="Default Changelist" comment=""> |
| | | <change beforePath="$PROJECT_DIR$/DyEnvir_system/src/com/fgkj/db/DBUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/DyEnvir_system/src/com/fgkj/db/DBUtil.java" afterDir="false" /> |
| | | </list> |
| | | <option name="SHOW_DIALOG" value="false" /> |
| | | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
| | | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
| | | <option name="LAST_RESOLUTION" value="IGNORE" /> |
| | | </component> |
| | | <component name="Git.Settings"> |
| | | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
| | | </component> |
| | | <component name="ProjectId" id="1kV3aKHTecR64oF2Lt4TMaW66h7" /> |
| | | <component name="ProjectViewState"> |
| | | <option name="foldersAlwaysOnTop" value="false" /> |
| | | <option name="hideEmptyMiddlePackages" value="true" /> |
| | | <option name="showLibraryContents" value="true" /> |
| | | </component> |
| | | <component name="PropertiesComponent"> |
| | | <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> |
| | | <property name="WebServerToolWindowFactoryState" value="false" /> |
| | | <property name="aspect.path.notification.shown" value="true" /> |
| | | <property name="last_opened_file_path" value="$PROJECT_DIR$/../Device_Manage" /> |
| | | </component> |
| | | <component name="RunManager"> |
| | | <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true"> |
| | | <option name="arquillianRunConfiguration"> |
| | | <value> |
| | | <option name="containerStateName" value="" /> |
| | | </value> |
| | | </option> |
| | | <option name="TEST_OBJECT" value="class" /> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | </component> |
| | | <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> |
| | | <component name="TaskManager"> |
| | | <task active="true" id="Default" summary="Default task"> |
| | | <changelist id="1a3d2627-2253-4d2b-b79a-14608a0c1f0f" name="Default Changelist" comment="" /> |
| | | <created>1605771999273</created> |
| | | <option name="number" value="Default" /> |
| | | <option name="presentableId" value="Default" /> |
| | | <updated>1605771999273</updated> |
| | | <workItem from="1605772008904" duration="411000" /> |
| | | </task> |
| | | <servers /> |
| | | </component> |
| | | <component name="TypeScriptGeneratedFilesManager"> |
| | | <option name="version" value="3" /> |
| | | </component> |
| | | <component name="WindowStateProjectService"> |
| | | <state x="561" y="271" key="#Scopes" timestamp="1605772140901"> |
| | | <screen x="0" y="0" width="1536" height="824" /> |
| | | </state> |
| | | <state x="561" y="271" key="#Scopes/0.0.1536.824@0.0.1536.824" timestamp="1605772140901" /> |
| | | <state x="549" y="167" key="FileChooserDialogImpl" timestamp="1605772433698"> |
| | | <screen x="0" y="0" width="1536" height="824" /> |
| | | </state> |
| | | <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1605772433698" /> |
| | | <state x="206" y="28" key="new project wizard" timestamp="1605772235195"> |
| | | <screen x="0" y="0" width="1536" height="824" /> |
| | | </state> |
| | | <state x="206" y="28" key="new project wizard/0.0.1536.824@0.0.1536.824" timestamp="1605772235195" /> |
| | | </component> |
| | | </project> |
| | |
| | | </classpathentry> |
| | | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
| | | <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0.39"/> |
| | | <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/> |
| | | <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> |
| | | </classpath> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>Java后端WebSocket的Tomcat实现</title> |
| | | <meta http-equiv=content-type content="text/html; charset=utf-8"> |
| | | </head> |
| | | <body> |
| | | Welcome<br/><input id="text" type="text"/> |
| | | <button onclick="send()">发送消息</button> |
| | | <hr/> |
| | | <button onclick="closeWebSocket()">关闭WebSocket连接</button> |
| | | <hr/> |
| | | <div id="message"></div> |
| | | </body> |
| | | |
| | | <script type="text/javascript"> |
| | | var websocket = null; |
| | | var uid="1002"; |
| | | //判断当前浏览器是否支持WebSocket |
| | | if ('WebSocket' in window) { |
| | | websocket = new WebSocket("ws://127.0.0.1:8080/DyEnvir_system/ws/socket/"+uid); |
| | | //websocket = new WebSocket("ws://127.0.0.1:8919/Device_Manage/ws/socket/"); |
| | | } |
| | | else { |
| | | alert('当前浏览器 Not support websocket') |
| | | } |
| | | |
| | | //连接发生错误的回调方法 |
| | | websocket.onerror = function () { |
| | | setMessageInnerHTML("WebSocket连接发生错误"); |
| | | }; |
| | | |
| | | //连接成功建立的回调方法 |
| | | websocket.onopen = function () { |
| | | setMessageInnerHTML("WebSocket连接成功"); |
| | | } |
| | | |
| | | //接收到消息的回调方法 |
| | | websocket.onmessage = function (event) { |
| | | console.info(event.data) |
| | | setMessageInnerHTML(event.data); |
| | | } |
| | | |
| | | //连接关闭的回调方法 |
| | | websocket.onclose = function () { |
| | | setMessageInnerHTML("WebSocket连接关闭"); |
| | | } |
| | | |
| | | //监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。 |
| | | window.onbeforeunload = function () { |
| | | closeWebSocket(); |
| | | } |
| | | |
| | | //将消息显示在网页上 |
| | | function setMessageInnerHTML(innerHTML) { |
| | | document.getElementById('message').innerHTML += innerHTML + '<br/>'; |
| | | } |
| | | |
| | | //关闭WebSocket连接 |
| | | function closeWebSocket() { |
| | | websocket.close(); |
| | | } |
| | | |
| | | //发送消息 |
| | | function send() { |
| | | /* var b={"num":"1002","BattGroupId":"1000004"}; |
| | | var jsonb=JSON.stringify(b);*/ |
| | | var uid="1002"; |
| | | //var message = document.getElementById('text').value+"|"+uid; |
| | | var binf={"BattGroupId":"1000004"}; |
| | | |
| | | var json_obj={"method":"2", |
| | | "method_name":["BattInfImpl!searchSocket","User_infImpl!searchAll"], |
| | | "method_param":[JSON.stringify(binf),JSON.stringify({})] |
| | | }; |
| | | //websocket.send(JSON.stringify(json_obj)+"|"+uid); |
| | | websocket.send(""); |
| | | } |
| | | </script> |
| | | </html> |
| | |
| | | String source=uri[uri.length-1]; |
| | | //System.out.println(source); |
| | | User_inf user=(User_inf)ActionUtil.getSession().getAttribute("user"); |
| | | if(("index.html").equals(source)|| ("loginm.html").equals(source) || ("DyEnvir_system").equals(source) || ("CheckClient.jsp").equals(source)){ |
| | | if(("3.html").equals(source)||("index.html").equals(source)|| ("loginm.html").equals(source) || ("DyEnvir_system").equals(source) || ("CheckClient.jsp").equals(source)){ |
| | | chain.doFilter(req, resp); |
| | | }else{ |
| | | //System.out.println("还未登陆请登陆 LoginFilter"); |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Ac230_elec implements Serializable{ |
| | | private float ac230_elecvol_one ;//'1号AC230不间断电源电压', |
| | | private float ac230_eleccurr_one ;//'1号AC230不间断电源电流', |
| | | private float ac230_elecvol_two ;//'2号AC230不间断电源电压', |
| | | private float ac230_eleccurr_two ;//'2号AC230不间断电源电流', |
| | | |
| | | private int ac230_state_one ;//'1号AC230不间断电源工作状态', |
| | | private int ac230_state_two ;//'2号AC230不间断电源工作状态', |
| | | public float getAc230_elecvol_one() { |
| | | return ac230_elecvol_one; |
| | | } |
| | | public void setAc230_elecvol_one(float ac230_elecvol_one) { |
| | | this.ac230_elecvol_one = ac230_elecvol_one; |
| | | } |
| | | public float getAc230_eleccurr_one() { |
| | | return ac230_eleccurr_one; |
| | | } |
| | | public void setAc230_eleccurr_one(float ac230_eleccurr_one) { |
| | | this.ac230_eleccurr_one = ac230_eleccurr_one; |
| | | } |
| | | public float getAc230_elecvol_two() { |
| | | return ac230_elecvol_two; |
| | | } |
| | | public void setAc230_elecvol_two(float ac230_elecvol_two) { |
| | | this.ac230_elecvol_two = ac230_elecvol_two; |
| | | } |
| | | public float getAc230_eleccurr_two() { |
| | | return ac230_eleccurr_two; |
| | | } |
| | | public void setAc230_eleccurr_two(float ac230_eleccurr_two) { |
| | | this.ac230_eleccurr_two = ac230_eleccurr_two; |
| | | } |
| | | public int getAc230_state_one() { |
| | | return ac230_state_one; |
| | | } |
| | | public void setAc230_state_one(int ac230_state_one) { |
| | | this.ac230_state_one = ac230_state_one; |
| | | } |
| | | public int getAc230_state_two() { |
| | | return ac230_state_two; |
| | | } |
| | | public void setAc230_state_two(int ac230_state_two) { |
| | | this.ac230_state_two = ac230_state_two; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Ac230_elec [ac230_elecvol_one=" + ac230_elecvol_one + ", ac230_eleccurr_one=" + ac230_eleccurr_one |
| | | + ", ac230_elecvol_two=" + ac230_elecvol_two + ", ac230_eleccurr_two=" + ac230_eleccurr_two |
| | | + ", ac230_state_one=" + ac230_state_one + ", ac230_state_two=" + ac230_state_two + "]"; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Acmain_board implements Serializable{ |
| | | private float acmain_boardabvol_one ;//'1号交流主配电板电压', |
| | | private float acmain_boardabvol_two ;//'2号交流主配电板电压', |
| | | private float acmain_boardabvol_three ;//'3号交流主配电板电压', |
| | | private float acmain_boardabvol_four ;//'4号交流主配电板电压', |
| | | public float getAcmain_boardabvol_one() { |
| | | return acmain_boardabvol_one; |
| | | } |
| | | public void setAcmain_boardabvol_one(float acmain_boardabvol_one) { |
| | | this.acmain_boardabvol_one = acmain_boardabvol_one; |
| | | } |
| | | public float getAcmain_boardabvol_two() { |
| | | return acmain_boardabvol_two; |
| | | } |
| | | public void setAcmain_boardabvol_two(float acmain_boardabvol_two) { |
| | | this.acmain_boardabvol_two = acmain_boardabvol_two; |
| | | } |
| | | public float getAcmain_boardabvol_three() { |
| | | return acmain_boardabvol_three; |
| | | } |
| | | public void setAcmain_boardabvol_three(float acmain_boardabvol_three) { |
| | | this.acmain_boardabvol_three = acmain_boardabvol_three; |
| | | } |
| | | public float getAcmain_boardabvol_four() { |
| | | return acmain_boardabvol_four; |
| | | } |
| | | public void setAcmain_boardabvol_four(float acmain_boardabvol_four) { |
| | | this.acmain_boardabvol_four = acmain_boardabvol_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Acmain_board [acmain_boardabvol_one=" + acmain_boardabvol_one + ", acmain_boardabvol_two=" |
| | | + acmain_boardabvol_two + ", acmain_boardabvol_three=" + acmain_boardabvol_three |
| | | + ", acmain_boardabvol_four=" + acmain_boardabvol_four + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Acreliable_board implements Serializable{ |
| | | private float acreliable_boardabvol_one ;//'1号可靠配电板电压', |
| | | private float acreliable_boardabvol_two ;//'2号可靠配电板电压', |
| | | public float getAcreliable_boardabvol_one() { |
| | | return acreliable_boardabvol_one; |
| | | } |
| | | public void setAcreliable_boardabvol_one(float acreliable_boardabvol_one) { |
| | | this.acreliable_boardabvol_one = acreliable_boardabvol_one; |
| | | } |
| | | public float getAcreliable_boardabvol_two() { |
| | | return acreliable_boardabvol_two; |
| | | } |
| | | public void setAcreliable_boardabvol_two(float acreliable_boardabvol_two) { |
| | | this.acreliable_boardabvol_two = acreliable_boardabvol_two; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Acreliable_board [acreliable_boardabvol_one=" + acreliable_boardabvol_one |
| | | + ", acreliable_boardabvol_two=" + acreliable_boardabvol_two + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Batt implements Serializable{ |
| | | private float batt_vol_one ;//'1号蓄电池组工作电压', |
| | | private float batt_curr_one ;//'1号蓄电池组工作电流', |
| | | private float batt_vol_two ;//'2号蓄电池组工作电压', |
| | | private float batt_curr_two ;//'2号蓄电池组工作电流', |
| | | |
| | | private int batt_state_one ;//'1号蓄电池充电与监测装置工作状态', |
| | | private int batt_state_two ;//'2号蓄电池充电与监测装置工作状态', |
| | | public float getBatt_vol_one() { |
| | | return batt_vol_one; |
| | | } |
| | | public void setBatt_vol_one(float batt_vol_one) { |
| | | this.batt_vol_one = batt_vol_one; |
| | | } |
| | | public float getBatt_curr_one() { |
| | | return batt_curr_one; |
| | | } |
| | | public void setBatt_curr_one(float batt_curr_one) { |
| | | this.batt_curr_one = batt_curr_one; |
| | | } |
| | | public float getBatt_vol_two() { |
| | | return batt_vol_two; |
| | | } |
| | | public void setBatt_vol_two(float batt_vol_two) { |
| | | this.batt_vol_two = batt_vol_two; |
| | | } |
| | | public float getBatt_curr_two() { |
| | | return batt_curr_two; |
| | | } |
| | | public void setBatt_curr_two(float batt_curr_two) { |
| | | this.batt_curr_two = batt_curr_two; |
| | | } |
| | | public int getBatt_state_one() { |
| | | return batt_state_one; |
| | | } |
| | | public void setBatt_state_one(int batt_state_one) { |
| | | this.batt_state_one = batt_state_one; |
| | | } |
| | | public int getBatt_state_two() { |
| | | return batt_state_two; |
| | | } |
| | | public void setBatt_state_two(int batt_state_two) { |
| | | this.batt_state_two = batt_state_two; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Batt [batt_vol_one=" + batt_vol_one + ", batt_curr_one=" + batt_curr_one + ", batt_vol_two=" |
| | | + batt_vol_two + ", batt_curr_two=" + batt_curr_two + ", batt_state_one=" + batt_state_one |
| | | + ", batt_state_two=" + batt_state_two + "]"; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Cabin_bump implements Serializable{ |
| | | private float front_cabin_curr ;//'前舱母联电流', |
| | | private float behind_cabin_curr ;//'后舱母联电流', |
| | | private float left_jumper_curr ;//'左舷跨接电流', |
| | | private float right_jumper_curr ;//'右舷跨接电流', |
| | | |
| | | private float pump_curr_ac10_q13 ;//'低压安注泵控制箱电流(AC10-Q13)', |
| | | private float pump_curr_ac10_q2 ;//'指挥舱舱底泵电流(AC10-Q2)', |
| | | private float pump_curr_ac51_q2 ;//'1号往复排盐泵变频电源装置电流(AC51-Q2)', |
| | | private float pump_curr_ac51_q4 ;//'1#凝水泵电流(AC51-Q4)', |
| | | private float pump_curr_ac52_q1 ;//'2#海水泵控制箱电流(AC52-Q1)', |
| | | private float pump_curr_ac52_q6 ;//'2号往复排盐泵变频电源装置电流(AC52-Q6)', |
| | | private float pump_curr_ac53_q3 ;//'3号海水泵控制箱电流(AC53-Q3)', |
| | | private float pump_curr_ac60_q16 ;//'轴系海水泵控制箱电流(AC60-Q1)', |
| | | private float pump_curr_ar13_q1 ;//'1#海水泵控制箱电流(AR13-Q1)', |
| | | private float pump_curr_ar12_q2 ;//'1#补水泵电流(AR12-Q2)', |
| | | private float pump_curr_ar12_q3 ;//'1#主滑油泵电流(AR12-Q3)', |
| | | private float pump_curr_ar12_q4 ;//'1#设备冷却水泵电流(AR12-Q4)', |
| | | private float pump_curr_ar12_q5 ;//'喷淋泵电流(AR12-Q5)', |
| | | private float pump_curr_ar12_q6 ;//'3#凝水泵电流(AR12-Q6)', |
| | | private float pump_curr_ac60_q1 ;//'轴系海水泵控制箱电流(AC60-Q1)', |
| | | private float pump_curr_ar23_q1 ;//'2#主滑油泵电流(AR23-Q1)', |
| | | private float pump_curr_ar23_q2 ;//'2#凝水泵电流(AR23-Q2)', |
| | | private float pump_curr_ar23_q3 ;//'2#设备冷却水泵电流(AR23-Q3)', |
| | | private float pump_curr_ar23_q4 ;//'2#补水泵电流(AR23-Q4)', |
| | | private float pump_curr_ar23_q6 ;//'2#海水泵控制箱电流(AR23-Q6)', |
| | | public float getFront_cabin_curr() { |
| | | return front_cabin_curr; |
| | | } |
| | | public void setFront_cabin_curr(float front_cabin_curr) { |
| | | this.front_cabin_curr = front_cabin_curr; |
| | | } |
| | | public float getBehind_cabin_curr() { |
| | | return behind_cabin_curr; |
| | | } |
| | | public void setBehind_cabin_curr(float behind_cabin_curr) { |
| | | this.behind_cabin_curr = behind_cabin_curr; |
| | | } |
| | | public float getLeft_jumper_curr() { |
| | | return left_jumper_curr; |
| | | } |
| | | public void setLeft_jumper_curr(float left_jumper_curr) { |
| | | this.left_jumper_curr = left_jumper_curr; |
| | | } |
| | | public float getRight_jumper_curr() { |
| | | return right_jumper_curr; |
| | | } |
| | | public void setRight_jumper_curr(float right_jumper_curr) { |
| | | this.right_jumper_curr = right_jumper_curr; |
| | | } |
| | | public float getPump_curr_ac10_q13() { |
| | | return pump_curr_ac10_q13; |
| | | } |
| | | public void setPump_curr_ac10_q13(float pump_curr_ac10_q13) { |
| | | this.pump_curr_ac10_q13 = pump_curr_ac10_q13; |
| | | } |
| | | public float getPump_curr_ac10_q2() { |
| | | return pump_curr_ac10_q2; |
| | | } |
| | | public void setPump_curr_ac10_q2(float pump_curr_ac10_q2) { |
| | | this.pump_curr_ac10_q2 = pump_curr_ac10_q2; |
| | | } |
| | | public float getPump_curr_ac51_q2() { |
| | | return pump_curr_ac51_q2; |
| | | } |
| | | public void setPump_curr_ac51_q2(float pump_curr_ac51_q2) { |
| | | this.pump_curr_ac51_q2 = pump_curr_ac51_q2; |
| | | } |
| | | public float getPump_curr_ac51_q4() { |
| | | return pump_curr_ac51_q4; |
| | | } |
| | | public void setPump_curr_ac51_q4(float pump_curr_ac51_q4) { |
| | | this.pump_curr_ac51_q4 = pump_curr_ac51_q4; |
| | | } |
| | | public float getPump_curr_ac52_q1() { |
| | | return pump_curr_ac52_q1; |
| | | } |
| | | public void setPump_curr_ac52_q1(float pump_curr_ac52_q1) { |
| | | this.pump_curr_ac52_q1 = pump_curr_ac52_q1; |
| | | } |
| | | public float getPump_curr_ac52_q6() { |
| | | return pump_curr_ac52_q6; |
| | | } |
| | | public void setPump_curr_ac52_q6(float pump_curr_ac52_q6) { |
| | | this.pump_curr_ac52_q6 = pump_curr_ac52_q6; |
| | | } |
| | | public float getPump_curr_ac53_q3() { |
| | | return pump_curr_ac53_q3; |
| | | } |
| | | public void setPump_curr_ac53_q3(float pump_curr_ac53_q3) { |
| | | this.pump_curr_ac53_q3 = pump_curr_ac53_q3; |
| | | } |
| | | public float getPump_curr_ac60_q16() { |
| | | return pump_curr_ac60_q16; |
| | | } |
| | | public void setPump_curr_ac60_q16(float pump_curr_ac60_q16) { |
| | | this.pump_curr_ac60_q16 = pump_curr_ac60_q16; |
| | | } |
| | | public float getPump_curr_ar13_q1() { |
| | | return pump_curr_ar13_q1; |
| | | } |
| | | public void setPump_curr_ar13_q1(float pump_curr_ar13_q1) { |
| | | this.pump_curr_ar13_q1 = pump_curr_ar13_q1; |
| | | } |
| | | public float getPump_curr_ar12_q2() { |
| | | return pump_curr_ar12_q2; |
| | | } |
| | | public void setPump_curr_ar12_q2(float pump_curr_ar12_q2) { |
| | | this.pump_curr_ar12_q2 = pump_curr_ar12_q2; |
| | | } |
| | | public float getPump_curr_ar12_q3() { |
| | | return pump_curr_ar12_q3; |
| | | } |
| | | public void setPump_curr_ar12_q3(float pump_curr_ar12_q3) { |
| | | this.pump_curr_ar12_q3 = pump_curr_ar12_q3; |
| | | } |
| | | public float getPump_curr_ar12_q4() { |
| | | return pump_curr_ar12_q4; |
| | | } |
| | | public void setPump_curr_ar12_q4(float pump_curr_ar12_q4) { |
| | | this.pump_curr_ar12_q4 = pump_curr_ar12_q4; |
| | | } |
| | | public float getPump_curr_ar12_q5() { |
| | | return pump_curr_ar12_q5; |
| | | } |
| | | public void setPump_curr_ar12_q5(float pump_curr_ar12_q5) { |
| | | this.pump_curr_ar12_q5 = pump_curr_ar12_q5; |
| | | } |
| | | public float getPump_curr_ar12_q6() { |
| | | return pump_curr_ar12_q6; |
| | | } |
| | | public void setPump_curr_ar12_q6(float pump_curr_ar12_q6) { |
| | | this.pump_curr_ar12_q6 = pump_curr_ar12_q6; |
| | | } |
| | | public float getPump_curr_ac60_q1() { |
| | | return pump_curr_ac60_q1; |
| | | } |
| | | public void setPump_curr_ac60_q1(float pump_curr_ac60_q1) { |
| | | this.pump_curr_ac60_q1 = pump_curr_ac60_q1; |
| | | } |
| | | public float getPump_curr_ar23_q1() { |
| | | return pump_curr_ar23_q1; |
| | | } |
| | | public void setPump_curr_ar23_q1(float pump_curr_ar23_q1) { |
| | | this.pump_curr_ar23_q1 = pump_curr_ar23_q1; |
| | | } |
| | | public float getPump_curr_ar23_q2() { |
| | | return pump_curr_ar23_q2; |
| | | } |
| | | public void setPump_curr_ar23_q2(float pump_curr_ar23_q2) { |
| | | this.pump_curr_ar23_q2 = pump_curr_ar23_q2; |
| | | } |
| | | public float getPump_curr_ar23_q3() { |
| | | return pump_curr_ar23_q3; |
| | | } |
| | | public void setPump_curr_ar23_q3(float pump_curr_ar23_q3) { |
| | | this.pump_curr_ar23_q3 = pump_curr_ar23_q3; |
| | | } |
| | | public float getPump_curr_ar23_q4() { |
| | | return pump_curr_ar23_q4; |
| | | } |
| | | public void setPump_curr_ar23_q4(float pump_curr_ar23_q4) { |
| | | this.pump_curr_ar23_q4 = pump_curr_ar23_q4; |
| | | } |
| | | public float getPump_curr_ar23_q6() { |
| | | return pump_curr_ar23_q6; |
| | | } |
| | | public void setPump_curr_ar23_q6(float pump_curr_ar23_q6) { |
| | | this.pump_curr_ar23_q6 = pump_curr_ar23_q6; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Cabin_bump [front_cabin_curr=" + front_cabin_curr + ", behind_cabin_curr=" + behind_cabin_curr |
| | | + ", left_jumper_curr=" + left_jumper_curr + ", right_jumper_curr=" + right_jumper_curr |
| | | + ", pump_curr_ac10_q13=" + pump_curr_ac10_q13 + ", pump_curr_ac10_q2=" + pump_curr_ac10_q2 |
| | | + ", pump_curr_ac51_q2=" + pump_curr_ac51_q2 + ", pump_curr_ac51_q4=" + pump_curr_ac51_q4 |
| | | + ", pump_curr_ac52_q1=" + pump_curr_ac52_q1 + ", pump_curr_ac52_q6=" + pump_curr_ac52_q6 |
| | | + ", pump_curr_ac53_q3=" + pump_curr_ac53_q3 + ", pump_curr_ac60_q16=" + pump_curr_ac60_q16 |
| | | + ", pump_curr_ar13_q1=" + pump_curr_ar13_q1 + ", pump_curr_ar12_q2=" + pump_curr_ar12_q2 |
| | | + ", pump_curr_ar12_q3=" + pump_curr_ar12_q3 + ", pump_curr_ar12_q4=" + pump_curr_ar12_q4 |
| | | + ", pump_curr_ar12_q5=" + pump_curr_ar12_q5 + ", pump_curr_ar12_q6=" + pump_curr_ar12_q6 |
| | | + ", pump_curr_ac60_q1=" + pump_curr_ac60_q1 + ", pump_curr_ar23_q1=" + pump_curr_ar23_q1 |
| | | + ", pump_curr_ar23_q2=" + pump_curr_ar23_q2 + ", pump_curr_ar23_q3=" + pump_curr_ar23_q3 |
| | | + ", pump_curr_ar23_q4=" + pump_curr_ar23_q4 + ", pump_curr_ar23_q6=" + pump_curr_ar23_q6 + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Dc230_converter implements Serializable{ |
| | | private float dc230_converter_outvol_one ;//'1号DC230直流变换装置输出电压', |
| | | private float dc230_converter_outcurr_one ;//'1号DC230直流变换装置输出电流', |
| | | private float dc230_converter_outvol_two ;//'2号DC230直流变换装置输出电压', |
| | | private float dc230_converter_outcurr_two ;//'2号DC230直流变换装置输出电流', |
| | | private float dc230_converter_outvol_three ;//'3号DC230直流变换装置输出电压', |
| | | private float dc230_converter_outcurr_three ;//'3号DC230直流变换装置输出电流', |
| | | private float dc230_converter_outvol_four ;//'4号DC230直流变换装置输出电压', |
| | | private float dc230_converter_outcurr_four ;//'4号DC230直流变换装置输出电流', |
| | | |
| | | private int dc230_state_one ;//'1号DC230直流变换装置运行状态', |
| | | private int dc230_state_two ;//'2号DC230直流变换装置运行状态', |
| | | private int dc230_state_three ;//'3号DC230直流变换装置运行状态', |
| | | private int dc230_state_four ;//'4号DC230直流变换装置运行状态', |
| | | |
| | | private int dc230_alarmstate_one ;//'1号DC230直流变换装置故障状态', |
| | | private int dc230_alarmstate_two ;//'2号DC230直流变换装置故障状态', |
| | | private int dc230_alarmstate_three ;//'3号DC230直流变换装置故障状态', |
| | | private int dc230_alarmstate_four ;//'4号DC230直流变换装置故障状态', |
| | | public float getDc230_converter_outvol_one() { |
| | | return dc230_converter_outvol_one; |
| | | } |
| | | public void setDc230_converter_outvol_one(float dc230_converter_outvol_one) { |
| | | this.dc230_converter_outvol_one = dc230_converter_outvol_one; |
| | | } |
| | | public float getDc230_converter_outcurr_one() { |
| | | return dc230_converter_outcurr_one; |
| | | } |
| | | public void setDc230_converter_outcurr_one(float dc230_converter_outcurr_one) { |
| | | this.dc230_converter_outcurr_one = dc230_converter_outcurr_one; |
| | | } |
| | | public float getDc230_converter_outvol_two() { |
| | | return dc230_converter_outvol_two; |
| | | } |
| | | public void setDc230_converter_outvol_two(float dc230_converter_outvol_two) { |
| | | this.dc230_converter_outvol_two = dc230_converter_outvol_two; |
| | | } |
| | | public float getDc230_converter_outcurr_two() { |
| | | return dc230_converter_outcurr_two; |
| | | } |
| | | public void setDc230_converter_outcurr_two(float dc230_converter_outcurr_two) { |
| | | this.dc230_converter_outcurr_two = dc230_converter_outcurr_two; |
| | | } |
| | | public float getDc230_converter_outvol_three() { |
| | | return dc230_converter_outvol_three; |
| | | } |
| | | public void setDc230_converter_outvol_three(float dc230_converter_outvol_three) { |
| | | this.dc230_converter_outvol_three = dc230_converter_outvol_three; |
| | | } |
| | | public float getDc230_converter_outcurr_three() { |
| | | return dc230_converter_outcurr_three; |
| | | } |
| | | public void setDc230_converter_outcurr_three(float dc230_converter_outcurr_three) { |
| | | this.dc230_converter_outcurr_three = dc230_converter_outcurr_three; |
| | | } |
| | | public float getDc230_converter_outvol_four() { |
| | | return dc230_converter_outvol_four; |
| | | } |
| | | public void setDc230_converter_outvol_four(float dc230_converter_outvol_four) { |
| | | this.dc230_converter_outvol_four = dc230_converter_outvol_four; |
| | | } |
| | | public float getDc230_converter_outcurr_four() { |
| | | return dc230_converter_outcurr_four; |
| | | } |
| | | public void setDc230_converter_outcurr_four(float dc230_converter_outcurr_four) { |
| | | this.dc230_converter_outcurr_four = dc230_converter_outcurr_four; |
| | | } |
| | | public int getDc230_state_one() { |
| | | return dc230_state_one; |
| | | } |
| | | public void setDc230_state_one(int dc230_state_one) { |
| | | this.dc230_state_one = dc230_state_one; |
| | | } |
| | | public int getDc230_state_two() { |
| | | return dc230_state_two; |
| | | } |
| | | public void setDc230_state_two(int dc230_state_two) { |
| | | this.dc230_state_two = dc230_state_two; |
| | | } |
| | | public int getDc230_state_three() { |
| | | return dc230_state_three; |
| | | } |
| | | public void setDc230_state_three(int dc230_state_three) { |
| | | this.dc230_state_three = dc230_state_three; |
| | | } |
| | | public int getDc230_state_four() { |
| | | return dc230_state_four; |
| | | } |
| | | public void setDc230_state_four(int dc230_state_four) { |
| | | this.dc230_state_four = dc230_state_four; |
| | | } |
| | | public int getDc230_alarmstate_one() { |
| | | return dc230_alarmstate_one; |
| | | } |
| | | public void setDc230_alarmstate_one(int dc230_alarmstate_one) { |
| | | this.dc230_alarmstate_one = dc230_alarmstate_one; |
| | | } |
| | | public int getDc230_alarmstate_two() { |
| | | return dc230_alarmstate_two; |
| | | } |
| | | public void setDc230_alarmstate_two(int dc230_alarmstate_two) { |
| | | this.dc230_alarmstate_two = dc230_alarmstate_two; |
| | | } |
| | | public int getDc230_alarmstate_three() { |
| | | return dc230_alarmstate_three; |
| | | } |
| | | public void setDc230_alarmstate_three(int dc230_alarmstate_three) { |
| | | this.dc230_alarmstate_three = dc230_alarmstate_three; |
| | | } |
| | | public int getDc230_alarmstate_four() { |
| | | return dc230_alarmstate_four; |
| | | } |
| | | public void setDc230_alarmstate_four(int dc230_alarmstate_four) { |
| | | this.dc230_alarmstate_four = dc230_alarmstate_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Dc230_converter [dc230_converter_outvol_one=" + dc230_converter_outvol_one |
| | | + ", dc230_converter_outcurr_one=" + dc230_converter_outcurr_one + ", dc230_converter_outvol_two=" |
| | | + dc230_converter_outvol_two + ", dc230_converter_outcurr_two=" + dc230_converter_outcurr_two |
| | | + ", dc230_converter_outvol_three=" + dc230_converter_outvol_three + ", dc230_converter_outcurr_three=" |
| | | + dc230_converter_outcurr_three + ", dc230_converter_outvol_four=" + dc230_converter_outvol_four |
| | | + ", dc230_converter_outcurr_four=" + dc230_converter_outcurr_four + ", dc230_state_one=" |
| | | + dc230_state_one + ", dc230_state_two=" + dc230_state_two + ", dc230_state_three=" + dc230_state_three |
| | | + ", dc230_state_four=" + dc230_state_four + ", dc230_alarmstate_one=" + dc230_alarmstate_one |
| | | + ", dc230_alarmstate_two=" + dc230_alarmstate_two + ", dc230_alarmstate_three=" |
| | | + dc230_alarmstate_three + ", dc230_alarmstate_four=" + dc230_alarmstate_four + "]"; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Dc25_converter implements Serializable{ |
| | | private float dc25_converter_outvol_one ;//'1号DC25直流变换装置输出电压', |
| | | private float dc25_converter_outcurr_one ;//'1号DC25直流变换装置输出电流', |
| | | private float dc25_converter_outvol_two ;//'2号DC25直流变换装置输出电压', |
| | | private float dc25_converter_outcurr_two ;//'2号DC25直流变换装置输出电流', |
| | | private float dc25_converter_outvol_three ;//'3号DC25直流变换装置输出电压', |
| | | private float dc25_converter_outcurr_three ;//'3号DC25直流变换装置输出电流', |
| | | private float dc25_converter_outvol_four ;//'4号DC25直流变换装置输出电压', |
| | | private float dc25_converter_outcurr_four ;//'4号DC25直流变换装置输出电流', |
| | | |
| | | private int dc25_state_one ;//'1号DC25直流变换装置运行状态', |
| | | private int dc25_state_two ;//'2号DC25直流变换装置运行状态', |
| | | private int dc25_state_three ;//'3号DC25直流变换装置运行状态', |
| | | private int dc25_state_four ;//'4号DC25直流变换装置运行状态', |
| | | |
| | | private int dc25_alarmstate_one ;//'1号DC25直流变换装置故障状态', |
| | | private int dc25_alarmstate_two ;//'2号DC25直流变换装置故障状态', |
| | | private int dc25_alarmstate_three ;//'3号DC25直流变换装置故障状态', |
| | | private int dc25_alarmstate_four ;//'4号DC25直流变换装置故障状态', |
| | | public float getDc25_converter_outvol_one() { |
| | | return dc25_converter_outvol_one; |
| | | } |
| | | public void setDc25_converter_outvol_one(float dc25_converter_outvol_one) { |
| | | this.dc25_converter_outvol_one = dc25_converter_outvol_one; |
| | | } |
| | | public float getDc25_converter_outcurr_one() { |
| | | return dc25_converter_outcurr_one; |
| | | } |
| | | public void setDc25_converter_outcurr_one(float dc25_converter_outcurr_one) { |
| | | this.dc25_converter_outcurr_one = dc25_converter_outcurr_one; |
| | | } |
| | | public float getDc25_converter_outvol_two() { |
| | | return dc25_converter_outvol_two; |
| | | } |
| | | public void setDc25_converter_outvol_two(float dc25_converter_outvol_two) { |
| | | this.dc25_converter_outvol_two = dc25_converter_outvol_two; |
| | | } |
| | | public float getDc25_converter_outcurr_two() { |
| | | return dc25_converter_outcurr_two; |
| | | } |
| | | public void setDc25_converter_outcurr_two(float dc25_converter_outcurr_two) { |
| | | this.dc25_converter_outcurr_two = dc25_converter_outcurr_two; |
| | | } |
| | | public float getDc25_converter_outvol_three() { |
| | | return dc25_converter_outvol_three; |
| | | } |
| | | public void setDc25_converter_outvol_three(float dc25_converter_outvol_three) { |
| | | this.dc25_converter_outvol_three = dc25_converter_outvol_three; |
| | | } |
| | | public float getDc25_converter_outcurr_three() { |
| | | return dc25_converter_outcurr_three; |
| | | } |
| | | public void setDc25_converter_outcurr_three(float dc25_converter_outcurr_three) { |
| | | this.dc25_converter_outcurr_three = dc25_converter_outcurr_three; |
| | | } |
| | | public float getDc25_converter_outvol_four() { |
| | | return dc25_converter_outvol_four; |
| | | } |
| | | public void setDc25_converter_outvol_four(float dc25_converter_outvol_four) { |
| | | this.dc25_converter_outvol_four = dc25_converter_outvol_four; |
| | | } |
| | | public float getDc25_converter_outcurr_four() { |
| | | return dc25_converter_outcurr_four; |
| | | } |
| | | public void setDc25_converter_outcurr_four(float dc25_converter_outcurr_four) { |
| | | this.dc25_converter_outcurr_four = dc25_converter_outcurr_four; |
| | | } |
| | | public int getDc25_state_one() { |
| | | return dc25_state_one; |
| | | } |
| | | public void setDc25_state_one(int dc25_state_one) { |
| | | this.dc25_state_one = dc25_state_one; |
| | | } |
| | | public int getDc25_state_two() { |
| | | return dc25_state_two; |
| | | } |
| | | public void setDc25_state_two(int dc25_state_two) { |
| | | this.dc25_state_two = dc25_state_two; |
| | | } |
| | | public int getDc25_state_three() { |
| | | return dc25_state_three; |
| | | } |
| | | public void setDc25_state_three(int dc25_state_three) { |
| | | this.dc25_state_three = dc25_state_three; |
| | | } |
| | | public int getDc25_state_four() { |
| | | return dc25_state_four; |
| | | } |
| | | public void setDc25_state_four(int dc25_state_four) { |
| | | this.dc25_state_four = dc25_state_four; |
| | | } |
| | | public int getDc25_alarmstate_one() { |
| | | return dc25_alarmstate_one; |
| | | } |
| | | public void setDc25_alarmstate_one(int dc25_alarmstate_one) { |
| | | this.dc25_alarmstate_one = dc25_alarmstate_one; |
| | | } |
| | | public int getDc25_alarmstate_two() { |
| | | return dc25_alarmstate_two; |
| | | } |
| | | public void setDc25_alarmstate_two(int dc25_alarmstate_two) { |
| | | this.dc25_alarmstate_two = dc25_alarmstate_two; |
| | | } |
| | | public int getDc25_alarmstate_three() { |
| | | return dc25_alarmstate_three; |
| | | } |
| | | public void setDc25_alarmstate_three(int dc25_alarmstate_three) { |
| | | this.dc25_alarmstate_three = dc25_alarmstate_three; |
| | | } |
| | | public int getDc25_alarmstate_four() { |
| | | return dc25_alarmstate_four; |
| | | } |
| | | public void setDc25_alarmstate_four(int dc25_alarmstate_four) { |
| | | this.dc25_alarmstate_four = dc25_alarmstate_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Dc25_converter [dc25_converter_outvol_one=" + dc25_converter_outvol_one |
| | | + ", dc25_converter_outcurr_one=" + dc25_converter_outcurr_one + ", dc25_converter_outvol_two=" |
| | | + dc25_converter_outvol_two + ", dc25_converter_outcurr_two=" + dc25_converter_outcurr_two |
| | | + ", dc25_converter_outvol_three=" + dc25_converter_outvol_three + ", dc25_converter_outcurr_three=" |
| | | + dc25_converter_outcurr_three + ", dc25_converter_outvol_four=" + dc25_converter_outvol_four |
| | | + ", dc25_converter_outcurr_four=" + dc25_converter_outcurr_four + ", dc25_state_one=" + dc25_state_one |
| | | + ", dc25_state_two=" + dc25_state_two + ", dc25_state_three=" + dc25_state_three + ", dc25_state_four=" |
| | | + dc25_state_four + ", dc25_alarmstate_one=" + dc25_alarmstate_one + ", dc25_alarmstate_two=" |
| | | + dc25_alarmstate_two + ", dc25_alarmstate_three=" + dc25_alarmstate_three + ", dc25_alarmstate_four=" |
| | | + dc25_alarmstate_four + "]"; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Dcmain_board implements Serializable{ |
| | | private float dcmain_boardvol_one ;//'1号直流主配电板电压', |
| | | private float dcmain_boardvol_two ;//'2号直流主配电板电压', |
| | | private float dcmain_boardvol_three ;//'3号直流主配电板电压', |
| | | private float dcmain_boardvol_four ;//'4号直流主配电板电压', |
| | | public float getDcmain_boardvol_one() { |
| | | return dcmain_boardvol_one; |
| | | } |
| | | public void setDcmain_boardvol_one(float dcmain_boardvol_one) { |
| | | this.dcmain_boardvol_one = dcmain_boardvol_one; |
| | | } |
| | | public float getDcmain_boardvol_two() { |
| | | return dcmain_boardvol_two; |
| | | } |
| | | public void setDcmain_boardvol_two(float dcmain_boardvol_two) { |
| | | this.dcmain_boardvol_two = dcmain_boardvol_two; |
| | | } |
| | | public float getDcmain_boardvol_three() { |
| | | return dcmain_boardvol_three; |
| | | } |
| | | public void setDcmain_boardvol_three(float dcmain_boardvol_three) { |
| | | this.dcmain_boardvol_three = dcmain_boardvol_three; |
| | | } |
| | | public float getDcmain_boardvol_four() { |
| | | return dcmain_boardvol_four; |
| | | } |
| | | public void setDcmain_boardvol_four(float dcmain_boardvol_four) { |
| | | this.dcmain_boardvol_four = dcmain_boardvol_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Dcmain_board [dcmain_boardvol_one=" + dcmain_boardvol_one + ", dcmain_boardvol_two=" |
| | | + dcmain_boardvol_two + ", dcmain_boardvol_three=" + dcmain_boardvol_three + ", dcmain_boardvol_four=" |
| | | + dcmain_boardvol_four + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Inverter implements Serializable{ |
| | | private float inverter_outvol_one ;//'1号大功率逆变电源输出电压', |
| | | private float inverter_outcurr_one ;//'1号大功率逆变电源输出电流', |
| | | private float inverter_outpower_one ;//'1号大功率逆变电源输出功率', |
| | | private float inverter_outvol_two ;//'2号大功率逆变电源输出电压', |
| | | private float inverter_outcurr_two ;//'2号大功率逆变电源输出电流', |
| | | private float inverter_outpower_two ;//'2号大功率逆变电源输出功率', |
| | | private float inverter_outvol_three ;//'3号大功率逆变电源输出电压', |
| | | private float inverter_outcurr_three ;//'3号大功率逆变电源输出电流', |
| | | private float inverter_outpower_three ;//'3号大功率逆变电源输出功率', |
| | | private float inverter_outvol_four ;//'4号大功率逆变电源输出电压', |
| | | private float inverter_outcurr_four ;//'4号大功率逆变电源输出电流', |
| | | private float inverter_outpower_four ;//'4号大功率逆变电源输出功率', |
| | | |
| | | private int inverter_state_one ;//'1号大功率逆变电源运行状态', |
| | | private int inverter_state_two ;//'2号大功率逆变电源运行状态', |
| | | private int inverter_state_three ;//'3号大功率逆变电源运行状态', |
| | | private int inverter_state_four ;//'4号大功率逆变电源运行状态', |
| | | |
| | | private int inverter_alarmstate_one ;//'1号大功率逆变电源故障状态', |
| | | private int inverter_alarmstate_two ;//'2号大功率逆变电源故障状态', |
| | | private int inverter_alarmstate_three ;//'3号大功率逆变电源故障状态', |
| | | private int inverter_alarmstate_four ;//'4号大功率逆变电源故障状态', |
| | | public float getInverter_outvol_one() { |
| | | return inverter_outvol_one; |
| | | } |
| | | public void setInverter_outvol_one(float inverter_outvol_one) { |
| | | this.inverter_outvol_one = inverter_outvol_one; |
| | | } |
| | | public float getInverter_outcurr_one() { |
| | | return inverter_outcurr_one; |
| | | } |
| | | public void setInverter_outcurr_one(float inverter_outcurr_one) { |
| | | this.inverter_outcurr_one = inverter_outcurr_one; |
| | | } |
| | | public float getInverter_outpower_one() { |
| | | return inverter_outpower_one; |
| | | } |
| | | public void setInverter_outpower_one(float inverter_outpower_one) { |
| | | this.inverter_outpower_one = inverter_outpower_one; |
| | | } |
| | | public float getInverter_outvol_two() { |
| | | return inverter_outvol_two; |
| | | } |
| | | public void setInverter_outvol_two(float inverter_outvol_two) { |
| | | this.inverter_outvol_two = inverter_outvol_two; |
| | | } |
| | | public float getInverter_outcurr_two() { |
| | | return inverter_outcurr_two; |
| | | } |
| | | public void setInverter_outcurr_two(float inverter_outcurr_two) { |
| | | this.inverter_outcurr_two = inverter_outcurr_two; |
| | | } |
| | | public float getInverter_outpower_two() { |
| | | return inverter_outpower_two; |
| | | } |
| | | public void setInverter_outpower_two(float inverter_outpower_two) { |
| | | this.inverter_outpower_two = inverter_outpower_two; |
| | | } |
| | | public float getInverter_outvol_three() { |
| | | return inverter_outvol_three; |
| | | } |
| | | public void setInverter_outvol_three(float inverter_outvol_three) { |
| | | this.inverter_outvol_three = inverter_outvol_three; |
| | | } |
| | | public float getInverter_outcurr_three() { |
| | | return inverter_outcurr_three; |
| | | } |
| | | public void setInverter_outcurr_three(float inverter_outcurr_three) { |
| | | this.inverter_outcurr_three = inverter_outcurr_three; |
| | | } |
| | | public float getInverter_outpower_three() { |
| | | return inverter_outpower_three; |
| | | } |
| | | public void setInverter_outpower_three(float inverter_outpower_three) { |
| | | this.inverter_outpower_three = inverter_outpower_three; |
| | | } |
| | | public float getInverter_outvol_four() { |
| | | return inverter_outvol_four; |
| | | } |
| | | public void setInverter_outvol_four(float inverter_outvol_four) { |
| | | this.inverter_outvol_four = inverter_outvol_four; |
| | | } |
| | | public float getInverter_outcurr_four() { |
| | | return inverter_outcurr_four; |
| | | } |
| | | public void setInverter_outcurr_four(float inverter_outcurr_four) { |
| | | this.inverter_outcurr_four = inverter_outcurr_four; |
| | | } |
| | | public float getInverter_outpower_four() { |
| | | return inverter_outpower_four; |
| | | } |
| | | public void setInverter_outpower_four(float inverter_outpower_four) { |
| | | this.inverter_outpower_four = inverter_outpower_four; |
| | | } |
| | | public int getInverter_state_one() { |
| | | return inverter_state_one; |
| | | } |
| | | public void setInverter_state_one(int inverter_state_one) { |
| | | this.inverter_state_one = inverter_state_one; |
| | | } |
| | | public int getInverter_state_two() { |
| | | return inverter_state_two; |
| | | } |
| | | public void setInverter_state_two(int inverter_state_two) { |
| | | this.inverter_state_two = inverter_state_two; |
| | | } |
| | | public int getInverter_state_three() { |
| | | return inverter_state_three; |
| | | } |
| | | public void setInverter_state_three(int inverter_state_three) { |
| | | this.inverter_state_three = inverter_state_three; |
| | | } |
| | | public int getInverter_state_four() { |
| | | return inverter_state_four; |
| | | } |
| | | public void setInverter_state_four(int inverter_state_four) { |
| | | this.inverter_state_four = inverter_state_four; |
| | | } |
| | | public int getInverter_alarmstate_one() { |
| | | return inverter_alarmstate_one; |
| | | } |
| | | public void setInverter_alarmstate_one(int inverter_alarmstate_one) { |
| | | this.inverter_alarmstate_one = inverter_alarmstate_one; |
| | | } |
| | | public int getInverter_alarmstate_two() { |
| | | return inverter_alarmstate_two; |
| | | } |
| | | public void setInverter_alarmstate_two(int inverter_alarmstate_two) { |
| | | this.inverter_alarmstate_two = inverter_alarmstate_two; |
| | | } |
| | | public int getInverter_alarmstate_three() { |
| | | return inverter_alarmstate_three; |
| | | } |
| | | public void setInverter_alarmstate_three(int inverter_alarmstate_three) { |
| | | this.inverter_alarmstate_three = inverter_alarmstate_three; |
| | | } |
| | | public int getInverter_alarmstate_four() { |
| | | return inverter_alarmstate_four; |
| | | } |
| | | public void setInverter_alarmstate_four(int inverter_alarmstate_four) { |
| | | this.inverter_alarmstate_four = inverter_alarmstate_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Inverter [inverter_outvol_one=" + inverter_outvol_one + ", inverter_outcurr_one=" + inverter_outcurr_one |
| | | + ", inverter_outpower_one=" + inverter_outpower_one + ", inverter_outvol_two=" + inverter_outvol_two |
| | | + ", inverter_outcurr_two=" + inverter_outcurr_two + ", inverter_outpower_two=" + inverter_outpower_two |
| | | + ", inverter_outvol_three=" + inverter_outvol_three + ", inverter_outcurr_three=" |
| | | + inverter_outcurr_three + ", inverter_outpower_three=" + inverter_outpower_three |
| | | + ", inverter_outvol_four=" + inverter_outvol_four + ", inverter_outcurr_four=" + inverter_outcurr_four |
| | | + ", inverter_outpower_four=" + inverter_outpower_four + ", inverter_state_one=" + inverter_state_one |
| | | + ", inverter_state_two=" + inverter_state_two + ", inverter_state_three=" + inverter_state_three |
| | | + ", inverter_state_four=" + inverter_state_four + ", inverter_alarmstate_one=" |
| | | + inverter_alarmstate_one + ", inverter_alarmstate_two=" + inverter_alarmstate_two |
| | | + ", inverter_alarmstate_three=" + inverter_alarmstate_three + ", inverter_alarmstate_four=" |
| | | + inverter_alarmstate_four + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class Partin_elemonitor implements Serializable{ |
| | | private int num ; |
| | | private Date record_time;//'记录时间', |
| | | |
| | | private int dc_insulation_low_alarm ;//'直流绝缘低报警', |
| | | |
| | | private Ac230_elec ac230_elec; //AC230不间断电源 |
| | | private Acmain_board acmain_board; //交流主配电板 |
| | | private Acreliable_board acreliable_board;//交流可靠配电板 |
| | | private Batt batt; //蓄电池组 |
| | | private Cabin_bump cabin_bump;//母联+水泵 |
| | | private Dc230_converter dc230_converter;//DC230直流变换装置 |
| | | private Dc25_converter dc25_converter;//DC25直流变换装置 |
| | | private Dcmain_board dcmain_board;//直流主配电板 |
| | | private Inverter inverter; //逆变电源 |
| | | private Propulsion propulsion_motor;//推进电机 |
| | | private Shore shore;//直流岸电 |
| | | private Switch_value switch_value;//开关量板 |
| | | private Turbogenerator turbogenerator;//汽轮发电机 |
| | | |
| | | private String note; |
| | | |
| | | public int getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(int num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public Date getRecord_time() { |
| | | return record_time; |
| | | } |
| | | |
| | | public void setRecord_time(Date record_time) { |
| | | this.record_time = record_time; |
| | | } |
| | | |
| | | public int getDc_insulation_low_alarm() { |
| | | return dc_insulation_low_alarm; |
| | | } |
| | | |
| | | public void setDc_insulation_low_alarm(int dc_insulation_low_alarm) { |
| | | this.dc_insulation_low_alarm = dc_insulation_low_alarm; |
| | | } |
| | | |
| | | public Ac230_elec getAc230_elec() { |
| | | return ac230_elec; |
| | | } |
| | | |
| | | public void setAc230_elec(Ac230_elec ac230_elec) { |
| | | this.ac230_elec = ac230_elec; |
| | | } |
| | | |
| | | public Acmain_board getAcmain_board() { |
| | | return acmain_board; |
| | | } |
| | | |
| | | public void setAcmain_board(Acmain_board acmain_board) { |
| | | this.acmain_board = acmain_board; |
| | | } |
| | | |
| | | public Acreliable_board getAcreliable_board() { |
| | | return acreliable_board; |
| | | } |
| | | |
| | | public void setAcreliable_board(Acreliable_board acreliable_board) { |
| | | this.acreliable_board = acreliable_board; |
| | | } |
| | | |
| | | public Batt getBatt() { |
| | | return batt; |
| | | } |
| | | |
| | | public void setBatt(Batt batt) { |
| | | this.batt = batt; |
| | | } |
| | | |
| | | public Cabin_bump getCabin_bump() { |
| | | return cabin_bump; |
| | | } |
| | | |
| | | public void setCabin_bump(Cabin_bump cabin_bump) { |
| | | this.cabin_bump = cabin_bump; |
| | | } |
| | | |
| | | public Dc230_converter getDc230_converter() { |
| | | return dc230_converter; |
| | | } |
| | | |
| | | public void setDc230_converter(Dc230_converter dc230_converter) { |
| | | this.dc230_converter = dc230_converter; |
| | | } |
| | | |
| | | public Dc25_converter getDc25_converter() { |
| | | return dc25_converter; |
| | | } |
| | | |
| | | public void setDc25_converter(Dc25_converter dc25_converter) { |
| | | this.dc25_converter = dc25_converter; |
| | | } |
| | | |
| | | public Dcmain_board getDcmain_board() { |
| | | return dcmain_board; |
| | | } |
| | | |
| | | public void setDcmain_board(Dcmain_board dcmain_board) { |
| | | this.dcmain_board = dcmain_board; |
| | | } |
| | | |
| | | public Inverter getInverter() { |
| | | return inverter; |
| | | } |
| | | |
| | | public void setInverter(Inverter inverter) { |
| | | this.inverter = inverter; |
| | | } |
| | | |
| | | public Propulsion getPropulsion_motor() { |
| | | return propulsion_motor; |
| | | } |
| | | |
| | | public void setPropulsion_motor(Propulsion propulsion_motor) { |
| | | this.propulsion_motor = propulsion_motor; |
| | | } |
| | | |
| | | public Shore getShore() { |
| | | return shore; |
| | | } |
| | | |
| | | public void setShore(Shore shore) { |
| | | this.shore = shore; |
| | | } |
| | | |
| | | public Switch_value getSwitch_value() { |
| | | return switch_value; |
| | | } |
| | | |
| | | public void setSwitch_value(Switch_value switch_value) { |
| | | this.switch_value = switch_value; |
| | | } |
| | | |
| | | public Turbogenerator getTurbogenerator() { |
| | | return turbogenerator; |
| | | } |
| | | |
| | | public void setTurbogenerator(Turbogenerator turbogenerator) { |
| | | this.turbogenerator = turbogenerator; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Partin_elemonitor [num=" + num + ", record_time=" + record_time + ", dc_insulation_low_alarm=" |
| | | + dc_insulation_low_alarm + ", ac230_elec=" + ac230_elec + ", acmain_board=" + acmain_board |
| | | + ", acreliable_board=" + acreliable_board + ", batt=" + batt + ", cabin_bump=" + cabin_bump |
| | | + ", dc230_converter=" + dc230_converter + ", dc25_converter=" + dc25_converter + ", dcmain_board=" |
| | | + dcmain_board + ", inverter=" + inverter + ", propulsion_motor=" + propulsion_motor + ", shore=" |
| | | + shore + ", switch_value=" + switch_value + ", turbogenerator=" + turbogenerator + ", note=" + note |
| | | + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Propulsion implements Serializable{ |
| | | private float propulsion_motorvol_one ;//'推进电机1支路电压', |
| | | private float propulsion_motorcurr_one ;//'推进电机1支路电流', |
| | | private float propulsion_motorvol_two ;//'推进电机2支路电压', |
| | | private float propulsion_motorcurr_two ;//'推进电机2支路电流', |
| | | private float propulsion_motorpower ;//'推进电机总功率', |
| | | private float propulsion_motorspeed ;//'推进电机转速', |
| | | |
| | | private int propulsion_motor_state ;//'推进电机工作状态', |
| | | |
| | | public float getPropulsion_motorvol_one() { |
| | | return propulsion_motorvol_one; |
| | | } |
| | | |
| | | public void setPropulsion_motorvol_one(float propulsion_motorvol_one) { |
| | | this.propulsion_motorvol_one = propulsion_motorvol_one; |
| | | } |
| | | |
| | | public float getPropulsion_motorcurr_one() { |
| | | return propulsion_motorcurr_one; |
| | | } |
| | | |
| | | public void setPropulsion_motorcurr_one(float propulsion_motorcurr_one) { |
| | | this.propulsion_motorcurr_one = propulsion_motorcurr_one; |
| | | } |
| | | |
| | | public float getPropulsion_motorvol_two() { |
| | | return propulsion_motorvol_two; |
| | | } |
| | | |
| | | public void setPropulsion_motorvol_two(float propulsion_motorvol_two) { |
| | | this.propulsion_motorvol_two = propulsion_motorvol_two; |
| | | } |
| | | |
| | | public float getPropulsion_motorcurr_two() { |
| | | return propulsion_motorcurr_two; |
| | | } |
| | | |
| | | public void setPropulsion_motorcurr_two(float propulsion_motorcurr_two) { |
| | | this.propulsion_motorcurr_two = propulsion_motorcurr_two; |
| | | } |
| | | |
| | | public float getPropulsion_motorpower() { |
| | | return propulsion_motorpower; |
| | | } |
| | | |
| | | public void setPropulsion_motorpower(float propulsion_motorpower) { |
| | | this.propulsion_motorpower = propulsion_motorpower; |
| | | } |
| | | |
| | | public float getPropulsion_motorspeed() { |
| | | return propulsion_motorspeed; |
| | | } |
| | | |
| | | public void setPropulsion_motorspeed(float propulsion_motorspeed) { |
| | | this.propulsion_motorspeed = propulsion_motorspeed; |
| | | } |
| | | |
| | | public int getPropulsion_motor_state() { |
| | | return propulsion_motor_state; |
| | | } |
| | | |
| | | public void setPropulsion_motor_state(int propulsion_motor_state) { |
| | | this.propulsion_motor_state = propulsion_motor_state; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Propulsion_motor [propulsion_motorvol_one=" + propulsion_motorvol_one + ", propulsion_motorcurr_one=" |
| | | + propulsion_motorcurr_one + ", propulsion_motorvol_two=" + propulsion_motorvol_two |
| | | + ", propulsion_motorcurr_two=" + propulsion_motorcurr_two + ", propulsion_motorpower=" |
| | | + propulsion_motorpower + ", propulsion_motorspeed=" + propulsion_motorspeed |
| | | + ", propulsion_motor_state=" + propulsion_motor_state + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Shore implements Serializable{ |
| | | private float dc_shorevol_one ;//'1号直流岸电工作电压', |
| | | private float dc_shorecurr_one ;//'1号直流岸电工作电流', |
| | | private float dc_shorevol_two ;//'2号直流岸电工作电压', |
| | | private float dc_shorecurr_two ;//'2号直流岸电工作电流', |
| | | private float ac_shorevol ;//'交流岸电工作电压', |
| | | private float ac_shorecurr ;//'交流岸电工作电流', |
| | | private float ac_shorepower ;//'交流岸电功率', |
| | | public float getDc_shorevol_one() { |
| | | return dc_shorevol_one; |
| | | } |
| | | public void setDc_shorevol_one(float dc_shorevol_one) { |
| | | this.dc_shorevol_one = dc_shorevol_one; |
| | | } |
| | | public float getDc_shorecurr_one() { |
| | | return dc_shorecurr_one; |
| | | } |
| | | public void setDc_shorecurr_one(float dc_shorecurr_one) { |
| | | this.dc_shorecurr_one = dc_shorecurr_one; |
| | | } |
| | | public float getDc_shorevol_two() { |
| | | return dc_shorevol_two; |
| | | } |
| | | public void setDc_shorevol_two(float dc_shorevol_two) { |
| | | this.dc_shorevol_two = dc_shorevol_two; |
| | | } |
| | | public float getDc_shorecurr_two() { |
| | | return dc_shorecurr_two; |
| | | } |
| | | public void setDc_shorecurr_two(float dc_shorecurr_two) { |
| | | this.dc_shorecurr_two = dc_shorecurr_two; |
| | | } |
| | | public float getAc_shorevol() { |
| | | return ac_shorevol; |
| | | } |
| | | public void setAc_shorevol(float ac_shorevol) { |
| | | this.ac_shorevol = ac_shorevol; |
| | | } |
| | | public float getAc_shorecurr() { |
| | | return ac_shorecurr; |
| | | } |
| | | public void setAc_shorecurr(float ac_shorecurr) { |
| | | this.ac_shorecurr = ac_shorecurr; |
| | | } |
| | | public float getAc_shorepower() { |
| | | return ac_shorepower; |
| | | } |
| | | public void setAc_shorepower(float ac_shorepower) { |
| | | this.ac_shorepower = ac_shorepower; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Shore [dc_shorevol_one=" + dc_shorevol_one + ", dc_shorecurr_one=" + dc_shorecurr_one |
| | | + ", dc_shorevol_two=" + dc_shorevol_two + ", dc_shorecurr_two=" + dc_shorecurr_two + ", ac_shorevol=" |
| | | + ac_shorevol + ", ac_shorecurr=" + ac_shorecurr + ", ac_shorepower=" + ac_shorepower + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Switch_value implements Serializable { |
| | | private int switching_value_one ;//'开关量板1', |
| | | private int switching_value_two ;//'开关量板2', |
| | | private int switching_value_three ;//'开关量板3', |
| | | private int switching_value_four ;//'开关量板4', |
| | | public int getSwitching_value_one() { |
| | | return switching_value_one; |
| | | } |
| | | public void setSwitching_value_one(int switching_value_one) { |
| | | this.switching_value_one = switching_value_one; |
| | | } |
| | | public int getSwitching_value_two() { |
| | | return switching_value_two; |
| | | } |
| | | public void setSwitching_value_two(int switching_value_two) { |
| | | this.switching_value_two = switching_value_two; |
| | | } |
| | | public int getSwitching_value_three() { |
| | | return switching_value_three; |
| | | } |
| | | public void setSwitching_value_three(int switching_value_three) { |
| | | this.switching_value_three = switching_value_three; |
| | | } |
| | | public int getSwitching_value_four() { |
| | | return switching_value_four; |
| | | } |
| | | public void setSwitching_value_four(int switching_value_four) { |
| | | this.switching_value_four = switching_value_four; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Switch_value [switching_value_one=" + switching_value_one + ", switching_value_two=" |
| | | + switching_value_two + ", switching_value_three=" + switching_value_three + ", switching_value_four=" |
| | | + switching_value_four + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Turbogenerator implements Serializable{ |
| | | private float turbogenerator_outvol_one ;//'1号汽轮发电机输出电压', |
| | | private float turbogenerator_outcurr_one ;//'1号汽轮发电机输出电流', |
| | | private float turbogenerator_outpower_one ;//'1号汽轮发电机输出功率', |
| | | private float turbogenerator_outvol_two ;//'2号汽轮发电机输出电压', |
| | | private float turbogenerator_outcurr_two ;//'2号汽轮发电机输出电流', |
| | | private float turbogenerator_outpower_two ;//'2号汽轮发电机输出功率', |
| | | |
| | | private int turbogenerator_state_one ;//'1号汽轮发电机运行状态', |
| | | private int turbogenerator_state_two ;//'2号汽轮发电机运行状态', |
| | | public float getTurbogenerator_outvol_one() { |
| | | return turbogenerator_outvol_one; |
| | | } |
| | | public void setTurbogenerator_outvol_one(float turbogenerator_outvol_one) { |
| | | this.turbogenerator_outvol_one = turbogenerator_outvol_one; |
| | | } |
| | | public float getTurbogenerator_outcurr_one() { |
| | | return turbogenerator_outcurr_one; |
| | | } |
| | | public void setTurbogenerator_outcurr_one(float turbogenerator_outcurr_one) { |
| | | this.turbogenerator_outcurr_one = turbogenerator_outcurr_one; |
| | | } |
| | | public float getTurbogenerator_outpower_one() { |
| | | return turbogenerator_outpower_one; |
| | | } |
| | | public void setTurbogenerator_outpower_one(float turbogenerator_outpower_one) { |
| | | this.turbogenerator_outpower_one = turbogenerator_outpower_one; |
| | | } |
| | | public float getTurbogenerator_outvol_two() { |
| | | return turbogenerator_outvol_two; |
| | | } |
| | | public void setTurbogenerator_outvol_two(float turbogenerator_outvol_two) { |
| | | this.turbogenerator_outvol_two = turbogenerator_outvol_two; |
| | | } |
| | | public float getTurbogenerator_outcurr_two() { |
| | | return turbogenerator_outcurr_two; |
| | | } |
| | | public void setTurbogenerator_outcurr_two(float turbogenerator_outcurr_two) { |
| | | this.turbogenerator_outcurr_two = turbogenerator_outcurr_two; |
| | | } |
| | | public float getTurbogenerator_outpower_two() { |
| | | return turbogenerator_outpower_two; |
| | | } |
| | | public void setTurbogenerator_outpower_two(float turbogenerator_outpower_two) { |
| | | this.turbogenerator_outpower_two = turbogenerator_outpower_two; |
| | | } |
| | | public int getTurbogenerator_state_one() { |
| | | return turbogenerator_state_one; |
| | | } |
| | | public void setTurbogenerator_state_one(int turbogenerator_state_one) { |
| | | this.turbogenerator_state_one = turbogenerator_state_one; |
| | | } |
| | | public int getTurbogenerator_state_two() { |
| | | return turbogenerator_state_two; |
| | | } |
| | | public void setTurbogenerator_state_two(int turbogenerator_state_two) { |
| | | this.turbogenerator_state_two = turbogenerator_state_two; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Turbogenerator [turbogenerator_outvol_one=" + turbogenerator_outvol_one |
| | | + ", turbogenerator_outcurr_one=" + turbogenerator_outcurr_one + ", turbogenerator_outpower_one=" |
| | | + turbogenerator_outpower_one + ", turbogenerator_outvol_two=" + turbogenerator_outvol_two |
| | | + ", turbogenerator_outcurr_two=" + turbogenerator_outcurr_two + ", turbogenerator_outpower_two=" |
| | | + turbogenerator_outpower_two + ", turbogenerator_state_one=" + turbogenerator_state_one |
| | | + ", turbogenerator_state_two=" + turbogenerator_state_two + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.impl; |
| | | |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.swing.plaf.synth.SynthScrollPaneUI; |
| | | |
| | | import com.fgkj.dao.BaseDAO; |
| | | import com.fgkj.dao.CallBack; |
| | | import com.fgkj.dao.DAOHelper; |
| | | import com.fgkj.db.DBUtil; |
| | | import com.partinsystem.udpall.dto.Ac230_elec; |
| | | import com.partinsystem.udpall.dto.Acmain_board; |
| | | import com.partinsystem.udpall.dto.Acreliable_board; |
| | | import com.partinsystem.udpall.dto.Batt; |
| | | import com.partinsystem.udpall.dto.Cabin_bump; |
| | | import com.partinsystem.udpall.dto.Dc230_converter; |
| | | import com.partinsystem.udpall.dto.Dc25_converter; |
| | | import com.partinsystem.udpall.dto.Dcmain_board; |
| | | import com.partinsystem.udpall.dto.Inverter; |
| | | import com.partinsystem.udpall.dto.Partin_elemonitor; |
| | | import com.partinsystem.udpall.dto.Propulsion; |
| | | import com.partinsystem.udpall.dto.Shore; |
| | | import com.partinsystem.udpall.dto.Switch_value; |
| | | import com.partinsystem.udpall.dto.Turbogenerator; |
| | | |
| | | public class Partin_elemonitorImpl implements BaseDAO,CallBack{ |
| | | //读取所有的数据 |
| | | @Override |
| | | public List getResults(ResultSet rs) { |
| | | List list=new ArrayList(); |
| | | try { |
| | | while(rs.next()) { |
| | | Partin_elemonitor partin_elemonitor=new Partin_elemonitor(); |
| | | |
| | | Ac230_elec ac230_elec=new Ac230_elec(); |
| | | ac230_elec.setAc230_eleccurr_one(rs.getFloat("Ac230_eleccurr_one")); |
| | | ac230_elec.setAc230_eleccurr_two(rs.getFloat("Ac230_eleccurr_two")); |
| | | ac230_elec.setAc230_elecvol_one(rs.getFloat("Ac230_elecvol_one")); |
| | | ac230_elec.setAc230_elecvol_two(rs.getFloat("Ac230_elecvol_two")); |
| | | ac230_elec.setAc230_state_one(rs.getInt("Ac230_state_one")); |
| | | ac230_elec.setAc230_state_two(rs.getInt("Ac230_state_two")); |
| | | partin_elemonitor.setAc230_elec(ac230_elec); |
| | | |
| | | Acmain_board acmain_board=new Acmain_board(); |
| | | acmain_board.setAcmain_boardabvol_one(rs.getFloat("acmain_boardabvol_one")); |
| | | acmain_board.setAcmain_boardabvol_two(rs.getFloat("acmain_boardabvol_two")); |
| | | acmain_board.setAcmain_boardabvol_three(rs.getFloat("acmain_boardabvol_three")); |
| | | acmain_board.setAcmain_boardabvol_four(rs.getFloat("acmain_boardabvol_four")); |
| | | partin_elemonitor.setAcmain_board(acmain_board); |
| | | |
| | | Acreliable_board acreliable_board=new Acreliable_board(); |
| | | acreliable_board.setAcreliable_boardabvol_one(rs.getFloat("Acreliable_boardabvol_one")); |
| | | acreliable_board.setAcreliable_boardabvol_two(rs.getFloat("Acreliable_boardabvol_two")); |
| | | partin_elemonitor.setAcreliable_board(acreliable_board); |
| | | |
| | | Batt batt=new Batt(); |
| | | batt.setBatt_curr_one(rs.getFloat("Batt_curr_one")); |
| | | batt.setBatt_curr_two(rs.getFloat("Batt_curr_two")); |
| | | batt.setBatt_state_one(rs.getInt("Batt_state_one")); |
| | | batt.setBatt_state_two(rs.getInt("Batt_state_two")); |
| | | batt.setBatt_vol_one(rs.getFloat("Batt_vol_one")); |
| | | batt.setBatt_vol_two(rs.getFloat("Batt_vol_two")); |
| | | partin_elemonitor.setBatt(batt); |
| | | |
| | | Cabin_bump cabin_bump=new Cabin_bump(); |
| | | cabin_bump.setBehind_cabin_curr(rs.getFloat("Behind_cabin_curr")); |
| | | cabin_bump.setFront_cabin_curr(rs.getFloat("Front_cabin_curr")); |
| | | cabin_bump.setLeft_jumper_curr(rs.getFloat("Left_jumper_curr")); |
| | | cabin_bump.setRight_jumper_curr(rs.getFloat("Right_jumper_curr")); |
| | | cabin_bump.setPump_curr_ac10_q13(rs.getFloat("Pump_curr_ac10_q13")); |
| | | cabin_bump.setPump_curr_ac10_q2(rs.getFloat("Pump_curr_ac10_q2")); |
| | | cabin_bump.setPump_curr_ac51_q2(rs.getFloat("Pump_curr_ac51_q2")); |
| | | cabin_bump.setPump_curr_ac51_q4(rs.getFloat("Pump_curr_ac51_q4")); |
| | | cabin_bump.setPump_curr_ac52_q1(rs.getFloat("Pump_curr_ac52_q1")); |
| | | cabin_bump.setPump_curr_ac52_q6(rs.getFloat("Pump_curr_ac52_q6")); |
| | | cabin_bump.setPump_curr_ac53_q3(rs.getFloat("Pump_curr_ac53_q3")); |
| | | cabin_bump.setPump_curr_ac60_q1(rs.getFloat("Pump_curr_ac60_q1")); |
| | | cabin_bump.setPump_curr_ac60_q16(rs.getFloat("Pump_curr_ac60_q16")); |
| | | cabin_bump.setPump_curr_ar12_q2(rs.getFloat("Pump_curr_ar12_q2")); |
| | | cabin_bump.setPump_curr_ar12_q3(rs.getFloat("Pump_curr_ar12_q3")); |
| | | cabin_bump.setPump_curr_ar12_q4(rs.getFloat("Pump_curr_ar12_q4")); |
| | | cabin_bump.setPump_curr_ar12_q5(rs.getFloat("Pump_curr_ar12_q5")); |
| | | cabin_bump.setPump_curr_ar12_q6(rs.getFloat("Pump_curr_ar12_q6")); |
| | | cabin_bump.setPump_curr_ar13_q1(rs.getFloat("Pump_curr_ar13_q1")); |
| | | cabin_bump.setPump_curr_ar23_q1(rs.getFloat("Pump_curr_ar23_q1")); |
| | | cabin_bump.setPump_curr_ar23_q2(rs.getFloat("Pump_curr_ar23_q2")); |
| | | cabin_bump.setPump_curr_ar23_q3(rs.getFloat("Pump_curr_ar23_q3")); |
| | | cabin_bump.setPump_curr_ar23_q4(rs.getFloat("Pump_curr_ar23_q4")); |
| | | cabin_bump.setPump_curr_ar23_q6(rs.getFloat("Pump_curr_ar23_q6")); |
| | | partin_elemonitor.setCabin_bump(cabin_bump); |
| | | |
| | | Dc230_converter dc230_converter=new Dc230_converter(); |
| | | dc230_converter.setDc230_alarmstate_one(rs.getInt("Dc230_alarmstate_one")); |
| | | dc230_converter.setDc230_alarmstate_two(rs.getInt("Dc230_alarmstate_two")); |
| | | dc230_converter.setDc230_alarmstate_three(rs.getInt("Dc230_alarmstate_three")); |
| | | dc230_converter.setDc230_alarmstate_four(rs.getInt("Dc230_alarmstate_four")); |
| | | dc230_converter.setDc230_converter_outcurr_one(rs.getFloat("Dc230_converter_outcurr_one")); |
| | | dc230_converter.setDc230_converter_outcurr_two(rs.getFloat("Dc230_converter_outcurr_two")); |
| | | dc230_converter.setDc230_converter_outcurr_three(rs.getFloat("Dc230_converter_outcurr_three")); |
| | | dc230_converter.setDc230_converter_outcurr_four(rs.getFloat("Dc230_converter_outcurr_four")); |
| | | dc230_converter.setDc230_converter_outvol_one(rs.getFloat("Dc230_converter_outvol_one")); |
| | | dc230_converter.setDc230_converter_outvol_two(rs.getFloat("Dc230_converter_outvol_two")); |
| | | dc230_converter.setDc230_converter_outvol_three(rs.getFloat("Dc230_converter_outvol_three")); |
| | | dc230_converter.setDc230_converter_outvol_four(rs.getFloat("Dc230_converter_outvol_four")); |
| | | dc230_converter.setDc230_state_one(rs.getInt("Dc230_state_one")); |
| | | dc230_converter.setDc230_state_two(rs.getInt("Dc230_state_two")); |
| | | dc230_converter.setDc230_state_three(rs.getInt("Dc230_state_three")); |
| | | dc230_converter.setDc230_state_four(rs.getInt("Dc230_state_four")); |
| | | partin_elemonitor.setDc230_converter(dc230_converter); |
| | | |
| | | Dc25_converter dc25_converter=new Dc25_converter(); |
| | | dc25_converter.setDc25_alarmstate_one(rs.getInt("Dc25_alarmstate_one")); |
| | | dc25_converter.setDc25_alarmstate_two(rs.getInt("Dc25_alarmstate_two")); |
| | | dc25_converter.setDc25_alarmstate_three(rs.getInt("Dc25_alarmstate_three")); |
| | | dc25_converter.setDc25_alarmstate_four(rs.getInt("Dc25_alarmstate_four")); |
| | | dc25_converter.setDc25_converter_outcurr_one(rs.getFloat("Dc25_converter_outcurr_one")); |
| | | dc25_converter.setDc25_converter_outcurr_two(rs.getFloat("Dc25_converter_outcurr_two")); |
| | | dc25_converter.setDc25_converter_outcurr_three(rs.getFloat("Dc25_converter_outcurr_three")); |
| | | dc25_converter.setDc25_converter_outcurr_four(rs.getFloat("Dc25_converter_outcurr_four")); |
| | | dc25_converter.setDc25_converter_outvol_one(rs.getFloat("Dc25_converter_outvol_one")); |
| | | dc25_converter.setDc25_converter_outvol_two(rs.getFloat("Dc25_converter_outvol_two")); |
| | | dc25_converter.setDc25_converter_outvol_three(rs.getFloat("Dc25_converter_outvol_three")); |
| | | dc25_converter.setDc25_converter_outvol_four(rs.getFloat("Dc25_converter_outvol_four")); |
| | | dc25_converter.setDc25_state_one(rs.getInt("Dc25_state_one")); |
| | | dc25_converter.setDc25_state_two(rs.getInt("Dc25_state_two")); |
| | | dc25_converter.setDc25_state_three(rs.getInt("Dc25_state_three")); |
| | | dc25_converter.setDc25_state_four(rs.getInt("Dc25_state_four")); |
| | | partin_elemonitor.setDc25_converter(dc25_converter); |
| | | |
| | | Dcmain_board dcmain_board=new Dcmain_board(); |
| | | dcmain_board.setDcmain_boardvol_one(rs.getFloat("Dcmain_boardvol_one")); |
| | | dcmain_board.setDcmain_boardvol_two(rs.getFloat("Dcmain_boardvol_two")); |
| | | dcmain_board.setDcmain_boardvol_three(rs.getFloat("Dcmain_boardvol_three")); |
| | | dcmain_board.setDcmain_boardvol_four(rs.getFloat("Dcmain_boardvol_four")); |
| | | partin_elemonitor.setDcmain_board(dcmain_board); |
| | | |
| | | Inverter inverter=new Inverter(); |
| | | inverter.setInverter_alarmstate_one(rs.getInt("Inverter_alarmstate_one")); |
| | | inverter.setInverter_alarmstate_two(rs.getInt("Inverter_alarmstate_two")); |
| | | inverter.setInverter_alarmstate_three(rs.getInt("Inverter_alarmstate_three")); |
| | | inverter.setInverter_alarmstate_four(rs.getInt("Inverter_alarmstate_four")); |
| | | inverter.setInverter_outcurr_one(rs.getFloat("Inverter_outcurr_one")); |
| | | inverter.setInverter_outcurr_two(rs.getFloat("Inverter_outcurr_two")); |
| | | inverter.setInverter_outcurr_three(rs.getFloat("Inverter_outcurr_three")); |
| | | inverter.setInverter_outcurr_four(rs.getFloat("Inverter_outcurr_four")); |
| | | inverter.setInverter_outpower_one(rs.getFloat("Inverter_outpower_one")); |
| | | inverter.setInverter_outpower_two(rs.getFloat("Inverter_outpower_two")); |
| | | inverter.setInverter_outpower_three(rs.getFloat("Inverter_outpower_three")); |
| | | inverter.setInverter_outpower_four(rs.getFloat("Inverter_outpower_four")); |
| | | inverter.setInverter_outvol_one(rs.getFloat("Inverter_outvol_one")); |
| | | inverter.setInverter_outvol_two(rs.getFloat("Inverter_outvol_two")); |
| | | inverter.setInverter_outvol_three(rs.getFloat("Inverter_outvol_three")); |
| | | inverter.setInverter_outvol_four(rs.getFloat("Inverter_outvol_four")); |
| | | inverter.setInverter_state_one(rs.getInt("Inverter_state_one")); |
| | | inverter.setInverter_state_two(rs.getInt("Inverter_state_two")); |
| | | inverter.setInverter_state_three(rs.getInt("Inverter_state_three")); |
| | | inverter.setInverter_state_four(rs.getInt("Inverter_state_four")); |
| | | partin_elemonitor.setInverter(inverter); |
| | | |
| | | Propulsion propulsion_motor=new Propulsion(); |
| | | propulsion_motor.setPropulsion_motorcurr_one(rs.getFloat("Propulsion_motorcurr_one")); |
| | | propulsion_motor.setPropulsion_motorcurr_two(rs.getFloat("Propulsion_motorcurr_two")); |
| | | propulsion_motor.setPropulsion_motorvol_one(rs.getFloat("Propulsion_motorvol_one")); |
| | | propulsion_motor.setPropulsion_motorvol_two(rs.getFloat("Propulsion_motorvol_two")); |
| | | propulsion_motor.setPropulsion_motorpower(rs.getFloat("Propulsion_motorpower")); |
| | | propulsion_motor.setPropulsion_motorspeed(rs.getFloat("Propulsion_motorspeed")); |
| | | propulsion_motor.setPropulsion_motor_state(rs.getInt("Propulsion_motor_state")); |
| | | partin_elemonitor.setPropulsion_motor(propulsion_motor); |
| | | |
| | | Shore shore=new Shore(); |
| | | shore.setDc_shorecurr_one(rs.getFloat("Dc_shorecurr_one")); |
| | | shore.setDc_shorecurr_two(rs.getFloat("Dc_shorecurr_two")); |
| | | shore.setDc_shorevol_one(rs.getFloat("Dc_shorevol_one")); |
| | | shore.setDc_shorevol_two(rs.getFloat("Dc_shorevol_two")); |
| | | shore.setAc_shorevol(rs.getFloat("Ac_shorevol")); |
| | | shore.setAc_shorecurr(rs.getFloat("Ac_shorecurr")); |
| | | shore.setAc_shorepower(rs.getFloat("Ac_shorepower")); |
| | | partin_elemonitor.setShore(shore); |
| | | |
| | | Switch_value switch_value=new Switch_value(); |
| | | switch_value.setSwitching_value_one(rs.getInt("Switching_value_one")); |
| | | switch_value.setSwitching_value_two(rs.getInt("Switching_value_two")); |
| | | switch_value.setSwitching_value_three(rs.getInt("Switching_value_three")); |
| | | switch_value.setSwitching_value_four(rs.getInt("Switching_value_four")); |
| | | partin_elemonitor.setSwitch_value(switch_value); |
| | | |
| | | Turbogenerator turbogenerator=new Turbogenerator(); |
| | | turbogenerator.setTurbogenerator_outcurr_one(rs.getFloat("Turbogenerator_outcurr_one")); |
| | | turbogenerator.setTurbogenerator_outcurr_two(rs.getFloat("Turbogenerator_outcurr_two")); |
| | | turbogenerator.setTurbogenerator_outpower_one(rs.getFloat("Turbogenerator_outpower_one")); |
| | | turbogenerator.setTurbogenerator_outpower_two(rs.getFloat("Turbogenerator_outpower_two")); |
| | | turbogenerator.setTurbogenerator_outvol_one(rs.getFloat("Turbogenerator_outvol_one")); |
| | | turbogenerator.setTurbogenerator_outvol_two(rs.getFloat("Turbogenerator_outvol_two")); |
| | | turbogenerator.setTurbogenerator_state_one(rs.getInt("Turbogenerator_state_one")); |
| | | turbogenerator.setTurbogenerator_state_two(rs.getInt("Turbogenerator_state_two")); |
| | | partin_elemonitor.setTurbogenerator(turbogenerator); |
| | | |
| | | list.add(partin_elemonitor); |
| | | } |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public boolean add(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean update(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean del(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return false; |
| | | } |
| | | //查询所有的设备实时数据 |
| | | @Override |
| | | public List searchAll() { |
| | | String sql=" select distinct * from db_partinsystem.tb_partin_elemonitor order by record_time asc "; |
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[] {}, new Partin_elemonitorImpl()); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List serchByCondition(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List serchByInfo(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | public static void main(String[] args) { |
| | | Partin_elemonitorImpl pimpl=new Partin_elemonitorImpl(); |
| | | List<Partin_elemonitor> list=pimpl.searchAll(); |
| | | for (Partin_elemonitor p : list) { |
| | | System.out.println(p); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.websocket; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import com.fgkj.actions.ActionUtil; |
| | | import com.fgkj.services.ServiceModel; |
| | | import com.partinsystem.udpall.impl.Partin_elemonitorImpl; |
| | | |
| | | public class Partin_elemonitorThread implements Runnable{ |
| | | private WebSocketTest2 socket; |
| | | private ServiceModel model; |
| | | |
| | | public Partin_elemonitorThread(WebSocketTest2 socket) { |
| | | this.socket=socket; |
| | | this.model=new ServiceModel(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void run() { |
| | | String oldStrList=""; |
| | | String newStrList=""; |
| | | while(true){ |
| | | Partin_elemonitorImpl pimpl=new Partin_elemonitorImpl(); |
| | | List list=pimpl.searchAll(); |
| | | newStrList=list.toString(); |
| | | //&&(!oldStrList.equals(newStrList)) |
| | | if(list!=null&&list.size()>0){ |
| | | oldStrList=newStrList; |
| | | try { |
| | | model.setCode(1); |
| | | model.setMsg("参设设备信息"); |
| | | model.setData(list); |
| | | if(socket.isClose()){ |
| | | break; |
| | | }else{ |
| | | socket.sendMessage(ActionUtil.tojson(model)); |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | try { |
| | | Thread.sleep(1000*1); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.partinsystem.udpall.websocket; |
| | | |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.PathParam; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import com.fgkj.actions.ActionUtil; |
| | | |
| | | import java.io.IOException; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | |
| | | /** |
| | | * //@ServerEndpoint 注解是一个类层次的注解,它的功能主要是将目前的类定义成一个websocket服务器端, |
| | | * 注解的值将被用于监听用户连接的终端访问URL地址,客户端可以通过这个URL来连接到WebSocket服务器端 |
| | | * //@ServerEndpoint 可以把当前类变成websocket服务类 |
| | | * //@ServerEndpoint("/ws/socket/{uid}") |
| | | */ |
| | | @ServerEndpoint("/ws/socket/{uid}") |
| | | public class WebSocketTest2 { |
| | | //静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 |
| | | private static int onlineCount = 0; |
| | | //concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。若要实现服务端与单一客户端通信的话,可以使用Map来存放,其中Key可以为用户标识 |
| | | private static ConcurrentHashMap<String, WebSocketTest2> webSocketSet = new ConcurrentHashMap<String, WebSocketTest2>(); |
| | | //与某个客户端的连接会话,需要通过它来给客户端发送数据 |
| | | private Session WebSocketsession; |
| | | //当前发消息的人员编号 |
| | | private String uid = ""; |
| | | private boolean isclose=false; |
| | | /*static { |
| | | System.setProperty("log4j.configurationFile", "log4j2.xml"); |
| | | // System.setProperty("contextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"); |
| | | } |
| | | private static Logger logger= LogManager.getLogger(WebSocketTest2.class); |
| | | */ |
| | | /** |
| | | * 连接建立成功调用的方法 |
| | | * |
| | | * @param WebSocketsession 可选的参数。session为与某个客户端的连接会话,需要通过它来给客户端发送数据 |
| | | */ |
| | | @OnOpen |
| | | public void onOpen(@PathParam(value = "uid") String param, Session WebSocketsession, EndpointConfig config) { |
| | | uid = param;//接收到发送消息的人员编号 |
| | | this.WebSocketsession = WebSocketsession; |
| | | webSocketSet.put(param, this);//加入map中 |
| | | addOnlineCount(); //在线数加1 |
| | | //System.out.println("有新连接加入!当前在线人数为" + getOnlineCount()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 连接关闭调用的方法 |
| | | */ |
| | | @OnClose |
| | | public void onClose() { |
| | | if (!uid.equals("")) { |
| | | webSocketSet.remove(uid); //从set中删除 |
| | | subOnlineCount(); //在线数减1 |
| | | //System.out.println("有一连接关闭!当前在线人数为" + getOnlineCount()); |
| | | } |
| | | this.isclose=true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 给指定的人发送消息 |
| | | * @param message |
| | | */ |
| | | @OnMessage |
| | | public void OnMessage(String message) { |
| | | if (webSocketSet.get(uid) != null) { |
| | | Partin_elemonitorThread binfthread=new Partin_elemonitorThread(webSocketSet.get(uid)); |
| | | new Thread(binfthread).start(); |
| | | } else { |
| | | System.out.println("没有找到请求用户!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 给所有人发消息 |
| | | * @param message |
| | | */ |
| | | private void sendAll(String message) { |
| | | String now = getNowTime(); |
| | | String sendMessage = message.split("[|]")[0]; |
| | | //遍历HashMap |
| | | for (String key : webSocketSet.keySet()) { |
| | | try { |
| | | //判断接收用户是否是当前发消息的用户 |
| | | if (!uid.equals(key)) { |
| | | webSocketSet.get(key).sendMessage(now + "用户" + uid + "发来消息:" + " <br/> " + sendMessage); |
| | | System.out.println("key = " + key); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /*获取当前socket是否关闭*/ |
| | | public boolean isClose() { |
| | | return isclose; |
| | | } |
| | | |
| | | /** |
| | | * 获取当前时间 |
| | | * |
| | | * @return |
| | | */ |
| | | private String getNowTime() { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String time = format.format(date); |
| | | return time; |
| | | } |
| | | /** |
| | | * 发生错误时调用 |
| | | * |
| | | * @param session |
| | | * @param error |
| | | */ |
| | | @OnError |
| | | public void onError(Session session, Throwable error) { |
| | | System.out.println("发生错误"); |
| | | error.printStackTrace(); |
| | | onClose(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 这个方法与上面几个方法不一样。没有用注解,是根据自己需要添加的方法。 |
| | | * |
| | | * @param message |
| | | * @throws IOException |
| | | */ |
| | | public void sendMessage(String message) throws IOException { |
| | | //this.WebSocketsession.getBasicRemote().sendText(message); |
| | | //this.session.getAsyncRemote().sendText(message); |
| | | synchronized(this.WebSocketsession){ |
| | | this.WebSocketsession.getBasicRemote().sendText(message); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static synchronized int getOnlineCount() { |
| | | return onlineCount; |
| | | } |
| | | |
| | | |
| | | public static synchronized void addOnlineCount() { |
| | | WebSocketTest2.onlineCount++; |
| | | } |
| | | |
| | | |
| | | public static synchronized void subOnlineCount() { |
| | | WebSocketTest2.onlineCount--; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <constant name="struts.multipart.maxSize" value ="1024000000" /> |
| | | |
| | | <constant name="struts.action.excludePattern" value="/ws/.*,ws://.*"></constant> |
| | | |
| | | <package name="default" namespace="/" extends="json-default" > |
| | | <action name="*_prt_*" class="com.fgkj.actions.partinsystem.{1}" method="{2}"> |