This commit is contained in:
2026-09-14 15:51:52 +08:00
parent 13d2fe8e3a
commit f9fa859391
7 changed files with 19 additions and 11 deletions
@@ -206,7 +206,11 @@ public interface DropshipPalletizationMapper {
@Select("""
SELECT c.tenant_id,c.inbound_id,o.inbound_code,
COALESCE(NULLIF(o.destination_name,''),NULLIF(o.destination_code,''),'—') destination_warehouse,
CASE REPLACE(UPPER(COALESCE(o.destination_code,'')),'.','')
WHEN 'NJDF' THEN '纽约 NJDF'
WHEN 'CADF' THEN '洛杉矶 CADF'
ELSE REPLACE(COALESCE(NULLIF(o.destination_name,''),NULLIF(o.destination_code,''),'—'),'.','')
END destination_warehouse,
COUNT(DISTINCT c.id) carton_count,
SUM(COALESCE(q.item_quantity,c.actual_sku_quantity,0)) item_quantity
FROM fl_dropship_pallet_carton c
@@ -217,7 +221,11 @@ public interface DropshipPalletizationMapper {
GROUP BY c.tenant_id,c.inbound_id,o.inbound_code,o.destination_name,o.destination_code
UNION ALL
SELECT p.tenant_id,p.inbound_id,o.inbound_code,
COALESCE(NULLIF(o.destination_name,''),NULLIF(o.destination_code,''),'—') destination_warehouse,
CASE REPLACE(UPPER(COALESCE(o.destination_code,'')),'.','')
WHEN 'NJDF' THEN '纽约 NJDF'
WHEN 'CADF' THEN '洛杉矶 CADF'
ELSE REPLACE(COALESCE(NULLIF(o.destination_name,''),NULLIF(o.destination_code,''),'—'),'.','')
END destination_warehouse,
0 carton_count,0 item_quantity
FROM fl_dropship_pallet p
JOIN fl_inbound_order o ON o.id=p.inbound_id AND o.tenant_id=p.tenant_id