Merge pull request 'demand: 柬埔寨快递漏组批次扫描准确性适应修改' (#142) from aike into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/142
This commit is contained in:
heyu 2025-08-04 14:48:30 +08:00
commit 6726c41c00

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());