|
@@ -2,6 +2,7 @@ package com.lantone.qc.dbanaly.util;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Sets;
|
|
import com.google.common.collect.Sets;
|
|
|
|
+import com.lantone.qc.pub.util.SpringContextUtil;
|
|
import org.apache.commons.collections.MapUtils;
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -18,11 +19,11 @@ import java.util.Set;
|
|
public class ModuleMappingUtil {
|
|
public class ModuleMappingUtil {
|
|
|
|
|
|
public static final Map<String, Map<Set<String>, String>> xmlDataTypeModuleInfo = Maps.newHashMap();
|
|
public static final Map<String, Map<Set<String>, String>> xmlDataTypeModuleInfo = Maps.newHashMap();
|
|
- public static final ThreadLocal<String> hospitalIdThreadLocal = new ThreadLocal<>();
|
|
|
|
|
|
|
|
public static String getXmlDataTypeModuleId(Map<String, String> sourceMap) {
|
|
public static String getXmlDataTypeModuleId(Map<String, String> sourceMap) {
|
|
|
|
+ SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
|
|
if (MapUtils.isEmpty(sourceMap)
|
|
if (MapUtils.isEmpty(sourceMap)
|
|
- || MapUtils.isEmpty(xmlDataTypeModuleInfo.get(hospitalIdThreadLocal.get()))) {
|
|
|
|
|
|
+ || MapUtils.isEmpty(xmlDataTypeModuleInfo.get(specialStorageUtil.getHospitalIdThreadLocal().get()))) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
Set<String> set = sourceMap.keySet();
|
|
Set<String> set = sourceMap.keySet();
|
|
@@ -34,7 +35,7 @@ public class ModuleMappingUtil {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
set = Sets.newLinkedHashSet(list);
|
|
set = Sets.newLinkedHashSet(list);
|
|
- return xmlDataTypeModuleInfo.get(hospitalIdThreadLocal.get()).get(set);
|
|
|
|
|
|
+ return xmlDataTypeModuleInfo.get(specialStorageUtil.getHospitalIdThreadLocal().get()).get(set);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|