|
@@ -21,13 +21,13 @@ public class DataTest {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static List<Map<String, Object>> loadHomePage(String tableName, String patientId) {
|
|
|
+ public static List<Map<String, Object>> loadHomePage(String hospitalId, String tableName, String patientId) {
|
|
|
Connection conn = null;
|
|
|
Statement stmt = null;
|
|
|
ResultSet rs = null;
|
|
|
List<Map<String, Object>> resultList = null;
|
|
|
try {
|
|
|
- conn = getConnection();
|
|
|
+ conn = getConnection(hospitalId);
|
|
|
stmt = conn.createStatement();
|
|
|
|
|
|
DatabaseMetaData dmd = conn.getMetaData();
|
|
@@ -64,13 +64,13 @@ public class DataTest {
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
- public static List<Map<String, String>> loadHomePageDiagnose(String tableName, String zdlbdm, String patientId) {
|
|
|
+ public static List<Map<String, String>> loadHomePageDiagnose(String hospitalId, String tableName, String zdlbdm, String patientId) {
|
|
|
Connection conn = null;
|
|
|
Statement stmt = null;
|
|
|
ResultSet rs = null;
|
|
|
List<Map<String, String>> resultList = new ArrayList<>();
|
|
|
try {
|
|
|
- conn = getConnection();
|
|
|
+ conn = getConnection(hospitalId);
|
|
|
stmt = conn.createStatement();
|
|
|
if (zdlbdm.equals("1")) {
|
|
|
zdlbdm = "'门诊诊断'";
|
|
@@ -111,13 +111,13 @@ public class DataTest {
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
- public static List<Map<String, String>> loadHomePageOperation(String tableNameOperation, String tableNameUser, String patientId) {
|
|
|
+ public static List<Map<String, String>> loadHomePageOperation(String hospitalId, String tableNameOperation, String tableNameUser, String patientId) {
|
|
|
Connection conn = null;
|
|
|
Statement stmt = null;
|
|
|
ResultSet rs = null;
|
|
|
List<Map<String, String>> resultList = new ArrayList<>();
|
|
|
try {
|
|
|
- conn = getConnection();
|
|
|
+ conn = getConnection(hospitalId);
|
|
|
stmt = conn.createStatement();
|
|
|
rs = stmt.executeQuery("SELECT r.BASYID, r.brssxh, r.BRSSRQ, r.BRSSMC, SSDMID, r.QKDJDM, r.YHDJDM, SSYSID, \n" +
|
|
|
"U1.YHRYMC, r.YZHSID, u3.yhrymc, r.MZYSID, u2.yhrymc, r.MZFFMC FROM " + tableNameOperation + " r\n" +
|
|
@@ -181,15 +181,25 @@ public class DataTest {
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
- private static Connection getConnection() throws Exception {
|
|
|
+ private static Connection getConnection(String hospitalId) throws Exception {
|
|
|
PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
|
|
|
Class.forName(propertiesUtil.getProperty("oracle.test.driver"));
|
|
|
|
|
|
- Properties props = new Properties();
|
|
|
- String url = propertiesUtil.getProperty("oracle.test.url");
|
|
|
- // 127.0.0.1是本机地址,1521是Oracle默认连接端口,DATABASE_NAME为实例名(SID)
|
|
|
- String user = propertiesUtil.getProperty("oracle.test.user");// 用户系统默认的账户名
|
|
|
- String password = propertiesUtil.getProperty("oracle.test.password");// 你安装时选设置的密码
|
|
|
+ String url = "";
|
|
|
+ String user = "";
|
|
|
+ String password = "";
|
|
|
+ Properties props = new Properties();
|
|
|
+ if ("1".equals(hospitalId)) {
|
|
|
+ url = propertiesUtil.getProperty("oracle.test.url");
|
|
|
+ // 127.0.0.1是本机地址,1521是Oracle默认连接端口,DATABASE_NAME为实例名(SID)
|
|
|
+ user = propertiesUtil.getProperty("oracle.test.user");// 用户系统默认的账户名
|
|
|
+ password = propertiesUtil.getProperty("oracle.test.password");// 你安装时选设置的密码
|
|
|
+ } else if ("3".equals(hospitalId)) {
|
|
|
+ url = propertiesUtil.getProperty("oracle.taizhou.url");
|
|
|
+ // 127.0.0.1是本机地址,1521是Oracle默认连接端口,DATABASE_NAME为实例名(SID)
|
|
|
+ user = propertiesUtil.getProperty("oracle.taizhou.user");// 用户系统默认的账户名
|
|
|
+ password = propertiesUtil.getProperty("oracle.taizhou.password");// 你安装时选设置的密码
|
|
|
+ }
|
|
|
props.put("user", user);
|
|
|
props.put("password", password);
|
|
|
props.put("defaultRowPrefetch", "15");
|