fix(firstleg): retain dropship carton label pool

This commit is contained in:
2026-08-25 15:07:06 +08:00
parent 39988cbaa5
commit e815abcbd7
2 changed files with 6 additions and 1 deletions
@@ -67,7 +67,7 @@ public interface LoadingCompletedEventMapper {
AND a.allocation_status IN ('CONFIRMED','TRANSFERRED','RELEASED')
AND a.picked_package_count > 0
LEFT JOIN fl_inbound_carton_label label
ON label.tenant_id = i.account_id AND label.inbound_id = i.inbound_id
ON label.tenant_id = i.account_id
AND label.inbound_detail_id = i.inbound_detail_id AND label.batch_status = 'ACTIVE'
WHERE i.loading_plan_id = #{planId} AND i.deleted = 0
ORDER BY i.account_id, i.inbound_id, a.allocation_no,
@@ -157,6 +157,11 @@ class LoadingCompletedOutboxServiceTest {
.doesNotContain("'PENDING'")
.doesNotContain("'PICKING'");
}
assertThat(palletsSql)
.contains("label.tenant_id = i.account_id")
.contains("label.inbound_detail_id = i.inbound_detail_id")
.contains("label.batch_status = 'ACTIVE'")
.doesNotContain("label.inbound_id = i.inbound_id");
}
@Test void publishesDropshipPalletSkuAndCartonSnapshots() throws Exception {