|
@@ -63,8 +63,16 @@ public class CacheUtil implements ApplicationRunner {
|
|
|
private void loadModuleMappingInfo() {
|
|
|
List<String> xmlDataTypeHospitalIds = Lists.newArrayList("1", "3");
|
|
|
try {
|
|
|
- String path = ResourceUtils.getURL("classpath:").getPath() + "cache/" + hospitalId + "/module_mapping.json";
|
|
|
- String mappingMsg = FileUtil.fileRead(path);
|
|
|
+ String mappingMsg = "";
|
|
|
+ Configuration configuration = new DefaultConfig();
|
|
|
+ List<String> lines = configuration.readTargetFileContents("cache/" + hospitalId + "/module_mapping.json");
|
|
|
+ for (String line : lines) {
|
|
|
+ mappingMsg +=line;
|
|
|
+ }
|
|
|
+ logger.error("模板数据:"+mappingMsg);
|
|
|
+
|
|
|
+// String path = ResourceUtils.getURL("classpath:").getPath() + "cache/" + hospitalId + "/module_mapping.json";
|
|
|
+// String mappingMsg = FileUtil.fileRead(path);
|
|
|
if (xmlDataTypeHospitalIds.contains(hospitalId)) {
|
|
|
Map<String, Long> mapKeysModuleInfoIdMap = (Map) FastJsonUtils.getJsonToMap(mappingMsg);
|
|
|
Map<Set<String>, String> xmlDataTypeModuleInfo = Maps.newHashMap();
|
|
@@ -84,7 +92,7 @@ public class CacheUtil implements ApplicationRunner {
|
|
|
// });
|
|
|
ModuleMappingUtil.xmlDataTypeModuleInfo = xmlDataTypeModuleInfo;
|
|
|
}
|
|
|
- } catch (FileNotFoundException e) {
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|