| | |
| | | + " ADD COLUMN `charge_curr_max` float DEFAULT '20'");
|
| | | }
|
| | | //---------------------------------------------------------------------------------------------//
|
| | | //为紫晶平台添加指定的列
|
| | | boolean isZijing = true;
|
| | | if(isZijing) {
|
| | | //添加电压等级列
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='Vol_grade'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `Vol_grade` float DEFAULT '0'");
|
| | | }
|
| | | |
| | | //生产厂家
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='Manufacturers'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `Manufacturers` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //是否资产级设备
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='Assetequipment'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `Assetequipment` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | |
| | | |
| | | //设备分类全路径
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='Deviceclasspath'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `Deviceclasspath` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //设备运维部门
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='Deviceoperationdepartment'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `DeviceOperationDepartment` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //产权单位
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='PropertyRightUnit'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `PropertyRightUnit` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //产权属性
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='PropertyAttribute'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `PropertyAttribute` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //出厂编号
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='FactoryNumber'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `FactoryNumber` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //运维班组
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='OperationTeam'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `OperationTeam` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //设备身份编码
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='DeviceIdentityCode'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `DeviceIdentityCode` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | |
| | | //项目类型
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='ProjectType'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `ProjectType` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //蓄电池应用类型
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='BatteryApplicationType'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `BatteryApplicationType` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //单电池额定电压
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='SingleRatedVoltage'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `SingleRatedVoltage` float DEFAULT '0'");
|
| | | }
|
| | | |
| | | //是否实现远程监控 |
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='RemoteMonitor'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `RemoteMonitor` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //是否独立蓄电池室放置 |
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='BatttIndependentPlaced'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `BatttIndependentPlaced` varchar(64) DEFAULT ''");
|
| | | }
|
| | | |
| | | //均充电压设定值 |
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|
| | | + " AND table_name='tb_battinf'"
|
| | | + " AND column_name='JunChargeVoltageValue'");
|
| | | if(false == res.next()) {
|
| | | sqlMysqlExecute("ALTER TABLE " + BattInf_Table |
| | | + " ADD COLUMN `JunChargeVoltageValue` float DEFAULT '0'");
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | |
| | | //---------------------------------------------------------------------------------------------//
|
| | | res = sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_battinf'"
|