|
@@ -63,10 +63,13 @@ public class DutyShiftSystemTran extends TargetTran {
|
|
|
String text = dutyShiftSystemDocs.get(0).getText();
|
|
|
String fir = text.split("\n")[1];
|
|
|
if(StringUtil.isNotEmpty(retMap.get("诊疗计划"))){
|
|
|
- String subStr = text.substring(text.indexOf("诊疗计划:"));
|
|
|
- String[] split = subStr.split("\n");
|
|
|
- String planRet =split[0];
|
|
|
- String planSignDate = parseString(split[1]);
|
|
|
+ String subStr = text.substring(text.indexOf("诊疗计划:")+"诊疗计划:".length());
|
|
|
+ String planRet = retMap.get("诊疗计划");
|
|
|
+ String planSignDate = "";
|
|
|
+ if(subStr.contains("/")){
|
|
|
+ planSignDate = parseString(planRet);
|
|
|
+ planRet = parseStr(planRet);
|
|
|
+ }
|
|
|
retMap.put("诊疗计划",planRet);
|
|
|
if(fir.contains("接班记录") && StringUtil.isNotEmpty(planSignDate.trim())){
|
|
|
retMap.put("接班者签名",planSignDate);
|
|
@@ -74,10 +77,14 @@ public class DutyShiftSystemTran extends TargetTran {
|
|
|
}
|
|
|
|
|
|
if(StringUtil.isNotEmpty(retMap.get("交班注意事项"))){
|
|
|
- String subStr = text.substring(text.indexOf("交班注意事项:"));
|
|
|
- String[] split = subStr.split("\n");
|
|
|
- String planRet = split[0];
|
|
|
- String planSignDate = parseString(split[1]);
|
|
|
+ String subStr = text.substring(text.indexOf("交班注意事项:")+"交班注意事项:".length());
|
|
|
+ String planRet = retMap.get("交班注意事项");
|
|
|
+ String planSignDate = "";
|
|
|
+ if(subStr.contains("/")){
|
|
|
+ planSignDate = parseString(planRet);
|
|
|
+ planRet = parseStr(planRet);
|
|
|
+ }
|
|
|
+
|
|
|
retMap.put("交班注意事项",planRet);
|
|
|
if(fir.contains("交班记录") && StringUtil.isNotEmpty(planSignDate.trim())){
|
|
|
retMap.put("交班者签名",planSignDate);
|
|
@@ -142,4 +149,13 @@ public class DutyShiftSystemTran extends TargetTran {
|
|
|
}
|
|
|
return text;
|
|
|
}
|
|
|
+
|
|
|
+ // 取/前
|
|
|
+ public static String parseStr(String text){
|
|
|
+ if(text.contains("/")){
|
|
|
+ text = text.substring(0,text.lastIndexOf("/"));
|
|
|
+ text= parseStr(text);
|
|
|
+ }
|
|
|
+ return text;
|
|
|
+ }
|
|
|
}
|