From 11244cf89f10ada5781fc7c6dd0a4cca79e8976f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Wed, 29 Apr 2026 13:24:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A1=E8=B4=B9=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= =?UTF-8?q?;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StockInOrderApplicationService.java | 20 ++++++++++--------- .../entity/ReceiptOrderAccount.java | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/mhd_wms/src/main/java/com/mhd/wms/application/service/stockInOrder/StockInOrderApplicationService.java b/mhd_wms/src/main/java/com/mhd/wms/application/service/stockInOrder/StockInOrderApplicationService.java index 9d82a46bc..7af387146 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/application/service/stockInOrder/StockInOrderApplicationService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/application/service/stockInOrder/StockInOrderApplicationService.java @@ -255,9 +255,10 @@ public class StockInOrderApplicationService { if (receiptOrderAccountList != null && !receiptOrderAccountList.isEmpty()) { for (ReceiptOrderAccount receiptOrderAccount : receiptOrderAccountList) { receiptOrderAccount.setOrderId(inOrderId); + receiptOrderAccount.setInOrOut("in"); } r = receiptOrderAccountService.saveBatch(receiptOrderAccountList); - wholeRentSynchronizationZXF(inOrderId); + wholeRentSynchronizationZXF(inOrderId,"in"); } return r; } @@ -276,9 +277,10 @@ public class StockInOrderApplicationService { if (receiptOrderAccountList != null && !receiptOrderAccountList.isEmpty()) { for (ReceiptOrderAccount receiptOrderAccount : receiptOrderAccountList) { receiptOrderAccount.setOrderId(outOrderId); + receiptOrderAccount.setInOrOut("out"); } r = receiptOrderAccountService.saveBatch(receiptOrderAccountList); - wholeRentSynchronizationZXF(outOrderId); + wholeRentSynchronizationZXF(outOrderId,"out"); } return r; } @@ -286,10 +288,10 @@ public class StockInOrderApplicationService { /** * 定时任务整租推送到bms装卸费 */ - public void wholeRentSynchronizationZXF(Long busId) { - StockInOrder stockInOrder = stockInOrderService.getOne(new QueryWrapper().lambda().eq(StockInOrder::getInOrderId, busId),false); - StockOutOrder stockOutOrder = stockOutOrderService.getOne(new QueryWrapper().lambda().eq(StockOutOrder::getOutOrderId, busId),false); - if (stockInOrder != null) { + public void wholeRentSynchronizationZXF(Long busId,String inOrOut) { + StockInOrder stockInOrder = stockInOrderService.getOne(new QueryWrapper().lambda().eq(StockInOrder::getInOrderId, busId).eq(StockInOrder::getDelFlag, 1),false); + StockOutOrder stockOutOrder = stockOutOrderService.getOne(new QueryWrapper().lambda().eq(StockOutOrder::getOutOrderId, busId).eq(StockOutOrder::getDelFlag, 1),false); + if ("in".equals(inOrOut)) { Long shipperId = stockInOrder.getShipperId(); Long organizationId = stockInOrder.getOrganizationId(); String organizationName = stockInOrder.getOrganizationName(); @@ -297,7 +299,7 @@ public class StockInOrderApplicationService { String inOrderNumber = stockInOrder.getInOrderNumber(); String settlementCurrency = stockInOrder.getSettlementCurrency(); String salesmanId = stockInOrder.getSalesmanId(); - List accounts = receiptOrderAccountService.list(new QueryWrapper().lambda().eq(ReceiptOrderAccount::getOrderId, busId)); + List accounts = receiptOrderAccountService.list(new QueryWrapper().lambda().eq(ReceiptOrderAccount::getOrderId, busId).eq(ReceiptOrderAccount::getInOrOut, "in")); for (ReceiptOrderAccount account : accounts) { BigDecimal amount = account.getAmount(); String subjectCode = account.getSubjectCode(); @@ -355,7 +357,7 @@ public class StockInOrderApplicationService { bmsServiceFeign.wholeRentSynchronizationZXF(businessDataPushDTO); } } - } else if (stockOutOrder != null) { + } else if ("out".equals(inOrOut)) { Long shipperId = stockOutOrder.getShipperId(); Long organizationId = stockOutOrder.getOrganizationId(); String organizationName = stockOutOrder.getOrganizationName(); @@ -363,7 +365,7 @@ public class StockInOrderApplicationService { String inOrderNumber = stockOutOrder.getOutOrderNumber(); String settlementCurrency = stockOutOrder.getSettlementCurrency(); String salesmanId = stockOutOrder.getSalesmanId(); - List accounts = receiptOrderAccountService.list(new QueryWrapper().lambda().eq(ReceiptOrderAccount::getOrderId, busId)); + List accounts = receiptOrderAccountService.list(new QueryWrapper().lambda().eq(ReceiptOrderAccount::getOrderId, busId).eq(ReceiptOrderAccount::getInOrOut, "out")); for (ReceiptOrderAccount account : accounts) { String subjectCode = account.getSubjectCode(); String subjectName = account.getSubjectName(); diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/receiptOrderAccount/entity/ReceiptOrderAccount.java b/mhd_wms/src/main/java/com/mhd/wms/domain/receiptOrderAccount/entity/ReceiptOrderAccount.java index 3f7cadb60..04ee86b95 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/receiptOrderAccount/entity/ReceiptOrderAccount.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/receiptOrderAccount/entity/ReceiptOrderAccount.java @@ -115,4 +115,6 @@ public class ReceiptOrderAccount extends BaseVOEntity { @ApiModelProperty(value = "计算价格json") private String amountJson; + @ApiModelProperty(value = "出入库区别标识") + private String inOrOut; } \ No newline at end of file