From 5701eb6693c654d53f1bba460eb3a417d495b344 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 六月 2025 17:31:53 +0800
Subject: [PATCH] bug修复;下发任务给rcs携带货架码
---
src/main/java/com/zy/asrs/utils/LocUtils.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/LocUtils.java b/src/main/java/com/zy/asrs/utils/LocUtils.java
index 53db48a..76d8425 100644
--- a/src/main/java/com/zy/asrs/utils/LocUtils.java
+++ b/src/main/java/com/zy/asrs/utils/LocUtils.java
@@ -9,7 +9,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import java.util.ArrayList;
import java.util.List;
@Component
@@ -24,20 +23,24 @@
* @param factory
* @return
*/
- public AgvLocMast getLocNoRuleByFactory(int type, String factory) {
+ public AgvLocMast getLocNoRuleByFactory(int type, boolean isEmpty, String factory) {
if (Cools.isEmpty(factory)) {
throw new CoolException("鎼滅储搴撲綅鏃讹紝璁㈠崟绫诲瀷閿欒");
}
try {
EntityWrapper<AgvLocMast> wrapper = new EntityWrapper<>();
wrapper.eq("loc_sts", "O").eq("loc_type1", type);
- List<AgvLocMast> agvLocMasts = new ArrayList<>();
+
if (factory.equalsIgnoreCase(AsrsConstants.ERCHANG)) {
- wrapper.orderBy("lev1", false);
+ if (isEmpty) {
+ wrapper.orderBy("lev1", true);
+ } else {
+ wrapper.orderBy("lev1", false);
+ }
} else if (factory.equalsIgnoreCase(AsrsConstants.SANCHANG)) {
wrapper.orderBy("lev1", true);
}
- agvLocMasts = agvLocMastService.selectList(wrapper);
+ List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(wrapper);
for (AgvLocMast agvLocMast : agvLocMasts) {
AgvLocMast agvLocMast1 = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocMast.getLocNo()));
@@ -57,10 +60,15 @@
* @param floor
* @return
*/
- public AgvLocMast getLocNoRuleByFloor(int type, Integer floor, Integer lev1) {
+ public AgvLocMast getLocNoRuleByFloor6(int type, Integer floor) {
try {
EntityWrapper<AgvLocMast> wrapper = new EntityWrapper<>();
- wrapper.eq("loc_sts", "O").eq("loc_type1", type).eq("floor", floor).eq("lev1", lev1);
+ wrapper.eq("loc_sts", "O").eq("loc_type1", type);
+ if (floor == 4) {
+ wrapper.eq("floor", 1).eq("lev1", 2).orderBy("bay1", false);
+ } else {
+ wrapper.orderBy("floor", false).orderBy("lev1", true);
+ }
List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(wrapper);
for (AgvLocMast agvLocMast : agvLocMasts) {
AgvLocMast agvLocMast1 = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocMast.getLocNo()));
--
Gitblit v1.9.1