fix(lastleg): restore fulfillment safeguards and reconcile return regressions

This commit is contained in:
2026-10-08 18:08:42 +08:00
parent c1ddb658bd
commit 3a9ee57e53
12 changed files with 409 additions and 770 deletions
@@ -94,7 +94,8 @@ class FleetTripPersistenceTest {
"ll_outbound_pallet_item", "ll_exception_order", "ll_exception_return_item", "ll_inventory_ledger", "ll_dispatch_pda_pick_order")) {
var match = Pattern.compile("(?s)CREATE TABLE(?: IF NOT EXISTS)? " + table + " \\(.*?;").matcher(schema);
assertThat(match.find()).as(table).isTrue();
jdbc.execute(match.group().replace(" JSON", " LONGTEXT"));
jdbc.execute(match.group().replace(" JSON", " LONGTEXT")
.replaceAll("\\((receipt_id|return_receipt_id|return_carton_id) IS NOT NULL\\)", "(CASE WHEN $1 IS NOT NULL THEN 1 ELSE 0 END)"));
}
var configuration = new MybatisConfiguration();
for (var mapper : List.of(DriverMapper.class, DriverHistoryMapper.class, VehicleMapper.class, FleetTripMapper.class, FleetResourceMapper.class,