|
@@ -600,7 +600,7 @@ public class EmailParseService {
|
|
return fundAssetDOList;
|
|
return fundAssetDOList;
|
|
}
|
|
}
|
|
Integer isStored = fundNavDTO.getParseStatus() != null && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.ASSET_NET_NEGATIVE)
|
|
Integer isStored = fundNavDTO.getParseStatus() != null && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.ASSET_NET_NEGATIVE)
|
|
- && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NOT_MATCH)? 1 : 0;
|
|
|
|
|
|
+ && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NOT_MATCH) && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.PRICE_DATE_ERROR)? 1 : 0;
|
|
Date priceDate = DateUtil.parse(fundNavDTO.getPriceDate(), DateConst.YYYY_MM_DD);
|
|
Date priceDate = DateUtil.parse(fundNavDTO.getPriceDate(), DateConst.YYYY_MM_DD);
|
|
if (CollUtil.isNotEmpty(fundNavDTO.getFundIdList())) {
|
|
if (CollUtil.isNotEmpty(fundNavDTO.getFundIdList())) {
|
|
for (String fundId : fundNavDTO.getFundIdList()) {
|
|
for (String fundId : fundNavDTO.getFundIdList()) {
|
|
@@ -647,7 +647,8 @@ public class EmailParseService {
|
|
BigDecimal nav = StrUtil.isNotBlank(fundNavDTO.getNav()) ? new BigDecimal(fundNavDTO.getNav()) : null;
|
|
BigDecimal nav = StrUtil.isNotBlank(fundNavDTO.getNav()) ? new BigDecimal(fundNavDTO.getNav()) : 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) ? 1 : 0;
|
|
|
|
|
|
+ && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NOT_MATCH) && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.NAV_NEGATIVE)
|
|
|
|
+ && !fundNavDTO.getParseStatus().equals(NavParseStatusConst.PRICE_DATE_ERROR)? 1 : 0;
|
|
if (CollUtil.isNotEmpty(fundNavDTO.getFundIdList())) {
|
|
if (CollUtil.isNotEmpty(fundNavDTO.getFundIdList())) {
|
|
for (String fundId : fundNavDTO.getFundIdList()) {
|
|
for (String fundId : fundNavDTO.getFundIdList()) {
|
|
if(nav == null && cumulativeNavWithdrawal == null){
|
|
if(nav == null && cumulativeNavWithdrawal == null){
|
|
@@ -721,9 +722,20 @@ public class EmailParseService {
|
|
|
|
|
|
private void setNavParseStatus(EmailFundNavDTO fundNavDTO, String emailTitle) {
|
|
private void setNavParseStatus(EmailFundNavDTO fundNavDTO, String emailTitle) {
|
|
// 1.单位净值或累计净值缺失
|
|
// 1.单位净值或累计净值缺失
|
|
- if ((StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal()) ) && StrUtil.isBlank(fundNavDTO.getAssetNet())) {
|
|
|
|
- fundNavDTO.setParseStatus(NavParseStatusConst.NAV_DEFICIENCY);
|
|
|
|
- return;
|
|
|
|
|
|
+ if(StringUtil.isEmpty(fundNavDTO.getAssetNet())){
|
|
|
|
+ if (StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal())) {
|
|
|
|
+ fundNavDTO.setParseStatus(NavParseStatusConst.NAV_DEFICIENCY);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ try{
|
|
|
|
+ Date priceDate = DateUtils.parse(fundNavDTO.getPriceDate(),DateUtils.YYYY_MM_DD);
|
|
|
|
+ if(priceDate != null && priceDate.after(new Date())){
|
|
|
|
+ fundNavDTO.setParseStatus(NavParseStatusConst.PRICE_DATE_ERROR);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.error(e.getMessage(),e);
|
|
}
|
|
}
|
|
// 考虑单独规模文件时 -> 无单位净值和累计净值
|
|
// 考虑单独规模文件时 -> 无单位净值和累计净值
|
|
// 2.单位净值或累计净值不大于0
|
|
// 2.单位净值或累计净值不大于0
|