puzhibing
2024-10-23 1d4acee1fdb66f0fd75b7a579a3277356f644b8c
bug修改
1个文件已修改
6 ■■■■ 已修改文件
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -785,19 +785,23 @@
        LocalDate end = null;
        if (statisticsQueryDto.getDayType()==1){
            start = LocalDate.now();
            end = LocalDate.now();
        }else if (statisticsQueryDto.getDayType()==2){
            LocalDate today = LocalDate.now();
            // 获取本周一的日期
            LocalDate mondayThisWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
            start = statisticsQueryDto.getStartTime();
            end = statisticsQueryDto.getEndTime();
            System.out.println("本周一是: " + mondayThisWeek);
        }
        else if (statisticsQueryDto.getDayType()==3){
            // 获取当前日期
            LocalDate today = LocalDate.now();
            start = statisticsQueryDto.getStartTime();
            end = statisticsQueryDto.getEndTime();
            // 获取本月1号的日期
            YearMonth yearMonth = YearMonth.from(today);
//            start = yearMonth.atDay(1);