Pu Zhibing
2025-03-04 9380492f1821e0306ea4fa481b49e14bb09f433a
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -468,6 +468,10 @@
        return refundList1;
    }
    public static List<TChargingOrderRefund> testing4(long total, long current, long size, List<TChargingOrderRefund> str){
        List<TChargingOrderRefund> result = new ArrayList<>();
        //获取初始化分页结构
@@ -516,6 +520,8 @@
        TCharingOrderVO res = chargingOrderService.chargingOrder(dto);
        return AjaxResult.success(res);
    }
    
    
    @RequiresPermissions(value = {"/chargingPileOrder/monitoring_record"}, logical = Logical.OR)
@@ -544,9 +550,23 @@
        List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, strategyId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        for (TChargingOrderAccountingStrategy tChargingOrderAccountingStrategy : list) {
            String format = tChargingOrderAccountingStrategy.getCreateTime().format(formatter);
            String format = "";
            String format1 = "";
            String temp1=list.get(0).getStartTime().split(":")[0];
            String[] split = tChargingOrderAccountingStrategy.getStartTime().split(":");
            if (Integer.parseInt(split[0])>=Integer.valueOf(temp1)){
                format = byId.getCreateTime().format(formatter);
            }else {
                format = byId.getEndTime().format(formatter);
            }
            String[] split1 = tChargingOrderAccountingStrategy.getEndTime().split(":");
            if (Integer.parseInt(split1[0])<Integer.valueOf(temp1)){
                format1 = byId.getCreateTime().format(formatter);
            }else {
                format1 = byId.getEndTime().format(formatter);
            }
            tChargingOrderAccountingStrategy.setStartTime(format+" "+tChargingOrderAccountingStrategy.getStartTime());
            tChargingOrderAccountingStrategy.setEndTime(format+" "+tChargingOrderAccountingStrategy.getEndTime());
            tChargingOrderAccountingStrategy.setEndTime(format1+" "+tChargingOrderAccountingStrategy.getEndTime());
            if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){
                BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2)
                        .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice());
@@ -562,6 +582,9 @@
        return AjaxResult.success(chargingOrderInfoVO);
    }
    @ResponseBody
    @PostMapping(value = "/addEvaluate")
    @ApiOperation(value = "添加评价", tags = {"小程序-扫一扫"})
@@ -570,6 +593,9 @@
        orderEvaluateService.addOrderEvaluate(dto);
        return AjaxResult.success();
    }
    /**
     * 查询用户最近一次充电记录使用的车辆
     *
@@ -589,6 +615,9 @@
            return R.ok(-1L);
        }
    }
    /**
     * 查询会员在本月有多少次享受了充电折扣