zjj
2025-03-25 3920895dadb73afafb02c979d6db59e310877534
删除CommandUtils
4个文件已修改
292 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/CrnController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/SiteController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/wcs/js/console.map.js 269 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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("命令下发失败");
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 {
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("输送线命令生成失败");
        }
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
            } ]
            }]
        }]
    }]
}