diff --git a/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnIssueNotifyPushTransactionServiceImpl.java b/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnIssueNotifyPushTransactionServiceImpl.java index ad1422b1..069ca12e 100644 --- a/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnIssueNotifyPushTransactionServiceImpl.java +++ b/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnIssueNotifyPushTransactionServiceImpl.java @@ -131,7 +131,7 @@ public class HaiAnIssueNotifyPushTransactionServiceImpl implements HaiAnIssueNot } } - // 原子更新本订单涉及的托盘调用标识,共享托盘在预览阶段已阻断,确认阶段仍需再次校验 - rqrq + // 原子更新本订单涉及的托盘调用标识。共享托盘不再提前拦截,calling_flag 已是 Y 时本订单回滚。- rqrq Map palletSeqMap = new LinkedHashMap(); int nextSeq = 1; for (String palletId : pushMaterialData.palletMaterials.keySet()) { diff --git a/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java b/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java index 596108c7..34d13395 100644 --- a/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java +++ b/src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java @@ -424,21 +424,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti rows.addAll(sourceRows); } - // 按itemNo建立订单索引,申请单允许一个领料单包含多个订单号 - rqrq - // 先识别同一托盘是否被多个订单共同匹配,无法拆分时阻断相关订单 - rqrq - Map> palletOwners = new LinkedHashMap>(); - for (HaiAnInventoryMatchResult row : new ArrayList(rows)) { - if (isMatchedEvent(row) && StringUtils.isNotBlank(row.getPalletId()) && row.getItemNo() != null) { - String palletId = row.getPalletId().trim(); - Set owners = palletOwners.get(palletId); - if (owners == null) { - owners = new LinkedHashSet(); - palletOwners.put(palletId, owners); - } - owners.add(itemKey(row.getItemNo())); - } - } - + // 同一托盘匹配多个订单不再拦截,库存完整且区域有效的订单仍可进入可推送清单。- rqrq int completeCount = 0; int pushableCount = 0; int specifiedBlockedCount = 0; @@ -484,24 +470,6 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti orderRows.add(targetFailure); targetAreaFailureCount++; } - boolean sharedPallet = false; - String sharedPalletId = null; - for (HaiAnInventoryMatchResult row : orderRows) { - if (isMatchedEvent(row) && StringUtils.isNotBlank(row.getPalletId())) { - Set owners = palletOwners.get(row.getPalletId().trim()); - if (owners != null && owners.size() > 1) { - sharedPallet = true; - sharedPalletId = row.getPalletId().trim(); - break; - } - } - } - if (sharedPallet) { - HaiAnInventoryMatchResult sharedFailure = createFailureRow(order, "SHARED_PALLET_CONFLICT", "托盘" + sharedPalletId + "同时匹配多个订单,无法安全拆分调用", "PUSH_CHECK"); - enrichOrderFields(sharedFailure, order, area); - rows.add(sharedFailure); - orderRows.add(sharedFailure); - } int existingTaskCount = haiAnSearchIssureNotifyMapper.countExistingIssueTask(site, notifyNo, order.getItemNo()); boolean alreadyPushed = "Y".equalsIgnoreCase(StringUtils.defaultString(order.getPushWmsFlag()).trim()); if (existingTaskCount > 0 || alreadyPushed) { @@ -522,7 +490,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti if (!inventoryComplete) { shortageCount++; } - boolean pushable = complete && targetAreaValid && !sharedPallet && existingTaskCount == 0 && !alreadyPushed; + boolean pushable = complete && targetAreaValid && existingTaskCount == 0 && !alreadyPushed; if (pushable) { pushableCount++; String orderKey = itemKey(order.getItemNo()); @@ -599,7 +567,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti } } - // 将目标区域、已推送、共享托盘等订单级失败挂回物料汇总行,否则页面只看到数量满足但看不到按钮禁用原因 - rqrq + // 将目标区域、已推送等订单级失败挂回物料汇总行,否则页面只看到数量满足但看不到按钮禁用原因 - rqrq applyOrderFailureToMaterialRow(materialRow, summary.getItemNo(), sourceRows); materialRow.setMatchedSerialNos(joinSerialNos(materialSerialNos));