|
@@ -270,6 +270,7 @@ public class EmailParseService {
|
|
int valuationId = valuationTableDO.getId();
|
|
int valuationId = valuationTableDO.getId();
|
|
saveValuationTableAttribute(valuationId, valuationTableAttributeList);
|
|
saveValuationTableAttribute(valuationId, valuationTableAttributeList);
|
|
fundPositionDetailDOList.forEach(e -> e.setValuationId(valuationId));
|
|
fundPositionDetailDOList.forEach(e -> e.setValuationId(valuationId));
|
|
|
|
+ fundNavDTO.setFailReason("未匹配基金");
|
|
// 不匹配基金的情况下 -> 不写fund_position_detail
|
|
// 不匹配基金的情况下 -> 不写fund_position_detail
|
|
// saveFundPositionDetail(fundPositionDetailDOList, null, fundNavDTO.getPriceDate());
|
|
// saveFundPositionDetail(fundPositionDetailDOList, null, fundNavDTO.getPriceDate());
|
|
continue;
|
|
continue;
|
|
@@ -644,7 +645,13 @@ public class EmailParseService {
|
|
private List<EmailFundNavDO> buildEmailFundNavDo(Integer fileId, EmailFundNavDTO fundNavDTO, Date parseDate) {
|
|
private List<EmailFundNavDO> buildEmailFundNavDo(Integer fileId, EmailFundNavDTO fundNavDTO, Date parseDate) {
|
|
List<EmailFundNavDO> fundNavDOList = CollUtil.newArrayList();
|
|
List<EmailFundNavDO> fundNavDOList = CollUtil.newArrayList();
|
|
Date priceDate = DateUtil.parse(fundNavDTO.getPriceDate(), DateConst.YYYY_MM_DD);
|
|
Date priceDate = DateUtil.parse(fundNavDTO.getPriceDate(), DateConst.YYYY_MM_DD);
|
|
|
|
+ if(StrUtil.isNotBlank(fundNavDTO.getNav())){
|
|
|
|
+ fundNavDTO.setNav(fundNavDTO.getNav().replace("null", ""));
|
|
|
|
+ }
|
|
BigDecimal nav = StrUtil.isNotBlank(fundNavDTO.getNav()) ? new BigDecimal(fundNavDTO.getNav()) : null;
|
|
BigDecimal nav = StrUtil.isNotBlank(fundNavDTO.getNav()) ? new BigDecimal(fundNavDTO.getNav()) : null;
|
|
|
|
+ if(StrUtil.isNotBlank(fundNavDTO.getCumulativeNavWithdrawal())){
|
|
|
|
+ fundNavDTO.setCumulativeNavWithdrawal(fundNavDTO.getCumulativeNavWithdrawal().replace("null", ""));
|
|
|
|
+ }
|
|
BigDecimal cumulativeNavWithdrawal = StrUtil.isNotBlank(fundNavDTO.getCumulativeNavWithdrawal()) ? new BigDecimal(fundNavDTO.getCumulativeNavWithdrawal()) : null;
|
|
BigDecimal cumulativeNavWithdrawal = StrUtil.isNotBlank(fundNavDTO.getCumulativeNavWithdrawal()) ? new BigDecimal(fundNavDTO.getCumulativeNavWithdrawal()) : null;
|
|
Integer isStored = fundNavDTO.getParseStatus() != null && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NAV_DEFICIENCY)
|
|
Integer isStored = fundNavDTO.getParseStatus() != null && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NAV_DEFICIENCY)
|
|
&& !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NOT_MATCH) && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NAV_NEGATIVE)
|
|
&& !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NOT_MATCH) && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NAV_NEGATIVE)
|
|
@@ -726,11 +733,16 @@ public class EmailParseService {
|
|
}
|
|
}
|
|
|
|
|
|
private void setNavParseStatus(EmailFundNavDTO fundNavDTO, String emailTitle) {
|
|
private void setNavParseStatus(EmailFundNavDTO fundNavDTO, String emailTitle) {
|
|
- // 1.单位净值或累计净值缺失
|
|
|
|
- if(StringUtil.isEmpty(fundNavDTO.getAssetNet())){
|
|
|
|
- if (StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal())) {
|
|
|
|
- fundNavDTO.setParseStatus(NavParseStatusConst.NAV_DEFICIENCY);
|
|
|
|
- return;
|
|
|
|
|
|
+
|
|
|
|
+ //判断是不是估值表,估值表不要求有净值和规模
|
|
|
|
+ if(fundNavDTO.getFundPositionDetailDOList() == null && fundNavDTO.getFundPositionDetailDOList().size() == 0 && fundNavDTO.getValuationTableDO() != null
|
|
|
|
+ && fundNavDTO.getValuationTableAttributeList() == null && fundNavDTO.getValuationTableAttributeList().size() == 0) {
|
|
|
|
+ // 1.单位净值或累计净值缺失
|
|
|
|
+ if(StringUtil.isEmpty(fundNavDTO.getAssetNet())){
|
|
|
|
+ if (StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal())) {
|
|
|
|
+ fundNavDTO.setParseStatus(NavParseStatusConst.NAV_DEFICIENCY);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
try{
|
|
try{
|
|
@@ -770,7 +782,6 @@ public class EmailParseService {
|
|
if (CollUtil.isEmpty(fundIdList)) {
|
|
if (CollUtil.isEmpty(fundIdList)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.SUCCESS);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.SUCCESS);
|
|
}
|
|
}
|
|
|
|
|