|
@@ -184,7 +184,10 @@ public final class ReportParseUtils {
|
|
* @param mvAndRemark 市值或备注
|
|
* @param mvAndRemark 市值或备注
|
|
* @param dtos 结果数据
|
|
* @param dtos 结果数据
|
|
*/
|
|
*/
|
|
- public static void buildAssetAllocation(Integer fileId, String detail, String mvAndRemark, List<ReportAssetAllocationDTO> dtos) {
|
|
|
|
|
|
+ public static void buildAssetAllocation(Integer fileId,
|
|
|
|
+ String detail,
|
|
|
|
+ String mvAndRemark,
|
|
|
|
+ List<ReportAssetAllocationDTO> dtos) {
|
|
if (StrUtil.isBlank(mvAndRemark)) {
|
|
if (StrUtil.isBlank(mvAndRemark)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -426,27 +429,16 @@ public final class ReportParseUtils {
|
|
return reportType;
|
|
return reportType;
|
|
}
|
|
}
|
|
// 类型识别---先识别季度报告,没有季度再识别年度报告,最后识别月报
|
|
// 类型识别---先识别季度报告,没有季度再识别年度报告,最后识别月报
|
|
- Matcher monthMatcher = PatternConsts.MONTHLY_PATTERN.matcher(text);
|
|
|
|
- Matcher dayMatcher = PatternConsts.DAY_PATTERN.matcher(text);
|
|
|
|
if (StrUtil.containsAny(text, ReportType.QUARTERLY.getPatterns())) {
|
|
if (StrUtil.containsAny(text, ReportType.QUARTERLY.getPatterns())) {
|
|
reportType = ReportType.QUARTERLY;
|
|
reportType = ReportType.QUARTERLY;
|
|
} else if (StrUtil.containsAny(text, ReportType.ANNUALLY.getPatterns())) {
|
|
} else if (StrUtil.containsAny(text, ReportType.ANNUALLY.getPatterns())) {
|
|
reportType = ReportType.ANNUALLY;
|
|
reportType = ReportType.ANNUALLY;
|
|
} else if (StrUtil.containsAny(text, ReportType.MONTHLY.getPatterns())) {
|
|
} else if (StrUtil.containsAny(text, ReportType.MONTHLY.getPatterns())) {
|
|
reportType = ReportType.MONTHLY;
|
|
reportType = ReportType.MONTHLY;
|
|
- } else if (monthMatcher.find() && !dayMatcher.find()) {
|
|
|
|
|
|
+ } else if (ReportParseUtils.containsAny(text, ReportParseUtils.MANAGER_KEYWORDS) || text.contains("定期报告")) {
|
|
// 特殊的月报(当季度->年度->月度报告无法识别时)
|
|
// 特殊的月报(当季度->年度->月度报告无法识别时)
|
|
reportType = ReportType.MONTHLY;
|
|
reportType = ReportType.MONTHLY;
|
|
}
|
|
}
|
|
-
|
|
|
|
- // 特殊月报
|
|
|
|
- if (ReportParseUtils.containsAny(text, MANAGER_KEYWORDS) || text.contains("定期报告")) {
|
|
|
|
- reportType = ReportType.MONTHLY;
|
|
|
|
- }
|
|
|
|
- // 其他报告
|
|
|
|
- if (text.contains("报告")) {
|
|
|
|
- reportType = ReportType.OTHER;
|
|
|
|
- }
|
|
|
|
return reportType;
|
|
return reportType;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -592,12 +584,17 @@ public final class ReportParseUtils {
|
|
emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
reportType = matchReportType(emailType, text);
|
|
reportType = matchReportType(emailType, text);
|
|
System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
-//
|
|
|
|
-// text = "第一创业2025年合同变更公告.png";
|
|
|
|
-// emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
|
-// reportType = matchReportType(emailType, text);
|
|
|
|
-// System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
-//
|
|
|
|
|
|
+
|
|
|
|
+ text = "第一创业2025年合同变更公告.png";
|
|
|
|
+ emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
|
+ reportType = matchReportType(emailType, text);
|
|
|
|
+ System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
+
|
|
|
|
+ text = "SGH866_致衍梧桐树2号私募证券投资基金_2025年04月份月度报告.pdf";
|
|
|
|
+ emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
|
+ reportType = matchReportType(emailType, text);
|
|
|
|
+ System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
+
|
|
String date = "2025年6月6日";
|
|
String date = "2025年6月6日";
|
|
String input = ReportParseUtils.cleaningValue(date, false);
|
|
String input = ReportParseUtils.cleaningValue(date, false);
|
|
Date date1 = DateUtils.toDate(input);
|
|
Date date1 = DateUtils.toDate(input);
|