无关风月
2025-02-27 40ac76e3c6cc0104544df629aa34d7d53c87b00d
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -516,8 +516,13 @@
        TCharingOrderVO res = chargingOrderService.chargingOrder(dto);
        return AjaxResult.success(res);
    }
    public static void main(String[] args) {
        String temp = "00";
        Integer i = Integer.valueOf(temp);
        System.err.println(i);
    }
    @RequiresPermissions(value = {"/chargingPileOrder/monitoring_record"}, logical = Logical.OR)
    @ResponseBody
    @GetMapping(value = "/chargingOrderInfo")
@@ -544,9 +549,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());