修复火车状态没有变更的问题

This commit is contained in:
lulz1 2024-03-17 23:54:03 +08:00
parent 821e4815ca
commit a353622442
2 changed files with 14 additions and 7 deletions

View File

@ -408,16 +408,23 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
changeItem = changeInfo.getChangeItem();
}
OrderDetail orderDetail = orderDetailRepository.findByOrderNo(trainDetailData.getOrderNo())
.orElseThrow(() -> new NotFoundException(NOT_FOUND));
Optional<OrderDetail> byOrderNo = orderDetailRepository.findByOrderNo(trainDetailData.getOrderNo());
TrainOrderDetail trainOrderDetail;
if (byOrderNo.isPresent()) {
if (byOrderNo.get().getHotelOrderDetail() == null) {
trainOrderDetail = new TrainOrderDetail();
} else {
return byOrderNo.get().getTrainOrderDetail();
}
} else {
trainOrderDetail = new TrainOrderDetail();
}
RouteOrder routeOrder = routeRepository.queryById(orderDetail.getRouteId());
OrderDetail orderDetail = byOrderNo.get();
RouteOrder routeOrder = routeRepository.queryById(byOrderNo.get().getRouteId());
String sysCode = routeOrder.getApproveOrderNo().getSysCode();
TrainOrderDetail trainOrderDetail = new TrainOrderDetail();
trainOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_LY);
if (sysCode != null) {
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {

View File

@ -68,7 +68,7 @@ public class GlobalExceptionHandler {
}
if(cause == null){
rootCause.printStackTrace();
return Result.error("未知错误");
return Result.error(rootCause.getMessage());
}
Throwable causeCause = cause.getCause();