浏览代码

fix: 定期报告归类调整

chenjianhua 6 月之前
父节点
当前提交
1ecc659256

+ 1 - 9
service-base/src/main/java/com/simuwang/base/common/util/EmailUtil.java

@@ -173,17 +173,9 @@ public class EmailUtil {
                         }
                     }
                     try{
-                        //获取邮件编码
-                        String contentType = part.getContentType();
-                        if(contentType.indexOf("charset=") != -1){
-                            contentType = contentType.substring(contentType.indexOf("charset=")+8,contentType.length());
-                            FileUtils.write(new File(savePath), partContent.toString(),contentType.toUpperCase());
-                        }else{
-                            FileUtil.writeFile(savePath, partContent.toString());
-                        }
+                        FileUtils.write(new File(savePath), partContent.toString());
                     }catch (Exception e){
                         logger.error(e.getMessage(),e);
-                        FileUtil.writeFile(savePath, partContent.toString());
                     }
                     emailContentInfoDTO.setFileName(fileName);
                     emailContentInfoDTO.setFilePath(savePath);

+ 18 - 4
service-daq/src/main/java/com/simuwang/daq/service/EmailParseService.java

@@ -1004,25 +1004,39 @@ public class EmailParseService {
         valuationNameValueVOS.add(templateErrorVO);
         result.setValuationFailAnalysisVO(valuationNameValueVOS);
         //定期报告
+        /**
+         *  PARSE_FAIL(21000, "定期报告解析错误:{}"),
+         *     NOT_A_REPORT(21001, "[{}]不是定期报告"),
+         *     REPORT_IS_SCAN(21002, "报告[{}]为扫描件"),
+         *     NO_SUPPORT_TEMPLATE(21003, "报告[{}]是不支持的文件格式"),
+         *     NOT_A_FIXED_FORMAT(21004, "报告[{}]不是基协统一格式"),
+         *
+         *     PARSE_FUND_INFO_FAIL(21010, "报告[{}]没有解析到基金基本信息"),
+         *     PARSE_NAV_INFO_FAIL(21011, "报告[{}]没有解析到基金净值信息"),
+         *     PARSE_FINANCIAL_INFO_FAIL(21012, "报告[{}]没有解析到基金财务指标信息"),
+         *     PARSE_INDUSTRY_INFO_FAIL(21013, "报告[{}]没有解析到基金行业配置信息"),
+         *     PARSE_ASSET_INFO_FAIL(21014, "报告[{}]没有解析到基金资产配置信息"),
+         *     PARSE_SHARE_INFO_FAIL(21015, "报告[{}]没有解析到基金份额变动信息"),
+         */
         databoardQuery.setEmailType(3);
         List<NameValueVO> reportNameValueVOS = new ArrayList<>();
         NameValueVO scannedFileVO = new NameValueVO();
-        Long scannedFile = emailParseInfoMapper.countpdfNoData(databoardQuery, "报告为扫描件");
+        Long scannedFile = emailParseInfoMapper.countpdfNoData(databoardQuery, "为扫描件");
         scannedFileVO.setName("报告为扫描件");
         scannedFileVO.setValue(scannedFile);
         reportNameValueVOS.add(scannedFileVO);
         NameValueVO errorAmacFileTypeVO = new NameValueVO();
-        Long errorAmacFileType = emailParseInfoMapper.countpdfNoData(databoardQuery, "报告不是基协统一格式");
+        Long errorAmacFileType = emailParseInfoMapper.countpdfNoData(databoardQuery, "不是基协统一格式");
         errorAmacFileTypeVO.setName("报告不是基协统一格式");
         errorAmacFileTypeVO.setValue(errorAmacFileType);
         reportNameValueVOS.add(errorAmacFileTypeVO);
         NameValueVO watermarkFileErrorVO = new NameValueVO();
-        Long watermarkFileError = emailParseInfoMapper.countpdfNoData(databoardQuery, "报告水印干扰导致部分没有解析");
+        Long watermarkFileError = emailParseInfoMapper.countpdfNoData(databoardQuery, "没有解析");
         watermarkFileErrorVO.setName("报告水印干扰导致部分没有解析");
         watermarkFileErrorVO.setValue(watermarkFileError);
         reportNameValueVOS.add(watermarkFileErrorVO);
         NameValueVO noReportVO = new NameValueVO();
-        Long noReport = emailParseInfoMapper.countpdfNoData(databoardQuery, "报告不是定期报告");
+        Long noReport = emailParseInfoMapper.countpdfNoData(databoardQuery, "不是定期报告");
         noReportVO.setName("报告不是定期报告");
         noReportVO.setValue(noReport);
         reportNameValueVOS.add(noReportVO);