From 0a6d2dd97665ee556b48a185b5a9291dcf2a5c77 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq,com> Date: 星期四, 20 八月 2020 09:26:12 +0800 Subject: [PATCH] 水冷系统提交 --- WaterSystem_MonitorServer/src/com/watersystem/monitor/Water_Task_SQL.java | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/WaterSystem_MonitorServer/src/com/watersystem/monitor/Water_Task_SQL.java b/WaterSystem_MonitorServer/src/com/watersystem/monitor/Water_Task_SQL.java index fc15b07..7bef32c 100644 --- a/WaterSystem_MonitorServer/src/com/watersystem/monitor/Water_Task_SQL.java +++ b/WaterSystem_MonitorServer/src/com/watersystem/monitor/Water_Task_SQL.java @@ -204,6 +204,43 @@ sql.close_con(); } } + //创建水冷故障表 + public static void createTb_water_alarm(MysqlConnPool pool) { + String sql_str = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.Tb_water_alarm + " (" + + " num bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键'," + + " water_id int(11) NOT NULL DEFAULT '5001' COMMENT '水冷系统id'," + + " P01_main_pump int(11) NOT NULL DEFAULT '0' COMMENT 'P01主泵运行'," + + " P11_replenish_pump int(11) NOT NULL DEFAULT '0' COMMENT 'P11补水泵运行'," + + " P12_pretest_pump int(11) NOT NULL DEFAULT '0' COMMENT 'P12试压泵运行'," + + " P13_replenish_pump int(11) NOT NULL DEFAULT '0' COMMENT 'P13补气泵运行'," + + " H01_electric_heater int(11) NOT NULL DEFAULT '0' COMMENT 'H01电加热器运行'," + + " H02_electric_heater int(11) NOT NULL DEFAULT '0' COMMENT 'H02电加热器运行'," + + " Solenoid_openflag int(11) NOT NULL DEFAULT '0' COMMENT '电磁阀开限位'," + + " Solenoid_shutflag int(11) NOT NULL DEFAULT '0' COMMENT '电磁阀关限位'," + + " valve_start int(11) NOT NULL DEFAULT '0' COMMENT '阀打开'," + + " Exhaust_start int(11) NOT NULL DEFAULT '0' COMMENT '排气阀打开'," + + " remote_start int(11) NOT NULL DEFAULT '0' COMMENT '远程启动水冷系统'," + + " remote_stop int(11) NOT NULL DEFAULT '0' COMMENT '远程停止水冷系统'," + + "" + + " Operation_ooled_devices int(11) NOT NULL DEFAULT '0' COMMENT '被冷却器件投运'," + + " Auto_control_state int(11) NOT NULL DEFAULT '0' COMMENT '水冷系统自动控制状态'," + + " Manual_control_state int(11) NOT NULL DEFAULT '0' COMMENT '水冷系统手动控制状态'," + + " remote_control_state int(11) NOT NULL DEFAULT '0' COMMENT '水冷系统远程控制状态'," + + " Water_system_function int(11) NOT NULL DEFAULT '0' COMMENT '水冷系统运行'," + + " note varchar(255) NOT NULL DEFAULT ''," + + " PRIMARY KEY (num)," + + " UNIQUE KEY water_id_key (water_id) USING BTREE" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8;"; + Sql_Mysql sql = new Sql_Mysql(pool.getConn()); + try { + sql.sqlMysqlExecute(sql_str); + } catch (SQLException e) { + e.printStackTrace(); + } finally { + sql.close_con(); + } + } + /** * 初始化数据库表 * @param pool -- Gitblit v1.9.1