自动化立体仓库 - WMS系统
#1
lsh
7 天以前 787f65595a4fcd9ff00ab4ed72c630ccfe7b8146
src/main/java/com/zy/asrs/utils/MultiLockerOptimizerUtils.java
@@ -1,4 +1,7 @@
package com.zy.asrs.utils;
import com.core.common.SnowflakeIdWorker;
import com.core.common.SpringUtils;
import java.util.*;
public class MultiLockerOptimizerUtils {
@@ -33,12 +36,19 @@
    static class Locker {
        int id;
        double remainingSpace;
        long bindingTags;
        Map<String, Integer> contents;
        Set<String> itemTypes;
        public Locker(int id) {
            this.id = id;
            this.remainingSpace = 1.0;
            this.contents = new HashMap<>();
            this.itemTypes = new HashSet<>();
            SnowflakeIdWorker snowflakeIdWorker = SpringUtils.getBean(SnowflakeIdWorker.class);
//            this.bindingTags = System.currentTimeMillis();
            this.bindingTags = snowflakeIdWorker.nextId();
        }
        // 尝试放入物品