已合并 PR 10037: 修复火车票明细状态没有更改的问题
This commit is contained in:
commit
49c3c485af
|
@ -23,8 +23,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static com.chint.infrastructure.constant.BelongSystemConstant.*;
|
||||
import static com.chint.infrastructure.constant.CommonMessageConstant.NOT_FOUND;
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.FSSC_FLIGHT_STATUS_CHANGE;
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.FSSC_TRAIN_STATUS_CHANGE;
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.*;
|
||||
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_ETA;
|
||||
|
||||
@Component
|
||||
|
@ -408,16 +407,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)) {
|
||||
|
@ -463,6 +469,10 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
)
|
||||
);
|
||||
}
|
||||
if (!trainOrderDetail.getOrderStatus().equals(FSSC_TRAIN_STATUS_CHANGE)
|
||||
&& !trainOrderDetail.getOrderStatus().equals(FSSC_ORDER_STATUS_CANCEL)) {
|
||||
trainOrderDetail.setOrderStatus(FSSC_TRAIN_STATUS_SUCCESS);
|
||||
}
|
||||
}
|
||||
);
|
||||
String EmployeeNo = routeOrder.getUserId();
|
||||
|
|
|
@ -68,7 +68,7 @@ public class GlobalExceptionHandler {
|
|||
}
|
||||
if(cause == null){
|
||||
rootCause.printStackTrace();
|
||||
return Result.error("未知错误");
|
||||
return Result.error(rootCause.getMessage());
|
||||
}
|
||||
|
||||
Throwable causeCause = cause.getCause();
|
||||
|
|
Loading…
Reference in New Issue