自动化立体仓库 - WMS系统
*
lsh
3 天以前 bbf11a79fce0131aa95905c09b00f25e7696d20b
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();
        }
        // 尝试放入物品