Pu Zhibing
2024-10-12 faf7a05f5227bc2a386501fa58ac809bc424df00
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -55,6 +55,7 @@
import com.ruoyi.order.service.*;
import com.ruoyi.order.service.impl.TChargingOrderServiceImpl;
import com.ruoyi.order.util.PreviousSixMonths;
import com.ruoyi.order.vo.EndOfChargePageInfo;
import com.ruoyi.payment.api.feignClient.AliPaymentClient;
import com.ruoyi.payment.api.feignClient.WxPaymentClient;
import com.ruoyi.payment.api.vo.AliQueryOrder;
@@ -769,16 +770,16 @@
            // 获取本月1号的日期
            YearMonth yearMonth = YearMonth.from(today);
            start = yearMonth.atDay(1);
            System.out.println("本月1号是: " + start);
//            start = yearMonth.atDay(1);
//
//            System.out.println("本月1号是: " + start);
        }else if (statisticsQueryDto.getDayType()==4){
            LocalDate today = LocalDate.now();
            // 获取当前年份
            int currentYear = today.getYear();
            // 获取今年1月1日的日期
            start = LocalDate.of(currentYear, 1, 1);
            System.out.println("今年1月1日是: " + start);
            start = statisticsQueryDto.getStartTime();
            end = statisticsQueryDto.getEndTime();
        }else if (statisticsQueryDto.getDayType()==5){
            // 获取今年1月1日的日期
@@ -1396,6 +1397,7 @@
     */
    @PostMapping("/endCharge")
    public void endCharge(@RequestParam("code") String code){
        log.error(code + ":-------------------充电桩自动结束充电-------------------");
        chargingOrderService.endCharge(code, 2);
    }
@@ -1405,6 +1407,7 @@
     */
    @PostMapping("/excelEndCharge")
    public void excelEndCharge(@RequestParam("code") String code){
        log.error(code + ":-------------------充电异常,停止充电-------------------");
        chargingOrderService.excelEndCharge(code);
    }
@@ -1429,4 +1432,16 @@
        chargingOrderService.updateById(chargingOrder);
        return R.ok();
    }
    @ResponseBody
    @GetMapping(value = "/getEndOfChargePageInfo/{id}")
    @ApiOperation(value = "获取充电结束页面数据", tags = {"小程序-扫一扫"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "订单id", required = true)
    })
    public AjaxResult<EndOfChargePageInfo> getEndOfChargePageInfo(String id){
        EndOfChargePageInfo endOfChargePageInfo = chargingOrderService.getEndOfChargePageInfo(id);
        return AjaxResult.success(endOfChargePageInfo);
    }
}