Pu Zhibing
2024-10-31 d1d7df6417a76d481e654c96b2db34e4fbab88ea
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -369,14 +369,14 @@
        List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, strategyId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list();
        for (TChargingOrderAccountingStrategy tChargingOrderAccountingStrategy : list) {
            if (byId.getVipDiscountAmount()!=null){
            if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){
                BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2)
                        .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice());
                tChargingOrderAccountingStrategy.setVipDiscount(multiply);
            }
            bigDecimal = bigDecimal.add(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice());
            if (byId.getCouponDiscountAmount()!=null){
            if (byId.getCouponDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){
                BigDecimal multiply = byId.getCouponDiscountAmount().divide(byId.getServiceCharge(), 2)
                        .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice());
                tChargingOrderAccountingStrategy.setCouponDiscount(multiply);
@@ -1262,8 +1262,19 @@
        //车辆用途
        List<Map<String, Object>> carMap = chargingOrderService.carUserMethod();
        //车辆品牌
        List<Map<String, Object>> carBrandMap = chargingOrderService.carUserBrand();
        List<String> brands = new ArrayList<>();
        for (Map<String, Object> objectMap : carBrandMap) {
            brands.add(objectMap.get("vehicle_brand").toString());
        }
        Long count = chargingOrderService.countCar(brands);
        Map<String, Object> others = new HashMap<>();
        others.put("vehicle_brand","其他");
        others.put("counts",count);
        carBrandMap.add(others);
        //本地车数量
        Map<String,Object> localCarMap = chargingOrderService.countLocalCar();