|
@@ -1618,13 +1618,13 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
return stringStringMap;
|
|
|
}
|
|
|
SeparateAccounts separateAccounts = separateAccountsMapper.findByDeptIdAndStatus(sysDepart.getId());
|
|
|
- ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoMd = new ReceiptPaymentDetailsInfoVo();
|
|
|
- receiptPaymentDetailsInfoVoMd.setMoney(priceSum);
|
|
|
- receiptPaymentDetailsInfoVoMd.setPayType(0);
|
|
|
- receiptPaymentDetailsInfoVoMd.setPurseChangeReason(0);
|
|
|
- receiptPaymentDetailsInfoVoMd.setCreateTime(new Date());
|
|
|
- receiptPaymentDetailsInfoVoMd.setUpdateTime(new Date());
|
|
|
- receiptPaymentDetailsInfoVoMd.setOrderId(appOrder.getId());
|
|
|
+ ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo = new ReceiptPaymentDetailsInfoVo();
|
|
|
+ receiptPaymentDetailsInfoVo.setMoney(priceSum);
|
|
|
+ receiptPaymentDetailsInfoVo.setPayType(0);
|
|
|
+ receiptPaymentDetailsInfoVo.setPurseChangeReason(0);
|
|
|
+ receiptPaymentDetailsInfoVo.setCreateTime(new Date());
|
|
|
+ receiptPaymentDetailsInfoVo.setUpdateTime(new Date());
|
|
|
+ receiptPaymentDetailsInfoVo.setOrderId(appOrder.getId());
|
|
|
if (separateAccounts==null){
|
|
|
//需要按照默认比例分账 -暂时未处理。
|
|
|
log.error("微信支付成功通知成功,未查询到分账信息,不进行分账");
|
|
@@ -1643,9 +1643,12 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
log.error("百分比计算错误", e);
|
|
|
}
|
|
|
BigDecimal mdBigDecimal = priceSum.subtract(shBigDecimal).subtract(ptBigDecimal).setScale(2, RoundingMode.HALF_UP);
|
|
|
+ ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoMd = getChangeMoney(receiptPaymentDetailsInfoVo, appOrder.getOrgCode(), appOrder.getTenantId(), 2, mdBigDecimal);
|
|
|
+ ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoSh = getChangeMoney(receiptPaymentDetailsInfoVo, sysDepart.getOrgCode(), sysDepart.getId(), 1, shBigDecimal);
|
|
|
+ ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoPt = getChangeMoney(receiptPaymentDetailsInfoVo, sysDepart.getOrgCode(), sysDepart.getId(), 1, shBigDecimal);
|
|
|
|
|
|
- log.info("支付成功消息通知,门店添加明细:"+JSONObject.toJSONString(receiptPaymentDetailsInfoVoMd));
|
|
|
- iReceiptPaymentDetailsInfoService.add(receiptPaymentDetailsInfoVoMd);
|
|
|
+ log.info("支付成功消息通知,门店添加明细:"+JSONObject.toJSONString(receiptPaymentDetailsInfoVo));
|
|
|
+ iReceiptPaymentDetailsInfoService.add(receiptPaymentDetailsInfoVo);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1654,11 +1657,12 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
|
|
|
|
|
|
|
|
|
- private void getChangeMoney(ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo,String orgCode,String deptId,Integer deptType,BigDecimal changeMoney){
|
|
|
+ private ReceiptPaymentDetailsInfoVo getChangeMoney(ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo,String orgCode,String deptId,Integer deptType,BigDecimal changeMoney){
|
|
|
receiptPaymentDetailsInfoVo.setDeptId(deptId);
|
|
|
receiptPaymentDetailsInfoVo.setDeptType(deptType);
|
|
|
receiptPaymentDetailsInfoVo.setOrgCode(orgCode);
|
|
|
receiptPaymentDetailsInfoVo.setChangeMoney(changeMoney);
|
|
|
+ return receiptPaymentDetailsInfoVo;
|
|
|
}
|
|
|
private BigDecimal getBigDecimal(BigDecimal priceSum,BigDecimal proportion){
|
|
|
if (proportion==null){
|