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
6f17ee6f
Commit
6f17ee6f
authored
Mar 29, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备参数解析
parent
a9330450
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
0 deletions
+126
-0
CutterbarStatus.java
...om/baosight/hpjx/equipment/hp/domain/CutterbarStatus.java
+23
-0
CutterbarWarning.java
...m/baosight/hpjx/equipment/hp/domain/CutterbarWarning.java
+66
-0
CutterbarWarningBase.java
...osight/hpjx/equipment/hp/domain/CutterbarWarningBase.java
+37
-0
No files found.
src/main/java/com/baosight/hpjx/equipment/hp/domain/CutterbarStatus.java
0 → 100644
View file @
6f17ee6f
package
com
.
baosight
.
hpjx
.
equipment
.
hp
.
domain
;
import
com.baosight.hpjx.xml.IXml
;
import
com.baosight.hpjx.xml.XmlUtils
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author wwl
* @Date 2024/3/29 11:22
*/
@Data
public
class
CutterbarStatus
{
@IXml
(
nodeName
=
"status"
)
private
Integer
status
;
public
static
void
main
(
String
[]
args
)
{
List
<
CutterbarStatus
>
list
=
XmlUtils
.
readXml
(
"<ncda><status>1</status></ncda>"
,
CutterbarStatus
.
class
);
System
.
out
.
println
(
list
);
}
}
src/main/java/com/baosight/hpjx/equipment/hp/domain/CutterbarWarning.java
0 → 100644
View file @
6f17ee6f
package
com
.
baosight
.
hpjx
.
equipment
.
hp
.
domain
;
import
com.baosight.hpjx.xml.IXml
;
import
com.baosight.hpjx.xml.XmlUtils
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @Author wwl
* @Date 2024/3/29 12:25
*/
@Data
public
class
CutterbarWarning
{
/**
* 异常编码
*/
private
String
errorCode
;
/**
* 异常登记
*/
private
String
prio
;
/**
* 程序号
*/
private
String
programNo
;
/**
* 行号
*/
private
String
rowNo
;
/**
* 不存在跳转行
*/
private
String
gotoRowNone
;
/**
* 文件名
*/
private
String
fileName
;
public
static
CutterbarWarning
convertBase
(
CutterbarWarningBase
base
){
CutterbarWarning
warning
=
null
;
if
(
Objects
.
nonNull
(
base
)&&
Objects
.
nonNull
(
base
.
getNo
())){
Integer
no
=
base
.
getNo
();
warning
=
new
CutterbarWarning
();
warning
.
setErrorCode
(
no
.
toString
());
warning
.
setPrio
(
base
.
getPrio
());
if
(
no
.
compareTo
(
new
Integer
(
200
))>=
0
&&
no
.
compareTo
(
new
Integer
(
299
))<=
0
){
warning
.
setProgramNo
(
base
.
getArg1
());
warning
.
setRowNo
(
base
.
getArg2
());
warning
.
setGotoRowNone
(
base
.
getArg3
());
warning
.
setFileName
(
base
.
getFileName
());
}
else
if
(
no
.
compareTo
(
new
Integer
(
300
))>=
0
&&
no
.
compareTo
(
new
Integer
(
399
))<=
0
){
warning
.
setRowNo
(
base
.
getArg1
());
warning
.
setFileName
(
warning
.
getFileName
());
}
}
return
warning
;
}
}
src/main/java/com/baosight/hpjx/equipment/hp/domain/CutterbarWarningBase.java
0 → 100644
View file @
6f17ee6f
package
com
.
baosight
.
hpjx
.
equipment
.
hp
.
domain
;
import
com.baosight.hpjx.xml.IXml
;
import
com.baosight.hpjx.xml.XmlUtils
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author wwl
* @Date 2024/3/29 12:25
*/
@Data
public
class
CutterbarWarningBase
{
@IXml
(
nodeName
=
"no"
)
private
Integer
no
;
@IXml
(
nodeName
=
"prio"
)
private
String
prio
;
@IXml
(
nodeName
=
"arg1"
)
private
String
arg1
;
@IXml
(
nodeName
=
"arg2"
)
private
String
arg2
;
@IXml
(
nodeName
=
"arg3"
)
private
String
arg3
;
@IXml
(
nodeName
=
"fileName"
)
private
String
fileName
;
public
static
void
main
(
String
[]
args
)
{
List
<
CutterbarWarningBase
>
list
=
XmlUtils
.
readXml
(
"<alarm><no>0</no><prio>0</prio><arg1>0</arg1><arg2>0</arg2><fileName></fileName></alarm>"
,
CutterbarWarningBase
.
class
);
System
.
out
.
println
(
list
);
}
}
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