34 lines
1.7 KiB
Java
34 lines
1.7 KiB
Java
package com.baiyue.warehouse.client;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.util.List;
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
|
/** Reuses the Print service's existing label renderer; no local PDF template. */
|
|
@FeignClient(name = "print-service", contextId = "overseasWarehousePrintPdfClient",
|
|
url = "${baiyue.clients.print.url:}", path = "/internal/print/v1/pdfs")
|
|
public interface PrintPdfClient {
|
|
@PostMapping(value = "/fba-pallet-labels", consumes = "application/json")
|
|
ResponseEntity<byte[]> generateFbaPalletLabels(
|
|
@RequestHeader("X-Internal-Service-Token") String token,
|
|
@RequestHeader(value = "X-Request-Id", required = false) String requestId,
|
|
@RequestBody FbaPalletRequest request);
|
|
|
|
record FbaPalletRequest(String templateCode, PageSpec pageSpec, String downloadFileName, List<FbaPalletLabel> labels) {}
|
|
record FbaPalletLabel(String fbaWarehouseCode, String palletCode) {}
|
|
|
|
@PostMapping(value = "/inbound-marks", consumes = "application/json")
|
|
ResponseEntity<byte[]> generateInboundMarks(
|
|
@RequestHeader("X-Internal-Service-Token") String token,
|
|
@RequestHeader(value = "X-Request-Id", required = false) String requestId,
|
|
@RequestBody Request request);
|
|
|
|
record Request(String templateCode, PageSpec pageSpec, String downloadFileName, List<Label> labels) {}
|
|
record PageSpec(BigDecimal widthMm, BigDecimal heightMm) {}
|
|
record Label(String topCode, String warehouseText, String cartonText, String routeText, String qrContent) {}
|
|
}
|