From 6e695903059e82c1c376bf2926ffb8b209c0dc3e Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期三, 11 三月 2026 15:45:57 +0800
Subject: [PATCH] lsh#
---
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java
index c29ee3d..ae742e3 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java
@@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
@Service
public class AgvServiceImpl implements AgvService {
@@ -83,7 +84,9 @@
if (Cools.isEmpty(basStation)) {
throw new CoolException("鏈壘鍒版帴椹崇珯鐐逛俊鎭紝璇锋鏌ョ珯鐐圭姸鎬�");
}
- List<Long> ids = basStation.getCrossZoneArea();
+ List<Long> ids = basStation.getCrossZoneArea().stream()
+ .map(Integer::longValue)
+ .collect(Collectors.toList());
// ids.add(basStation.getArea());
// if (basStation.getIsCrossZone() == 1) {
// String content = basStation.getCrossZoneArea().substring(1,.length() - 1);
@@ -144,8 +147,9 @@
String targetLoc = LocManageUtil.getTargetLoc(Long.parseLong(area));
taskService.generateAGVTasks(waitPakin, targetLoc, sta, deviceSite.getDeviceCode(),loginUserId);
-
- basStation.setUseStatus(LocStsType.LOC_STS_TYPE_R.type);
+ if (!basStation.getType().equals(0)){
+ basStation.setUseStatus(LocStsType.LOC_STS_TYPE_R.type);
+ }
if (!basStationService.updateById(basStation)) {
throw new CoolException("鏇存柊绔欑偣鐘舵�佸け璐�");
}
@@ -213,7 +217,9 @@
if (Cools.isEmpty(waitPakinItems)) {
throw new CoolException("鏁版嵁閿欒锛屾湭鎵惧埌缁勬墭鏄庣粏");
}
- List<Long> ids = basStation.getCrossZoneArea();
+ List<Long> ids = basStation.getCrossZoneArea().stream()
+ .map(Integer::longValue)
+ .collect(Collectors.toList());
// ids.add(basStation.getArea());
// if (basStation.getIsCrossZone() == 1) {
// String content = basStation.getCrossZoneArea().substring(1, basStation.getCrossZoneArea().length() - 1);
@@ -243,7 +249,9 @@
//楠岃瘉鍩虹淇℃伅
BasStation basStation = checkStaStatus(barcode, sta,waitPakinPda.getArea());
//鏇存柊绔欑偣鐘舵��
- basStation.setUseStatus(LocStsType.LOC_STS_TYPE_F.type);
+ if (!basStation.getType().equals(0)){
+ basStation.setUseStatus(LocStsType.LOC_STS_TYPE_F.type);
+ }
basStation.setBarcode(barcode);
if (!basStationService.updateById(basStation)) {
throw new CoolException("鏇存柊绔欑偣鐘舵�佸け璐�");
@@ -274,7 +282,9 @@
throw new CoolException("鏈壘鍒扮珯鐐逛俊鎭�");
}
if (!Cools.isEmpty(basStation.getContainerType())) {
- List<Long> longs1 = basStation.getCrossZoneArea();
+ List<Long> longs1 = basStation.getContainerType().stream()
+ .map(Integer::longValue)
+ .collect(Collectors.toList());
List<BasContainer> containers = basContainerService.list(
new LambdaQueryWrapper<BasContainer>()
.in(BasContainer::getContainerType, longs1)
@@ -330,12 +340,13 @@
throw new CoolException("绔欑偣涓哄厜鐢电珯鐐癸紝绂佹鍛煎彨AGV");
}
- List<Long> areaList = basStation.getCrossZoneArea();
- if (!areaList.contains(Long.parseLong(area))) {
+ if (!basStation.getCrossZoneArea().contains(Integer.parseInt(area))) {
throw new CoolException("褰撳墠绔欑偣涓嶆敮鎸佺洰鏍囧簱鍖�");
}
if (!Cools.isEmpty(basStation.getContainerType())) {
- List<Long> longs1 = basStation.getContainerType();
+ List<Long> longs1 = basStation.getContainerType().stream()
+ .map(Integer::longValue)
+ .collect(Collectors.toList());
List<BasContainer> containers = basContainerService.list(
new LambdaQueryWrapper<BasContainer>()
.in(BasContainer::getContainerType, longs1)
--
Gitblit v1.9.1