| | |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.ChargingOrderGroup; |
| | | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; |
| | | 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.ChargingBillVO; |
| | | import com.ruoyi.order.api.vo.SettlementTotalVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ruoyi.order.api.vo.GetChargingOrderByLicensePlate; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 充电订单服务 |
| | | * @author ruoyi |
| | | */ |
| | | @FeignClient(contextId = "ChargingOrderClient", value = ServiceNameConstants.CONTRACT_SERVICE, fallbackFactory = ChargingOrderFallbackFactory.class) |
| | | @FeignClient(contextId = "ChargingOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = ChargingOrderFallbackFactory.class) |
| | | public interface ChargingOrderClient { |
| | | @PostMapping(value = "/t-charging-order/useOrderCount") |
| | | R<Long> useOrderCount(@RequestParam Long userId); |
| | | R<Long> useOrderCount(@RequestParam("userId") Long userId); |
| | | @PostMapping(value = "/t-charging-order/chargingBillListR") |
| | | R<ChargingBillVO> chargingBillListR(@RequestBody ChargingListQuery dto); |
| | | @PostMapping(value = "/t-charging-order/detail") |
| | | R<TChargingOrder> orderDetail(@RequestParam("orderId") Long orderId); |
| | | |
| | | |
| | | @PostMapping(value = "/t-charging-order/getList") |
| | | R<List<TChargingOrder>> getList(@RequestParam("siteId") Integer siteId); |
| | | |
| | | @PostMapping(value = "/t-charging-order/getBySiteIdAndTime") |
| | | R<List<ChargingOrderGroup>> getBySiteIdAndTime(@RequestBody ChargingPercentProvinceDto chargingPercentProvinceDto); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询会员在本月有多少次享受了充电折扣 |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/getChargingCount") |
| | | public R<Integer> getChargingCount(@RequestBody TChargingCountQuery req); |
| | | |
| | | |
| | | /** |
| | | * 根据充电枪获取正在充电的订单 |
| | | * @param chargingGunId 充电枪id |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/getOrderDetailByGunId") |
| | | R<TChargingOrder> getOrderDetailByGunId(@RequestParam("chargingGunId") Integer chargingGunId); |
| | | |
| | | /** |
| | | * 获取用户最近使用车辆充电的车辆id |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "/t-charging-order/getCar") |
| | | public R<Long> getCar(); |
| | | |
| | | |
| | | /** |
| | | * 处理充电订单实时监控数据相关的业务逻辑 |
| | | * @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") |
| | | public R<SettlementTotalVO> settlementTotalR(String time); |
| | | } |