From 83ff02860cfc3cbe63cda138c638b6fd4ad51da1 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期二, 26 三月 2024 15:33:06 +0800
Subject: [PATCH] 库位地图
---
src/main/java/com/zy/common/web/WcsController.java | 50 ++++++++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java
index 45f3aff..fc8ca3a 100644
--- a/src/main/java/com/zy/common/web/WcsController.java
+++ b/src/main/java/com/zy/common/web/WcsController.java
@@ -21,7 +21,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@ -591,8 +590,6 @@
if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){
throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦ㄦ垨鑰呯珯鐐逛笉涓虹┖");
}
-
- AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectByContainerCode(containerCode);
AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", containerCode));
//鎷f枡銆佺洏鐐瑰畬鎴愪换鍔�
@@ -633,7 +630,8 @@
currentContainerMap = new HashMap<>();
}
- String containerCode = param.getContainerCode();
+ String containerCode = param.getContainerCode().split(";")[0];
+
if(Cools.isEmpty(containerCode)){
throw new CoolException("鏂欑鐮佷负绌�");
}
@@ -651,19 +649,22 @@
//鏌ヨ鏃у鍣ㄧ殑宸ヤ綔妗�
AgvWrkMast agvWrkMast = agvWrkMastService.selectByContainerCode(currentContainerCode);
if(!Cools.isEmpty(agvWrkMast) && agvWrkMast.getIoType() == 101){
- //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗�
- List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
- agvWrkMastList.add(agvWrkMast);
- try {
- int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
- if(code == 0){
- //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
- agvWrkMast.setWrkSts(206L);
- agvWrkMastService.updateById(agvWrkMast);
- }
- } catch (IOException e) {
- log.error(e.getMessage());
- }
+ //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
+ agvWrkMast.setWrkSts(206L);
+ agvWrkMastService.updateById(agvWrkMast);
+// //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗�
+// List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
+// agvWrkMastList.add(agvWrkMast);
+// try {
+// int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
+// if(code == 0){
+// //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
+// agvWrkMast.setWrkSts(206L);
+// agvWrkMastService.updateById(agvWrkMast);
+// }
+// } catch (IOException e) {
+// log.error(e.getMessage());
+// }
}
}
@@ -689,7 +690,7 @@
if(!Cools.isEmpty(agvWrkMast)){
List<AgvWrkDetl> agvWrkDetlList = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", agvWrkMast.getWrkNo()));
- for (AgvWrkDetl agvWrkDetl : AgvWrkDetlList){
+ for (AgvWrkDetl agvWrkDetl : agvWrkDetlList){
agvWrkDetl.setVolume(agvWrkDetl.getAnfme());
if(agvWrkMast.getIoType() == 103){
//瀵绘壘鏄惁鏈夌浉鍚岀墿鏂欑殑宸ヤ綔妗f槑缁嗭紝骞惰繑鍥炴暟閲忎箣鍜�
@@ -708,16 +709,21 @@
}
};
-
- return R.ok(agvWrkDetlList).add(agvWrkMast);
+ agvBasDevpDto.setAgvWrkDetls(agvWrkDetlList);
+ agvBasDevpDto.setAgvWrkMast(agvWrkMast);
}
//鏌ユ壘璇ュ鍣ㄧ殑鍏ュ簱閫氱煡妗�
List<AgvWaitPakin> agvWaitPakinList = agvWaitPakinService.selectList(new EntityWrapper<AgvWaitPakin>().eq("supp_code", containerCode));
if(!Cools.isEmpty(agvWaitPakinList)){
- return R.ok(agvWaitPakinList);
+ agvBasDevpDto.setAgvWaitPakins(agvWaitPakinList);
}
- return R.error("娌℃湁璇ュ鍣ㄧ殑鍑哄簱銆佹嫞鏂欍�佸叆搴撲俊鎭瓑");
+ System.out.println("currentContainerMap: " + currentContainerMap);
+
+
+ System.out.println("agvBasDevpDto: " + agvBasDevpDto);
+
+ return R.ok(agvBasDevpDto);
}
private double getAllAnfmeInAgvWrkDetlList(List<AgvWrkDetl> agvWrkDetlList, AgvWrkDetl wd0) {
--
Gitblit v1.9.1