|
@@ -351,13 +351,19 @@ public final class ReportParseUtils {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (ReportType.WEEKLY.equals(reportType) || ReportType.LETTER.equals(reportType) || ReportType.OTHER.equals(reportType)) {
|
|
if (ReportType.WEEKLY.equals(reportType) || ReportType.LETTER.equals(reportType) || ReportType.OTHER.equals(reportType)) {
|
|
- Matcher matcher = PatternConsts.DAY_PATTERN.matcher(text);
|
|
|
|
|
|
+ // 先用严格的日期匹配
|
|
|
|
+ Matcher matcher = PatternConsts.STRICT_DAY_PATTERN.matcher(text);
|
|
|
|
+ if (matcher.find()) {
|
|
|
|
+ return matcher.group();
|
|
|
|
+ }
|
|
|
|
+ // 匹配不了时
|
|
|
|
+ matcher = PatternConsts.DAY_PATTERN.matcher(text);
|
|
if (matcher.find()) {
|
|
if (matcher.find()) {
|
|
String date = matcher.group();
|
|
String date = matcher.group();
|
|
if (NumberUtil.isNumber(date) && date.length() >= 10) {
|
|
if (NumberUtil.isNumber(date) && date.length() >= 10) {
|
|
return StrUtil.sub(date, 0, 10);
|
|
return StrUtil.sub(date, 0, 10);
|
|
}
|
|
}
|
|
- return matcher.group();
|
|
|
|
|
|
+ return date;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|