From 9f43ee66e8fa2e0d02945f4bdd40d9c3a53a4bd7 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期六, 24 一月 2026 13:41:13 +0800
Subject: [PATCH] lsh#
---
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java | 45 +++++++++++++++++++++------------------------
1 files changed, 21 insertions(+), 24 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 195c55a..a40715c 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
@@ -63,6 +63,14 @@
}
@Override
+ @Transactional(rollbackFor = Exception.class)
+ public boolean AGVBindAndInTaskStart(String barcode, String sta) {
+ //楠岃瘉鏉$爜
+ checkStaStatus(barcode,sta);
+ return true;
+ }
+
+ @Override
public R getStaMsgSelect(Map<String, Object> params) {
String sta = params.get("sta").toString();
if (Cools.isEmpty(sta)) {
@@ -102,17 +110,26 @@
String sta = waitPakinPda.getStaNo();
String area = waitPakinPda.getArea();
if (Cools.isEmpty(sta)) {
- throw new CoolException("鎺ラ┏浣嶆潯鐮佷笉鑳戒负绌�");
+ throw new CoolException("璧风偣涓嶈兘涓虹┖");
}
if (Cools.isEmpty(area)) {
throw new CoolException("鐩爣搴撳尯涓嶈兘涓虹┖");
}
+
+ DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>()
+ .eq(DeviceSite::getSite, sta)
+ .eq(DeviceSite::getAreaIdEnd, Long.parseLong(area))
+ .eq(DeviceSite::getType, TaskType.TASK_TYPE_IN.type).last("limit 1"));
+ if (Cools.isEmpty(deviceSite)) {
+ throw new CoolException("鏃犲彲鐢ㄨ矾寰勶紒锛�");
+ }
+
BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
.eq(BasStation::getStationName, sta)
.eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_F.type)
);
if (Cools.isEmpty(basStation)) {
- throw new CoolException("鏈壘鍒版帴椹崇珯鐐逛俊鎭紝璇锋鏌ョ珯鐐圭姸鎬�");
+ throw new CoolException("鏈壘鍒拌捣鐐圭珯鐐逛俊鎭紝璇锋鏌ョ珯鐐圭姸鎬�");
}
if (Cools.isEmpty(basStation.getBarcode())) {
throw new CoolException("鏁版嵁閿欒锛屾帴椹崇珯鏃犳潯鐮佷俊鎭�");
@@ -125,14 +142,6 @@
throw new CoolException("鏈壘鍒扮粍鎵樻暟鎹�,璇锋鏌ョ姸鎬�");
}
String targetLoc = LocManageUtil.getTargetLoc(Long.parseLong(area));
-
- DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>()
- .eq(DeviceSite::getSite, sta)
- .eq(DeviceSite::getAreaIdEnd, Long.parseLong(area))
- .eq(DeviceSite::getType, TaskType.TASK_TYPE_IN.type).last("limit 1"));
- if (Cools.isEmpty(deviceSite)) {
- throw new CoolException("鏃犲彲鐢ㄨ矾寰勶紒锛�");
- }
taskService.generateAGVTasks(waitPakin, targetLoc, sta, deviceSite.getTarget(),loginUserId);
@@ -248,15 +257,9 @@
throw new CoolException("瀹瑰櫒鐮佷笉鑳戒负绌�");
}
if (Cools.isEmpty(sta)) {
- throw new CoolException("鎺ラ┏浣嶆潯鐮佷笉鑳戒负绌�");
+ throw new CoolException("绔欑偣淇℃伅涓嶈兘涓虹┖");
}
- WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
- .eq(WaitPakin::getBarcode, barcode)
- .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)
- );
- if (Cools.isEmpty(waitPakin)) {
- throw new CoolException("瀹瑰櫒鐮佹湭鎵惧埌缁勬墭淇℃伅,璇锋鏌ョ粍鎵樼姸鎬�");
- }
+
BasStation isBarcodeSta = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
.eq(BasStation::getBarcode, barcode)
, false
@@ -269,9 +272,6 @@
);
if (Cools.isEmpty(basStation)) {
throw new CoolException("鏈壘鍒扮珯鐐逛俊鎭�");
- }
- if (!basStation.getUseStatus().equals("O")) {
- throw new CoolException("绔欑偣鐘舵�佷笉涓虹┖闂�");
}
if (!Cools.isEmpty(basStation.getContainerType())) {
List<Long> longs1 = JSONObject.parseArray(basStation.getContainerType(), Long.class);
@@ -287,9 +287,6 @@
break; // 鎵惧埌鍖归厤鐨勫氨閫�鍑哄惊鐜�
}
}
-// boolean matches = containers.stream()
-// .map(BasContainer::getCodeType)
-// .anyMatch(codeType -> barcode.matches(codeType));
if (!matches) {
throw new CoolException("鏉$爜涓庣珯鐐逛笉鍖归厤");
}
--
Gitblit v1.9.1