Pu Zhibing
2024-10-11 d03a20125852c40f4a9d118c6ce64b0c94f3b32a
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -53,6 +53,7 @@
import com.ruoyi.order.dto.OrderEvaluateVo;
import com.ruoyi.order.dto.*;
import com.ruoyi.order.service.*;
import com.ruoyi.order.service.impl.TChargingOrderServiceImpl;
import com.ruoyi.order.util.PreviousSixMonths;
import com.ruoyi.payment.api.feignClient.AliPaymentClient;
import com.ruoyi.payment.api.feignClient.WxPaymentClient;
@@ -63,6 +64,8 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.models.auth.In;
import jdk.nashorn.internal.runtime.ListAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiOperation;
@@ -94,6 +97,8 @@
@RestController
@RequestMapping("/t-charging-order")
public class TChargingOrderController {
    private Logger log = LoggerFactory.getLogger(TChargingOrderController.class);
    @Resource
    private TChargingOrderService chargingOrderService;
@@ -466,6 +471,7 @@
    @ResponseBody
    @PostMapping(value = "/securityDetection")
    public void securityDetection(@RequestBody SecurityDetectionVO securityDetection){
        log.error("-------------------安全检测数据-------------------:" + securityDetection);
        chargingOrderService.securityDetection(securityDetection);
    }
    
@@ -476,7 +482,7 @@
    @ResponseBody
    @PostMapping(value = "/startChargeSuccessfully")
    public void startChargeSuccessfully(@RequestBody PlatformStartChargingReplyMessageVO message){
        System.err.println("远程启动应答:" + message);
        log.error("-------------------远程启动充电请求应答-------------------:" + message);
        chargingOrderService.startChargeSuccessfully(message);
    }
    
@@ -564,6 +570,7 @@
     */
    @PostMapping("/terminateSuccessfulResponse")
    public void terminateSuccessfulResponse(@RequestBody PlatformStopChargingReplyVO platformStopChargingReply){
        log.error("-------------------远程停止充电请求应答-------------------:" + platformStopChargingReply);
        chargingOrderService.terminateSuccessfulResponse(platformStopChargingReply);
    }
    
@@ -762,16 +769,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日的日期
@@ -1389,6 +1396,7 @@
     */
    @PostMapping("/endCharge")
    public void endCharge(@RequestParam("code") String code){
        log.error(code + ":-------------------充电桩自动结束充电-------------------");
        chargingOrderService.endCharge(code, 2);
    }
@@ -1398,6 +1406,7 @@
     */
    @PostMapping("/excelEndCharge")
    public void excelEndCharge(@RequestParam("code") String code){
        log.error(code + ":-------------------充电异常,停止充电-------------------");
        chargingOrderService.excelEndCharge(code);
    }