|
@@ -4,17 +4,14 @@ import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
-import com.smppw.modaq.application.util.EmailUtil;
|
|
|
import com.smppw.modaq.common.conts.EmailTypeConst;
|
|
|
import com.smppw.modaq.common.conts.PatternConsts;
|
|
|
import com.smppw.modaq.common.enums.ReportType;
|
|
|
import com.smppw.modaq.domain.dto.report.ReportAssetAllocationDTO;
|
|
|
+import com.smppw.modaq.infrastructure.util.DateUtils;
|
|
|
|
|
|
import java.time.YearMonth;
|
|
|
-import java.util.Calendar;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -227,10 +224,8 @@ public final class ReportParseUtils {
|
|
|
.replaceAll("\r", StrUtil.EMPTY)
|
|
|
.replaceAll(";", ";")
|
|
|
.replaceAll(":", ":")
|
|
|
- .replaceAll(" ", StrUtil.EMPTY)
|
|
|
.replaceAll("【", StrUtil.EMPTY)
|
|
|
- .replaceAll("】", StrUtil.EMPTY)
|
|
|
- .replaceAll(":", StrUtil.EMPTY);
|
|
|
+ .replaceAll("】", StrUtil.EMPTY).trim();
|
|
|
if (replaceEn) {
|
|
|
fieldValue = fieldValue.replaceAll("[a-zA-Z]", StrUtil.EMPTY);
|
|
|
}
|
|
@@ -560,10 +555,14 @@ public final class ReportParseUtils {
|
|
|
// System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
|
|
// 异常的类型,不要基金合同
|
|
|
- text = "潼骁周周享私募证券投资基金基金合同(2025-1).pdf";
|
|
|
- emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
- reportType = matchReportType(emailType, text);
|
|
|
- System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
+// text = "潼骁周周享私募证券投资基金基金合同(2025-1).pdf";
|
|
|
+// emailType = EmailUtil.getEmailTypeBySubject(text);
|
|
|
+// reportType = matchReportType(emailType, text);
|
|
|
+// System.out.println(emailType + ",reportType=" + reportType + ",reportDate=" + matchReportDate(reportType, text));
|
|
|
|
|
|
+ String date = "2025-06-04 11:36:43";
|
|
|
+ String input = ReportParseUtils.cleaningValue(date, false);
|
|
|
+ Date date1 = DateUtils.toDate(input);
|
|
|
+ System.out.println(date1);
|
|
|
}
|
|
|
}
|