#
Junjie
1 天以前 9af70943c966b0c74dcd735217ff18c9d7564221
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;