| | |
| | | private WhsTypeMapping whsTypeMapping = new WhsTypeMapping(); |
| | | |
| | | /** |
| | | * 站点分配策略配置 |
| | | */ |
| | | private SiteAllocationStrategy siteAllocation = new SiteAllocationStrategy(); |
| | | |
| | | /** |
| | | * whs_type映射配置内部类 |
| | | */ |
| | | @Data |
| | |
| | | return west != null && west.getRobotGroup() != null && !west.getRobotGroup().isEmpty() |
| | | ? west.getRobotGroup() : "Group-002"; |
| | | } |
| | | |
| | | /** |
| | | * 站点分配策略配置内部类 |
| | | */ |
| | | @Data |
| | | public static class SiteAllocationStrategy { |
| | | /** |
| | | * 分配策略类型 |
| | | * round-robin: 轮询分配(平均分配) |
| | | * least-task: 最少任务优先(默认) |
| | | * random: 随机分配 |
| | | */ |
| | | private String strategy = "least-task"; |
| | | |
| | | /** |
| | | * 是否启用平均分配 |
| | | * true: 当多个站点任务数相同时,使用轮询分配 |
| | | * false: 总是选择第一个(任务最少的) |
| | | */ |
| | | private boolean enableRoundRobin = true; |
| | | } |
| | | } |