This commit is contained in:
2026-09-20 15:49:29 +08:00
parent 75c2bd092f
commit 0dec690235
3 changed files with 34 additions and 1 deletions
@@ -52,4 +52,17 @@ public class IamCustomerSnapshotService {
throw new BizException(ResultCode.SERVICE_UNAVAILABLE, "客户主数据服务暂不可用");
}
}
/**
* 打印托盘信息单时客户昵称属于展示字段,客户资料尚未补全不应阻断 PDF 生成。
* 下游服务不可用等基础设施错误仍然向上抛出,避免静默生成不完整数据。
*/
public String customerNicknameForPrint(long customerId) {
try {
return customerNickname(customerId);
} catch (BizException exception) {
if (exception.getResultCode() == ResultCode.CONFLICT) return "—";
throw exception;
}
}
}
@@ -163,7 +163,7 @@ public class InboundCartonLabelPrintService {
List<PrintPdfClient.DropshipPalletInboundRow> inboundRows = inboundFacts.stream()
.map(row -> new PrintPdfClient.DropshipPalletInboundRow(
row.getInboundCode(),
customerNicknameCache.computeIfAbsent(row.getTenantId(), customerSnapshots::customerNickname),
customerNicknameCache.computeIfAbsent(row.getTenantId(), customerSnapshots::customerNicknameForPrint),
number(row.getCartonCount()), number(row.getItemQuantity())))
.toList();
String destinationWarehouse = inboundFacts.stream()