From 7172f29c54a04164674212f4ead303603dff0548 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 01 七月 2025 16:16:34 +0800
Subject: [PATCH] 波次终止前端修改
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
index d8f9ad0..ee4cf92 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
@@ -74,6 +74,8 @@
private DeviceSiteService deviceSiteService;
@Autowired
private LocService locService;
+ @Autowired
+ private WaveOrderRelaServiceImpl waveOrderRelaService;
/**
@@ -308,8 +310,10 @@
if (orderItems.isEmpty()) {
throw new CoolException("鍗曟嵁涓嶅瓨鍦紒锛�");
}
+
//鍚堝苟鐗╂枡锛岀敓鎴愭尝娆℃槑缁�
List<WaveItem> waveItems = mergeWave(orderItems, wave);
+
if (!waveItemService.saveBatch(waveItems)) {
throw new CoolException("娉㈡鏄庣粏淇濆瓨澶辫触锛侊紒");
}
@@ -321,6 +325,30 @@
for (int i = 0; i < orderItems.size(); i++) {
orderItems.get(i).setWorkQty(orderItems.get(i).getAnfme());
}
+
+ /**
+ *璁㈠崟淇℃伅瀛樺偍鑷抽�昏緫鍏宠仈琛�
+ */
+ for (WaveItem item : waveItems) {
+ List<AsnOrderItem> items = orderItems.stream()
+ .filter(orderItem -> item.getMatnrId()
+ .equals(orderItem.getMatnrId()))
+ .collect(Collectors.toList());
+
+ items.forEach(orderItem -> {
+ WaveOrderRela orderRela = new WaveOrderRela();
+ orderRela.setId(null)
+ .setOrderId(orderItem.getAsnId())
+ .setOrderItemId(orderItem.getId())
+ .setWaveId(wave.getId())
+ .setWaveItemId(item.getId());
+ if (!waveOrderRelaService.saveOrUpdate(orderRela)) {
+ throw new CoolException("<UNK>");
+ }
+ });
+ }
+
+
if (!asnOrderItemService.saveOrUpdateBatch(orderItems)) {
throw new CoolException("鍑哄簱鍗曟墽琛屾暟閲忎慨鏀瑰け璐ワ紒锛�");
}
--
Gitblit v1.9.1