From 3920895dadb73afafb02c979d6db59e310877534 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 25 三月 2025 08:19:14 +0800
Subject: [PATCH] 删除CommandUtils
---
src/main/java/com/zy/asrs/controller/SiteController.java | 8
src/main/webapp/static/wcs/js/console.map.js | 269 ++++++++++++++---------------------------------------
src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java | 8
src/main/java/com/zy/asrs/controller/CrnController.java | 7
4 files changed, 82 insertions(+), 210 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/CrnController.java b/src/main/java/com/zy/asrs/controller/CrnController.java
index 07253ac..7563fbe 100644
--- a/src/main/java/com/zy/asrs/controller/CrnController.java
+++ b/src/main/java/com/zy/asrs/controller/CrnController.java
@@ -22,7 +22,6 @@
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.service.impl.MainServiceImpl;
-import com.zy.asrs.utils.CommandUtils;
import com.zy.asrs.utils.VersionUtils;
import com.zy.core.CrnThread;
import com.zy.core.cache.MessageQueue;
@@ -612,7 +611,7 @@
crnCommand.setCommand((short) 0); // 浠诲姟瀹屾垚纭浣�
// 寤舵椂鍙戦��
Thread.sleep(1000L);
- if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(5, crnCommand), false)) {
+ if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(5, crnCommand))) {
return R.ok();
} else {
throw new CoolException("鍛戒护涓嬪彂澶辫触");
@@ -771,7 +770,7 @@
}
// 绌洪棽鍒ゆ柇
// if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) {
- if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(4, command), false)) {
+ if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(4, command))) {
return true;
} else {
throw new CoolException("鍛戒护涓嬪彂澶辫触");
@@ -802,7 +801,7 @@
}
// 绌洪棽鍒ゆ柇
// if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) {
- if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(2, command), false)) {
+ if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(2, command))) {
return true;
} else {
throw new CoolException("鍛戒护涓嬪彂澶辫触");
diff --git a/src/main/java/com/zy/asrs/controller/SiteController.java b/src/main/java/com/zy/asrs/controller/SiteController.java
index 741daa3..f224249 100644
--- a/src/main/java/com/zy/asrs/controller/SiteController.java
+++ b/src/main/java/com/zy/asrs/controller/SiteController.java
@@ -8,8 +8,8 @@
import com.zy.asrs.domain.vo.SiteTableVo;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.service.BasDevpService;
-import com.zy.asrs.utils.CommandUtils;
import com.zy.core.DevpThread;
+import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.OutputQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.SlaveType;
@@ -227,7 +227,7 @@
basDevp.setOutEnable(outEnable ? "Y" : "N");
}
basDevpService.updateById(basDevp);
- boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol), false);
+ boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
if (result) {
return R.ok();
} else {
@@ -277,7 +277,7 @@
staProtocol.setWorkNo((short) 0);
staProtocol.setStaNo((short) 0);
basDevpService.updateById(basDevp);
- boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false);
+ boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
if (result) {
return R.ok();
} else {
@@ -318,7 +318,7 @@
}
staProtocol.setWorkNo((short) 9999);
staProtocol.setStaNo(inSta.getStaNo().shortValue());
- boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false);
+ boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
if (result) {
return R.ok();
} else {
diff --git a/src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java
index 183abd1..1373172 100644
--- a/src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java
@@ -13,11 +13,11 @@
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.StaDescService;
import com.zy.asrs.service.TaskWrkService;
-import com.zy.asrs.utils.CommandUtils;
import com.zy.asrs.utils.Utils;
import com.zy.common.service.CommonService;
import com.zy.common.utils.HttpHandler;
import com.zy.core.DevpThread;
+import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.CrnTaskModeType;
import com.zy.core.enums.SlaveType;
@@ -139,7 +139,7 @@
crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 鐩爣搴撲綅灞�
crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 鐩爣搴撲綅鎺�
crnCommand.setCommand((short) 1);
- if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand), false)) {
+ if (!MessageQueue.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand))) {
log.error("鍫嗗灈鏈哄懡浠ょ敓鎴愬け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand));
throw new CoolException("鍫嗗灈鏈哄懡浠ょ敓鎴愬け璐�");
} else {
@@ -210,7 +210,7 @@
crnCommand.setDestinationPosY(crnStn.getLev().shortValue()); // 鐩爣搴撲綅鍒�
crnCommand.setDestinationPosZ(crnStn.getRow().shortValue()); // 鐩爣搴撲綅灞�
crnCommand.setCommand((short) 1);
- if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand))) {
+ if (!MessageQueue.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand))) {
log.error("鍫嗗灈鏈哄懡浠ょ敓鎴愬け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand));
throw new CoolException("鍫嗗灈鏈哄懡浠ょ敓鎴愬け璐�");
}
@@ -220,7 +220,7 @@
StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()).clone();
staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue());
staProtocol.setStaNo((short) Integer.parseInt(taskWrk.getTargetPoint()));
- if (!CommandUtils.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(3, staProtocol))) {
+ if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(3, staProtocol))) {
log.error("杈撻�佺嚎鍛戒护鐢熸垚澶辫触锛屽爢鍨涙満鍙�={}锛屼换鍔℃暟鎹�={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand));
throw new CoolException("杈撻�佺嚎鍛戒护鐢熸垚澶辫触");
}
diff --git a/src/main/webapp/static/wcs/js/console.map.js b/src/main/webapp/static/wcs/js/console.map.js
index 05f46a5..84695e1 100644
--- a/src/main/webapp/static/wcs/js/console.map.js
+++ b/src/main/webapp/static/wcs/js/console.map.js
@@ -6,7 +6,48 @@
"hpPosition": 0,
"minBayNo": 1,
"floors": 1,
- "racks": [{
+ "racks": [
+ {
+ "type": "rack",
+ "id": "rack7",
+ "top": 483,
+ "left": 800,
+ "width": 795,
+ "height": 23,
+ "minBayNo": 1,
+ "maxBayNo": 22,
+ "hiddenArr": [1,22]
+ }, {
+ "type": "rack",
+ "id": "rack6",
+ "top": 460,
+ "left": 800,
+ "width": 795,
+ "height": 23,
+ "minBayNo": 1,
+ "maxBayNo": 22,
+ "hiddenArr": [1,22]
+ }, {
+ "type": "rack",
+ "id": "rack5",
+ "top": 366,
+ "left": 800,
+ "width": 795,
+ "height": 23,
+ "minBayNo": 1,
+ "maxBayNo": 22,
+ "hiddenArr": [1,22]
+ },{
+ "type": "rack",
+ "id": "rack8",
+ "top": 389,
+ "left": 800,
+ "width": 795,
+ "height": 23,
+ "minBayNo": 1,
+ "maxBayNo": 22,
+ "hiddenArr": [1,22]
+ },{
"type": "rack",
"id": "rack7",
"top": 326,
@@ -89,6 +130,14 @@
}],
"crns": [{
"type": "crane",
+ "id": "crn-3",
+ "text": "3",
+ "top": 423,
+ "left": 855,
+ "width": 93,
+ "height": 22
+ },{
+ "type": "crane",
"id": "crn-2",
"text": "2",
"top": 268,
@@ -103,6 +152,14 @@
"left": 855,
"width": 93,
"height": 22
+ }, {
+ "type": "track",
+ "id": "lb_track3",
+ "text": "",
+ "top": 433,
+ "left": 769,
+ "width": 850,
+ "height": 2
}, {
"type": "track",
"id": "lb_track2",
@@ -138,8 +195,8 @@
"height": 706,
"stns": [{
"type": "stn",
- "id": "site-100",
- "text": "100",
+ "id": "site-102",
+ "text": "102",
"top": 99,
"left": 771,
"width": 62,
@@ -149,73 +206,25 @@
"id": "site-101",
"text": "101",
"top": 99,
- "left": 707,
+ "left": 705,
"width": 62,
"height": 23
},{
"type": "stn",
- "id": "site-102",
- "text": "102",
- "top": 99,
- "left": 643,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-103",
- "text": "103",
- "top": 99,
- "left": 579,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-104",
- "text": "104",
- "top": 124,
- "left": 579,
- "width": 62,
- "height": 34
- },{
- "type": "stn",
- "id": "site-125",
- "text": "125",
+ "id": "site-105",
+ "text": "105",
"top": 160,
"left": 771,
"width": 62,
"height": 23
},{
"type": "stn",
- "id": "site-124",
- "text": "124",
+ "id": "site-104",
+ "text": "104",
"top": 160,
- "left": 707,
+ "left": 705,
"width": 62,
"height": 23
- },{
- "type": "stn",
- "id": "site-123",
- "text": "123",
- "top": 160,
- "left": 643,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-122",
- "text": "122",
- "top": 160,
- "left": 579,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-121",
- "text": "121",
- "top": 186,
- "left": 579,
- "width": 62,
- "height": 42
},{
"type": "stn",
"id": "site-120",
@@ -226,38 +235,6 @@
"height": 23
},{
"type": "stn",
- "id": "site-119",
- "text": "119",
- "top": 231,
- "left": 707,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-118",
- "text": "118",
- "top": 231,
- "left": 643,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-117",
- "text": "117",
- "top": 231,
- "left": 579,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-116",
- "text": "116",
- "top": 256,
- "left": 579,
- "width": 62,
- "height": 46
- },{
- "type": "stn",
"id": "site-115",
"text": "115",
"top": 304,
@@ -266,117 +243,13 @@
"height": 23
},{
"type": "stn",
- "id": "site-114",
- "text": "114",
- "top": 304,
- "left": 707,
+ "id": "site-1150",
+ "text": "1150",
+ "top": 460,
+ "left": 771,
"width": 62,
"height": 23
- },{
- "type": "stn",
- "id": "site-113",
- "text": "113",
- "top": 304,
- "left": 643,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-112",
- "text": "112",
- "top": 304,
- "left": 579,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-105",
- "text": "105",
- "top": 99,
- "left": 515,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-106",
- "text": "106",
- "top": 124,
- "left": 515,
- "width": 62,
- "height": 34
- },{
- "type": "stn",
- "id": "site-107",
- "text": "107",
- "top": 160,
- "left": 515,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-108",
- "text": "108",
- "top": 186,
- "left": 515,
- "width": 62,
- "height": 42
- },{
- "type": "stn",
- "id": "site-109",
- "text": "109",
- "top": 231,
- "left": 515,
- "width": 62,
- "height": 70
- },{
- "type": "stn",
- "id": "site-110",
- "text": "110",
- "top": 304,
- "left": 515,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-111",
- "text": "111",
- "top": 329,
- "left": 515,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-1001",
- "text": "1001",
- "top": 99,
- "left": 451,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-1002",
- "text": "1002",
- "top": 160,
- "left": 451,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-1003",
- "text": "1003",
- "top": 231,
- "left": 451,
- "width": 62,
- "height": 23
- },{
- "type": "stn",
- "id": "site-1004",
- "text": "1004",
- "top": 304,
- "left": 451,
- "width": 62,
- "height": 23
- } ]
+ }]
}]
}]
}
\ No newline at end of file
--
Gitblit v1.9.1