demand: 定时扫描漏组批次自测bug修改
committer: heyu
This commit is contained in:
parent
b5d9c982e3
commit
0fab01cd67
@ -508,7 +508,7 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
|
||||
private boolean checkRule(EmisTransPlanRule rule, List<EmisTmsSiteBatch> waybillBatches,
|
||||
List<EmisTransPlanRule> list) {
|
||||
List<EmisTransPlanRule> list) {
|
||||
// 检查当前节点是否匹配
|
||||
boolean currentMatch = false;
|
||||
for (EmisTmsSiteBatch batch : waybillBatches) {
|
||||
@ -523,20 +523,22 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
}
|
||||
|
||||
// 如果是叶子节点,直接返回当前节点是否匹配
|
||||
// 如果是叶子节点,返回当前节点的匹配结果
|
||||
if (CollectionUtil.isEmpty(rule.getChildren())) {
|
||||
return currentMatch;
|
||||
}
|
||||
|
||||
// 检查所有子节点,只要有一条路径匹配就返回true
|
||||
// 检查所有子节点,记录所有匹配的节点
|
||||
boolean allChildrenMatch = true;
|
||||
for (EmisTransPlanRule childRule : rule.getChildren()) {
|
||||
if (checkRule(childRule, waybillBatches, list)) {
|
||||
return true;
|
||||
boolean childMatch = checkRule(childRule, waybillBatches, list);
|
||||
if (!childMatch) {
|
||||
allChildrenMatch = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果当前节点不匹配,或者所有子节点都不匹配,返回false
|
||||
return false;
|
||||
// 返回当前节点和所有子节点的匹配结果
|
||||
return currentMatch && allChildrenMatch;
|
||||
}
|
||||
|
||||
private void setMissRecords(List<EmisTmsSiteBatchMiss> missRecords, EmisTransPlanRule rule,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user