|
@@ -1,7 +1,6 @@
|
|
|
package com.smppw.modaq.application.components;
|
|
|
|
|
|
import cn.hutool.core.collection.ListUtil;
|
|
|
-import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
@@ -361,8 +360,8 @@ public final class ReportParseUtils {
|
|
|
matcher = PatternConsts.DAY_PATTERN.matcher(text);
|
|
|
if (matcher.find()) {
|
|
|
String date = matcher.group();
|
|
|
- if (NumberUtil.isNumber(date) && date.length() >= 10) {
|
|
|
- return StrUtil.sub(date, 0, 10);
|
|
|
+ if (NumberUtil.isNumber(date) && date.length() >= 10 && !date.contains("-") && !date.contains("_")) {
|
|
|
+ return StrUtil.sub(date, 0, 8);
|
|
|
}
|
|
|
return date;
|
|
|
}
|
|
@@ -586,11 +585,11 @@ public final class ReportParseUtils {
|
|
|
reportType = matchReportType(emailType, text);
|
|
|
System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
|
|
- String filepath = "D:\\home\\wwwroot\\mo_report_file\\wangzaijun@simuwang.com\\20250523\\20250523100147ST9332_伏犀奇点2号私募投资基金_2024年年报.pdf";
|
|
|
- System.out.println(FileUtil.mainName(filepath));
|
|
|
- System.out.println(FileUtil.getName(filepath));
|
|
|
- System.out.println(FileUtil.getPrefix(filepath));
|
|
|
- System.out.println(FileUtil.getSuffix(filepath));
|
|
|
- System.out.println(FileUtil.getParent(filepath, 1));
|
|
|
+ text = "SZK953_私募基金季报PDF_香元梅花9号行业精选私募证券投资基金_20250331102500.pdf";
|
|
|
+ emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
+ reportType = matchReportType(emailType, text);
|
|
|
+ String reportDate = matchReportDate(reportType, text);
|
|
|
+ System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + reportDate);
|
|
|
+
|
|
|
}
|
|
|
}
|