|
@@ -32,6 +32,7 @@ public class BeiLunDifficultCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysi
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
}
|
|
}
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
|
|
|
|
+ removeLast(structureMap);
|
|
//structureMap.put("rec_title=", "141");
|
|
//structureMap.put("rec_title=", "141");
|
|
BeiLunHtmlAnalysisUtil.insertModuleId(recTypeId, structureMap);
|
|
BeiLunHtmlAnalysisUtil.insertModuleId(recTypeId, structureMap);
|
|
//找不到模板id,用默认标准模板
|
|
//找不到模板id,用默认标准模板
|
|
@@ -39,4 +40,23 @@ public class BeiLunDifficultCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysi
|
|
return structureMap;
|
|
return structureMap;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 去除value中最后的逗号
|
|
|
|
+ *
|
|
|
|
+ * @param structureMap
|
|
|
|
+ */
|
|
|
|
+ private void removeLast(Map<String, String> structureMap) {
|
|
|
|
+ for (Map.Entry<String, String> entry : structureMap.entrySet()) {
|
|
|
|
+ structureMap.put(entry.getKey(), findLast(entry.getValue()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private String findLast(String value) {
|
|
|
|
+ if (value.lastIndexOf(",") != value.length() - 1) {
|
|
|
|
+ return value;
|
|
|
|
+ }
|
|
|
|
+ value = value.substring(0, value.length() - 1);
|
|
|
|
+ findLast(value);
|
|
|
|
+ return value;
|
|
|
|
+ }
|
|
}
|
|
}
|