Merge pull request 'demand: 定时扫描漏组批次自测bug修改' (#51) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/51
This commit is contained in:
commit
0c687733ce
@ -523,20 +523,22 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是叶子节点,直接返回当前节点是否匹配
|
// 如果是叶子节点,返回当前节点的匹配结果
|
||||||
if (CollectionUtil.isEmpty(rule.getChildren())) {
|
if (CollectionUtil.isEmpty(rule.getChildren())) {
|
||||||
return currentMatch;
|
return currentMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查所有子节点,只要有一条路径匹配就返回true
|
// 检查所有子节点,记录所有匹配的节点
|
||||||
|
boolean allChildrenMatch = true;
|
||||||
for (EmisTransPlanRule childRule : rule.getChildren()) {
|
for (EmisTransPlanRule childRule : rule.getChildren()) {
|
||||||
if (checkRule(childRule, waybillBatches, list)) {
|
boolean childMatch = checkRule(childRule, waybillBatches, list);
|
||||||
return true;
|
if (!childMatch) {
|
||||||
|
allChildrenMatch = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果当前节点不匹配,或者所有子节点都不匹配,返回false
|
// 返回当前节点和所有子节点的匹配结果
|
||||||
return false;
|
return currentMatch && allChildrenMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setMissRecords(List<EmisTmsSiteBatchMiss> missRecords, EmisTransPlanRule rule,
|
private void setMissRecords(List<EmisTmsSiteBatchMiss> missRecords, EmisTransPlanRule rule,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user