fix: 修复提交时,会创建临时单号的bug

This commit is contained in:
lulz1 2024-06-24 09:42:26 +08:00
parent 1a0e4c65c1
commit 286aad6c14
2 changed files with 5 additions and 4 deletions

View File

@ -324,8 +324,6 @@ public class OrderQuery {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter simpleFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter simpleFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// RouteOrder routeOrder = routeRepository.findByFakeOrderNoAndSysCode(queryData.getBillcode(), queryData.getSysCode())
// .reloadStatus();
String sysCode = queryData.getSysCode(); String sysCode = queryData.getSysCode();
String fakeOrderNo = queryData.getFakeOrderNo(); String fakeOrderNo = queryData.getFakeOrderNo();
@ -337,8 +335,9 @@ public class OrderQuery {
routeOrder = routeRepository.queryById(queryData.getRouteId()); routeOrder = routeRepository.queryById(queryData.getRouteId());
} }
// 这里查询出来的订单需要保存它的状态 if(routeOrder != null){
routeRepository.saveTempRouteOrder(routeOrder,24L); routeOrder.reloadStatus();
}
List<Location> locationList = new ArrayList<>(); List<Location> locationList = new ArrayList<>();
User currentUser = userHttpRequest.loadUserInfo( User currentUser = userHttpRequest.loadUserInfo(

View File

@ -78,6 +78,8 @@ public class RouteOrderFactory implements OrderFactory {
approveOrderNo.setAccountCompanyName(currentUser.getCompanyName()); approveOrderNo.setAccountCompanyName(currentUser.getCompanyName());
routeOrder.setApproveOrderNo(approveOrderNo); routeOrder.setApproveOrderNo(approveOrderNo);
routeOrder.setBookingTime(LocalDateTime.now()); routeOrder.setBookingTime(LocalDateTime.now());
routeOrder.setCreateTime(LocalDateTime.now());
routeOrder.setUpdateTime(LocalDateTime.now());
return routeOrder; return routeOrder;
} }