|  |  |  | 
|---|
|  |  |  | import com.ruoyi.common.core.domain.R; | 
|---|
|  |  |  | import com.ruoyi.common.core.dto.ChargingOrderGroup; | 
|---|
|  |  |  | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; | 
|---|
|  |  |  | import com.ruoyi.common.core.web.domain.AjaxResult; | 
|---|
|  |  |  | import com.ruoyi.order.api.factory.ChargingOrderFallbackFactory; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.ChargingListQuery; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.TChargingOrder; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.TSettlementConfirm; | 
|---|
|  |  |  | import com.ruoyi.order.api.query.TChargingCountQuery; | 
|---|
|  |  |  | import com.ruoyi.order.api.query.UploadRealTimeMonitoringDataQuery; | 
|---|
|  |  |  | import com.ruoyi.order.api.vo.*; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParam; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.springframework.cloud.openfeign.FeignClient; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestParam; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @FeignClient(contextId = "ChargingOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = ChargingOrderFallbackFactory.class) | 
|---|
|  |  |  | public interface ChargingOrderClient { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping(value = "/t-charging-order/queryOrderByGunId/{id}") | 
|---|
|  |  |  | R<String> queryOrderByGunId(@PathVariable("id") String id); | 
|---|
|  |  |  | @PostMapping(value = "/t-charging-order/useOrderCount") | 
|---|
|  |  |  | R<Long> useOrderCount(@RequestParam("userId") Long userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping(value = "/chargingBill/chargingBillListR") | 
|---|
|  |  |  | R<ChargingBillVO> chargingBillListR(@RequestBody ChargingListQuery dto); | 
|---|
|  |  |  | @PostMapping(value = "/t-charging-order/detail") | 
|---|
|  |  |  | R<TChargingOrder> orderDetail(@RequestParam("orderId") Long orderId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 获取用户最近使用车辆充电的车辆id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(value = "/t-charging-order/getCar") | 
|---|
|  |  |  | public R<Long> getCar(); | 
|---|
|  |  |  | @GetMapping(value = "/t-charging-order/getCar/{id}") | 
|---|
|  |  |  | public R<Long> getCar(@PathVariable("id")String id); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 处理充电订单实时监控数据相关的业务逻辑 | 
|---|
|  |  |  | * @param query | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping(value = "/t-charging-order/chargeMonitoring") | 
|---|
|  |  |  | void chargeMonitoring(@RequestBody UploadRealTimeMonitoringDataQuery query); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 通过流水号查询订单 | 
|---|
|  |  |  | * @param code | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping(value = "/t-charging-order/getOrderByCode/{code}") | 
|---|
|  |  |  | R<TChargingOrder> getOrderByCode(@PathVariable("code") String code); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 充电解释后处理逻辑 | 
|---|
|  |  |  | * @param code | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/endCharge") | 
|---|
|  |  |  | void endCharge(@RequestParam("code") String code); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 硬件异常结束充电后的处理逻辑 | 
|---|
|  |  |  | * @param code | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/excelEndCharge") | 
|---|
|  |  |  | void excelEndCharge(@RequestParam("code") String code); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据车牌号和时间查询有效的充电数据 | 
|---|
|  |  |  | * @param query | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/getChargingOrderByLicensePlate") | 
|---|
|  |  |  | R<TChargingOrder> getChargingOrderByLicensePlate(@RequestBody GetChargingOrderByLicensePlate query); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取充电结算记录 | 
|---|
|  |  |  | * @param uid | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(value = "/financial/settlement/downloadSettlement/{uid}") | 
|---|
|  |  |  | public R<TSettlementConfirm> downloadSettlement(@PathVariable("uid") String uid); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping(value = "/financial/settlement/settlementTotalR/{time}/{userId}") | 
|---|
|  |  |  | public R<SettlementTotalVO> settlementTotalR(@PathVariable("time")String time,@PathVariable("userId")Long userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改充电订单 | 
|---|
|  |  |  | * @param chargingOrder | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/updateChargingOrder") | 
|---|
|  |  |  | R<String> updateChargingOrder(@RequestBody TChargingOrder chargingOrder); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 手动停止充电 | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PutMapping(value = "/t-charging-order/stopCharging/{id}") | 
|---|
|  |  |  | R<String> stopCharging(@PathVariable("id") String id); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 充电支付成功回调通知 | 
|---|
|  |  |  | * @param out_trade_no | 
|---|
|  |  |  | * @param transaction_id | 
|---|
|  |  |  | * @param attach | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/chargingOrderWXCallback") | 
|---|
|  |  |  | void chargingOrderWXCallback(@RequestParam("out_trade_no") String out_trade_no, | 
|---|
|  |  |  | @RequestParam("transaction_id") String transaction_id, | 
|---|
|  |  |  | @RequestParam("attach") String attach); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 充电支付成功回调通知 | 
|---|
|  |  |  | * @param out_trade_no | 
|---|
|  |  |  | * @param transaction_id | 
|---|
|  |  |  | * @param attach | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/chargingOrderALICallback") | 
|---|
|  |  |  | void chargingOrderALICallback(@RequestParam("out_trade_no") String out_trade_no, | 
|---|
|  |  |  | @RequestParam("transaction_id") String transaction_id, | 
|---|
|  |  |  | @RequestParam("attach") String attach); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 远程启动失败后退款回调 | 
|---|
|  |  |  | * @param out_refund_no | 
|---|
|  |  |  | * @param refund_id | 
|---|
|  |  |  | * @param tradeState | 
|---|
|  |  |  | * @param success_time | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/chargingOrderStartupFailureWxRefund") | 
|---|
|  |  |  | void chargingOrderStartupFailureWxRefund(@RequestParam("out_refund_no") String out_refund_no, | 
|---|
|  |  |  | @RequestParam("refund_id") String refund_id, | 
|---|
|  |  |  | @RequestParam("tradeState") String tradeState, | 
|---|
|  |  |  | @RequestParam("success_time") String success_time); | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 管理后台取消购物订单后退款回调 | 
|---|
|  |  |  | * @param out_refund_no | 
|---|
|  |  |  | * @param refund_id | 
|---|
|  |  |  | * @param tradeState | 
|---|
|  |  |  | * @param success_time | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-shopping-order/shoppingOrderWxRefund") | 
|---|
|  |  |  | void shoppingOrderWxRefund(@RequestParam("out_trade_no") String out_refund_no, | 
|---|
|  |  |  | @RequestParam("out_trade_no") String refund_id, | 
|---|
|  |  |  | @RequestParam("out_trade_no") String tradeState, | 
|---|
|  |  |  | @RequestParam("out_trade_no") String success_time); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改安全检测数据 | 
|---|
|  |  |  | * @param securityDetection | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/securityDetection") | 
|---|
|  |  |  | void securityDetection(@RequestBody SecurityDetectionVO securityDetection); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 远程启动充电应答 | 
|---|
|  |  |  | * @param message | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/startChargeSuccessfully") | 
|---|
|  |  |  | void startChargeSuccessfully(PlatformStartChargingReplyMessageVO message); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 停止充电应答处理 | 
|---|
|  |  |  | * @param platformStopChargingReply | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/terminateSuccessfulResponse") | 
|---|
|  |  |  | void terminateSuccessfulResponse(@RequestBody PlatformStopChargingReplyVO platformStopChargingReply); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 停止充电返回账单后计算费用 | 
|---|
|  |  |  | * @param vo | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/endChargeBillingCharge") | 
|---|
|  |  |  | void endChargeBillingCharge(@RequestBody TransactionRecordMessageVO vo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取充电订单数据 | 
|---|
|  |  |  | * @param order | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/getChargingOrder") | 
|---|
|  |  |  | R<List<TChargingOrder>> getChargingOrder(@RequestBody TChargingOrderVo order); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据车辆id获取指定时间范围内的数据 | 
|---|
|  |  |  | * @param carId | 
|---|
|  |  |  | * @param startTime | 
|---|
|  |  |  | * @param endTime | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-charging-order/getCarChargingOrder") | 
|---|
|  |  |  | R<List<TChargingOrder>> getCarChargingOrder(@RequestParam("carId") Long carId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime); | 
|---|
|  |  |  | } | 
|---|