Merge pull request 'demand: TMS-运输管理-漏组批次扫描-针对缅甸快递进口漏组判断不准确问题修复' (#160) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/160
This commit is contained in:
heyu 2025-08-19 13:07:51 +08:00
commit 6794deacba

View File

@ -4911,6 +4911,10 @@ public class EmisBaseService {
&& !batch.getEtd().before(firstLevelRule.getStartDate())) { && !batch.getEtd().before(firstLevelRule.getStartDate())) {
firstLevelMatch = true; firstLevelMatch = true;
list.add(firstLevelRule); list.add(firstLevelRule);
// 收集当前第一级节点的所有子节点到第二级集合中
if (!CollectionUtil.isEmpty(firstLevelRule.getChildren())) {
secondLevelRules.addAll(firstLevelRule.getChildren());
}
break; break;
} }
} }
@ -4919,10 +4923,6 @@ public class EmisBaseService {
hasFirstLevelMatch = true; hasFirstLevelMatch = true;
} }
// 收集当前第一级节点的所有子节点到第二级集合中
if (!CollectionUtil.isEmpty(firstLevelRule.getChildren())) {
secondLevelRules.addAll(firstLevelRule.getChildren());
}
} }
// 如果第二级为空,说明已经到底了,返回当前节点匹配且第一级至少有一个匹配的结果 // 如果第二级为空,说明已经到底了,返回当前节点匹配且第一级至少有一个匹配的结果
@ -4946,6 +4946,10 @@ public class EmisBaseService {
&& !batch.getEtd().before(secondLevelRule.getStartDate())) { && !batch.getEtd().before(secondLevelRule.getStartDate())) {
secondLevelMatch = true; secondLevelMatch = true;
list.add(secondLevelRule); list.add(secondLevelRule);
// 收集当前第二级节点的所有子节点到第三级集合中
if (!CollectionUtil.isEmpty(secondLevelRule.getChildren())) {
thirdLevelRules.addAll(secondLevelRule.getChildren());
}
break; break;
} }
} }
@ -4954,10 +4958,6 @@ public class EmisBaseService {
hasSecondLevelMatch = true; hasSecondLevelMatch = true;
} }
// 收集当前第二级节点的所有子节点到第三级集合中
if (!CollectionUtil.isEmpty(secondLevelRule.getChildren())) {
thirdLevelRules.addAll(secondLevelRule.getChildren());
}
} }
// 递归处理下一级,并收集结果 // 递归处理下一级,并收集结果