fix: 修复出差申请单数据回传的bug

This commit is contained in:
lulz1 2024-06-20 15:29:12 +08:00
parent a62de4dc4a
commit 91746a727d
1 changed files with 10 additions and 2 deletions

View File

@ -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);