puzhibing
2024-08-28 8c9ad0bd2fc6591fe606c793d6e11e2cfbe5a165
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -1,4 +1,5 @@
package com.ruoyi.order.controller;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -91,15 +92,23 @@
    private TVipOrderService vipOrderService;
    @Resource
    private ParkingLotClient parkingLotClient;
    @Resource private TChargingOrderRefundService chargingOrderRefundService;
    @Resource
    private TChargingOrderRefundService chargingOrderRefundService;
    @Resource private TShoppingOrderRefundService shoppingOrderRefundService;
    @Resource private  TVipOrderRefundService vipOrderRefundService;
    @Resource private SiteClient siteClient;
    @Resource private ChargingPileClient chargingPileClient;
    @Resource private ChargingGunClient chargingGunClient;
    @Resource private AppUserCarClient appUserCarClient;
    @Resource private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService;
    @Resource
    private TShoppingOrderRefundService shoppingOrderRefundService;
    @Resource
    private TVipOrderRefundService vipOrderRefundService;
    @Resource
    private SiteClient siteClient;
    @Resource
    private ChargingPileClient chargingPileClient;
    @Resource
    private ChargingGunClient chargingGunClient;
    @Resource
    private AppUserCarClient appUserCarClient;
    @Resource
    private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService;
    @ResponseBody
    @PostMapping(value = "/pay/order/list")
@@ -159,12 +168,11 @@
//                    payOrderInfoDto3.setRefundAmount(new BigDecimal("0"));
            }
        return R.ok();
    }
    @ResponseBody
    @GetMapping(value = "/pay/order/refund/detail")
    @ApiOperation(value = "退款信息", tags = {"管理后台-支付订单-订单信息"})
@@ -201,6 +209,7 @@
        payOrderChargingInfo.setCarNum(data3.get(0).getLicensePlate());
        return R.ok();
    }
    @ResponseBody
    @GetMapping(value = "/pay/order/charging/details")
    @ApiOperation(value = "充电明细", tags = {"管理后台-支付订单-订单信息"})
@@ -208,7 +217,6 @@
        List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list();
        return R.ok(list);
    }
    @ResponseBody
@@ -220,9 +228,6 @@
    }
    @ResponseBody
    @PostMapping(value = "/chargingOrder")
    @ApiOperation(value = "充电桩订单列表", tags = {"管理后台-订单管理"})
@@ -232,6 +237,7 @@
        TCharingOrderVO res = chargingOrderService.chargingOrder(dto);
        return AjaxResult.success(res);
    }
    @ResponseBody
    @PostMapping(value = "/chargingOrderInfo")
    @ApiOperation(value = "充电桩订单列表查看详情", tags = {"管理后台-订单管理"})
@@ -248,8 +254,10 @@
        orderEvaluateService.addOrderEvaluate(dto);
        return AjaxResult.success();
    }
    /**
     * 查询用户最近一次充电记录使用的车辆
     *
     * @param
     * @return
     */
@@ -269,6 +277,7 @@
    /**
     * 查询会员在本月有多少次享受了充电折扣
     *
     * @param req
     * @return
     */
@@ -280,6 +289,7 @@
                .between(TChargingOrder::getStartTime, req.getStartTime(), req.getEndTime())).size();
        return R.ok(size);
    }
    //用户订单数量
    @PostMapping(value = "/useOrderCount")
    public R<Long> useOrderCount(@RequestParam("userId") Long userId) {
@@ -287,6 +297,7 @@
        return R.ok(count);
    }
    //订单详情
    @PostMapping(value = "/detail")
    public R<TChargingOrder> detail(@RequestParam("orderId") Long orderId) {
@@ -295,6 +306,7 @@
    
    /**
     * 根据充电枪id获取正在进行中的订单
     *
     * @param chargingGunId 充电枪id
     * @return
     */
@@ -304,8 +316,6 @@
                .eq(TChargingOrder::getDelFlag, 0).eq(TChargingOrder::getStatus, 3));
        return R.ok(one);
    }
    
    
    @ResponseBody
@@ -326,7 +336,6 @@
    }
    
    
    @ResponseBody
    @GetMapping(value = "/getNoInvoicedOrder")
    @ApiOperation(value = "获取未开票的订单数据", tags = {"小程序-充电发票"})
@@ -334,7 +343,6 @@
        List<MyChargingOrderList> list = chargingOrderService.getNoInvoicedOrder(query);
        return AjaxResult.success(list);
    }
    
    
    @ResponseBody
@@ -346,6 +354,7 @@
    
    /**
     * 充电充值支付回调
     *
     * @param request
     */
    @ResponseBody
@@ -387,7 +396,6 @@
    }
    
    
    @ResponseBody
    @GetMapping(value = "/preChargeCheck/{id}")
    @ApiOperation(value = "获取安全检测数据", tags = {"小程序-扫一扫"})
@@ -401,7 +409,6 @@
    }
    
    
    @ResponseBody
    @GetMapping(value = "/getChargingDetails/{id}")
    @ApiOperation(value = "获取充电中页面数据", tags = {"小程序-扫一扫"})
@@ -412,7 +419,6 @@
        ChargingDetails chargingDetails = chargingOrderService.getChargingDetails(id);
        return AjaxResult.success(chargingDetails);
    }
    
    
    @ResponseBody