From 252bfe6c268c95444525c16c95845a4ee8d10fd5 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期五, 07 三月 2025 16:46:24 +0800
Subject: [PATCH] 四期

---
 src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
index 2aae096..e64b67a 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -7,6 +7,7 @@
 import com.core.common.Cools;
 import com.core.common.SnowflakeIdWorker;
 import com.core.exception.CoolException;
+import com.zy.asrs.constant.AsrsConstants;
 import com.zy.asrs.entity.*;
 import com.zy.asrs.entity.param.MesBuyPakinReportParam;
 import com.zy.asrs.entity.param.MesOrderReportParam;
@@ -432,8 +433,18 @@
                     //鐩爣绔欑偣
                     if (agvWrkMast.getLocNo().startsWith("QO") && agvWrkMast.getLocNo().endsWith("F4") && Integer.valueOf(agvWrkMast.getBarcode().substring(0, 2)) == 30) {
                         if (!agvWrkMast.getSourceLocNo().endsWith("02F1")) {
-                            AgvLocMast locByFloor = agvCommonService.getLocByFloor(3, 1);
-                            if (locByFloor != null) {
+                            AgvLocMast locByFloor = null;
+                            try {
+                                locByFloor = agvCommonService.getLocByLocRule(3, 1, AsrsConstants.ERCHANG, true);
+                            } catch (Exception e) {
+
+                            }
+                            if (locByFloor != null && locByFloor.getLocNo().endsWith("02F1")) {
+                                AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getSourceLocNo());
+                                agvLocMast.setLocSts("O");
+                                agvLocMast.setModiTime(now);
+                                agvLocMast.setBarcode("");
+                                agvLocMastService.updateById(agvLocMast);
                                 wrkMast.setLocNo(locByFloor.getLocNo());
                             } else {
                                 wrkMast.setLocNo(agvWrkMast.getSourceLocNo());
@@ -444,7 +455,7 @@
                     } else {
                         wrkMast.setLocNo(agvWrkMast.getSourceLocNo());
                     }
-
+                    //wrkMast.setLocNo(agvWrkMast.getSourceLocNo());
 
                     //璐ф灦缂栫爜
                     wrkMast.setBarcode(agvWrkMast.getBarcode());
@@ -460,7 +471,7 @@
                     if (!agvWrkMastService.insertByIncrease(wrkMast)) {
                         throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
                     }
-                    AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getSourceLocNo());
+                    AgvLocMast agvLocMast = agvLocMastService.selectById(wrkMast.getLocNo());
                     agvLocMast.setLocSts("S");
                     agvLocMast.setModiTime(now);
                     agvLocMastService.updateById(agvLocMast);

--
Gitblit v1.9.1