From 40ac76e3c6cc0104544df629aa34d7d53c87b00d Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 27 二月 2025 15:10:41 +0800 Subject: [PATCH] 补充管理后台文件上传 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java index 2194538..05be148 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java +++ b/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()); -- Gitblit v1.7.1