|
@@ -293,12 +293,13 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
|
|
throw new Exception("乘客不存在");
|
|
throw new Exception("乘客不存在");
|
|
}
|
|
}
|
|
|
|
|
|
- PriceInfo priceInfo = priceInfoService.findByStartStationAndEndStation(ticketUpStationId, ticketDownStationId);
|
|
|
|
- if (priceInfo == null) {
|
|
|
|
- PriceInfo priceInfo1 = priceInfoService.findByStartStationAndEndStation(ticketDownStationId, ticketUpStationId);
|
|
|
|
- if (priceInfo1 == null) {
|
|
|
|
|
|
+ PriceInfo priceInfo = priceInfoService.findByStartStationAndEndStation(ticketUpStationId,ticketDownStationId);
|
|
|
|
+ if (priceInfo == null || priceInfo.getPrice().compareTo(BigDecimal.ZERO) <=0){
|
|
|
|
+ PriceInfo priceInfo1 = priceInfoService.findByStartStationAndEndStation(ticketDownStationId,ticketUpStationId);
|
|
|
|
+ if (priceInfo1 == null || priceInfo1.getPrice().compareTo(BigDecimal.ZERO) <= 0){
|
|
throw new Exception("站点间无费用设置");
|
|
throw new Exception("站点间无费用设置");
|
|
}
|
|
}
|
|
|
|
+ priceInfo = priceInfo1;
|
|
}
|
|
}
|
|
|
|
|
|
BigDecimal price = priceInfo.getPrice();
|
|
BigDecimal price = priceInfo.getPrice();
|