Your Name
2023-03-10 ba7d8abce77a433272f297c0a6cff0b3975ee280
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.java110.common.charge;
 
import com.java110.dto.chargeMachine.ChargeMachineDto;
import com.java110.dto.chargeMachineOrder.NotifyChargeOrderDto;
import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
import com.java110.vo.ResultVo;
import org.springframework.http.ResponseEntity;
 
/**
 * 充电适配器
 */
public interface IChargeCore {
 
    public static final String CHARGE_TYPE_HOURS = "hours";
    public static final String CHARGE_TYPE_ENERGY = "energy";
 
    /**
     * 开始充电接口
     * @param chargeMachineDto
     * @param chargeType
     * @param duration
     * @return
     */
    ResultVo startCharge(ChargeMachineDto chargeMachineDto, ChargeMachinePortDto chargeMachinePortDto, String chargeType, double duration,String orderId);
 
 
    /**
     * 结束充电接口
     * @param chargeMachineDto
     * @return
     */
    ResultVo stopCharge(ChargeMachineDto chargeMachineDto, ChargeMachinePortDto chargeMachinePortDto);
 
    /**
     * 查询充电端口状态
     * @param chargeMachineDto
     * @param chargeMachinePortDto
     * @return
     */
    ChargeMachinePortDto getChargePortState(ChargeMachineDto chargeMachineDto, ChargeMachinePortDto chargeMachinePortDto);
 
    ResponseEntity<String> finishCharge(NotifyChargeOrderDto notifyChargeOrderDto);
 
    ResponseEntity<String> heartbeat(NotifyChargeOrderDto notifyChargeOrderDto);
 
    ResponseEntity<String> chargeHeartBeat(NotifyChargeOrderDto notifyChargeOrderDto);
}