贴标申请,仓储转运

This commit is contained in:
2026-09-17 17:37:29 +08:00
parent 3b8b6f5aa2
commit 29f05b7b09
106 changed files with 5019 additions and 471 deletions
@@ -25,6 +25,16 @@ public class PalletLabelPrintService {
private String internalToken;
public ResponseEntity<byte[]> print(long warehouseId, long palletId, String requestId) {
return print(warehouseId, palletId, requestId, "PALLET");
}
public ResponseEntity<byte[]> printTransfer(long warehouseId, long palletId, String transferNo,
String requestId) {
String reference = transferNo == null || transferNo.isBlank() ? "转运单" : "转运单 " + transferNo.trim();
return print(warehouseId, palletId, requestId, reference);
}
private ResponseEntity<byte[]> print(long warehouseId, long palletId, String requestId, String reference) {
var pallet = resources.pallet(WarehouseResourceService.PUBLIC_RESOURCE_SCOPE, warehouseId, palletId);
String code = pallet.getPalletCode();
String fbaCode = pallet.getFbaWarehouseCode();
@@ -37,8 +47,9 @@ public class PalletLabelPrintService {
}
var warehouse = warehouses.required(warehouseId);
String fileName = code.replaceAll("[\\\\/:*?\"<>|]", "-") + "-托盘码.pdf";
var label = new PrintPdfClient.Label(code, fbaCode == null || fbaCode.isBlank() ? "—" : fbaCode,
"PALLET", warehouse.warehouseName(), code);
var label = new PrintPdfClient.Label(code,
fbaCode == null || fbaCode.isBlank() ? "目的仓待定" : fbaCode,
reference, warehouse.warehouseName(), code);
var request = new PrintPdfClient.Request("INBOUND_MARK_V1",
new PrintPdfClient.PageSpec(new BigDecimal("100"), new BigDecimal("100")), fileName, List.of(label));
try {