BattMonitor_DB_Builder/bin/com/battdata_rt/PowerData_RT_Array.classBinary files differ
BattMonitor_DB_Builder/bin/com/battdata_rt/PowerData_RT_SQL.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Abe_Ram.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Abe_TestData.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Alarm.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Batt.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Dis_Batt.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Lithium_Ram_Db.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Lithium_Testdata.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Param.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Power_Alarm.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_User.classBinary files differ
BattMonitor_DB_Builder/bin/com/sql/util/Db_Work.classBinary files differ
BattMonitor_DB_Builder/bin/com/version_inf/version_inf.txt
@@ -1,8 +1,13 @@ 乌东德水电站智能运维平台 建表程序 V1.02 edit by lijun 2025-03-28 V1.03 edit by lijun 2025-04-14 1.'db_abe_ram.tb_abe_inf'新增字敦 now_mon_res double precision NOT NULL DEFAULT 0, COMMENT ON COLUMN db_abe_ram.tb_abe_inf.now_mon_res IS '当前连接单体内阻'; 2.'db_abe_ram.tb_abe_state'新增字敦 op_cmd integer NOT NULL DEFAULT 0, COMMENT ON COLUMN db_abe_ram.tb_abe_state.op_cmd IS '控制命令'; V1.01 edit by lijun 2024-08-15 1.完成基本数据表的开发任务 BattMonitor_DB_Builder/src/com/battdata_rt/PowerData_RT_Array.java
@@ -257,10 +257,16 @@ public void checkBattRealData() { for (int i = 0; i < Data_Array.size(); i++) { PowerData_RT poRt = Data_Array.get(i); if(poRt .BattGroupId < 1) { continue; } //System.out.println("1111111111111" + poRt .BattGroupId); PowerData_RT_SQL.checkBattRtData(poRt.BattGroupId,poRt.MonCount,m_Conn_Pool); //System.out.println("2222222222222"); PowerData_RT_SQL.checkBattRSData(poRt.BattGroupId,poRt.MonCount,m_Conn_Pool); //System.out.println("3333333333333"); } } BattMonitor_DB_Builder/src/com/battdata_rt/PowerData_RT_SQL.java
@@ -445,6 +445,7 @@ ResultSet res = null; try { if(monCount > 0) { //System.out.println("SELECT MAX(mon_num) as max_monnum FROM db_real_batt.rt_data WHERE binf_id = " + battGroupId); res = sql.sqlMysqlQuery("SELECT MAX(mon_num) as max_monnum FROM db_real_batt.rt_data WHERE binf_id = " + battGroupId); if(res.next()) { //数据库中有记录 BattMonitor_DB_Builder/src/com/sql/Sql_Mysql.java
@@ -28,6 +28,8 @@ public static final String DB_WORK = "db_work"; public static final String DB_USER = "db_user"; public static final String DB_ABE_RAM = "db_abe_ram"; //ABE实时数据和信息 public static final String DB_ABE_TESTDATA = "db_abe_testdata"; //ABE历史历史数据 /**********************************************************************/ public static final String Mon_Inf_Table = DB_BATT + ".mon_inf"; @@ -84,6 +86,13 @@ public static final String Worksheet_Link_Table = DB_WORK + ".worksheet_link"; //电源实时告警分表 public static final String Worksheet_Main_Table = DB_WORK + ".worksheet_main"; //电源实时告警分表 /**********************************************************************/ public static final String Abe_Inf_Table = DB_ABE_RAM + ".tb_abe_inf"; //ABE设备信息表 public static final String Abe_Ram_Table = DB_ABE_RAM + ".tb_abe_ram"; //ABE实时单体信息 public static final String Abe_State_Table = DB_ABE_RAM + ".tb_abe_state"; //ABE设备实时状态信息 /**********************************************************************/ public static final String Abe_TestData_Inf_Table = DB_ABE_TESTDATA + ".tb_abe_testdata_inf"; //ABE历史测试数据 /**********************************************************************/ //--------------------------------------------------------------------------------------------// public Connection mysql_con; BattMonitor_DB_Builder/src/com/sql/util/Db_Abe_Ram.java
New file @@ -0,0 +1,199 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Abe_Ram { public static void init(MysqlConnPool pool) { System.out.println("Db_Abe_Ram init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Abe_Ram(pool); createAbe_Inf_Table(pool); createAbe_Ram_Table(pool); createAbe_State_Table(pool); System.out.println("Db_Abe_Ram init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } public static void createDb_Abe_Ram(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { sql.sqlMysqlExecute("CREATE SCHEMA IF NOT EXISTS " + Sql_Mysql.DB_ABE_RAM + " AUTHORIZATION sysdba"); } catch (SQLException e) { e.printStackTrace(); } } /** * 创建 batt_alarm 数据库表 * @param conn */ public static void createAbe_Inf_Table(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { String sql_str_auto = "CREATE SEQUENCE IF NOT EXISTS " + Sql_Mysql.Abe_Inf_Table + "_auto" + " INCREMENT 1" + " MINVALUE 1" + " MAXVALUE 9223372036854775807" + " START 1" + " CACHE 1;"; //创建自增序列 sql.sqlMysqlExecute(sql_str_auto); String sql_str = " CREATE TABLE IF NOT EXISTS " + Sql_Mysql.Abe_Inf_Table + " " + "(id bigint NOT NULL DEFAULT nextval('" + Sql_Mysql.Abe_Inf_Table + "_auto'::regclass)," + " abe_ip character varying NOT NULL COLLATE pg_catalog.\"default\" DEFAULT '127.0.0.1'::character varying," + " abe_name character varying NOT NULL COLLATE pg_catalog.\"default\" DEFAULT ''::character varying," + " abe_mon_id integer NOT NULL DEFAULT 1," + " task_no character varying(255) NOT NULL COLLATE pg_catalog.\"default\" DEFAULT ''::character varying," + " now_mon_res double precision NOT NULL DEFAULT 0," + " PRIMARY KEY (id)" + ")"; sql.sqlMysqlExecute(sql_str); sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_Inf_Table + " OWNER TO sysdba;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".id IS '主键';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".abe_ip IS 'ABE设备IP';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".abe_name IS 'ABE设备名称';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".abe_mon_id IS 'ABE连接单体编号';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".task_no IS '当前任务编号';"); sql.sqlMysqlExecute("COMMENT ON TABLE " + Sql_Mysql.Abe_Inf_Table + " IS 'ABE设备信息表';"); //添加当前单体内阻的字段 sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_Inf_Table + " ADD COLUMN IF NOT EXISTS now_mon_res double precision NOT NULL DEFAULT 0;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Inf_Table + ".now_mon_res IS '当前连接单体内阻';"); } catch (Exception e) { e.printStackTrace(); } finally { sql.close_con(); } } /** * 创建 db_abe_ram.tb_abe_ram 数据库表 * @param conn */ public static void createAbe_Ram_Table(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { String sql_str_auto = "CREATE SEQUENCE IF NOT EXISTS " + Sql_Mysql.Abe_Ram_Table + "_auto" + " INCREMENT 1" + " MINVALUE 1" + " MAXVALUE 9223372036854775807" + " START 1" + " CACHE 1;"; //创建自增序列 sql.sqlMysqlExecute(sql_str_auto); String sql_str = " CREATE TABLE IF NOT EXISTS " + Sql_Mysql.Abe_Ram_Table + " " + "(num bigint NOT NULL DEFAULT nextval('" + Sql_Mysql.Abe_Ram_Table + "_auto'::regclass)," + " mon_id integer NOT NULL DEFAULT 1," + " record_time timestamp without time zone NOT NULL DEFAULT '2000-01-01 00:00:00'::timestamp without time zone," + " mon_vol double precision NOT NULL DEFAULT 0," + " mon_tmp double precision NOT NULL DEFAULT 0," + " mon_res double precision NOT NULL DEFAULT 0," + " test_mon_num integer NOT NULL DEFAULT 1," + " test_state integer NOT NULL DEFAULT 0," + " group_vol double precision NOT NULL DEFAULT 0," + " group_curr double precision NOT NULL DEFAULT 0," + " test_time_long integer NOT NULL DEFAULT 0," + " test_cap double precision NOT NULL DEFAULT 0," + " wait_time integer NOT NULL DEFAULT 0," + " cyc_count integer NOT NULL DEFAULT 0," + " now_test_state integer NOT NULL DEFAULT 0," + " PRIMARY KEY (num)," + " CONSTRAINT idx_mon_id UNIQUE ( mon_id)" + ")"; sql.sqlMysqlExecute(sql_str); sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_Ram_Table + " OWNER TO sysdba;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".num IS '自增主键';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".mon_id IS '单体编号';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".record_time IS '记录时间';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".mon_vol IS '单体电压';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".mon_tmp IS '单体温度';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".mon_res IS '单体内阻';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".test_mon_num IS '被测单体编号';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".test_state IS '测试状态[]';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".group_vol IS '电池电压';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".group_curr IS '电池电流';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".test_time_long IS '测试时长';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".test_cap IS '测试容量';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".wait_time IS '静置时间';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".cyc_count IS '活化次数';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_Ram_Table + ".now_test_state IS '工作状态[0-无测试 253-放电测试 252-充电测试 249-活化测试]';"); sql.sqlMysqlExecute("COMMENT ON CONSTRAINT idx_mon_id ON " + Sql_Mysql.Abe_Ram_Table + " IS '单体ID';"); } catch (Exception e) { e.printStackTrace(); } finally { sql.close_con(); } } /** * 创建 " + Sql_Mysql.Abe_State_Table + " 数据库表 * @param conn */ public static void createAbe_State_Table(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { String sql_str_auto = "CREATE SEQUENCE IF NOT EXISTS " + Sql_Mysql.Abe_State_Table + "_auto" + " INCREMENT 1" + " MINVALUE 1" + " MAXVALUE 9223372036854775807" + " START 1" + " CACHE 1;"; //创建自增序列 sql.sqlMysqlExecute(sql_str_auto); String sql_str = " CREATE TABLE IF NOT EXISTS " + Sql_Mysql.Abe_State_Table + " " + "(num bigint NOT NULL DEFAULT nextval('" + Sql_Mysql.Abe_State_Table + "_auto'::regclass)," + " abe_id bigint NOT NULL DEFAULT 1," + " record_time timestamp without time zone NOT NULL DEFAULT '2000-01-01 00:00:00'::timestamp without time zone," + " now_mon_id integer NOT NULL DEFAULT 1," + " cnn_state integer NOT NULL DEFAULT 0," + " comm_errcount integer NOT NULL DEFAULT 0," + " comm_totalcount integer NOT NULL DEFAULT 0," + " op_cmd integer NOT NULL DEFAULT 0," + " PRIMARY KEY (num)," + " CONSTRAINT idx_abe_id UNIQUE ( abe_id)" + ")"; sql.sqlMysqlExecute(sql_str); sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_State_Table + " OWNER TO sysdba;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".num IS '自增主键';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".abe_id IS 'ABE的id号';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".record_time IS '更新下时间';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".now_mon_id IS '当前接入单体编号';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".cnn_state IS '连接状态(0-未连接 1-已连接)';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".comm_errcount IS '通信错误计数';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".comm_totalcount IS '通信计数';"); sql.sqlMysqlExecute("COMMENT ON CONSTRAINT idx_abe_id ON " + Sql_Mysql.Abe_State_Table + " IS '设备ID';"); //添加空hi命令字段 sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_Inf_Table + " ADD COLUMN IF NOT EXISTS op_cmd integer NOT NULL DEFAULT 0;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_State_Table + ".op_cmd IS '控制命令';"); } catch (Exception e) { e.printStackTrace(); } finally { sql.close_con(); } } } BattMonitor_DB_Builder/src/com/sql/util/Db_Abe_TestData.java
New file @@ -0,0 +1,87 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Abe_TestData { public static void init(MysqlConnPool pool) { System.out.println("Db_Abe_TestData init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Abe_TestData(pool); createAbe_TestData_Inf_Table(pool); System.out.println("Db_Abe_TestData init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } public static void createDb_Abe_TestData(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { sql.sqlMysqlExecute("CREATE SCHEMA IF NOT EXISTS " + Sql_Mysql.DB_ABE_TESTDATA + " AUTHORIZATION sysdba"); } catch (SQLException e) { e.printStackTrace(); } } /** * 创建 batt_alarm 数据库表 * @param conn */ public static void createAbe_TestData_Inf_Table(MysqlConnPool pool) { Sql_Mysql sql = new Sql_Mysql(pool.getConn()); try { String sql_str_auto = "CREATE SEQUENCE IF NOT EXISTS " + Sql_Mysql.Abe_TestData_Inf_Table + "_auto" + " INCREMENT 1" + " MINVALUE 1" + " MAXVALUE 9223372036854775807" + " START 1" + " CACHE 1;"; //创建自增序列 sql.sqlMysqlExecute(sql_str_auto); String sql_str = " CREATE TABLE IF NOT EXISTS " + Sql_Mysql.Abe_TestData_Inf_Table + " " + "(num integer NOT NULL DEFAULT nextval('" + Sql_Mysql.Abe_TestData_Inf_Table + "_auto'::regclass)," + " mon_id integer NOT NULL DEFAULT 1," + " test_record_count integer NOT NULL DEFAULT 1," + " record_time timestamp without time zone NOT NULL DEFAULT '2000-01-01 00:00:00'::timestamp without time zone," + " record_num integer NOT NULL DEFAULT 1," + " test_starttime timestamp without time zone NOT NULL DEFAULT '2000-01-01 00:00:00'::timestamp without time zone," + " test_type integer NOT NULL DEFAULT 2," + " test_timelong integer NOT NULL DEFAULT 0," + " test_stoptype integer NOT NULL DEFAULT 0," + " group_vol double precision NOT NULL DEFAULT 0," + " test_curr double precision NOT NULL DEFAULT 0," + " test_cap double precision NOT NULL DEFAULT 0," + " task_no character varying(255) NOT NULL COLLATE pg_catalog.\"default\" DEFAULT ''::character varying," + " PRIMARY KEY (num)" + ")"; sql.sqlMysqlExecute(sql_str); sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Abe_TestData_Inf_Table + " OWNER TO sysdba;"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".num IS '自增主键';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".mon_id IS '单体ID';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_record_count IS '测试笔数';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".record_time IS '记录时间';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".record_num IS '记录笔数';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_starttime IS '测试开始时间';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_type IS '测试类型[2-充电 3-放电 4-活化]';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_timelong IS ' 测试时长';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_stoptype IS '停止原因';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".group_vol IS '组端电压';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_curr IS '测试电流';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".test_cap IS '测试容量';"); sql.sqlMysqlExecute("COMMENT ON COLUMN " + Sql_Mysql.Abe_TestData_Inf_Table + ".task_no IS '仓储任务编号';"); } catch (Exception e) { e.printStackTrace(); } finally { sql.close_con(); } } } BattMonitor_DB_Builder/src/com/sql/util/Db_Alarm.java
@@ -1,17 +1,22 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Alarm { public static void init(MysqlConnPool pool) { System.out.println("Db_Alarm init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Alarm(pool); createBatt_Alarm_Table(pool); System.out.println("Db_Alarm init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/sql/util/Db_Batt.java
@@ -1,12 +1,16 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Batt { public static void init(MysqlConnPool pool) { System.out.println("Db_Batt init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Batt(pool); createMon_Inf_Table(pool); @@ -19,6 +23,7 @@ createStation_Inf_Table(pool); System.out.println("Db_Batt init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } public static void createStation_Inf_Table(MysqlConnPool pool) BattMonitor_DB_Builder/src/com/sql/util/Db_Dis_Batt.java
@@ -1,16 +1,22 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Dis_Batt { public static void init(MysqlConnPool pool) { System.out.println("Db_Dis_Batt init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Dis_Batt(pool); createBatt_Test_Inf_Table(pool); System.out.println("Db_Dis_Batt init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } public static void createBatt_Test_Inf_Table(MysqlConnPool pool) BattMonitor_DB_Builder/src/com/sql/util/Db_Lithium_Ram_Db.java
@@ -1,12 +1,16 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Lithium_Ram_Db { public static void init(MysqlConnPool pool) { System.out.println("Db_Lithium_Ram_Db init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Lithium_Ram_Db(pool); createA200_RealState_Table(pool); @@ -20,6 +24,8 @@ createWorkstate_Cfg_Table(pool); createWorkstate_ChangeEvent_Table(pool); System.out.println("Db_Lithium_Ram_Db init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/sql/util/Db_Lithium_Testdata.java
@@ -1,15 +1,21 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Lithium_Testdata { public static void init(MysqlConnPool pool) { System.out.println("Db_Lithium_Testdata init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Lithium_Testdata(pool); createBattTestdata_Inf_Table(pool); System.out.println("Db_Lithium_Testdata init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/sql/util/Db_Param.java
@@ -1,17 +1,23 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Param { public static void init(MysqlConnPool pool) { System.out.println("Db_Param init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Param(pool); createBattAlarm_Param_Table(pool); createPowerAlarm_param_Table(pool); System.out.println("Db_Param init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } public static void createPowerAlarm_param_Table(MysqlConnPool pool) BattMonitor_DB_Builder/src/com/sql/util/Db_Power_Alarm.java
@@ -1,7 +1,9 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; @@ -12,12 +14,16 @@ */ public class Db_Power_Alarm { public static void init(MysqlConnPool pool) { System.out.println("Db_Power_Alarm init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Power_Alarm(pool); createPower_Alarm_Table(pool); createPower_Alarm_Cfg_Table(pool); System.out.println("Db_Power_Alarm init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/sql/util/Db_User.java
@@ -1,12 +1,16 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_User { public static void init(MysqlConnPool pool) { System.out.println("Db_User init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_User(pool); createOperation_Log_Table(pool); @@ -16,6 +20,7 @@ createUser_Inf_Table(pool); System.out.println("Db_User init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/sql/util/Db_Work.java
@@ -1,17 +1,23 @@ package com.sql.util; import java.sql.SQLException; import java.util.Date; import com.base.Com; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; public class Db_Work { public static void init(MysqlConnPool pool) { System.out.println("Db_Work init Start " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); createDb_Work(pool); createWorksheet_Link_Table(pool); createWorksheet_Main_Table(pool); System.out.println("Db_Work init End " + Com.getDateTimeFormat(new Date(),Com.DTF_YMDhms)); } BattMonitor_DB_Builder/src/com/version_inf/version_inf.txt
@@ -1,8 +1,13 @@ 乌东德水电站智能运维平台 建表程序 V1.02 edit by lijun 2025-03-28 V1.03 edit by lijun 2025-04-14 1.'db_abe_ram.tb_abe_inf'新增字敦 now_mon_res double precision NOT NULL DEFAULT 0, COMMENT ON COLUMN db_abe_ram.tb_abe_inf.now_mon_res IS '当前连接单体内阻'; 2.'db_abe_ram.tb_abe_state'新增字敦 op_cmd integer NOT NULL DEFAULT 0, COMMENT ON COLUMN db_abe_ram.tb_abe_state.op_cmd IS '控制命令'; V1.01 edit by lijun 2024-08-15 1.完成基本数据表的开发任务 BattMonitor_DB_Builder/src/main/main_BTS_DB_Builder.java
@@ -7,6 +7,8 @@ import com.config.AppConfig; import com.sql.MysqlConnPool; import com.sql.Sql_Mysql; import com.sql.util.Db_Abe_Ram; import com.sql.util.Db_Abe_TestData; import com.sql.util.Db_Alarm; import com.sql.util.Db_Batt; import com.sql.util.Db_Dis_Batt; @@ -21,7 +23,7 @@ /**************************************************************************/ /**************************************************************************/ public final static boolean app_debug = false; public final static float m_VersionNum = (float) 1.02; public final static float m_VersionNum = (float) 1.03; public final static String m_Version = "Welcome To Use BTS DB BUILDER V" + m_VersionNum + " RC_20180908"; /**************************************************************************/ /**************************************************************************/ @@ -100,6 +102,11 @@ Db_User.init(GB_MysqlConnPool); Db_Abe_TestData.init(GB_MysqlConnPool); Db_Abe_Ram.init(GB_MysqlConnPool); GB_DataArray.checkBattRealData(); System.out.println("main_BTS_DB_Builder Run Done.");