Commit 5e39085b authored by fangxinjiang's avatar fangxinjiang

社保自动化配置-fxj

parent b81311e1
......@@ -1371,9 +1371,26 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
try {
// 添加了异常处理,避免 recordBase 不是合法数字格式时程序崩溃
if (CommonConstants.ZERO_STRING.equals(rel.getPaymentType())){
if (BigDecimal.valueOf(Double.valueOf(rel.getRecordBase())).compareTo(setInfo.getLowerLimit()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerLimit());
BigDecimal recordBaseDecimal = new BigDecimal(rel.getRecordBase());
if (CommonConstants.ZERO_STRING.equals(setInfo.getIsSameBase())){
if (recordBaseDecimal.compareTo(setInfo.getLowerLimit()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerLimit());
}
}else {
if (recordBaseDecimal.compareTo(setInfo.getLowerPersion()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerPersion());
}else if (recordBaseDecimal.compareTo(setInfo.getLowerMedical()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerMedical());
}else if (recordBaseDecimal.compareTo(setInfo.getLowerBirth()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerBirth());
}else if (recordBaseDecimal.compareTo(setInfo.getLowerInjury()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerInjury());
}else if (recordBaseDecimal.compareTo(setInfo.getLowerUnemployment()) > 0) {
return R.failed("备案基数不大于配置名称("+rel.getConfigName()+")最低基数:"+setInfo.getLowerUnemployment());
}
}
}
} catch (NumberFormatException e) {
return R.failed("备案基数格式不正确");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment