From a578777e1191abb5507848047f0ee03a67790ecc Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 05 Feb 2021 14:09:44 +0800
Subject: [PATCH] 取消订单,删除交易流水
---
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index e64412a..75b3de3 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -220,7 +220,7 @@
sysOrder.setStaffId(source != null ? source.getStaffId() : user.getSuId());
sysOrder.setCompanyId(source != null ? source.getCompanyId() : user.getCompanyId());
- sysOrder.setPayTime(new Date());
+
if (sysOrder.getId() == null) {
//新增订单
sysOrder.setOrderNo(codeService.getOrderCode());
@@ -365,6 +365,10 @@
AchieveNew achieveNew = new AchieveNew();
achieveNew.setOrderId(id);
achieveNewService.removeByModel(achieveNew);
+
+ // 删除收款记录
+ sysOrderFlowDao.deleteByOrderId(id);
+
// 取消订单
order.setStatu(Dictionary.ORDER_STATU_YQX);
@@ -582,6 +586,7 @@
orderStatus = Dictionary.ORDER_STATU_TK;
}
// 更新收款状态
+ sourceOrder.setPayTime(new Date());
sourceOrder.setStatu(orderStatus);
sourceOrder.setCardPay(cardPayTotal);
sourceOrder.setCashPay(cashPayTotal);
--
Gitblit v1.9.1