From 62a2e5583931e439b5914e39801173074e83e9ac Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 31 十二月 2025 13:57:39 +0800
Subject: [PATCH] 提交 订单其他金额列和金额重置方法业务调整
---
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
index 40bd59d..c27975a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -83,9 +83,8 @@
List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class);
List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("otherMoney")), OrderOtherMoney.class);
if(orderOtherMoneyList != null ){
- orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn().indexOf("M")==0).collect(Collectors.toList());
+ orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn()==null || o.getColumn().indexOf("M")==0).collect(Collectors.toList());
}
-
boolean saveState = true;
//璁剧疆鍥炴粴鐐�
Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
@@ -265,7 +264,11 @@
//鍏堟妸鍏朵粬閲戦鍓〃鐨勯噾棰濅笌鏁伴噺缃�0
if(orderOtherMoneyList!=null){
orderOtherMoneyList.forEach(orderOtherMoney -> {
- orderOtherMoney.setQuantity(0.0);
+ if(orderOtherMoney.getColumn()!=null){
+ orderOtherMoney.setQuantity(0.0);
+ }else{
+ orderOtherMoney.setMoney(orderOtherMoney.getPrice()*orderOtherMoney.getQuantity());
+ }
});
}
@@ -519,11 +522,15 @@
List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(jsonObject.get("otherMoney")), OrderOtherMoney.class);
if(orderOtherMoneyList != null ){
- orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn().indexOf("M")==0).collect(Collectors.toList());
+ orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn()==null || o.getColumn().indexOf("M")==0).collect(Collectors.toList());
}
if(orderOtherMoneyList!=null){
orderOtherMoneyList.forEach(orderOtherMoney -> {
- orderOtherMoney.setQuantity(0.0);
+ if(orderOtherMoney.getColumn()!=null){
+ orderOtherMoney.setQuantity(0.0);
+ }else{
+ orderOtherMoney.setMoney(orderOtherMoney.getPrice()*orderOtherMoney.getQuantity());
+ }
});
}
--
Gitblit v1.8.0