自动化立体仓库 - WMS系统
chen.llin
6 天以前 1815bcadb613f8951c02031176d2b54dcfa5a393
src/main/java/com/zy/common/properties/AgvProperties.java
@@ -39,6 +39,16 @@
    private WhsTypeMapping whsTypeMapping = new WhsTypeMapping();
    /**
     * 站点分配策略配置
     */
    private SiteAllocationStrategy siteAllocation = new SiteAllocationStrategy();
    /**
     * 库位前缀配置
     */
    private LocationPrefix locationPrefix = new LocationPrefix();
    /**
     * whs_type映射配置内部类
     */
    @Data
@@ -68,6 +78,11 @@
         * 站点列表
         */
        private List<String> stations = new ArrayList<>();
        /**
         * 侧边显示名称(用于日志和提示信息,如"东侧"、"西侧")
         */
        private String displayName = "";
    }
    /**
@@ -99,4 +114,57 @@
        return west != null && west.getRobotGroup() != null && !west.getRobotGroup().isEmpty() 
            ? west.getRobotGroup() : "Group-002";
    }
    /**
     * 获取东侧显示名称
     */
    public String getEastDisplayName() {
        return east != null && east.getDisplayName() != null && !east.getDisplayName().isEmpty()
            ? east.getDisplayName() : "东侧";
    }
    /**
     * 获取西侧显示名称
     */
    public String getWestDisplayName() {
        return west != null && west.getDisplayName() != null && !west.getDisplayName().isEmpty()
            ? west.getDisplayName() : "西侧";
    }
    /**
     * 站点分配策略配置内部类
     */
    @Data
    public static class SiteAllocationStrategy {
        /**
         * 分配策略类型
         * round-robin: 轮询分配(平均分配)
         * least-task: 最少任务优先(默认)
         * random: 随机分配
         */
        private String strategy = "least-task";
        /**
         * 是否启用平均分配
         * true: 当多个站点任务数相同时,使用轮询分配
         * false: 总是选择第一个(任务最少的)
         */
        private boolean enableRoundRobin = true;
    }
    /**
     * 库位前缀配置内部类
     */
    @Data
    public static class LocationPrefix {
        /**
         * CA前缀:只做入库的库位前缀(默认"CA")
         */
        private String inboundOnly = "CA";
        /**
         * WA前缀:会被出库分配缓存区的库位前缀(默认"WA")
         */
        private String cacheArea = "WA";
    }
}