|
@@ -45,19 +45,19 @@ public class NavDataUtil {
|
|
// 净值日期格式校验
|
|
// 净值日期格式校验
|
|
if (StrUtil.isBlank(fundNavDTO.getPriceDate())) {
|
|
if (StrUtil.isBlank(fundNavDTO.getPriceDate())) {
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.PRICE_DATE_IS_NULL);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.PRICE_DATE_IS_NULL);
|
|
- return "缺少净值日期";
|
|
|
|
|
|
+ return NavParseStatusConst.PRICE_DATE_IS_NULL_TEXT;
|
|
}
|
|
}
|
|
if (StrUtil.isBlank(DateUtils.stringToDate(fundNavDTO.getPriceDate()))) {
|
|
if (StrUtil.isBlank(DateUtils.stringToDate(fundNavDTO.getPriceDate()))) {
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.PRICE_DATE_IS_ERROR);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.PRICE_DATE_IS_ERROR);
|
|
- return "净值日期格式有误";
|
|
|
|
|
|
+ return NavParseStatusConst.PRICE_DATE_IS_ERROR_TEXT;
|
|
}
|
|
}
|
|
if (StrUtil.isBlank(fundNavDTO.getFundName()) && StrUtil.isBlank(fundNavDTO.getRegisterNumber())) {
|
|
if (StrUtil.isBlank(fundNavDTO.getFundName()) && StrUtil.isBlank(fundNavDTO.getRegisterNumber())) {
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.FUND_NAME_REGISTER_IS_NULL);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.FUND_NAME_REGISTER_IS_NULL);
|
|
- return "基金名称和备案编码均缺失";
|
|
|
|
|
|
+ return NavParseStatusConst.FUND_NAME_REGISTER_IS_NULL_TEXT;
|
|
}
|
|
}
|
|
if(StrUtil.isBlank(fundNavDTO.getNav()) && StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal()) && StrUtil.isBlank(fundNavDTO.getAssetNet())){
|
|
if(StrUtil.isBlank(fundNavDTO.getNav()) && StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal()) && StrUtil.isBlank(fundNavDTO.getAssetNet())){
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.NAV_ASSET_IS_NULL);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.NAV_ASSET_IS_NULL);
|
|
- return "单位净值和累计净值和资产净值均缺失";
|
|
|
|
|
|
+ return NavParseStatusConst.NAV_ASSET_IS_NULL_TEXT;
|
|
}
|
|
}
|
|
// 单位净值,累计单位净值,资产净值,资产份额数字格式校验
|
|
// 单位净值,累计单位净值,资产净值,资产份额数字格式校验
|
|
boolean isvalidNumericFormat = (StrUtil.isBlank(fundNavDTO.getNav()) || StringUtil.isNumeric(fundNavDTO.getNav()))
|
|
boolean isvalidNumericFormat = (StrUtil.isBlank(fundNavDTO.getNav()) || StringUtil.isNumeric(fundNavDTO.getNav()))
|
|
@@ -66,7 +66,7 @@ public class NavDataUtil {
|
|
&& (StrUtil.isBlank(fundNavDTO.getAssetShare()) || StringUtil.isNumeric(fundNavDTO.getAssetShare()));
|
|
&& (StrUtil.isBlank(fundNavDTO.getAssetShare()) || StringUtil.isNumeric(fundNavDTO.getAssetShare()));
|
|
if (!isvalidNumericFormat) {
|
|
if (!isvalidNumericFormat) {
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.NAV_ASSET_IS_ERROR);
|
|
fundNavDTO.setParseStatus(NavParseStatusConst.NAV_ASSET_IS_ERROR);
|
|
- return "单位净值或累计净值或资产净值或资产份额格式不正确";
|
|
|
|
|
|
+ return NavParseStatusConst.NAV_ASSET_IS_ERROR_TEXT;
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|