whyclj
2020-09-10 1a5a1cc060e2e4c715d966521d2cdaf2ce239e79
修改
6 文件已重命名
1个文件已添加
1个文件已修改
358 ■■■■■ 已修改文件
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_2Kw_ServerSocket_Thread.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_Control_Single_2kw.java 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_Rt_2kw.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_State_2kw.java 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_inf_2kw.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electrical_2KWTask_SQL.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electrical_2KW_SocketClient_Thread.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/main/main_ElectricalSystem_MonitorServer_2KW.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_2Kw_ServerSocket_Thread.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electric_2Kw_ServerSocket_Thread.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
import java.util.Date;
import java.util.List;
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_Control_Single_2kw.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electric_Control_Single_2kw.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
import com.modbus.data.MyModbusMaster;
import com.modbus.data.MyModbusUtils;
@@ -7,28 +7,37 @@
import com.serotonin.modbus4j.code.DataType;
public class Electric_Control_Single_2kw {
      public int num ;//'主键',
      public int electric2KW_id ;//'电源id',
      public float consvolmode_chargecurr ;// '转为恒压模式充电电压值',
      public float chargecurr_five ;// '第5阶段充电电流值',
      public float chargecurr_four ;// '第4阶段充电电流值',
      public float chargecurr_three ;// '第3阶段充电电流值',
      public float chargecurr_two ;// '第2阶段充电电流值',
      public float chargecurr_one ;// '第1阶段充电电流值',
      public float currset ;// '电流设定值',
      public float localgivecurr ;// '当前给定电流',
      public float volset ;// '电压设定值',
      public float localgivevol ;// '当前给定电压',
      public float controlangle ;// '控制角',
      public float stopchargevol_five ;// '第5阶段充电终止电压',
      public float stopchargevol_four ;// '第4阶段充电终止电压',
      public float stopchargevol_three ;// '第3阶段充电终止电压',
      public float stopchargevol_two ;// '第2阶段充电终止电压',
      public float stopchargevol_one ;// '第1阶段充电终止电压',
      public float alldccurr ;// '总直流电流',
      public float alldcvol ;// '总直流电压',
      public float brachdccurr ;// '分直流电流',
      public float brachdcvol ;// '分直流电压',
      public int num ;                            //'主键',
      public int electric2KW_id ;                //'电源id',
      public int upper_pulse_block;                //上位机脉冲封锁
      public int remote_start;                    //远程启动
      public int fault_reset;                    //故障复位
      public int conscurrswitch;                //恒流切换
      public int constantvol;                    //4并或2串2并恒压
      public int volset_confirm;                //电压给定确认
      public int currset_confirm;                //电流给定确认
      public int remote_stop;                    //远程停止
      public int start_screen_set;                //启动触摸屏给定
      public int start_upper_set;                //启动上位机给定
      public int consvolswitch;                    //恒压切换
      public int othermode;                        //4并或2串2并以外模式
      public int consvol_distribution;            //四串恒压电压分配位
      public float consvolmode_chargecurr ;        // '转为恒压模式充电电压值',
      public float chargecurr_one ;                // '第1阶段充电电流值',
      public float chargecurr_two ;                // '第2阶段充电电流值',
      public float chargecurr_three ;            // '第3阶段充电电流值',
      public float chargecurr_four ;            // '第4阶段充电电流值',
      public float chargecurr_five ;            // '第5阶段充电电流值',
      public float currset ;                    // '电流设定值',
      public float volset ;                        // '电压设定值',
      public float stopchargevol_one ;            // '第1阶段充电终止电压',
      public float stopchargevol_two ;            // '第2阶段充电终止电压',
      public float stopchargevol_three ;        // '第3阶段充电终止电压',
      public float stopchargevol_four ;            // '第4阶段充电终止电压',
      public float stopchargevol_five ;            // '第5阶段充电终止电压',
      
      
     
@@ -91,29 +100,11 @@
    public void setCurrset(float currset) {
        this.currset = currset;
    }
    public float getLocalgivecurr() {
        return localgivecurr;
    }
    public void setLocalgivecurr(float localgivecurr) {
        this.localgivecurr = localgivecurr;
    }
    public float getVolset() {
        return volset;
    }
    public void setVolset(float volset) {
        this.volset = volset;
    }
    public float getLocalgivevol() {
        return localgivevol;
    }
    public void setLocalgivevol(float localgivevol) {
        this.localgivevol = localgivevol;
    }
    public float getControlangle() {
        return controlangle;
    }
    public void setControlangle(float controlangle) {
        this.controlangle = controlangle;
    }
    public float getStopchargevol_five() {
        return stopchargevol_five;
@@ -145,46 +136,9 @@
    public void setStopchargevol_one(float stopchargevol_one) {
        this.stopchargevol_one = stopchargevol_one;
    }
    public float getAlldccurr() {
        return alldccurr;
    }
    public void setAlldccurr(float alldccurr) {
        this.alldccurr = alldccurr;
    }
    public float getAlldcvol() {
        return alldcvol;
    }
    public void setAlldcvol(float alldcvol) {
        this.alldcvol = alldcvol;
    }
    public float getBrachdccurr() {
        return brachdccurr;
    }
    public void setBrachdccurr(float brachdccurr) {
        this.brachdccurr = brachdccurr;
    }
    public float getBrachdcvol() {
        return brachdcvol;
    }
    public void setBrachdcvol(float brachdcvol) {
        this.brachdcvol = brachdcvol;
    }
    
    
    @Override
    public String toString() {
        return "Electric_Control_Single_2kw [num=" + num + ", electric2KW_id=" + electric2KW_id
                + ", consvolmode_chargecurr=" + consvolmode_chargecurr + ", chargecurr_five=" + chargecurr_five
                + ", chargecurr_four=" + chargecurr_four + ", chargecurr_three=" + chargecurr_three
                + ", chargecurr_two=" + chargecurr_two + ", chargecurr_one=" + chargecurr_one + ", currset=" + currset
                + ", localgivecurr=" + localgivecurr + ", volset=" + volset + ", localgivevol=" + localgivevol
                + ", controlangle=" + controlangle + ", stopchargevol_five=" + stopchargevol_five
                + ", stopchargevol_four=" + stopchargevol_four + ", stopchargevol_three=" + stopchargevol_three
                + ", stopchargevol_two=" + stopchargevol_two + ", stopchargevol_one=" + stopchargevol_one
                + ", alldccurr=" + alldccurr + ", alldcvol=" + alldcvol + ", brachdccurr=" + brachdccurr
                + ", brachdcvol=" + brachdcvol + "]";
    }
    /**
     * 创建读取数据集合
     * @param master
@@ -228,19 +182,19 @@
            this.chargecurr_two= MyModbusUtils.readShortToFloat(res.getValue(4));    
            this.chargecurr_one= MyModbusUtils.readShortToFloat(res.getValue(5));    
            this.currset= MyModbusUtils.readShortToFloat(res.getValue(6));    
            this.localgivecurr= MyModbusUtils.readShortToFloat(res.getValue(7));
            //this.localgivecurr= MyModbusUtils.readShortToFloat(res.getValue(7));
            this.volset= (float)res.getValue(8);    
            this.localgivevol= (float)res.getValue(9);
            this.controlangle= (float)res.getValue(10);
            //this.localgivevol= (float)res.getValue(9);
            //this.controlangle= (float)res.getValue(10);
            this.stopchargevol_five= MyModbusUtils.readShortToFloat(res.getValue(11));    
            this.stopchargevol_four= MyModbusUtils.readShortToFloat(res.getValue(12));    
            this.stopchargevol_three= MyModbusUtils.readShortToFloat(res.getValue(13));    
            this.stopchargevol_two= MyModbusUtils.readShortToFloat(res.getValue(14));    
            this.stopchargevol_one= MyModbusUtils.readShortToFloat(res.getValue(15));    
            this.alldccurr= (float)res.getValue(16);
            this.alldcvol= (float)res.getValue(17);
            this.brachdccurr= (float)res.getValue(18);
            this.brachdcvol= (float)res.getValue(19);
            //this.alldccurr= (float)res.getValue(16);
            //this.alldcvol= (float)res.getValue(17);
            //this.brachdccurr= (float)res.getValue(18);
            //this.brachdcvol= (float)res.getValue(19);
        }
    }  
      
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_Rt_2kw.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electric_Rt_2kw.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
import com.modbus.data.MyModbusMaster;
import com.modbus.data.MyModbusUtils;
@@ -7,28 +7,31 @@
import com.serotonin.modbus4j.code.DataType;
public class Electric_Rt_2kw {
      public int num ;//'主键',
      public int electric2KW_id ;// '电源id',
      public int upper_pulse_block ;//'上位机脉冲封锁',
      public int consvolcurrstatus ;//'恒压恒流模式状态',
      public int constantvolflag ;//'4并或2串2并恒压标志位',
      public int main_circuit_connmode ;//'主电路连接模式',
      public int remote_start ;//'远程启动',
      public int fault_reset ;//'故障复位',
      public int conscurrswitch ;//'恒流切换',
      public int constantvol ;//'A机组4并或2串2并恒压',
      public int volset_confirm ;//'电压给定确认',
      public int currset_confirm ;//'电流给定确认',
      public int remote_stop ;//'远程停止',
      public int start_screen_set ;//'启动触摸屏给定',
      public int start_upper_set ;//'启动上位机给定',
      public int consvolswitch ;//'恒压切换',
      public int othermode ;//'4并或2串2并以外模式',
      public int consvol_distribution ;//'四串恒压电压分配位',
      public int local_remote_control ;//'就地远程控制状态',
      public int curve_charge_mode ;//'曲线充电模式状态',
      public int start_curve_charge_mode ;//'启动曲线充电模式',
      public int stop_curve_charge_mode ;//'停止曲线充电模式',
      public int num ;                            //'主键',
      public int electric2KW_id ;                // '电源id',
      public int upper_pulse_block ;            //'上位机脉冲封锁',
      public int consvolcurrstatus ;            //'恒压恒流模式状态',
      public int constantvolflag ;                //'4并或2串2并恒压标志位',
      public int main_circuit_connmode ;        //'主电路连接模式',
      public int remote_start ;                    //'远程启动',
      public int fault_reset ;                    //'故障复位',
      public int conscurrswitch ;                //'恒流切换',
      public int constantvol ;                    //'4并或2串2并恒压',
      public int volset_confirm ;                //'电压给定确认',
      public int currset_confirm ;                //'电流给定确认',
      public int remote_stop ;                    //'远程停止',
      public int start_screen_set ;                //'启动触摸屏给定',
      public int start_upper_set ;                //'启动上位机给定',
      public int consvolswitch ;                //'恒压切换',
      public int othermode ;                    //'4并或2串2并以外模式',
      public int consvol_distribution ;            //'四串恒压电压分配位',
      public int local_remote_control ;            //'就地远程控制状态',
      public int pulse_blocking;                //脉冲封锁*
      public int curve_charge_mode ;            //'曲线充电模式状态',
      public int start_curve_charge_mode ;        //'启动曲线充电模式',
      public int stop_curve_charge_mode ;        //'停止曲线充电模式',
      public int note;//'',
    
    public Electric_Rt_2kw(int electric2kw_id) {
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_State_2kw.java
New file
@@ -0,0 +1,153 @@
package com.electrical.TwoKW;
public class Electric_State_2kw {
    public int electric2KW_id;
    public float brachdcvol;                //分直流电压
    public float brachdccurr;                //分直流电流
    public float alldcvol;                    //总直流电压
    public float alldccurr;                    //总直流电流
    public float stopchargevol_one;            //第1阶段充电终止电压
    public float stopchargevol_two;            //第2阶段充电终止电压
    public float stopchargevol_three;        //第3阶段充电终止电压
    public float stopchargevol_four;        //第4阶段充电终止电压
    public float stopchargevol_five;        //第5阶段充电终止电压
    public float controlangle;                //控制角
    public float localgivevol;                //当前给定电压
    public float volset;                    //电压设定值
    public float localgivecurr;                //当前给定电流
    public float currset;                    //电流设定值
    public float chargecurr_one;            //第1阶段充电电流值
    public float chargecurr_two;            //第2阶段充电电流值
    public float chargecurr_three;            //第3阶段充电电流值
    public float chargecurr_four;            //第4阶段充电电流值
    public float chargecurr_five;            //第5阶段充电电流值
    public float consvolmode_chargecurr;    //转为恒压模式充电电压值
    public int getElectric2KW_id() {
        return electric2KW_id;
    }
    public float getBrachdcvol() {
        return brachdcvol;
    }
    public float getBrachdccurr() {
        return brachdccurr;
    }
    public float getAlldcvol() {
        return alldcvol;
    }
    public float getAlldccurr() {
        return alldccurr;
    }
    public float getStopchargevol_one() {
        return stopchargevol_one;
    }
    public float getStopchargevol_two() {
        return stopchargevol_two;
    }
    public float getStopchargevol_three() {
        return stopchargevol_three;
    }
    public float getStopchargevol_four() {
        return stopchargevol_four;
    }
    public float getStopchargevol_five() {
        return stopchargevol_five;
    }
    public float getControlangle() {
        return controlangle;
    }
    public float getLocalgivevol() {
        return localgivevol;
    }
    public float getVolset() {
        return volset;
    }
    public float getLocalgivecurr() {
        return localgivecurr;
    }
    public float getCurrset() {
        return currset;
    }
    public float getChargecurr_one() {
        return chargecurr_one;
    }
    public float getChargecurr_two() {
        return chargecurr_two;
    }
    public float getChargecurr_three() {
        return chargecurr_three;
    }
    public float getChargecurr_four() {
        return chargecurr_four;
    }
    public float getChargecurr_five() {
        return chargecurr_five;
    }
    public float getConsvolmode_chargecurr() {
        return consvolmode_chargecurr;
    }
    public void setElectric2KW_id(int electric2kw_id) {
        electric2KW_id = electric2kw_id;
    }
    public void setBrachdcvol(float brachdcvol) {
        this.brachdcvol = brachdcvol;
    }
    public void setBrachdccurr(float brachdccurr) {
        this.brachdccurr = brachdccurr;
    }
    public void setAlldcvol(float alldcvol) {
        this.alldcvol = alldcvol;
    }
    public void setAlldccurr(float alldccurr) {
        this.alldccurr = alldccurr;
    }
    public void setStopchargevol_one(float stopchargevol_one) {
        this.stopchargevol_one = stopchargevol_one;
    }
    public void setStopchargevol_two(float stopchargevol_two) {
        this.stopchargevol_two = stopchargevol_two;
    }
    public void setStopchargevol_three(float stopchargevol_three) {
        this.stopchargevol_three = stopchargevol_three;
    }
    public void setStopchargevol_four(float stopchargevol_four) {
        this.stopchargevol_four = stopchargevol_four;
    }
    public void setStopchargevol_five(float stopchargevol_five) {
        this.stopchargevol_five = stopchargevol_five;
    }
    public void setControlangle(float controlangle) {
        this.controlangle = controlangle;
    }
    public void setLocalgivevol(float localgivevol) {
        this.localgivevol = localgivevol;
    }
    public void setVolset(float volset) {
        this.volset = volset;
    }
    public void setLocalgivecurr(float localgivecurr) {
        this.localgivecurr = localgivecurr;
    }
    public void setCurrset(float currset) {
        this.currset = currset;
    }
    public void setChargecurr_one(float chargecurr_one) {
        this.chargecurr_one = chargecurr_one;
    }
    public void setChargecurr_two(float chargecurr_two) {
        this.chargecurr_two = chargecurr_two;
    }
    public void setChargecurr_three(float chargecurr_three) {
        this.chargecurr_three = chargecurr_three;
    }
    public void setChargecurr_four(float chargecurr_four) {
        this.chargecurr_four = chargecurr_four;
    }
    public void setChargecurr_five(float chargecurr_five) {
        this.chargecurr_five = chargecurr_five;
    }
    public void setConsvolmode_chargecurr(float consvolmode_chargecurr) {
        this.consvolmode_chargecurr = consvolmode_chargecurr;
    }
}
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electric_inf_2kw.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electric_inf_2kw.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
public class Electric_inf_2kw {
    public int  num ; //'主键',
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electrical_2KWTask_SQL.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electrical_2KWTask_SQL.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -102,12 +102,13 @@
                "  consvolswitch int(11) NOT NULL DEFAULT '0' COMMENT '恒压切换'," + 
                "  othermode int(11) NOT NULL DEFAULT '0' COMMENT '4并或2串2并以外模式'," + 
                "  consvol_distribution int(11) NOT NULL DEFAULT '0' COMMENT '四串恒压电压分配位'," + 
                "   " +
                "  local_remote_control int(11) NOT NULL DEFAULT '0' COMMENT '就地远程控制状态'," +
                "  local_remote_control int(11) NOT NULL DEFAULT '0' COMMENT '就地远程控制状态'," +
                "  pulse_blocking int(11) NOT NULL DEFAULT '0' COMMENT '脉冲封锁'," +
                "  curve_charge_mode int(11) NOT NULL DEFAULT '0' COMMENT '曲线充电模式状态'," + 
                "  start_curve_charge_mode int(11) NOT NULL DEFAULT '0' COMMENT '启动曲线充电模式'," + 
                "  stop_curve_charge_mode int(11) NOT NULL DEFAULT '0' COMMENT '停止曲线充电模式'," + 
                "   " +
                "  note varchar(255) NOT NULL DEFAULT ''," + 
                "  PRIMARY KEY (num)," + 
                "  UNIQUE KEY electric2KW_id_key (electric2KW_id) USING BTREE  " + 
@@ -280,19 +281,12 @@
                + " chargecurr_two = "+econ.chargecurr_two+","
                + " chargecurr_one = "+econ.chargecurr_one+","
                + " currset = "+econ.currset+","
                + " localgivecurr = "+econ.localgivecurr+","
                + " volset = "+econ.volset+","
                + " localgivevol = "+econ.localgivevol+","
                + " controlangle = "+econ.controlangle+","
                + " stopchargevol_five = "+econ.stopchargevol_five+","
                + " stopchargevol_four = "+econ.stopchargevol_four+","
                + " stopchargevol_three = "+econ.stopchargevol_three+","
                + " stopchargevol_two = "+econ.stopchargevol_two+","
                + " stopchargevol_one = "+econ.stopchargevol_one+","
                + " alldccurr = "+econ.alldccurr+","
                + " alldcvol = "+econ.alldcvol+","
                + " brachdccurr = "+econ.brachdccurr+","
                + " brachdcvol = "+econ.brachdcvol+" "
                + " stopchargevol_one = "+econ.stopchargevol_one+" "
                + " WHERE electric2KW_id = " + econ.electric2KW_id;
        Sql_Mysql sql = new Sql_Mysql(pool.getConn());
        try {
ElectricalSystem_MonitorServer_2KW/src/com/electrical/TwoKW/Electrical_2KW_SocketClient_Thread.java
File was renamed from ElectricalSystem_MonitorServer_2KW/src/com/electrical/Twokw/Electrical_2KW_SocketClient_Thread.java
@@ -1,4 +1,4 @@
package com.electrical.Twokw;
package com.electrical.TwoKW;
import java.util.List;
ElectricalSystem_MonitorServer_2KW/src/main/main_ElectricalSystem_MonitorServer_2KW.java
@@ -8,9 +8,9 @@
import com.base.Com;
import com.config.AppConfig;
import com.config.AppParam;
import com.electrical.Twokw.Electric_2Kw_ServerSocket_Thread;
import com.electrical.Twokw.Electric_inf_2kw;
import com.electrical.Twokw.Electrical_2KWTask_SQL;
import com.electrical.TwoKW.Electric_2Kw_ServerSocket_Thread;
import com.electrical.TwoKW.Electric_inf_2kw;
import com.electrical.TwoKW.Electrical_2KWTask_SQL;
import com.sql.MysqlConnPool;
public class main_ElectricalSystem_MonitorServer_2KW {