Browse Source

推送的时候不拦截共享托盘

master
常熟吴彦祖 11 hours ago
parent
commit
84bdf75a18
  1. 2
      src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnIssueNotifyPushTransactionServiceImpl.java
  2. 38
      src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java

2
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<String, Integer> palletSeqMap = new LinkedHashMap<String, Integer>(); Map<String, Integer> palletSeqMap = new LinkedHashMap<String, Integer>();
int nextSeq = 1; int nextSeq = 1;
for (String palletId : pushMaterialData.palletMaterials.keySet()) { for (String palletId : pushMaterialData.palletMaterials.keySet()) {

38
src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java

@ -424,21 +424,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti
rows.addAll(sourceRows); rows.addAll(sourceRows);
} }
// 按itemNo建立订单索引,申请单允许一个领料单包含多个订单号 - rqrq
// 先识别同一托盘是否被多个订单共同匹配,无法拆分时阻断相关订单 - rqrq
Map<String, Set<String>> palletOwners = new LinkedHashMap<String, Set<String>>();
for (HaiAnInventoryMatchResult row : new ArrayList<HaiAnInventoryMatchResult>(rows)) {
if (isMatchedEvent(row) && StringUtils.isNotBlank(row.getPalletId()) && row.getItemNo() != null) {
String palletId = row.getPalletId().trim();
Set<String> owners = palletOwners.get(palletId);
if (owners == null) {
owners = new LinkedHashSet<String>();
palletOwners.put(palletId, owners);
}
owners.add(itemKey(row.getItemNo()));
}
}
// 同一托盘匹配多个订单不再拦截,库存完整且区域有效的订单仍可进入可推送清单。- rqrq
int completeCount = 0; int completeCount = 0;
int pushableCount = 0; int pushableCount = 0;
int specifiedBlockedCount = 0; int specifiedBlockedCount = 0;
@ -484,24 +470,6 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti
orderRows.add(targetFailure); orderRows.add(targetFailure);
targetAreaFailureCount++; targetAreaFailureCount++;
} }
boolean sharedPallet = false;
String sharedPalletId = null;
for (HaiAnInventoryMatchResult row : orderRows) {
if (isMatchedEvent(row) && StringUtils.isNotBlank(row.getPalletId())) {
Set<String> 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()); int existingTaskCount = haiAnSearchIssureNotifyMapper.countExistingIssueTask(site, notifyNo, order.getItemNo());
boolean alreadyPushed = "Y".equalsIgnoreCase(StringUtils.defaultString(order.getPushWmsFlag()).trim()); boolean alreadyPushed = "Y".equalsIgnoreCase(StringUtils.defaultString(order.getPushWmsFlag()).trim());
if (existingTaskCount > 0 || alreadyPushed) { if (existingTaskCount > 0 || alreadyPushed) {
@ -522,7 +490,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti
if (!inventoryComplete) { if (!inventoryComplete) {
shortageCount++; shortageCount++;
} }
boolean pushable = complete && targetAreaValid && !sharedPallet && existingTaskCount == 0 && !alreadyPushed;
boolean pushable = complete && targetAreaValid && existingTaskCount == 0 && !alreadyPushed;
if (pushable) { if (pushable) {
pushableCount++; pushableCount++;
String orderKey = itemKey(order.getItemNo()); String orderKey = itemKey(order.getItemNo());
@ -599,7 +567,7 @@ public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNoti
} }
} }
// 将目标区域、已推送、共享托盘等订单级失败挂回物料汇总行,否则页面只看到数量满足但看不到按钮禁用原因 - rqrq
// 将目标区域、已推送等订单级失败挂回物料汇总行,否则页面只看到数量满足但看不到按钮禁用原因 - rqrq
applyOrderFailureToMaterialRow(materialRow, summary.getItemNo(), sourceRows); applyOrderFailureToMaterialRow(materialRow, summary.getItemNo(), sourceRows);
materialRow.setMatchedSerialNos(joinSerialNos(materialSerialNos)); materialRow.setMatchedSerialNos(joinSerialNos(materialSerialNos));

Loading…
Cancel
Save