#
Junjie
119 分钟以前 b6428016edf3de843020bc95fd1708d3bb1961e5
src/main/java/com/zy/core/cache/MessageQueue.java
@@ -1,6 +1,6 @@
package com.zy.core.cache;
import com.zy.core.Slave;
import com.zy.asrs.entity.DeviceConfig;
import com.zy.core.enums.SlaveType;
import com.zy.core.model.Task;
@@ -26,19 +26,19 @@
    /**
     * mq 交换机初始化
     */
    public static void init(SlaveType type, Slave slave) {
    public static void init(SlaveType type, DeviceConfig deviceConfig) {
        switch (type) {
            case Shuttle:
                SHUTTLE_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                SHUTTLE_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>());
                break;
            case ForkLift:
                FORK_LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                FORK_LIFT_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>());
                break;
            case ForkLiftMaster:
                FORK_LIFT_MASTER_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                FORK_LIFT_MASTER_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>());
                break;
            case Lift:
                LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                LIFT_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>());
                break;
            default:
                break;