From e13518129e509aa19d76a029354535acd7570e1d Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期四, 20 十一月 2025 15:33:53 +0800
Subject: [PATCH] 1
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java | 89 ++++++++++++++++++++++++--------------------
1 files changed, 49 insertions(+), 40 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 36f6740..2ea7580 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
@@ -683,10 +683,9 @@
if (Objects.isNull(loc)) {
throw new CoolException("搴撳瓨涓嶅瓨鍦紒锛�");
}
- if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
- throw new CoolException("褰撳墠搴撲綅鐘舵�佷笉澶勪簬S.鍏ュ簱棰勭害锛屼笉鍙墽琛屽叆搴撴搷浣滐紒");
- }
-
+// if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
+// throw new CoolException("褰撳墠搴撲綅鐘舵�佷笉澶勪簬S.鍏ュ簱棰勭害锛屼笉鍙墽琛屽叆搴撴搷浣滐紒");
+// }
loc.setUseStatus(LocStsType.LOC_STS_TYPE_F.type)
.setBarcode(task.getBarcode())
.setUpdateBy(loginUserId).setUpdateTime(new Date());
@@ -705,6 +704,7 @@
LocItem locItem = new LocItem();
LocItemWorking locWorking = locItemWorkingService.getOne(new LambdaQueryWrapper<LocItemWorking>()
.eq(LocItemWorking::getTaskId, taskItem.getTaskId())
+ .eq(LocItemWorking::getFieldsIndex, taskItem.getFieldsIndex())
.eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItemWorking::getBatch, taskItem.getBatch())
.eq(LocItemWorking::getMatnrId, taskItem.getMatnrId()));
if (Objects.isNull(locWorking)) {
@@ -1064,22 +1064,22 @@
throw new CoolException("鐩爣搴撲綅涓嶅瓨鍦紒锛�");
}
- List<LocItemWorking> workings = new ArrayList<>();
- List<TaskItem> items = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()));
- items.forEach(taskItem -> {
- if (taskItem.getAnfme() > 0) {
- LocItemWorking itemWorking = new LocItemWorking();
- BeanUtils.copyProperties(taskItem, itemWorking);
- itemWorking.setTaskId(task.getId())
- .setLocId(loc1.getId())
- .setLocCode(loc1.getCode());
- workings.add(itemWorking);
- }
- });
-
- if (!locItemWorkingService.saveBatch(workings)) {
- throw new CoolException("涓存椂搴撳瓨鏇存柊澶辫触锛侊紒");
- }
+// List<LocItemWorking> workings = new ArrayList<>();
+// List<TaskItem> items = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()));
+// items.forEach(taskItem -> {
+// if (taskItem.getAnfme() > 0) {
+// LocItemWorking itemWorking = new LocItemWorking();
+// BeanUtils.copyProperties(taskItem, itemWorking);
+// itemWorking.setTaskId(task.getId())
+// .setLocId(loc1.getId())
+// .setLocCode(loc1.getCode());
+// workings.add(itemWorking);
+// }
+// });
+//
+// if (!locItemWorkingService.saveBatch(workings)) {
+// throw new CoolException("涓存椂搴撳瓨鏇存柊澶辫触锛侊紒");
+// }
loc1.setUseStatus(LocStsType.LOC_STS_TYPE_S.type);
@@ -1205,28 +1205,37 @@
throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
}
- if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
- if (!this.update(new LambdaUpdateWrapper<Task>()
- .eq(Task::getId, task.getId())
- .set(Task::getUpdateBy, loginUserId)
- .set(Task::getUpdateTime, new Date())
- .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
- throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
- }
- } else {
- if (!this.update(new LambdaUpdateWrapper<Task>()
- .eq(Task::getId, task.getId())
- .set(Task::getUpdateBy, loginUserId)
- .set(Task::getUpdateTime, new Date())
- .set(Task::getTaskStatus, TaskStsType.UPDATED_OUT.id))) {
- throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
- }
- //鍏ㄦ澘鍑哄簱锛屽垹闄や复鏃跺簱瀛�
- if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
- throw new CoolException("涓存椂搴撳瓨娓呴櫎澶辫触锛侊紒");
- }
+ if (!this.update(new LambdaUpdateWrapper<Task>()
+ .eq(Task::getId, task.getId())
+ .set(Task::getUpdateBy, loginUserId)
+ .set(Task::getUpdateTime, new Date())
+ .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+ throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
}
+
+// if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
+// if (!this.update(new LambdaUpdateWrapper<Task>()
+// .eq(Task::getId, task.getId())
+// .set(Task::getUpdateBy, loginUserId)
+// .set(Task::getUpdateTime, new Date())
+// .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+// throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
+// }
+// } else {
+// if (!this.update(new LambdaUpdateWrapper<Task>()
+// .eq(Task::getId, task.getId())
+// .set(Task::getUpdateBy, loginUserId)
+// .set(Task::getUpdateTime, new Date())
+// .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+// throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
+// }
+//// //鍏ㄦ澘鍑哄簱锛屽垹闄や复鏃跺簱瀛�
+//// if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
+//// throw new CoolException("涓存椂搴撳瓨娓呴櫎澶辫触锛侊紒");
+//// }
+// }
+
}
/**
--
Gitblit v1.9.1