From 1c7184503554a6728895489b084cc4b523f261f2 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 23 五月 2025 09:39:48 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index 1d188d1..ac780a4 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -454,7 +454,10 @@
for (TaskItem taskItem : taskItems) {
LocItem locItem = new LocItem();
LocItemWorking locWorking = locItemWorkingService.getOne(new LambdaQueryWrapper<LocItemWorking>()
- .eq(LocItemWorking::getTaskId, taskItem.getTaskId()));
+ .eq(LocItemWorking::getTaskId, taskItem.getTaskId())
+ .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItemWorking::getBatch, taskItem.getBatch())
+ .eq(StringUtils.isNotBlank(taskItem.getFieldsIndex()), LocItemWorking::getFieldsIndex, taskItem.getFieldsIndex())
+ .eq(LocItemWorking::getMatnrId, taskItem.getMatnrId()));
if (Objects.isNull(locWorking)) {
throw new CoolException("鏁版嵁閿欒锛屼綔涓氫腑搴撳瓨鏁版嵁涓㈠け锛侊紒");
}
@@ -469,13 +472,14 @@
items.add(locItem);
}
- TaskItem taskItem = taskItems.stream().findFirst().get();
-
- saveStockItems(taskItems, null, null, taskItem.getWkType(), taskItem.getOrderType());
-
if (!locItemService.saveBatch(items)) {
throw new CoolException("浣滀笟搴撳瓨鍥炲啓澶辫触锛侊紒");
}
+
+ TaskItem taskItem = taskItems.stream().findFirst().get();
+ //淇濆瓨鍏ュ嚭搴撴祦姘�
+ saveStockItems(taskItems, null, null, taskItem.getWkType(), taskItem.getOrderType());
+
if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
throw new CoolException("浣滀笟涓簱瀛樺垹闄ゅけ璐ワ紒锛�");
@@ -648,7 +652,7 @@
for (LocItem item : locItems) {
LocItemWorking working = new LocItemWorking();
BeanUtils.copyProperties(item, working);
- working.setId(null).setTaskId(task.getId());
+ working.setId(null).setTaskId(task.getId()).setLocItemId(item.getId());
workings.add(working);
}
--
Gitblit v1.9.1