|
@@ -28,18 +28,15 @@ public class BeiLunFirstCourseRecordDocTrans extends ModelDocTrans {
|
|
|
public FirstCourseRecordDoc extract(MedrecVo medrecVo) {
|
|
|
Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
|
|
|
String content = contentMap.get("xmlText").toString();
|
|
|
- String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
+ String recTitle = contentMap.get("recTitle").toString();
|
|
|
BeiLunFirstCourseRecordHtmlAnalysis beiLunFirstCourseRecordHtmlAnalysis = new BeiLunFirstCourseRecordHtmlAnalysis();
|
|
|
- Map<String, String> sourceMap = beiLunFirstCourseRecordHtmlAnalysis.analysis(content, recTypeId);
|
|
|
- sourceMap = removeSerialNumber(sourceMap);
|
|
|
+ Map<String, String> sourceMap = beiLunFirstCourseRecordHtmlAnalysis.analysis(content, recTitle);
|
|
|
//Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
- sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
- sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ sourceMap = removeSerialNumber(sourceMap);
|
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
-
|
|
|
String text = CommonAnalysisUtil.html2String(content);
|
|
|
-// Map<String, String> cutWordMap = getCutWordMap(text);
|
|
|
-// cutWordMap.putAll(structureMap);
|
|
|
+ //Map<String, String> cutWordMap = getCutWordMap(text);
|
|
|
+ //cutWordMap.putAll(structureMap);
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = ModelDocGenerate.firstCourseRecordDocGen(structureMap);
|
|
|
firstCourseRecordDoc.setText(text);
|
|
|
firstCourseRecordDoc.setPageData((Map) structureMap);
|
|
@@ -51,7 +48,7 @@ public class BeiLunFirstCourseRecordDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private Map<String, String> removeSerialNumber(Map<String, String> sourceMap) {
|
|
|
Map<String, String> structureMap = Maps.newLinkedHashMap();
|
|
|
- sourceMap.forEach((key, value) -> structureMap.put(key.replaceAll("[一二三四五六()()]", ""), value));
|
|
|
+ sourceMap.forEach((key, value) -> structureMap.put(key.replaceAll("[一二三四五六()().123456]", ""), value));
|
|
|
return structureMap;
|
|
|
}
|
|
|
|