Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-charging-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fb1508a6
authored
Nov 07, 2023
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]交易记录协议
1 parent
930dc6bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
294 additions
and
2 deletions
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/interactive/TransactionRecordsReqData.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/interactive/TransactionRecordsRespData.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/req/ShutdownMachineReq.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/resp/ShutdownMachineResp.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/interactive/TransactionRecordsReqData.java
0 → 100644
View file @
fb1508a
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
data
.
interactive
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpData
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @Description 交易记录
* 功能 充电桩在网络正常情况下,主运发送结算账单,直到运营平台响应成账单上传成功(若未收到
* 0x40 回复间隔 30s 再重试一次,最多重试 3 次),收到账单结算成功,本账单在充电桩本地删
* 除。每次接收到启机命令并已执行启机过程,无论启机成功与否,都需在订单结束充电后生成
* 账单上传
* 样例报文 68 (起始标志) A2 (数据长度) 8001 (序列号域) 00 (加密标志) 3B (类型)
* 55031412782305012018061910262392(交易流水号)55031412782305(桩编码)01(枪号:1
* 枪)98B70E11100314(开始时间:2020-03-16 17:14:47)98B70E11100314(结束时间:2020-03-16
* 17:14:47)D0FB0100(尖单价:1.30000)00000000(尖电量:0)00000000(计损尖电量:0)
* 00000000(尖金额:0)D0FB0100(峰单价: 1.30000)00000000(峰电量:0)00000000(计损
* 峰电量:0)00000000(峰金额:0)D0FB0100(平单价: 1.30000)00000000(平电量:0)00000000
* (计损平电量:0)00000000(平金额:0)D0FB0100(谷单价: 1.30000)00000000(谷电量:
* 0)00000000(计损谷电量:0)00000000(谷金额:0)0000000000(电表总起值:0)0000000000
* (电表总止值:0)00000000(总电量:0)00000000(计损总电量:0)00000000(消费金额:
* 0)0000000000000000000000000000000000(VIN 码)02(交易标识:app 启动)98B70E11100314
* (交易时间:2020-03-16 17:14:47)00(停止原因:无)00000000D14B0A54(物理卡号:D14B0A54)
* 388C(帧校验域)
* @Author yelq
* @Date 2023/11/7-16:57
* @Version 1.0
*/
@Getter
@Setter
public
class
TransactionRecordsReqData
extends
TcpData
{
/**
* 参数名称:交易流水号
* 数据类型:BCD码
* 长度(Byte):16
* 备注:见名词解释
*/
private
byte
[]
transactionSerialNumber
=
new
byte
[
16
];
/**
* 参数名称:桩编号
* 数据类型:BCD码
* 长度(Byte):7
* 备注:不足7位补0
*/
private
byte
[]
deviceNumber
=
new
byte
[
7
];
/**
* 参数名称:枪号
* 数据类型:BCD码
* 长度(Byte):1
*/
private
byte
gunNumber
;
/**
* 参数名称:开始时间
* 数据类型:BIN
* 长度(Byte):7
* 备注:CP56Time2a格式
*/
private
byte
[]
startTime
=
new
byte
[
7
];
/**
* 参数名称:结束时间
* 数据类型:BIN
* 长度(Byte):7
* 备注:CP56Time2a格式
*/
private
byte
[]
endTime
=
new
byte
[
7
];
/**
* 参数名称:尖单价
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后五位(尖电费+尖服务费,见费率帧)
*/
private
byte
[]
peakUnitPrice
=
new
byte
[
4
];
/**
* 参数名称:尖电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
peakElectricity
=
new
byte
[
4
];
/**
* 参数名称:计损尖电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
peakElectricityLoss
=
new
byte
[
4
];
/**
* 参数名称:尖金额
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
peakAmount
=
new
byte
[
4
];
/**
* 参数名称:峰单价
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后五位(峰电费+峰服务费)
*/
private
byte
[]
topUnitPrice
=
new
byte
[
4
];
/**
* 参数名称:峰电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
topElectricity
=
new
byte
[
4
];
/**
* 参数名称:计损峰电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
topElectricityLoss
=
new
byte
[
4
];
/**
* 参数名称:峰金额
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
topAmount
=
new
byte
[
4
];
/**
* 参数名称:平单价
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后五位(平电费+平服务费)
*/
private
byte
[]
flatUnitPrice
=
new
byte
[
4
];
/**
* 参数名称:平电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
flatElectricity
=
new
byte
[
4
];
/**
* 参数名称:计损平电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
flatElectricityLoss
=
new
byte
[
4
];
/**
* 参数名称:平金额
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
flatAmount
=
new
byte
[
4
];
/**
* 参数名称:谷单价
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后五位(谷电费+谷服务费)
*/
private
byte
[]
valleyUnitPrice
=
new
byte
[
4
];
/**
* 参数名称:谷电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
valleyElectricity
=
new
byte
[
4
];
/**
* 参数名称:计损谷电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
valleyElectricityLoss
=
new
byte
[
4
];
/**
* 参数名称:谷金额
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
valleyAmount
=
new
byte
[
4
];
/**
* 参数名称:电表总起值
* 数据类型:BIN
* 长度(Byte):5
* 备注:精确到小数点后四位
*/
private
byte
[]
totalStartValue
=
new
byte
[
4
];
/**
* 参数名称:电表总止值
* 数据类型:BIN
* 长度(Byte):5
* 备注:精确到小数点后四位
*/
private
byte
[]
totalEndValue
=
new
byte
[
4
];
/**
* 参数名称:总电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
totalElectricity
=
new
byte
[
4
];
/**
* 参数名称:计损总电量
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位
*/
private
byte
[]
totalElectricityLoss
=
new
byte
[
4
];
/**
* 参数名称:消费金额
* 数据类型:BIN
* 长度(Byte):4
* 备注:精确到小数点后四位,包含电费、服务费
*/
private
byte
[]
totalAmount
=
new
byte
[
4
];
/**
* 参数名称:电动汽车唯一标识
* 数据类型:ASCII
* 长度(Byte):17
* 备注:VIN码,此处VIN码和充电时VIN码不同,正序直接上传,无需补0和反序
*/
private
byte
[]
vehicleIdentifier
=
new
byte
[
17
];
/**
* 参数名称:交易标识
* 数据类型:BIN
* 长度(Byte):1
* 备注:0x01:app启动 0x02:卡启动 0x04:离线卡启动 0x05: vin码启动充电
*/
private
byte
transactionIdentifier
;
/**
* 参数名称:交易日期、时间
* 数据类型:BIN
* 长度(Byte):7
* 备注:CP56Time2a格式
*/
private
byte
[]
transactionDateTime
=
new
byte
[
7
];
/**
* 参数名称:停止原因
* 数据类型:BIN
* 长度(Byte):1
* 备注:见附录11.1
*/
private
byte
stopReason
;
/**
* 物理卡号
* 数据类型: (BIN码)
* 长度(Byte):8
* 备注:不足补零,桩与平台交互需使用的物理卡号
*/
private
byte
[]
physicalCardNumber
=
new
byte
[
8
];
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/interactive/TransactionRecordsRespData.java
0 → 100644
View file @
fb1508a
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
data
.
interactive
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpData
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @Description 交易记录确认
* @Author yelq
* @Date 2023/11/7-16:57
* @Version 1.0
*/
@Getter
@Setter
public
class
TransactionRecordsRespData
extends
TcpData
{
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/req/ShutdownMachineReq.java
View file @
fb1508a
...
...
@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach
*/
public
class
ShutdownMachineReq
extends
TcpReq
<
ShutdownMachineReqData
>
{
public
ShutdownMachineReq
()
{
super
(
TcpMapper
.
FTCD_REQ_REMOTE_SHUTDOWN
.
getType
());
super
(
TcpMapper
.
CMD_REQ_STOP_CHARGING
.
getType
());
}
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/resp/ShutdownMachineResp.java
View file @
fb1508a
...
...
@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach
*/
public
class
ShutdownMachineResp
extends
TcpReq
<
ShutdownMachineRespData
>
{
public
ShutdownMachineResp
()
{
super
(
TcpMapper
.
FTCD_RSP_REMOTE_SHUTDOWN
.
getType
());
super
(
TcpMapper
.
CMD_RSP_STOP_CHARGING
.
getType
());
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment