|
|
@ -214,6 +214,20 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde |
|
|
|
if (busSalesOrder == null) { |
|
|
|
return rb.setMsg("该销售订单单据不存在"); |
|
|
|
} |
|
|
|
if("1".equals(busSalesOrder.getPayTypeKey())){//全款
|
|
|
|
BusSalesOrderPrice busSalesOrderPrice = busSalesOrderPriceService.selectBySalesOrderSid(salesOrderSid); |
|
|
|
if(busSalesOrderPrice == null){ |
|
|
|
return rb.setMsg("请先录入价格信息"); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(dto.getDeposit())){ |
|
|
|
return rb.setMsg("订金不允许为空"); |
|
|
|
}else{ |
|
|
|
if(new BigDecimal(dto.getDeposit()).compareTo(busSalesOrderPrice.getSingleGuildPrice())>=0){ |
|
|
|
return rb.setMsg("单台订金不允许大于单台整体成交价"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//先计算需补交订金是多少
|
|
|
|
//总的结转金额
|
|
|
|
BigDecimal makeUpDecimal = new BigDecimal("0"); |
|
|
|