调整评分量化表
This commit is contained in:
+9
-6
@@ -509,8 +509,8 @@ public class CreditScoreQuantificationServiceImpl extends BaseServiceImpl<Credit
|
|||||||
if (Func.isEmpty(item.getScore())) {
|
if (Func.isEmpty(item.getScore())) {
|
||||||
throw new ServiceException(item.getItemName() + "分值不能为空");
|
throw new ServiceException(item.getItemName() + "分值不能为空");
|
||||||
}
|
}
|
||||||
if (item.getScore().compareTo(BigDecimal.ZERO) <= 0) {
|
if (item.getScore().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
throw new ServiceException(item.getItemName() + "分值必须大于0");
|
throw new ServiceException(item.getItemName() + "分值不能小于0");
|
||||||
}
|
}
|
||||||
validateScale(item.getScore(), item.getItemName() + "分值最多保留两位小数");
|
validateScale(item.getScore(), item.getItemName() + "分值最多保留两位小数");
|
||||||
if (!itemNames.add(item.getItemName())) {
|
if (!itemNames.add(item.getItemName())) {
|
||||||
@@ -536,8 +536,8 @@ public class CreditScoreQuantificationServiceImpl extends BaseServiceImpl<Credit
|
|||||||
if (Func.isEmpty(option.getScore())) {
|
if (Func.isEmpty(option.getScore())) {
|
||||||
throw new ServiceException(item.getItemName() + "分值不能为空");
|
throw new ServiceException(item.getItemName() + "分值不能为空");
|
||||||
}
|
}
|
||||||
if (option.getScore().compareTo(BigDecimal.ZERO) <= 0) {
|
if (option.getScore().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
throw new ServiceException(item.getItemName() + "选项分值必须大于0");
|
throw new ServiceException(item.getItemName() + "选项分值不能小于0");
|
||||||
}
|
}
|
||||||
validateScale(option.getScore(), item.getItemName() + "选项分值最多保留两位小数");
|
validateScale(option.getScore(), item.getItemName() + "选项分值最多保留两位小数");
|
||||||
}
|
}
|
||||||
@@ -563,8 +563,11 @@ public class CreditScoreQuantificationServiceImpl extends BaseServiceImpl<Credit
|
|||||||
if (!SCORE_TYPE_ADD.equals(option.getScoreType()) && !SCORE_TYPE_SUBTRACT.equals(option.getScoreType())) {
|
if (!SCORE_TYPE_ADD.equals(option.getScoreType()) && !SCORE_TYPE_SUBTRACT.equals(option.getScoreType())) {
|
||||||
throw new ServiceException(item.getItemName() + "加减类型不正确");
|
throw new ServiceException(item.getItemName() + "加减类型不正确");
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(option.getScore()) || option.getScore().compareTo(BigDecimal.ZERO) <= 0) {
|
if (Func.isEmpty(option.getScore())) {
|
||||||
throw new ServiceException(item.getItemName() + "基础分值必须大于0");
|
throw new ServiceException(item.getItemName() + "基础分值不能为空");
|
||||||
|
}
|
||||||
|
if (option.getScore().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
|
throw new ServiceException(item.getItemName() + "基础分值不能小于0");
|
||||||
}
|
}
|
||||||
if (option.getScore().scale() > 2) {
|
if (option.getScore().scale() > 2) {
|
||||||
throw new ServiceException(item.getItemName() + "基础分值最多保留两位小数");
|
throw new ServiceException(item.getItemName() + "基础分值最多保留两位小数");
|
||||||
|
|||||||
Reference in New Issue
Block a user