V1.34 edit at date 2022-06-30
1.修复之前默认添加的superuser账号为临时账号bug
| | |
| | | `mon_cap` float NOT NULL DEFAULT '0' COMMENT '实际容量', |
| | | `mon_rest_cap` float NOT NULL DEFAULT '0' COMMENT '剩余容量', |
| | | |
| | | |
| | | V1.34 edit at date 2022-06-30 |
| | | 1.修复之前默认添加的superuser账号为临时账号bug |
| | | |
| | |
| | | |
| | | <root> |
| | | <mysql_ramdb_recreate_en>false</mysql_ramdb_recreate_en> |
| | | <mysql_server_ip>49.234.20.113</mysql_server_ip> |
| | | <mysql_server_ip>127.0.0.1</mysql_server_ip> |
| | | <!--SOURCE_BATTDATA_TYPE_FBSDEV = 0--> |
| | | <!--SOURCE_BATTDATA_TYPE_SQLSERVER = 1--> |
| | | <!--SOURCE_BATTDATA_TYPE_C_INTERFACE = 2--> |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattInf_Table |
| | | + " ADD COLUMN `PackCount` int DEFAULT '1' COMMENT '锂电池包数量';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加sort_id |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_battinf'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattInf_Table |
| | | + " ADD COLUMN `sort_id` float DEFAULT '1' COMMENT '';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加dev_num |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_battinf'" |
| | |
| | | //123456-------- |
| | | String upstr = "jFr3/n7JBhwxVE+uiMzC9LapSjDb97x1P7s8npTTLepabMucHcgVPwU/rkiG4tLlEICjYJKINQzoZQ0bqGxhwASe9vT2KukOOHJAEmBjs1uWkJoK0GLMZtNt7oiRoQzVSzPCfmtlc64gplUCSH6UTqqkMu//pEn/67W4sTLzUzg="; |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as num_count FROM " + Sql_Mysql.TB_UserInf); |
| | | if(res.next()) { |
| | | /*if(res.next()) { |
| | | int count = res.getInt("num_count"); |
| | | if(count<1) { |
| | | //默认没有添加用户信息时添加superuser |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1001', '" + upstr + "', 'admin', 'admin', 'employeeid', '12345678912', '12345678912', 'abcde@mail.com', '', '1980-01-01', '2015-12-09', '男', '广东省', 'protitle', 'authority', '默认班组', 'duties', 'tasks', '1', 'note', '"+upstr+"', '', '', '48505834353130373639353153594E4F', '28', '0','0','0','0','1','" + Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms) + "','2022-05-19 14:53:44','2022-05-19 14:53:44','2022-05-19 14:53:44','2022-05-19 14:53:44','0','0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1002', '" + upstr + "', 'superuser', '1234567', '100010000', '12345678', '15346259512', '123456789@qq.com', '', '1990-04-20', '2016-03-28', '男', '湖北省', '软件工程师', 'authority111', '默认班组', 'dutie', '完成软件的研发工作', '0', 'note', '"+upstr+"', '', '', '14031C0F0136063E', '27', '0','0','0','0','1','" + Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms) + "','2022-05-19 14:53:44','2022-05-19 14:53:44','2022-05-19 14:53:44','2022-05-19 14:53:44','0','0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1001', '" + upstr + "', 'admin', 'admin', 'employeeid', '12345678912', '12345678912', 'abcde@mail.com', '', '1980-01-01', '2015-12-09', '男', '广东省', 'protitle', 'authority', '默认班组', 'duties', 'tasks', '1', 'note', '"+upstr+"', '', '', '48505834353130373639353153594E4F', '28', '0','0','0','1','1',null,'"+Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms)+"','2022-05-19 14:53:44','2022-05-19 14:53:44',null,'00:00:01~23:59:59','*');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1002', '" + upstr + "', 'superuser', '1234567', '100010000', '12345678', '15346259512', '123456789@qq.com', '', '1990-04-20', '2016-03-28', '男', '湖北省', '软件工程师', 'authority111', '默认班组', 'dutie', '完成软件的研发工作', '0', 'note', '"+upstr+"', '', '', '14031C0F0136063E', '27', '0','0','0','1','1',null,'"+Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms)+"','2022-05-19 14:53:44','2022-05-19 14:53:44',null,'00:00:01~23:59:59','*');"); |
| | | } |
| | | }*/ |
| | | |
| | | //默认新增系统默认的账号superuser,admin |
| | | { |
| | | //添加admin |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as num_count FROM " + Sql_Mysql.TB_UserInf + " WHERE uName = 'admin';"); |
| | | if(res.next()) { |
| | | int count = res.getInt("num_count"); |
| | | if(count<1) { |
| | | //默认没有添加用户信息时添加'admin' |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1001', '" + upstr + "', 'admin', 'admin', 'employeeid', '12345678912', '12345678912', 'abcde@mail.com', '', '1980-01-01', '2015-12-09', '男', '广东省', 'protitle', 'authority', '默认班组', 'duties', 'tasks', '1', 'note', '"+upstr+"', '', '', '48505834353130373639353153594E4F', '28', '0','0','0','1','1',null,'"+Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms)+"','2022-05-19 14:53:44','2022-05-19 14:53:44',null,'00:00:01~23:59:59','*');"); |
| | | }else { |
| | | //修复前期添加默认账号时添加成了临时账号 |
| | | sql.sqlMysqlExecute("UPDATE " + Sql_Mysql.UserInfTable + " SET type = 1,expiration_time = null,lock_time = null,visit_time='00:00:00~23:59:59',visit_ip = '*' WHERE uName = 'admin'"); |
| | | } |
| | | } |
| | | //添加superuser |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as num_count FROM " + Sql_Mysql.TB_UserInf + " WHERE uName = 'superuser';"); |
| | | if(res.next()) { |
| | | int count = res.getInt("num_count"); |
| | | if(count<1) { |
| | | //默认没有添加用户信息时添加'superuser' |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+" VALUES ('1002', '" + upstr + "', 'superuser', '1234567', '100010000', '12345678', '15346259512', '123456789@qq.com', '', '1990-04-20', '2016-03-28', '男', '湖北省', '软件工程师', 'authority111', '默认班组', 'dutie', '完成软件的研发工作', '0', 'note', '"+upstr+"', '', '', '14031C0F0136063E', '27', '0','0','0','1','1',null,'"+Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms)+"','2022-05-19 14:53:44','2022-05-19 14:53:44',null,'00:00:01~23:59:59','*');"); |
| | | }else { |
| | | //修复前期添加默认账号时添加成了临时账号 |
| | | sql.sqlMysqlExecute("UPDATE " + Sql_Mysql.UserInfTable + " SET type = 1,expiration_time = null,lock_time = null,visit_time='00:00:00~23:59:59',visit_ip = '*' WHERE uName = 'superuser'"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //默认新增指定UID = 0;1;2的 账号 |
| | | { |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as num_count FROM " + Sql_Mysql.TB_UserInf + " WHERE uName = '未登录的用户账号';"); |
| | |
| | | `mon_cap` float NOT NULL DEFAULT '0' COMMENT '实际容量', |
| | | `mon_rest_cap` float NOT NULL DEFAULT '0' COMMENT '剩余容量', |
| | | |
| | | |
| | | V1.34 edit at date 2022-06-30 |
| | | 1.修复之前默认添加的superuser账号为临时账号bug |
| | | |
| | |
| | | /**************************************************************************/ |
| | | /**************************************************************************/ |
| | | public final static boolean app_debug = false; |
| | | public final static float m_VersionNum = (float) 1.33; |
| | | public final static float m_VersionNum = (float) 1.34; |
| | | public final static String m_Version = "Welcome To Use BTS DB BUILDER V" + m_VersionNum + " RC_20180908"; |
| | | /**************************************************************************/ |
| | | /**************************************************************************/ |