小bug修复---站台不可用站台未停止分配

This commit is contained in:
梁州 2025-05-08 15:59:45 +08:00
parent 7a3090d752
commit ff5fc6c92d

View File

@ -677,9 +677,14 @@ public class WorkServiceImplements implements IWorkService {
List<Stand> usablePickStands = allPickStands.stream().filter(stand -> stand.getStandStatus() == 0).toList();
if (usablePickStands.size() != allPickStands.size()) {
logger.info("站台未全部释放,不执行分配。");
return;
}
// 映射出站台号
List<String> standIds = usablePickStands.stream().map(Stand::getStandId).distinct().toList();
if (standIds.isEmpty()) {
logger.info("没有站台能够分配,不执行分配。");
return;
}
// 查询出所有的工作流
List<WorkFlow> allCurrentWorks = workFlowService.list();
// 查询这些站台是否已经分配了工作
@ -740,7 +745,8 @@ public class WorkServiceImplements implements IWorkService {
.eq(ETagLocation::getELocationStatus, 0)
.orderByAsc(ETagLocation::getSequenceId));
// 获取已经添加的电子标签库位分配
List<ELocationConfig> oldELocationConfigs = eLocationConfigService.list();
List<ELocationConfig> oldELocationConfigs = eLocationConfigService.list(new LambdaQueryWrapper<ELocationConfig>()
.in(ELocationConfig::getWorkStation, standIds));
if (oldELocationConfigs != null && !oldELocationConfigs.isEmpty()) {
logger.info("存在旧的标签配置,不执行分配。");
return;