|
@@ -142,9 +142,14 @@ public class CompetitionTask {
|
|
|
return;
|
|
|
}
|
|
|
String filePath = competitionConfig.getDirectory() + competitionConfig.getName() + "_" + period + "_基金净值采集结果明细_" + DateUtil.format(new Date(), DateConst.YYYYMMDD) + ".xlsx";
|
|
|
- EasyExcel.write(filePath, FundNavDataDTO.class)
|
|
|
- .sheet("基金净值采集结果明细")
|
|
|
- .doWrite(navDataDTOList);
|
|
|
+ log.info("基金净值采集结果明细表格数据量:{}", navDataDTOList.size());
|
|
|
+ try {
|
|
|
+ EasyExcel.write(filePath, FundNavDataDTO.class)
|
|
|
+ .sheet("基金净值采集结果明细")
|
|
|
+ .doWrite(navDataDTOList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("EasyExcel写基金净值采集结果明细表报错 -> 堆栈信息:{}", ExceptionUtil.stacktraceToString(e));
|
|
|
+ }
|
|
|
log.info("基金净值采集结果明细表格已输出 -> 文件:{}", filePath);
|
|
|
|
|
|
// 通过邮件发送"基金净值采集结果明细表格"
|
|
@@ -168,17 +173,24 @@ public class CompetitionTask {
|
|
|
String endDate = DateUtil.format(new Date(), DateConst.YYYY_MM_DD);
|
|
|
// 输出榜单之前 -> 执行净值缺失检测(确保净值不全的基金不参与榜单)
|
|
|
if (isComputeDeletion) {
|
|
|
- // fundDeletionTask.computeDeletion();
|
|
|
+ fundDeletionTask.computeDeletion();
|
|
|
}
|
|
|
List<FundNavDeletionDTO> navDeletionDTOList = fundNavService.getFundNavDeletion(competitionId, endDate);
|
|
|
if (CollUtil.isEmpty(navDeletionDTOList)) {
|
|
|
+ log.info("无净值缺失数据,不输出基金净值缺失明细表格");
|
|
|
return;
|
|
|
}
|
|
|
String filePath = competitionConfig.getDirectory() + competitionConfig.getName() + "_" + period + "_基金净值缺失明细_" + DateUtil.format(new Date(), DateConst.YYYYMMDD) + ".xlsx";
|
|
|
- EasyExcel.write(filePath, FundNavDeletionDTO.class)
|
|
|
- .sheet("基金净值缺失明细")
|
|
|
- .doWrite(navDeletionDTOList);
|
|
|
- log.info("基金净值缺失明细表格已输出 -> 文件:{}", filePath);
|
|
|
+ log.info("基金净值缺失明细表格数据量:{}", navDeletionDTOList.size());
|
|
|
+
|
|
|
+ try {
|
|
|
+ EasyExcel.write(filePath, FundNavDeletionDTO.class)
|
|
|
+ .sheet("基金净值缺失明细")
|
|
|
+ .doWrite(navDeletionDTOList);
|
|
|
+ log.info("基金净值缺失明细表格已输出 -> 文件:{}", filePath);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("EasyExcel写基金净值缺失明细表格报错 -> 堆栈信息:{}", ExceptionUtil.stacktraceToString(e));
|
|
|
+ }
|
|
|
|
|
|
// 通过邮件发送"基金净值采集结果明细表格"
|
|
|
if (competitionConfig.getMethod() == 1) {
|
|
@@ -209,9 +221,16 @@ public class CompetitionTask {
|
|
|
}
|
|
|
Class<? extends CompetitionBaseResultDTO> aClass = competitionResultDTOList.get(0).getClass();
|
|
|
String filePath = competitionConfig.getDirectory() + competitionConfig.getName() + "_" + period + "_基金净值衍生指标及排名结果明细_" + DateUtil.format(new Date(), DateConst.YYYYMMDD) + ".xlsx";
|
|
|
- EasyExcel.write(filePath, aClass)
|
|
|
- .sheet("基金净值衍生指标及排名结果明细")
|
|
|
- .doWrite(competitionResultDTOList);
|
|
|
+ log.info("基金净值衍生指标及排名结果明细表格数据量:{}", competitionResultDTOList.size());
|
|
|
+
|
|
|
+ try {
|
|
|
+ EasyExcel.write(filePath, aClass)
|
|
|
+ .sheet("基金净值衍生指标及排名结果明细")
|
|
|
+ .doWrite(competitionResultDTOList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("EasyExcel写基金净值衍生指标及排名结果明细报错 -> 堆栈信息:{}", ExceptionUtil.stacktraceToString(e));
|
|
|
+ }
|
|
|
+
|
|
|
log.info("基金净值衍生指标及排名结果明细表已输出 -> 文件:{},耗时:{}", filePath, (System.currentTimeMillis() - startTime));
|
|
|
|
|
|
Integer method = competitionConfig.getMethod();
|