feat(firstleg): expose loading item tax mode
This commit is contained in:
@@ -177,6 +177,8 @@ public final class LoadingListDtos {
|
||||
Long itemId,
|
||||
Long accountId,
|
||||
String customerName,
|
||||
String customsTaxMode,
|
||||
Boolean taxRefundFlag,
|
||||
Long orderId,
|
||||
String orderNo,
|
||||
Long inboundId,
|
||||
|
||||
@@ -168,7 +168,14 @@ public interface LoadingListQueryMapper {
|
||||
@Param("operatorName") String operatorName);
|
||||
|
||||
@Select("""
|
||||
SELECT i.id AS item_id, i.account_id, i.customer_name, i.order_id, i.order_no,
|
||||
SELECT i.id AS item_id, i.account_id, i.customer_name,
|
||||
inbound.tax_mode AS customs_tax_mode,
|
||||
CASE inbound.tax_mode
|
||||
WHEN 'TAX_REFUND' THEN TRUE
|
||||
WHEN 'BUY_DECLARATION' THEN FALSE
|
||||
ELSE NULL
|
||||
END AS tax_refund_flag,
|
||||
i.order_id, i.order_no,
|
||||
i.inbound_id, i.inbound_detail_id, i.inbound_code, b.container_no,
|
||||
i.sku_code, i.destination_warehouse_name, i.product_name_zh,
|
||||
product_name_en, product_image_url, i.package_count,
|
||||
@@ -409,6 +416,8 @@ public interface LoadingListQueryMapper {
|
||||
private Long itemId;
|
||||
private Long accountId;
|
||||
private String customerName;
|
||||
private String customsTaxMode;
|
||||
private Boolean taxRefundFlag;
|
||||
private Long orderId;
|
||||
private String orderNo;
|
||||
private Long inboundId;
|
||||
|
||||
@@ -184,7 +184,8 @@ public class LoadingListRepository {
|
||||
|
||||
private List<Item> items(List<ItemRow> rows) {
|
||||
return rows.stream().map(row -> new Item(row.getItemId(), row.getAccountId(), row.getCustomerName(),
|
||||
row.getOrderId(), row.getOrderNo(), row.getInboundId(), row.getInboundDetailId(),
|
||||
row.getCustomsTaxMode(), row.getTaxRefundFlag(), row.getOrderId(), row.getOrderNo(),
|
||||
row.getInboundId(), row.getInboundDetailId(),
|
||||
row.getInboundCode(), row.getContainerNo(), row.getSkuCode(),
|
||||
row.getDestinationWarehouseName(), row.getProductNameZh(), row.getProductNameEn(),
|
||||
row.getProductImageUrl(), integer(row.getPackageCount()), integer(row.getPalletCount()),
|
||||
|
||||
@@ -361,6 +361,8 @@ components:
|
||||
itemId: {$ref: '#/components/schemas/LongId'}
|
||||
accountId: {$ref: '#/components/schemas/LongId'}
|
||||
customerName: {type: string, nullable: true, description: 客户名称快照}
|
||||
customsTaxMode: {type: string, enum: [TAX_REFUND, BUY_DECLARATION], nullable: true, description: 订单/入仓片段冻结的报关方式;不根据退税文件推断}
|
||||
taxRefundFlag: {type: boolean, nullable: true, description: customsTaxMode为TAX_REFUND时为true、BUY_DECLARATION时为false;缺少权威事实时为null}
|
||||
orderId: {$ref: '#/components/schemas/LongId'}
|
||||
orderNo: {type: string, description: 订单号快照}
|
||||
inboundId: {$ref: '#/components/schemas/LongId'}
|
||||
|
||||
Reference in New Issue
Block a user