|
@@ -99,26 +99,25 @@ public class KlDiagnoseImportFacade {
|
|
|
// 获取标准词库Map
|
|
|
Map<String, KlConcept> concept_map = getConceptMap();
|
|
|
|
|
|
- // 分组之后的数据
|
|
|
- Map<String, List<ImportDiagnoseVO>> groupData = new LinkedHashMap<>();
|
|
|
- // 获取全部数据,分组
|
|
|
+ // 获取表格数据
|
|
|
List<ImportDiagnoseVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, 0, ImportDiagnoseVO.class);
|
|
|
+
|
|
|
+ // 以疾病分组之后的数据
|
|
|
+ Map<String, List<ImportDiagnoseVO>> groupData = new LinkedHashMap<>();
|
|
|
List<ImportDiagnoseVO> importDiagnoseVOList = null;
|
|
|
String addDisName = "";
|
|
|
for (ImportDiagnoseVO importDiagnoseVO : data) {
|
|
|
String type = importDiagnoseVO.getType();
|
|
|
if (type != null && type.startsWith("【") && type.endsWith("】")) {
|
|
|
if (StringUtil.isNotBlank(addDisName)) {
|
|
|
- addDisName = RegexUtil.getRegexData(addDisName, "【(.*?)】", 1);
|
|
|
- groupData.put(addDisName, importDiagnoseVOList);
|
|
|
+ groupData.put(addDisName, importDiagnoseVOList); // 存放上一个疾病数据
|
|
|
}
|
|
|
importDiagnoseVOList = new ArrayList<>();
|
|
|
- addDisName = type;
|
|
|
+ addDisName = RegexUtil.getRegexData(type, "【(.*?)】", 1);
|
|
|
} else {
|
|
|
importDiagnoseVOList.add(importDiagnoseVO);
|
|
|
}
|
|
|
}
|
|
|
- addDisName = RegexUtil.getRegexData(addDisName, "【(.*?)】", 1); // 获取名字
|
|
|
groupData.put(addDisName, importDiagnoseVOList); // 添加最后一个
|
|
|
|
|
|
int i = 0;
|