From e711c834aec2293c53b07efe53e81e3573c289b6 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期三, 01 四月 2026 11:42:44 +0800
Subject: [PATCH] lsh#
---
rsf-server/src/main/java/com/vincent/rsf/server/api/utils/LocUtils.java | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/utils/LocUtils.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/utils/LocUtils.java
index 9d7c34b..3024b18 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/utils/LocUtils.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/utils/LocUtils.java
@@ -16,7 +16,8 @@
import org.springframework.stereotype.Component;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
+import java.util.ArrayList;
import java.util.List;
@Component
@@ -110,13 +111,29 @@
}
//鑾峰彇绔欑偣瀵瑰簲鐨勫簱绫诲瀷
- public static Long getAreaType(Integer sourceStaNo) {
+ public static List<Long> getAreaTypeList(String sourceStaNo) {
+ List<Long> deviceBindIdList = new ArrayList<>();
DeviceBindService rowLastnoService = SpringUtils.getBean(DeviceBindService.class);
List<DeviceBind> deviceBinds = rowLastnoService.list(new LambdaQueryWrapper<DeviceBind>());
for (DeviceBind deviceBind : deviceBinds) {
String[] staNoList = deviceBind.getStaList().split(";");
for (String staNo : staNoList) {
- if (staNo.equals(sourceStaNo.toString())) {
+ if (staNo.equals(sourceStaNo)) {
+ deviceBindIdList.add(deviceBind.getId());
+ }
+ }
+ }
+ return deviceBindIdList;
+ }
+
+ //鑾峰彇绔欑偣瀵瑰簲鐨勫簱绫诲瀷
+ public static Long getAreaType(String sourceStaNo) {
+ DeviceBindService rowLastnoService = SpringUtils.getBean(DeviceBindService.class);
+ List<DeviceBind> deviceBinds = rowLastnoService.list(new LambdaQueryWrapper<DeviceBind>());
+ for (DeviceBind deviceBind : deviceBinds) {
+ String[] staNoList = deviceBind.getStaList().split(";");
+ for (String staNo : staNoList) {
+ if (staNo.equals(sourceStaNo)) {
return deviceBind.getId();
}
}
@@ -242,7 +259,7 @@
* @param ioType 浣滀笟绫诲瀷锛�*蹇呬紶鍙傛暟锛�
* @return
*/
- public static InTaskMsgDto getLocNoCrn(DeviceBind deviceBind, Long area, Integer sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
+ public static InTaskMsgDto getLocNoCrn(DeviceBind deviceBind, Long area, String sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
DeviceBindService deviceBindService = SpringUtils.getBean(DeviceBindService.class);
DeviceSiteService deviceSiteService = SpringUtils.getBean(DeviceSiteService.class);
LocService locService = SpringUtils.getBean(LocService.class);
@@ -329,17 +346,6 @@
// }
// }
// }
- //鏌ユ壘璺緞
- DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>()
- .eq(DeviceSite::getType, ioType)
- .eq(DeviceSite::getSite, sourceStaNo)
- .eq(DeviceSite::getChannel, channel)
- );
- if (Cools.isEmpty(deviceSite)) {
- channel = 0;
- } else {
- inTaskMsgDto.setStaNo(Integer.parseInt(deviceSite.getDeviceSite()));
- }
//鏇存柊褰撳墠鎺�
deviceBind.setCurrentRow(curRow);
@@ -363,7 +369,7 @@
continue;
}
String shallowLoc = LocUtils.getDeepLoc(locMast1.getCode());
- if ((ioType == TaskStsType.GENERATE_IN.id && deviceBind.getBeSimilar().equals("1"))) {
+ if ((ioType == TaskStsType.MISSION_INITIAL.id && deviceBind.getBeSimilar().equals("1"))) {
//鐩镐技鐗╂枡鎵撳紑锛屽垽鏂繁搴撲綅鏈夋病鏈夎揣锛屾病璐у氨鏀炬繁搴撲綅锛屾湁璐у氨涓嶆搷浣�
Loc locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>()
.eq(Loc::getCode, shallowLoc)
@@ -470,3 +476,4 @@
}
+
--
Gitblit v1.9.1