feat(fleet): bind quote versions and reconcile actual return quantities

This commit is contained in:
2026-10-03 13:32:55 +08:00
parent cb6c54ffe5
commit a6fd0ba3c5
60 changed files with 1363 additions and 75 deletions
@@ -20,11 +20,15 @@ class Phase5ExceptionVisitSchemaContractTest {
assertThat(normalized).contains(
"ll_exception_order(",
"UNIQUEKEYuk_ll_exception_no(customer_id,exception_no)",
"UNIQUEKEYuk_ll_exception_delivery_return(customer_id,delivery_order_id,exception_type)",
"KEYidx_ll_exception_delivery_return(customer_id,delivery_order_id,exception_type)",
"return_context_jsonJSONNULL",
"received_packagesBIGINTNOTNULLDEFAULT0",
"CHECK(received_packages>=0ANDreceived_packages<=approved_return_packages)",
"KEYidx_ll_exception_inbound(customer_id,inbound_code)",
"ll_customer_visit(",
"UNIQUEKEYuk_ll_customer_visit_delivery(customer_id,delivery_order_id)",
"KEYidx_ll_customer_visit_list(customer_id,status,delivery_completed_at)");
assertThat(normalized).doesNotContain("UNIQUEKEYuk_ll_exception_delivery_return");
assertThat(sql).contains(
"COMMENT='海外仓异常订单'",
"COMMENT='派送单维度客户回访记录'");
@@ -42,7 +42,8 @@ class Phase5OverseasUpgradeSqlContractTest {
"customer_id", "outbound_type", "lx_codes", "request_hash");
assertThat(createStatement(overseas, "ll_outbound_pallet_item")).contains("picked_package_count");
assertThat(createStatement(overseas, "ll_delivery_order")).contains(
"customer_id", "overseas_warehouse_name", "waybill_no");
"customer_id", "overseas_warehouse_name", "waybill_no", "signed_packages");
assertThat(normalized).contains("check(signed_packagesisnullor(signed_packages>=0andsigned_packages<=package_count))");
assertThat(createStatement(overseas, "ll_dropship_order_profile")).contains(
"source_pallet_no", "manifest_version", "manifest_package_count",
"manifest_fragment_count", "manifest_hash");