diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index 818a0123..133e6784 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -326,8 +326,16 @@ public class OrderQuery { DateTimeFormatter simpleFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); // RouteOrder routeOrder = routeRepository.findByFakeOrderNoAndSysCode(queryData.getBillcode(), queryData.getSysCode()) // .reloadStatus(); - RouteOrder routeOrder = routeRepository.queryById(queryData.getRouteId()) - .reloadStatus(); + + String sysCode = queryData.getSysCode(); + String fakeOrderNo = queryData.getFakeOrderNo(); + RouteOrder routeOrder = null; + if (fakeOrderNo != null && sysCode != null) { + routeOrder = routeRepository.findTempRouteOrderBySysCodeAndBillCode(sysCode, fakeOrderNo); + } + if (routeOrder == null) { + routeOrder = routeRepository.queryById(queryData.getRouteId()); + } // 这里查询出来的订单,需要保存它的状态 routeRepository.save(routeOrder);