|
@@ -1,5 +1,13 @@
|
|
|
package com.uas.report.util;
|
|
package com.uas.report.util;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.druid.pool.DruidDataSource;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.uas.report.SpecialProperties;
|
|
|
|
|
+import com.uas.report.model.Master;
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
+
|
|
|
|
|
+import javax.sql.DataSource;
|
|
|
import java.sql.Connection;
|
|
import java.sql.Connection;
|
|
|
import java.sql.PreparedStatement;
|
|
import java.sql.PreparedStatement;
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.ResultSet;
|
|
@@ -10,16 +18,6 @@ import java.util.Map.Entry;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
-import javax.sql.DataSource;
|
|
|
|
|
-
|
|
|
|
|
-import org.slf4j.Logger;
|
|
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
|
|
-
|
|
|
|
|
-import com.alibaba.druid.pool.DruidDataSource;
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
-import com.uas.report.SpecialProperties;
|
|
|
|
|
-import com.uas.report.model.Master;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 账套及其数据源管理
|
|
* 账套及其数据源管理
|
|
|
*
|
|
*
|
|
@@ -108,9 +106,7 @@ public class MasterManager {
|
|
|
PreparedStatement preparedStatement = null;
|
|
PreparedStatement preparedStatement = null;
|
|
|
ResultSet resultSet = null;
|
|
ResultSet resultSet = null;
|
|
|
try {
|
|
try {
|
|
|
- logger.info("mainMaster.getConnection..." + mainMaster.getUsername() + "," + userName);
|
|
|
|
|
connection = mainMaster.getConnection();
|
|
connection = mainMaster.getConnection();
|
|
|
- logger.info("mainMaster.getConnection done..." + mainMaster.getUsername() + "," + userName);
|
|
|
|
|
// 先检查是否存在MASTER表
|
|
// 先检查是否存在MASTER表
|
|
|
String sql = "select count(*) from user_tables where table_name='MASTER'";
|
|
String sql = "select count(*) from user_tables where table_name='MASTER'";
|
|
|
preparedStatement = connection.prepareStatement(sql);
|
|
preparedStatement = connection.prepareStatement(sql);
|