Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
thingsboard-3.6.2-custom
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
吴斌
thingsboard-3.6.2-custom
Commits
6efa82c8
Commit
6efa82c8
authored
Mar 14, 2024
by
吴斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跳过 calculateDeltaNode 对于负值的检验
parent
6f30d5d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
CalculateDeltaNode.java
.../thingsboard/rule/engine/metadata/CalculateDeltaNode.java
+4
-4
No files found.
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/CalculateDeltaNode.java
View file @
6efa82c8
...
...
@@ -96,10 +96,10 @@ public class CalculateDeltaNode implements TbNode {
BigDecimal
delta
=
BigDecimal
.
valueOf
(
previousData
!=
null
?
currentValue
-
previousData
.
value
:
0.0
);
if
(
config
.
isTellFailureIfDeltaIsNegative
()
&&
delta
.
doubleValue
()
<
0
)
{
ctx
.
tellFailure
(
msg
,
new
IllegalArgumentException
(
"Delta value is negative!"
));
return
;
}
//
if (config.isTellFailureIfDeltaIsNegative() && delta.doubleValue() < 0) {
//
ctx.tellFailure(msg, new IllegalArgumentException("Delta value is negative!"));
//
return;
//
}
if
(
config
.
getRound
()
!=
null
)
{
delta
=
delta
.
setScale
(
config
.
getRound
(),
RoundingMode
.
HALF_UP
);
...
...
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