|
|
@ -3464,15 +3464,24 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
return rb.setMsg("金融方案中实收金额小于单台订金"); |
|
|
|
} |
|
|
|
BigDecimal AmountAll = BigDecimal.ZERO; |
|
|
|
BigDecimal AllAmount = BigDecimal.ZERO; |
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getMainVehicleAmount())) { |
|
|
|
//主车发票价
|
|
|
|
AmountAll = AmountAll.add(new BigDecimal(solutionsDetailsVo.getMainVehicleAmount())); |
|
|
|
AllAmount = AllAmount.add(new BigDecimal(solutionsDetailsVo.getMainVehicleAmount())); |
|
|
|
} |
|
|
|
if (solutionsDetailsVo.isAccessoriesAmountCb()) {//包含配件
|
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getAccessoriesAmount())) { |
|
|
|
AmountAll = AmountAll.add(new BigDecimal(solutionsDetailsVo.getAccessoriesAmount())); |
|
|
|
AllAmount = AllAmount.add(new BigDecimal(solutionsDetailsVo.getAccessoriesAmount())); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getOffsetAccessories())) {//抵顶配件
|
|
|
|
AllAmount = AllAmount.subtract(new BigDecimal(solutionsDetailsVo.getOffsetAccessories())); |
|
|
|
} |
|
|
|
if(AllAmount.compareTo(new BigDecimal(busSalesOrderPriceDetailsVo.getSingleFinalPrice())) != 0){ |
|
|
|
return rb.setMsg("需要先完善金融方案信息,再提交订单"); |
|
|
|
} |
|
|
|
//判断成交价与主车发票价和配件之和
|
|
|
|
if (AmountAll.compareTo(new BigDecimal(busSalesOrderPriceDetailsVo.getSingleFinalPrice())) < 0) { |
|
|
|
return rb.setMsg("主车发票价与配件之和不能小于订单成交价"); |
|
|
@ -8563,7 +8572,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
String customerSid = busSalesOrder.getCustomerSid(); |
|
|
|
LoanPreloanCreditApply loanPreloanCreditApply = busSalesOrderBorrowerService.selectLoanApply(customerSid); |
|
|
|
if (loanPreloanCreditApply != null) { |
|
|
|
if ((!"001".equals(loanPreloanCreditApply.getZffkjgKey()) && !"003".equals(loanPreloanCreditApply.getZffkjgKey()))|| !"通过".equals(loanPreloanCreditApply.getSsjg())) { |
|
|
|
if ((!"001".equals(loanPreloanCreditApply.getZffkjgKey()) && !"003".equals(loanPreloanCreditApply.getZffkjgKey())) || !"通过".equals(loanPreloanCreditApply.getSsjg())) { |
|
|
|
return rb.setMsg("该客户资方审核未通过或未审核,请处理后再操作"); |
|
|
|
} |
|
|
|
} |
|
|
|