套餐修改单据出行费用
This commit is contained in:
parent
b0a346ec04
commit
a6f7f3ca70
|
@ -993,7 +993,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
orders.setTripWay(3);
|
||||
}
|
||||
TravelPriceVo travelPriceVo = travelConfService.calcTravelPrice(orders.getArtificerId(), orders.getLongitude(), orders.getLatitude(),orders.getServeTime(),tripWay);
|
||||
if (travelPriceVo == null) {
|
||||
if (travelPriceVo == null) {
|
||||
return Result.error("暂不支持当前地址,请更换其他地址!");
|
||||
}
|
||||
taxiMoney = new BigDecimal(travelPriceVo.getTravelPrice());
|
||||
|
@ -1611,6 +1611,15 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
|
||||
String value1 = commonInfoService.findOne(395).getValue();
|
||||
Integer tripWay = orders.getTripWay();
|
||||
BigDecimal taxiMoney = BigDecimal.ZERO;
|
||||
if(orders.getUserPackageDetailId() != null) {
|
||||
String isTravelFree = commonInfoService.findOne(460).getValue();
|
||||
if(isTravelFree.equals("是")){
|
||||
taxiMoney = BigDecimal.ZERO;
|
||||
tripWay = 3;
|
||||
orders.setTripWay(3);
|
||||
}
|
||||
}
|
||||
|
||||
String serveTime = orders.getServeTime();
|
||||
String date = serveTime.substring(0, 10);
|
||||
|
@ -1702,12 +1711,15 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
|
||||
//项目差价
|
||||
BigDecimal xmchajia = orders.getMassageMoney().subtract(oldOrders.getMassageMoney());
|
||||
|
||||
TravelPriceVo travelPriceVo = travelConfService.calcTravelPrice(orders.getArtificerId(), orders.getLongitude(), orders.getLatitude(),orders.getServeTime());
|
||||
TravelPriceVo travelPriceVo = null;
|
||||
if(orders.getUserPackageDetailId() != null) {
|
||||
travelPriceVo = travelConfService.calcTravelPrice(orders.getArtificerId(), orders.getLongitude(), orders.getLatitude(),orders.getServeTime(),tripWay);
|
||||
}else{
|
||||
travelPriceVo = travelConfService.calcTravelPrice(orders.getArtificerId(), orders.getLongitude(), orders.getLatitude(),orders.getServeTime());
|
||||
}
|
||||
if (travelPriceVo == null) {
|
||||
return Result.error("暂不支持当前地址,请更换其他地址!");
|
||||
}
|
||||
|
||||
//删除未支付,无用的升级新单据
|
||||
List<Orders> newList = baseMapper.getNewOrdersByOld(oldOrders.getOrdersId());
|
||||
if(newList.size()>0){
|
||||
|
@ -1718,8 +1730,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
BigDecimal taxiMoney = new BigDecimal(travelPriceVo.getTravelPrice());
|
||||
taxiMoney = new BigDecimal(travelPriceVo.getTravelPrice());
|
||||
taxiMoney = taxiMoney.setScale(0,BigDecimal.ROUND_UP);
|
||||
BigDecimal oldTaxiMoney = oldOrders.getTaxiMoney();
|
||||
if (taxiMoney.compareTo(oldTaxiMoney) < 0) {
|
||||
|
|
Loading…
Reference in New Issue