|
@@ -168,21 +168,10 @@ public class EmailParseService {
|
|
|
}
|
|
|
// 重新判断类型
|
|
|
for (EmailZipFileDTO emailFile : emailFileList) {
|
|
|
- if (EmailTypeConst.SUPPORT_NO_OTHER_TYPES.contains(emailFile.getEmailType())) {
|
|
|
+ if (EmailTypeConst.SUPPORT_EMAIL_TYPES.contains(emailFile.getEmailType())) {
|
|
|
continue;
|
|
|
}
|
|
|
Integer type = EmailUtil.getEmailTypeBySubject(emailTitle + emailFile.getFilename());
|
|
|
- // 特殊月报
|
|
|
- if ((Objects.equals(EmailTypeConst.NAV_EMAIL_TYPE, type)
|
|
|
- || Objects.equals(EmailTypeConst.REPORT_OTHER_TYPE, type))
|
|
|
- && (ReportParseUtils.containsAny(emailTitle, ReportParseUtils.MANAGER_KEYWORDS)
|
|
|
- || emailTitle.contains("定期报告"))) {
|
|
|
- type = EmailTypeConst.REPORT_EMAIL_TYPE;
|
|
|
- }
|
|
|
- // 其他报告
|
|
|
- if (Objects.equals(EmailTypeConst.NAV_EMAIL_TYPE, type)) {
|
|
|
- type = EmailTypeConst.REPORT_OTHER_TYPE;
|
|
|
- }
|
|
|
emailFile.setEmailType(type);
|
|
|
}
|
|
|
|
|
@@ -225,7 +214,7 @@ public class EmailParseService {
|
|
|
}
|
|
|
|
|
|
// 文件中的类型判断
|
|
|
- if (emailType == null || !EmailTypeConst.SUPPORT_NO_OTHER_TYPES.contains(emailType)) {
|
|
|
+ if (emailType == null || !EmailTypeConst.SUPPORT_EMAIL_TYPES.contains(emailType)) {
|
|
|
emailType = EmailUtil.getEmailTypeBySubject(emailContentInfoDTO.getFileName());
|
|
|
emailContentInfoDTO.setEmailType(emailType);
|
|
|
}
|
|
@@ -334,7 +323,7 @@ public class EmailParseService {
|
|
|
* @param params 上传文件路径
|
|
|
* @return /
|
|
|
*/
|
|
|
- public List<UploadReportResult> uploadReportResults(UploadReportParams params) {
|
|
|
+ public List<ParseResult<ReportData>> uploadReportResults(UploadReportParams params) {
|
|
|
List<ParseResult<ReportData>> dataList = ListUtil.list(false);
|
|
|
List<UploadReportParams.ReportInfo> reportInfos = params.getReportInfos();
|
|
|
List<EmailZipFileDTO> dtos = ListUtil.list(false);
|
|
@@ -360,12 +349,12 @@ public class EmailParseService {
|
|
|
return null;
|
|
|
}
|
|
|
this.parseResults(-1, null, null, totalSize, emailInfo, dataList);
|
|
|
- List<UploadReportResult> resultList = ListUtil.list(false);
|
|
|
- for (ParseResult<ReportData> result : dataList) {
|
|
|
- ReportData data = result.getData();
|
|
|
- resultList.add(new UploadReportResult(data.getReportPath(), result.getStatus(), result.getMsg()));
|
|
|
- }
|
|
|
- return resultList;
|
|
|
+// List<UploadReportResult> resultList = ListUtil.list(false);
|
|
|
+// for (ParseResult<ReportData> result : dataList) {
|
|
|
+// ReportData data = result.getData();
|
|
|
+// resultList.add(new UploadReportResult(data.getReportPath(), result.getStatus(), result.getMsg()));
|
|
|
+// }
|
|
|
+ return dataList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -410,15 +399,15 @@ public class EmailParseService {
|
|
|
if (Objects.equals(type, EmailTypeConst.REPORT_LETTER_EMAIL_TYPE)) {
|
|
|
// 确认单
|
|
|
count = this.emailFileInfoMapper.getLetterFilenameSuccessCount(emailTitle, filename);
|
|
|
- } else if (Objects.equals(type, EmailTypeConst.REPORT_EMAIL_TYPE)) {
|
|
|
- // 定期报告
|
|
|
- count = this.emailFileInfoMapper.getAmacFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
- } else if (Objects.equals(type, EmailTypeConst.REPORT_WEEKLY_TYPE)) {
|
|
|
- // 管理人周报
|
|
|
- count = this.emailFileInfoMapper.getWeeklyFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
- } else if (Objects.equals(type, EmailTypeConst.REPORT_OTHER_TYPE)) {
|
|
|
- // 其他报告
|
|
|
- count = this.emailFileInfoMapper.getOtherFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
+// } else if (Objects.equals(type, EmailTypeConst.REPORT_EMAIL_TYPE)) {
|
|
|
+// // 定期报告
|
|
|
+// count = this.emailFileInfoMapper.getAmacFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
+// } else if (Objects.equals(type, EmailTypeConst.REPORT_WEEKLY_TYPE)) {
|
|
|
+// // 管理人周报
|
|
|
+// count = this.emailFileInfoMapper.getWeeklyFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
+// } else if (Objects.equals(type, EmailTypeConst.REPORT_OTHER_TYPE)) {
|
|
|
+// // 其他报告
|
|
|
+// count = this.emailFileInfoMapper.getOtherFilenameSuccessCount(emailTitle, filename, totalSize);
|
|
|
}
|
|
|
if (count > 0) {
|
|
|
iterator.remove();
|