| | |
| | | |
| | | BigDecimal surplusMonthPrice; |
| | | if (quotaConfig.getQuatoPrice() != null) { |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaTotal.getUseAmount()); |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaMonth.getUseAmount()); |
| | | if (applyAmount.compareTo(surplusMonthPrice) == 1) { |
| | | throw new TipsException(asDeptName + "月额度已超出,无法申请"); |
| | | } |
| | |
| | | |
| | | Integer surplusTotalNum; |
| | | if (quotaConfig.getQuatoTotalNum() != null) { |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaMonth.getUseNum(); |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaTotal.getUseNum(); |
| | | if (applyNum > surplusTotalNum) { |
| | | throw new TipsException(asDeptName + "总数量额度已超出,无法申请"); |
| | | } |