From b4d9cf3a9974d9abac40ecd228820e5e854b080a Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期三, 07 一月 2026 17:43:38 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 05bdb79..8121973 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -29,6 +29,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource;
import java.util.*;
@@ -1680,4 +1681,41 @@
throw new CoolException(locDetl.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
}
}
+ @Override
+ public void agvUnlockLoc(AgvUnlockLoc agvUnlockLoc){
+ Date now = new Date();
+ if(agvUnlockLoc.getFloorNo().equals(1)){
+ LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",agvUnlockLoc.getPositionCode()));
+ if(locMast != null){
+ locMast.setLocSts("O");
+ locMast.setBarcode("");
+ locMast.setIoTime(now);
+ locMast.setModiTime(now);
+ if (!locMastService.updateById(locMast)) {
+ throw new CoolException(agvUnlockLoc.getPositionCode() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
+ }
+ }
+ }else{
+ LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",agvUnlockLoc.getPositionCode()));
+ AgvBindCtnrAndBinTwoParam agvBindCtnrAndBinTwoParam = new AgvBindCtnrAndBinTwoParam();
+ agvBindCtnrAndBinTwoParam.setReqCode(String.valueOf(snowflakeIdWorker.nextId()));
+ agvBindCtnrAndBinTwoParam.setPodcode(agvUnlockLoc.getPodcode());
+ agvBindCtnrAndBinTwoParam.setPositionCode(agvUnlockLoc.getPositionCode());
+ agvBindCtnrAndBinTwoParam.setIndBind("0");;
+ ReturnT<String> resultBind = new PostMesDataUtils().postMesDataArmGrating("AGV搴撲綅瑙g粦",
+ AgvConstant.AGV_URL+"/"+AgvConstant.AGV_hikRpcService,AgvConstant.getAGVADAPTOR(2), agvBindCtnrAndBinTwoParam);
+ if (resultBind.getCode()!=1){
+ if(locMast != null){
+ locMast.setLocSts("O");
+ locMast.setBarcode("");
+ locMast.setIoTime(now);
+ locMast.setModiTime(now);
+ if (!locMastService.updateById(locMast)) {
+ throw new CoolException(agvUnlockLoc.getPositionCode() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
+ }
+ }
+ }
+ }
+
+ }
}
--
Gitblit v1.9.1