|
|
@ -110,6 +110,58 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//自营非担保和贷款的需要填写金融方案
|
|
|
|
if ("01".equals(dto.getTypeKey()) || StringUtils.isBlank(dto.getTypeKey())) { |
|
|
|
String mainVehicleAmount = dto.getMainVehicleAmount(); |
|
|
|
if (StringUtils.isBlank(mainVehicleAmount)) { |
|
|
|
return rb.setMsg("主车发票价不能为空"); |
|
|
|
} |
|
|
|
//是否勾选融资票据
|
|
|
|
if (dto.isAccessoriesAmountCb()) { |
|
|
|
//融资票据
|
|
|
|
String accessoriesAmount = dto.getAccessoriesAmount(); |
|
|
|
if (StringUtils.isBlank(accessoriesAmount)) { |
|
|
|
return rb.setMsg("请输入融资票据"); |
|
|
|
} |
|
|
|
} |
|
|
|
//是否勾选挂车
|
|
|
|
if (dto.isTrailerAmountCb()) { |
|
|
|
//挂车
|
|
|
|
String trailerAmount = dto.getTrailerAmount(); |
|
|
|
if (StringUtils.isBlank(trailerAmount)) { |
|
|
|
return rb.setMsg("请输入挂车金额"); |
|
|
|
} |
|
|
|
} |
|
|
|
//是否勾选保险
|
|
|
|
if (dto.isPremiumCb()) { |
|
|
|
//保险
|
|
|
|
String premium = dto.getPremium(); |
|
|
|
if (StringUtils.isBlank(premium)) { |
|
|
|
return rb.setMsg("请输入保险金额"); |
|
|
|
} else { |
|
|
|
if (StringUtils.isNotBlank(dto.getOffsetPremium())) { |
|
|
|
if(new BigDecimal(dto.getOffsetPremium()).compareTo(new BigDecimal(premium))>0){ |
|
|
|
return rb.setMsg("抵顶首年保险费不能超过保险费用"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//是否勾选购置税
|
|
|
|
if (dto.isPurchaseTaxCb()) { |
|
|
|
//购置税
|
|
|
|
String purchaseTax = dto.getPurchaseTax(); |
|
|
|
if (StringUtils.isBlank(purchaseTax)) { |
|
|
|
return rb.setMsg("请输入购置税"); |
|
|
|
} else{ |
|
|
|
if (StringUtils.isNotBlank(dto.getOffsetPurchasetax())) { |
|
|
|
if(new BigDecimal(dto.getOffsetPurchasetax()).compareTo(new BigDecimal(purchaseTax))>0){ |
|
|
|
return rb.setMsg("抵顶购置税不能超过购置税"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//查询金融方案
|
|
|
|
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(dto.getSaleOrderSid()); |
|
|
|