Browse Source

修改移动端销售订单的使用简易订金剩余情况

master
dimengzhe 3 years ago
parent
commit
5e879ae825
  1. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdeposit/app/AppBusSalesOrderDepositListVo.java
  2. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdepositfictitious/BusDepositFictitiousMapper.xml
  3. 11
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java

5
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdeposit/app/AppBusSalesOrderDepositListVo.java

@ -32,4 +32,9 @@ public class AppBusSalesOrderDepositListVo implements Vo {
private String name;
private Boolean showImage;
@ApiModelProperty("订金总数")
private String deposit;
@ApiModelProperty("已使用订金")
private String usedDeposit;
}

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdepositfictitious/BusDepositFictitiousMapper.xml

@ -40,9 +40,10 @@
select bf.depositBillNo as virtualOrderId,
bd.sid as virtualOrderSid,
bd2.draweeName as name,
bf.depositPrice as remainderMoney,
bf.price as payMoney,
bf.payPath
bf.payPath,
bd2.usedDeposit,
bd2.deposit
from bus_deposit_fictitious bf
left join bus_main_deposit bd on bd.sid = bf.depositBillSid
left join bus_deposit bd2 on bf.depositBillSid = bd2.billSid

11
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java

@ -166,6 +166,15 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde
} else {
listVo.setShowImage(false);
}
//简易订金所有的订金
if (StringUtils.isNotBlank(listVo.getDeposit())) {
if (StringUtils.isNotBlank(listVo.getUsedDeposit())) {
listVo.setRemainderMoney(new BigDecimal(listVo.getDeposit()).subtract(new BigDecimal(listVo.getUsedDeposit())).add(new BigDecimal(listVo.getPayMoney())).toString());
} else {
listVo.setRemainderMoney(listVo.getDeposit());
}
}
}
}
vo.setVirtualOrderList(listVos);
@ -269,7 +278,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde
busDepositService.updateDeposit(depositAll, listDto.getDepositBillNo());
bigDecimalAll = bigDecimalAll.add(new BigDecimal(listDto.getPrice()));
}
if(bigDecimalAll.compareTo(new BigDecimal(dto.getDepositAll()))>0){
if (bigDecimalAll.compareTo(new BigDecimal(dto.getDepositAll())) > 0) {
return rb.setMsg("结转金额大于订金合计,请重新选择");
}
}

Loading…
Cancel
Save