优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user