From c2478aba3b4db1f7c97ddd40eb636eed42368f28 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 25 八月 2025 16:39:50 +0800
Subject: [PATCH] 库存调整单功能优化修改
---
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java | 65 ++++++++++++++++----------------
1 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
index 1789ec9..e6a36bf 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -6,7 +6,7 @@
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto;
import com.vincent.rsf.server.api.entity.dto.LocTypeDto;
-import com.vincent.rsf.server.api.controller.params.TaskInParam;
+import com.vincent.rsf.server.api.controller.erp.params.TaskInParam;
import com.vincent.rsf.server.manager.enums.*;
import com.vincent.rsf.server.api.service.WcsService;
import com.vincent.rsf.server.api.utils.LocUtils;
@@ -388,23 +388,20 @@
InTaskMsgDto inTaskMsgDto = new InTaskMsgDto();
- int sRow = deviceBind.getStartRow();
- int eRow = deviceBind.getEndRow();
int deviceQty = deviceBind.getDeviceQty();
// ===============>>>> 寮�濮嬫墽琛�
curRow = deviceBind.getCurrentRow();
- //姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿
- for (int i = times; i <= deviceQty * 2; i++) {
- int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty);
- curRow = locNecessaryParameters[1];
- channel = locNecessaryParameters[2];
- rowCount = locNecessaryParameters[0];
- nearRow = locNecessaryParameters[3];
- break;
- }
+ //鑾峰彇鎺�
+ int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty);
+ curRow = locNecessaryParameters[1];
+ channel = locNecessaryParameters[2];
+ rowCount = locNecessaryParameters[0];
+ nearRow = locNecessaryParameters[3];
+
+
if (nearRow == 0) {
throw new CoolException("鏃犲彲鐢ㄥ爢鍨涙満");
}
@@ -500,12 +497,13 @@
.eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
.eq(Loc::getAreaId, area)
);
- if (null != orgMoveLoc){
- if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
- break;
- }
- }
+
if (!Cools.isEmpty(locMast2)) {
+ if (null != orgMoveLoc){
+ if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
+ break;
+ }
+ }
loc = locMast2;
break;
}
@@ -531,12 +529,13 @@
.eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
.eq(Loc::getAreaId, area)
);
- if (null != orgMoveLoc){
- if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
- break;
- }
- }
+
if (!Cools.isEmpty(locMast2)) {
+ if (null != orgMoveLoc){
+ if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
+ break;
+ }
+ }
loc = locMast2;
break;
}
@@ -555,12 +554,13 @@
.eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
.eq(Loc::getAreaId, area)
);
- if (null != orgMoveLoc){
- if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
- break;
- }
- }
+
if (!Cools.isEmpty(locMast2)) {
+ if (null != orgMoveLoc){
+ if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
+ break;
+ }
+ }
loc = locMast2;
break;
} else {
@@ -569,12 +569,13 @@
.in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type, LocStsType.LOC_STS_TYPE_D.type)
.eq(Loc::getAreaId, area)
);
- if (null != orgMoveLoc){
- if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
- break;
- }
- }
+
if (!Cools.isEmpty(locMast2)) {
+ if (null != orgMoveLoc){
+ if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
+ break;
+ }
+ }
loc = locMast1;
break;
}
--
Gitblit v1.9.1