Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gass-device-report
Project
Project
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
耿迪迪
gass-device-report
Commits
991f2048
Commit
991f2048
authored
Sep 26, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备上报修改 gengdidi
parent
fef6c767
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
PressureDecryptReportedData.java
...rt/netty/decryptreported/PressureDecryptReportedData.java
+2
-2
FlowmeterDecryptReportedData.java
...cryptreported/flowmeter/FlowmeterDecryptReportedData.java
+9
-1
Tian5cFlowmeterDecryptReportedData.java
...eported/flowmeter/Tian5cFlowmeterDecryptReportedData.java
+3
-0
No files found.
src/main/java/com/zehong/gassdevicereport/netty/decryptreported/PressureDecryptReportedData.java
View file @
991f2048
...
...
@@ -89,10 +89,10 @@ public class PressureDecryptReportedData {
private
String
getDeviceStatus
(){
String
deviceStatus
=
reportedDataStr
.
substring
(
32
,
34
);
switch
(
deviceStatus
){
case
"0
1
"
:
case
"0
0
"
:
deviceStatus
=
"预热"
;
break
;
case
"0
2
"
:
case
"0
1
"
:
deviceStatus
=
"正常"
;
break
;
case
"03"
:
...
...
src/main/java/com/zehong/gassdevicereport/netty/decryptreported/flowmeter/FlowmeterDecryptReportedData.java
View file @
991f2048
...
...
@@ -41,7 +41,12 @@ public class FlowmeterDecryptReportedData implements DecryptReportedData{
tDeviceReportData
.
setStandardConditionAccumulation
(
new
BigDecimal
(
standardConditionAccumulation
));
// 工况累计量
double
workingConditionAccumulation
=
HexUtils
.
hexToDouble
(
reportedDataStr
.
substring
(
64
,
80
));
tDeviceReportData
.
setWorkingConditionAccumulation
(
new
BigDecimal
(
workingConditionAccumulation
));
if
(
"苍南EVC300体积修正仪"
.
equals
(
deviceType
)){
tDeviceReportData
.
setWorkingConditionAccumulation
(
new
BigDecimal
(
workingConditionAccumulation
));
}
else
{
tDeviceReportData
.
setResidualQuantity
(
new
BigDecimal
(
workingConditionAccumulation
));
}
// 标况流量
float
standardConditionFlow
=
HexUtils
.
hexToFloat
(
reportedDataStr
.
substring
(
80
,
88
));
tDeviceReportData
.
setStandardConditionFlow
(
new
BigDecimal
(
standardConditionFlow
));
...
...
@@ -89,6 +94,9 @@ public class FlowmeterDecryptReportedData implements DecryptReportedData{
*/
private
Date
getReportedTime
()
throws
ParseException
{
String
reportTime
=
reportedDataStr
.
substring
(
36
,
48
);
if
(
"00"
.
equals
(
reportTime
.
substring
(
0
,
2
))){
return
new
Date
();
}
StringBuilder
timeStr
=
new
StringBuilder
(
""
);
timeStr
.
append
(
reportTime
.
substring
(
0
,
2
));
timeStr
.
append
(
"-"
);
...
...
src/main/java/com/zehong/gassdevicereport/netty/decryptreported/flowmeter/Tian5cFlowmeterDecryptReportedData.java
View file @
991f2048
...
...
@@ -82,6 +82,9 @@ public class Tian5cFlowmeterDecryptReportedData implements DecryptReportedData{
*/
private
Date
getReportedTime
()
throws
ParseException
{
String
reportTime
=
reportedDataStr
.
substring
(
36
,
48
);
if
(
"00"
.
equals
(
reportTime
.
substring
(
0
,
2
))){
return
new
Date
();
}
StringBuilder
timeStr
=
new
StringBuilder
(
""
);
timeStr
.
append
(
reportTime
.
substring
(
0
,
2
));
timeStr
.
append
(
"-"
);
...
...
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