fix: isolate legacy from shadow admission errors

This commit is contained in:
zgw
2026-09-03 17:49:55 +08:00
parent 81888f5150
commit c8fa9f767f
4 changed files with 58 additions and 3 deletions

View File

@@ -419,7 +419,7 @@ public class ToWmsServiceImpl implements IToWmsService {
InboundShadowCompletion shadowCompletion = InboundShadowCompletion.rejected();
try {
shadowCompletion = shadowObservationGateway.observeInbound(taskNo, inJob.getTrayCode());
} catch (RuntimeException exception) {
} catch (RuntimeException | Error exception) {
// Shadow admission is best-effort; Legacy continues unchanged.
}
try {

View File

@@ -258,7 +258,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
private OutboundShadowCompletion observeProjectOutboundShadow(String stockoutDetailId) {
try {
return shadowObservationGateway.observeProjectOutbound(stockoutDetailId);
} catch (RuntimeException exception) {
} catch (RuntimeException | Error exception) {
return OutboundShadowCompletion.rejected();
}
}
@@ -266,7 +266,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
private OutboundShadowCompletion observeExactStockOutboundShadow(String stockoutDetailId, String stockId) {
try {
return shadowObservationGateway.observeExactStockOutbound(stockoutDetailId, stockId);
} catch (RuntimeException exception) {
} catch (RuntimeException | Error exception) {
return OutboundShadowCompletion.rejected();
}
}