From c30e856b9ae160b84e3deb519e320feb09793283 Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期二, 27 五月 2025 20:40:47 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 44 +++++++++++++-------------------------------
1 files changed, 13 insertions(+), 31 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index cf8db66..992fb0f 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -50,6 +50,7 @@
import java.util.Date;
import java.util.List;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -154,10 +155,7 @@
back = true;
}
- //鎷f枡銆佺洏鐐逛换鍔★紝涓嶈繘鍏ユ柊鏉垮叆搴撴柟娉曪紝鐩存帴璺冲嚭
- if(staProtocol.getWorkNo()>=3001 && staProtocol.getWorkNo()<=6000){
- continue;
- }
+
// 閫�鍥�
if (back) {
@@ -180,7 +178,10 @@
MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg));
}
-
+ //鎷f枡銆佺洏鐐逛换鍔★紝涓嶈繘鍏ユ柊鏉垮叆搴撴柟娉曪紝鐩存帴璺冲嚭
+ if(staProtocol.getWorkNo()>=3001 && staProtocol.getWorkNo()<=6000){
+ continue;
+ }
// 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢
if (staProtocol.isAutoing()
&& staProtocol.isLoading()
@@ -249,6 +250,7 @@
param.setLocType1(locTypeDto.getLocType1());
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
+ .setTimeout(30, TimeUnit.SECONDS)
.setPath("/rpc/pakin/loc/v1")
.setJson(JSON.toJSONString(param))
.build()
@@ -459,7 +461,7 @@
// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
- if ("NG".endsWith(barcode) || "NoRead".equals(barcode) && staProtocol.isPakMk()) {
+ if ("NG".endsWith(barcode) || "NoRead".equals(barcode) && staProtocol.isPakMk()) {
if (!staProtocol.isLoading()) {
continue;
}
@@ -514,30 +516,7 @@
|| Cools.isEmpty(wrkMast.getStaNo()) || Cools.isEmpty(wrkMast.getSourceStaNo())) {
continue;
}
-// 濡傛灉鏄苟鏉垮叆搴�
- if (wrkMast.getIoType() == 104) {
- LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("barcode", barcode));
- if (Cools.isEmpty(locMast1)) {
- continue;
- } else {
- if (locMast1.getLocType1().equals((short)2)) {
- if (staProtocol.isWeight()) {
- staProtocol.setWorkNo(wrkNo);
- wrkNo++;
- staProtocol.setStaNo(pickSta.getBackSta().shortValue());
- devpThread.setPakMk(staProtocol.getSiteId(), false);
- MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
- // led 寮傚父鏄剧ず
- if (ledThread != null) {
- String errorMsg = "骞舵澘鍏ュ簱閲嶉噺澶т簬搴撲綅閲嶉噺锛岃閲嶆柊璋冩暣";
- News.error(methodName + ":骞舵澘鍏ュ簱閲嶉噺澶т簬搴撲綅閲嶉噺锛岃閲嶆柊璋冩暣");
- MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg));
- }
- continue;
- }
- }
- }
- }
+ LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo()));
@@ -1759,6 +1738,7 @@
param.setLocType1(locTypeDto.getLocType1());
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
+ .setTimeout(30, TimeUnit.SECONDS)
.setPath("/rpc/pakin/loc/v1")
.setJson(JSON.toJSONString(param))
.build()
@@ -1934,7 +1914,7 @@
News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
continue;
} else {
- News.info("{}鍙稬ED鍛戒护涓嬪彂鎴愬姛锛侊紒锛乕ip锛歿}] [port锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort(),commands);
+// News.info("{}鍙稬ED鍛戒护涓嬪彂鎴愬姛锛侊紒锛乕ip锛歿}] [port锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort(),commands);
}
}
@@ -2458,6 +2438,7 @@
try {
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
+ .setTimeout(30, TimeUnit.SECONDS)
.setPath("/rpc/auto/emptyOut/v1")
.build()
.doPost();
@@ -2496,6 +2477,7 @@
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
+ .setTimeout(30, TimeUnit.SECONDS)
.setPath("/rpc/auto/emptyIn/v1")
.setJson(JSON.toJSONString(locTypeDto))
.build()
--
Gitblit v1.9.1