|
@@ -768,8 +768,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
FsStoreOrderScrm storeOrder = new FsStoreOrderScrm();
|
|
FsStoreOrderScrm storeOrder = new FsStoreOrderScrm();
|
|
|
//扣减金额
|
|
//扣减金额
|
|
|
if (ObjectUtil.isNotNull(param.getReceipt())) {
|
|
if (ObjectUtil.isNotNull(param.getReceipt())) {
|
|
|
- storeOrder.setReceiptId(param.getReceipt().getId());
|
|
|
|
|
- storeOrder.setDeductionPrice(param.getReceipt().getTotalFee());
|
|
|
|
|
|
|
+
|
|
|
//收款记录更新
|
|
//收款记录更新
|
|
|
try {
|
|
try {
|
|
|
FsCompanyExternalPayReceipt receipt = new FsCompanyExternalPayReceipt();
|
|
FsCompanyExternalPayReceipt receipt = new FsCompanyExternalPayReceipt();
|
|
@@ -913,15 +912,17 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
}
|
|
}
|
|
|
storeOrder.setStatus(0);
|
|
storeOrder.setStatus(0);
|
|
|
storeOrder.setPayPrice(param.getPrepaidAmount());
|
|
storeOrder.setPayPrice(param.getPrepaidAmount());
|
|
|
|
|
+ storeOrder.setPayDelivery(storeOrder.getTotalPrice().subtract(storeOrder.getPayPrice()));
|
|
|
storeOrder.setPayType("2");
|
|
storeOrder.setPayType("2");
|
|
|
}
|
|
}
|
|
|
if (receipt != null) {
|
|
if (receipt != null) {
|
|
|
|
|
+ storeOrder.setReceiptId(param.getReceipt().getId());
|
|
|
|
|
+ storeOrder.setDeductionPrice(param.getReceipt().getTotalFee());
|
|
|
int compareTo = receipt.getTotalFee().compareTo(storeOrder.getPayPrice());
|
|
int compareTo = receipt.getTotalFee().compareTo(storeOrder.getPayPrice());
|
|
|
if(param.getPayType().equals("1")) {
|
|
if(param.getPayType().equals("1")) {
|
|
|
//全款
|
|
//全款
|
|
|
if (compareTo < 0) {
|
|
if (compareTo < 0) {
|
|
|
- storeOrder.setTotalPrice(storeOrder.getTotalPrice().subtract(receipt.getTotalFee()));
|
|
|
|
|
- storeOrder.setPayPrice(storeOrder.getPayPrice().subtract(receipt.getTotalFee()));
|
|
|
|
|
|
|
+ storeOrder.setPayPrice(storeOrder.getTotalPrice().subtract(receipt.getTotalFee()));
|
|
|
storeOrder.setDeductionPrice(receipt.getTotalFee());
|
|
storeOrder.setDeductionPrice(receipt.getTotalFee());
|
|
|
storeOrder.setStatus(0);
|
|
storeOrder.setStatus(0);
|
|
|
} else {
|
|
} else {
|
|
@@ -934,11 +935,11 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
} else if (param.getPayType().equals("2")) {
|
|
} else if (param.getPayType().equals("2")) {
|
|
|
//物流代收
|
|
//物流代收
|
|
|
if (compareTo < 0) {
|
|
if (compareTo < 0) {
|
|
|
- storeOrder.setTotalPrice(storeOrder.getTotalPrice().subtract(receipt.getTotalFee()));
|
|
|
|
|
- storeOrder.setPayPrice(storeOrder.getPayPrice().subtract(receipt.getTotalFee()));
|
|
|
|
|
|
|
+ storeOrder.setPayPrice(storeOrder.getTotalPrice().subtract(receipt.getTotalFee()));
|
|
|
storeOrder.setPayMoney(receipt.getTotalFee());
|
|
storeOrder.setPayMoney(receipt.getTotalFee());
|
|
|
storeOrder.setDeductionPrice(receipt.getTotalFee());
|
|
storeOrder.setDeductionPrice(receipt.getTotalFee());
|
|
|
storeOrder.setStatus(1);
|
|
storeOrder.setStatus(1);
|
|
|
|
|
+ storeOrder.setPayDelivery(storeOrder.getTotalPrice().subtract(storeOrder.getPayPrice()));
|
|
|
} else {
|
|
} else {
|
|
|
storeOrder.setPayType("1");
|
|
storeOrder.setPayType("1");
|
|
|
storeOrder.setPayMoney(storeOrder.getTotalPrice());
|
|
storeOrder.setPayMoney(storeOrder.getTotalPrice());
|
|
@@ -949,6 +950,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//物理代收付款
|
|
//物理代收付款
|
|
|
if (param.getPayType().equals("2")) {
|
|
if (param.getPayType().equals("2")) {
|
|
|
storeOrder.setPaid(1);
|
|
storeOrder.setPaid(1);
|
|
|
|
|
+ storeOrder.setPayDelivery(storeOrder.getTotalPrice());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|