Procházet zdrojové kódy

fix:优化确认函解析逻辑

wangzaijun před 1 týdnem
rodič
revize
5ea323f537

+ 12 - 12
mo-daq/src/main/java/com/smppw/modaq/application/components/report/parser/pdf/PDLetterReportParser.java

@@ -48,18 +48,18 @@ public class PDLetterReportParser extends AbstractPDReportParser<LetterReportDat
                 } else {
                     this.parseHisTable(colCount, table, 1, this.allInfoMap);
                 }
-            } else {
-                // 每行的单数列是键,偶数列是值(4列或者2列的表格)
-                for (int i = 0; i < rowCount; i++) {
-                    int t = colCount / 2;
-                    for (int j = 0; j < t; j++) {
-                        String key = ReportParseUtils.cleaningValue(table.getCell(i, j * 2).getText());
-                        if (StrUtil.isBlank(key)) {
-                            continue;
-                        }
-                        String value = table.getCell(i, j * 2 + 1).getText();
-                        this.allInfoMap.put(key, ReportParseUtils.cleaningValue(value, false));
+                continue;
+            }
+            // 每行的单数列是键,偶数列是值(4列或者2列的表格)
+            for (int i = 0; i < rowCount; i++) {
+                int t = colCount / 2;
+                for (int j = 0; j < t; j++) {
+                    String key = ReportParseUtils.cleaningValue(table.getCell(i, j * 2).getText());
+                    if (StrUtil.isBlank(key)) {
+                        continue;
                     }
+                    String value = table.getCell(i, j * 2 + 1).getText();
+                    this.allInfoMap.put(key, ReportParseUtils.cleaningValue(value, false));
                 }
             }
         }
@@ -85,7 +85,7 @@ public class PDLetterReportParser extends AbstractPDReportParser<LetterReportDat
     protected LetterReportData parseExtInfoAndSetData(ReportBaseInfoDTO reportInfo, ReportFundInfoDTO fundInfo) {
         Integer fileId = reportInfo.getFileId();
         if (this.logger.isInfoEnabled()) {
-            this.logger.info("文件{} 解析的内容是:{}", fileId, this.allInfoMap);
+            this.logger.info("文件{},是否AI解析{}, 解析的内容是:{}", fileId, this.aiParse, this.allInfoMap);
         }
         // 投资者信息
         ReportInvestorInfoDTO investorInfo = this.buildDto(fileId, ReportInvestorInfoDTO.class, this.allInfoMap);

+ 1 - 1
mo-daq/src/main/java/com/smppw/modaq/domain/service/EmailParseService.java

@@ -487,7 +487,7 @@ public class EmailParseService {
                     });
                     emailMessageMap.put(uuidKey, emailContentInfoDTOList);
                 }
-                log.info("邮件{} 解析内容为:{}", message.getSubject(), emailContentInfoDTOList);
+                log.info("邮件{} 采集内容是:{}", message.getSubject(), emailContentInfoDTOList);
             } catch (Exception e) {
                 log.error("获取邮箱的邮件报错,堆栈信息:{}", ExceptionUtil.stacktraceToString(e));
             }