demand: 柬埔寨快递漏组批次扫描准确性适应修改

committer: heyu
This commit is contained in:
aike 2025-08-04 14:47:11 +08:00
parent a7cc7d4eb5
commit 596c62beb7

View File

@ -5027,12 +5027,35 @@ public class EmisBaseService {
String key = ruleItem.getStartSiteCode() + "_" + ruleItem.getNextSiteCode();
groupMap.computeIfAbsent(key, k -> new ArrayList<>()).add(ruleItem);
}
boolean isGroupMatch = false;
for (List<EmisTransPlanRule> group : groupMap.values()) {
// 判断该组是否有匹配
boolean matched = group.stream().anyMatch(levelRule -> filterRules.stream().anyMatch(
filterRule -> Objects.equals(filterRule.getStartSiteCode(), levelRule.getStartSiteCode()) &&
Objects.equals(filterRule.getNextSiteCode(), levelRule.getNextSiteCode()) &&
compareSupplierCodes(filterRule.getSupplierCode(), levelRule.getSupplierCode())));
if (matched) {
isGroupMatch = true;
if (group.get(0).getChildren() == null) {
return;
}
break;
}
}
if (isGroupMatch) {
continue;
}
for (List<EmisTransPlanRule> group : groupMap.values()) {
// 判断该组是否有匹配
boolean matched = group.stream().anyMatch(levelRule -> filterRules.stream().anyMatch(
filterRule -> Objects.equals(filterRule.getStartSiteCode(), levelRule.getStartSiteCode()) &&
Objects.equals(filterRule.getNextSiteCode(), levelRule.getNextSiteCode()) &&
compareSupplierCodes(filterRule.getSupplierCode(), levelRule.getSupplierCode())));
if (matched && group.get(0).getChildren() == null) {
return;
}
if (!matched && !group.isEmpty()) {
// if (CollectionUtil.isNotEmpty(missRecords)) {
// List<EmisTmsSiteBatchMiss> list = missRecords.stream().filter(i -> waybill.getBillCode().equals(i.getBillCode())).collect(Collectors.toList());