| | |
| | | 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.dto.ChargingStatisticeDTO; |
| | | import com.ruoyi.order.api.dto.DeviceStartChargingDTO; |
| | | import com.ruoyi.order.api.factory.ChargingOrderFallbackFactory; |
| | | import com.ruoyi.order.api.model.AddTripartitePlatformOrder; |
| | | 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.math.BigDecimal; |
| | | 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); |
| | | |
| | |
| | | |
| | | @PostMapping(value = "/t-charging-order/getBySiteIdAndTime") |
| | | R<List<ChargingOrderGroup>> getBySiteIdAndTime(@RequestBody ChargingPercentProvinceDto chargingPercentProvinceDto); |
| | | |
| | | |
| | | /** |
| | | * 根据站点id和时间区间查询订单数据 |
| | | * @param chargingPercentProvinceDto |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/getOrderBySiteIdAndTime") |
| | | R<List<TChargingOrder>> getOrderBySiteIdAndTime(@RequestBody ChargingPercentProvinceDto chargingPercentProvinceDto); |
| | | |
| | | |
| | | |
| | |
| | | * 获取用户最近使用车辆充电的车辆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); |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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); |
| | | |
| | | /** |
| | | * 根据订单编号前缀将握手 VIN 写入对应订单表 |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/updateHandshakeVin") |
| | | R<Boolean> updateHandshakeVin(@RequestParam("orderCode") String orderCode, |
| | | @RequestParam("vin") String vin); |
| | | |
| | | |
| | | /** |
| | | * 充电解释后处理逻辑 |
| | | * @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_trade_no |
| | | * @param transaction_id |
| | | * @param attach |
| | | */ |
| | | @PostMapping("/t-charging-order/chargingOrderALIH5Callback") |
| | | void chargingOrderALIH5Callback(@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") |
| | | R endChargeBillingCharge(@RequestBody TransactionRecordMessageVO vo); |
| | | |
| | | /** |
| | | * 获取充电订单数据 |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/getChargingOrder") |
| | | R<List<TChargingOrder>> getChargingOrder(@RequestBody TChargingOrderVo order); |
| | | /** |
| | | * 获取充电订单数据 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-charging-order/getChargingStatistics") |
| | | public R<List<TChargingOrder>> getChargingStatistics(@RequestBody ChargingStatisticeDTO dto); |
| | | |
| | | |
| | | /** |
| | | * 根据车辆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); |
| | | |
| | | |
| | | /** |
| | | * 根据车牌号查询指定时间范围内的数据 |
| | | * @param plateNum |
| | | * @param startTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/getCarChargingOrderByPlateNum") |
| | | R<List<TChargingOrder>> getCarChargingOrderByPlateNum(@RequestParam("plateNum") String plateNum, @RequestParam("startTime") String startTime, |
| | | @RequestParam("endTime") String endTime); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加三方平台充电订单数据 |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/addTripartitePlatformOrder") |
| | | R addTripartitePlatformOrder(@RequestBody AddTripartitePlatformOrder query); |
| | | |
| | | |
| | | /** |
| | | * 根据三方平台订单id获取充电数据 |
| | | * @param startChargeSeq |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/getChargingOrderByStartChargeSeq") |
| | | R<TChargingOrder> getChargingOrderByStartChargeSeq(@RequestParam("startChargeSeq") String startChargeSeq); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据三方平台订单ids获取充电数据 |
| | | * @param startChargeSeqs |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/getChargingOrderByStartChargeSeqs") |
| | | R<List<TChargingOrder>> getChargingOrderByStartChargeSeqs(@RequestParam("startChargeSeqs") List<String> startChargeSeqs); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 三方平台请求停止充电 |
| | | * @param startChargeSeq |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/tripartitePlatformStopCharge") |
| | | R tripartitePlatformStopCharge(@RequestParam("startChargeSeq") String startChargeSeq); |
| | | |
| | | /** |
| | | * 充电桩大屏 获取站点集合中总的充电量 |
| | | */ |
| | | @GetMapping("/t-charging-order/getSumDegreeBySiteIds") |
| | | R<BigDecimal> getSumDegreeBySiteIds(@RequestParam("siteIds") List<Integer> SiteIds); |
| | | |
| | | /** |
| | | * 充电桩大屏 获取站点集合中累计充电量(已结束+已支付订单口径, 与 large-screen/summary 一致) |
| | | */ |
| | | @GetMapping("/t-charging-order/getLargeScreenTotalCapacity") |
| | | R<BigDecimal> getLargeScreenTotalCapacity(@RequestParam("siteIds") List<Integer> siteIds); |
| | | |
| | | /** |
| | | * 查询指定站点中实际发生过充电的用户ID |
| | | */ |
| | | @PostMapping("/t-charging-order/getAppUserIdsBySiteIds") |
| | | R<List<Long>> getAppUserIdsBySiteIds(@RequestBody List<Integer> siteIds); |
| | | |
| | | @PostMapping("/t-vin-charging-order/inner/charging-status") |
| | | R<List<VinChargingStatusVO>> getChargingVinStatus(@RequestBody List<Long> vinIds); |
| | | |
| | | |
| | | // /** |
| | | // * 获取充电订单列表 |
| | | // * @param statusList |
| | | // * @return |
| | | // */ |
| | | // @GetMapping("/t-charging-order/getOrderListByStatus") |
| | | // R<List<TChargingOrder>> getOrderListByStatus(List<Integer> statusList); |
| | | |
| | | /** |
| | | * 添加订单 |
| | | * @param chargingOrder |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-charging-order/addChargingOrder") |
| | | R<Long> addChargingOrder(@RequestBody TChargingOrder chargingOrder); |
| | | |
| | | /** |
| | | * 设备主动发起充电(刷卡/VIN码)鉴权建单 |
| | | * @param dto 启动鉴权请求(桩编码、枪编号、启动方式、账户、卡密码) |
| | | * @return 鉴权结果(含订单编号与失败原因) |
| | | */ |
| | | @PostMapping("/t-charging-order/inner/device-start-charging") |
| | | R<DeviceStartChargingVO> deviceStartCharging(@RequestBody DeviceStartChargingDTO dto); |
| | | |
| | | /** |
| | | * 统计公司名下进行中的充电订单数(三表合计,状态 2=启动中/3=充电中/4=停止中, |
| | | * 账户模式切换:分配→共享 前校验使用) |
| | | * |
| | | * @param companyId 所属公司ID |
| | | * @return 进行中订单数 |
| | | */ |
| | | @PostMapping("/t-charging-order/inner/count-active-by-company") |
| | | R<Integer> countActiveByCompany(@RequestParam("companyId") Integer companyId); |
| | | } |