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 2d0890ed
authored
Nov 10, 2023
by
王欣伟
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
支持List数据结构,业务在使用中需要自己控制list的长度
1 parent
98a2aee6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/Ocpp16Helper.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/Ocpp16Helper.java
View file @
2d0890e
...
...
@@ -7,6 +7,7 @@ import java.math.BigInteger;
import
java.math.RoundingMode
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.ListIterator
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
@@ -232,6 +233,14 @@ public class Ocpp16Helper {
byte
[]
bs
=
build
(
v
);
byteBuf
.
writeBytes
(
bs
);
}
else
if
(
v
instanceof
List
)
{
ListIterator
listIterator
=
((
List
<?>)
v
).
listIterator
();
while
(
listIterator
.
hasNext
()){
Object
iv
=
listIterator
.
next
();
byte
[]
bs
=
build
(
v
);
byteBuf
.
writeBytes
(
bs
);
}
}
// log.info("build:{} field:{} value:{} -- {}", d.getClass().getSimpleName(), f.getName(), v, byteBuf.readableBytes());
}
catch
(
Exception
e
)
{
...
...
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