xuhy
2025-08-15 0467b2c78c12aba5922e5b900eed5205824e9220
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -569,7 +569,7 @@
            orderPrivateCar.setState(7);
        }
        if(new BigDecimal(orderPrivateCar.getPaymentAdvanceMoney()).compareTo(BigDecimal.ZERO)>0 && new BigDecimal(orderPrivateCar.getPaymentAdvanceMoney()).compareTo(new BigDecimal(orderPrivateCar.getOrderMoney()))>-1) {
        if(orderPrivateCar.getPayMethod() == 0 && new BigDecimal(orderPrivateCar.getPaymentAdvanceMoney()).compareTo(BigDecimal.ZERO)>0 && new BigDecimal(orderPrivateCar.getPaymentAdvanceMoney()).compareTo(new BigDecimal(orderPrivateCar.getOrderMoney()))>-1) {
            orderPrivateCar.setState(8);
            // 退款情况
            if (new BigDecimal(orderPrivateCar.getPaymentAdvanceMoney()).compareTo(new BigDecimal(orderPrivateCar.getOrderMoney())) > 0) {
@@ -630,7 +630,7 @@
//            orderPrivateCar.setBindId("");
//        }
        // 判断预估金额和订单金额差异是否大于3元
        if(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()).subtract(orderPrivateCar.getEstimatedPrice()).abs().doubleValue() > 3){
        if(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()).subtract(new BigDecimal(orderPrivateCar.getEstimatedPrice())).abs().doubleValue() > 3){
            orderPrivateCar.setIsException(1);
        }
        if(orderPrivateCar.getIsException() == 1){
@@ -703,6 +703,14 @@
        map.put("couponMoney", orderPrivateCar.getCouponMoney());//优惠券抵扣金额
        map.put("discountMoney", orderPrivateCar.getDiscountMoney());//折扣抵扣金额
        map.put("discount", orderPrivateCar.getDiscount());//折扣
        if(Objects.isNull(orderPrivateCar.getEstimatedPrice())){
            orderPrivateCar.setEstimatedPrice(0D);
        }
        if(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()).subtract(new BigDecimal(orderPrivateCar.getEstimatedPrice())).abs().doubleValue() > 3){
            orderPrivateCar.setIsException(1);
        }
        map.put("estimatedPrice", orderPrivateCar.getEstimatedPrice());
        map.put("isException", orderPrivateCar.getIsException());//是否异常
        return map;
    }
@@ -993,6 +1001,7 @@
        orderPrivateCar.setPriceType(priceType);
        orderPrivateCar.setUpdatePrice(updatePrice);
        orderPrivateCar.setPriceAuditState(1);
        orderPrivateCar.setState(6);
        this.updateById(orderPrivateCar);
    }
}