Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
a9330450
Commit
a9330450
authored
Mar 29, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备参数解析
parent
831d36f9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
IXml.java
src/main/java/com/baosight/hpjx/xml/IXml.java
+57
-0
XmlUtils.java
src/main/java/com/baosight/hpjx/xml/XmlUtils.java
+0
-0
No files found.
src/main/java/com/baosight/hpjx/xml/IXml.java
0 → 100644
View file @
a9330450
package
com
.
baosight
.
hpjx
.
xml
;
import
java.lang.annotation.*
;
/**
* @ClassName: IXml
* @Description: 注意:当前判断新建节点映射对象是根据类成员变量所有标注当前注解的字段值都不为null,
* 所以:
* 一 :所有nodeName都必须存在于xml文件中(区分大小写)
* 二 :所有相同node节点和attributeName都必须相同,个数都保持一致
* @1"<Code curCode="21000090000000011001" packLayer="3" flag="0" />"
* @2“<Code curCode="21000080000000019897" packLayer="2" flag="0" parentCode="21000090000000011001"/>”
* 1比2少一个 parentCode ,造成只读取了2这一条数据,可以给1 添加一个parentCode=“” 空字符串即可
* 三:如果不确定某个节点或属性一定有值,标注该注解的成员变量类型用String
* @Date: 2023/3/20 14:24
* @author: ph9527
* @version: 1.0
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
FIELD
)
public
@interface
IXml
{
/**
* 当前字段所属xml的标签名称
*
* @return
* @注意1: 默认取值为标签的内容,如果是标签的属性值,添加“attributeName”
* @注意2: 如果不需要attribute的信息不要填写 (不要填写 不要填写 不要填写) attributeName
*/
String
nodeName
();
/**
* 标签的属性名称
*
* @return
* @注意1: 当该字段的值为xml中的属性描述的值时,该属性“attributeName”必填
* @注意2: 如果不需要该值,不要填写 不要填写 不要填写 不要填写
*/
String
attributeName
()
default
""
;
/**
* 是否子集,当为true时,nodeName可以填写任何值,
*
* @return
*/
boolean
isSon
()
default
false
;
/**
* 日期转换格式
*
* @return
*/
String
dateFormat
()
default
""
;
}
src/main/java/com/baosight/hpjx/xml/XmlUtils.java
0 → 100644
View file @
a9330450
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment