贴标申请,仓储转运
This commit is contained in:
+25
-1
@@ -15,7 +15,8 @@ class DispatchCandidateMapperContractTest {
|
||||
"planNo", "orderType", "volumeWeightKg", "containerNo", "appointmentAt", "expectedLoadingAt",
|
||||
"overseasWarehouseId", "overseasWarehouseName", "orderNo", "orderRefs", "inboundCode", "palletNo",
|
||||
"destinationWarehouseId", "destinationWarehouseCode", "destinationWarehouseName", "fbaWarehouseCode",
|
||||
"packageCount", "volumeCbm", "sourceStage", "cartonMarks", "relabelCartonMarks"
|
||||
"packageCount", "volumeCbm", "sourceStage", "cartonMarks", "relabelCartonMarks",
|
||||
"destinationType", "deliveryAddress", "postalCode", "contactName", "contactPhone"
|
||||
);
|
||||
|
||||
@Test
|
||||
@@ -37,6 +38,29 @@ class DispatchCandidateMapperContractTest {
|
||||
assertTrue(sql.contains("pos.available_packages > 0"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void candidatesWithoutFbaWarehouseAreExcludedFromReadAndWriteQueries() throws Exception {
|
||||
for (Method method : List.of(
|
||||
DispatchCandidateMapper.class.getMethod("available", String.class, List.class, String.class,
|
||||
String.class, String.class, String.class),
|
||||
DispatchCandidateMapper.class.getMethod("lockSelected", String.class, List.class))) {
|
||||
String sql = String.join(" ", method.getAnnotation(Select.class).value());
|
||||
assertTrue(sql.contains("NULLIF(TRIM(l.fba_warehouse_code),'') IS NOT NULL"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void candidateKeywordSearchIncludesSourceInboundCode() throws Exception {
|
||||
Method available = DispatchCandidateMapper.class.getMethod("available", String.class, List.class,
|
||||
String.class, String.class, String.class, String.class);
|
||||
String availableSql = String.join(" ", available.getAnnotation(Select.class).value());
|
||||
assertTrue(availableSql.contains("o.order_no LIKE CONCAT('%',#{orderNo},'%') OR l.inbound_code LIKE CONCAT('%',#{orderNo},'%')"));
|
||||
|
||||
Method relabel = DispatchCandidateMapper.class.getMethod("relabelAvailable", String.class, String.class, String.class);
|
||||
String relabelSql = String.join(" ", relabel.getAnnotation(Select.class).value());
|
||||
assertTrue(relabelSql.contains("ri.source_inbound_code LIKE CONCAT('%',#{orderNo},'%')"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void candidateWarehouseComesFromPhysicalInventoryOrFrozenInboundPlan() throws Exception {
|
||||
for (Method method : List.of(
|
||||
|
||||
Reference in New Issue
Block a user