From 91746a727df41f2f2ec6caa40cae10beabddecd7 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Thu, 20 Jun 2024 15:29:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=87=BA=E5=B7=AE?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8D=95=E6=95=B0=E6=8D=AE=E5=9B=9E=E4=BC=A0?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/chint/application/queryies/OrderQuery.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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);