Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
my-flink-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
AI算法平台
my-flink-project
Commits
a20dfdc7
Commit
a20dfdc7
authored
Nov 16, 2023
by
周昊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into production
parents
cab34ce7
0d1978c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/main/java/com/censoft/flink/transform/AlarmThresholdFunction.java
...a/com/censoft/flink/transform/AlarmThresholdFunction.java
+9
-1
No files found.
src/main/java/com/censoft/flink/transform/AlarmThresholdFunction.java
View file @
a20dfdc7
package
com
.
censoft
.
flink
.
transform
;
import
cn.hutool.core.util.NumberUtil
;
import
com.censoft.flink.domain.AlgorithmPushDto
;
import
com.censoft.flink.domain.AlgorithmSceneBasePo
;
import
com.censoft.flink.domain.AlgorithmScenePiecePo
;
...
...
@@ -51,7 +52,14 @@ public class AlarmThresholdFunction implements AlgorithmBaseFilterFunction {
String
label
=
po
.
getLabel
();
if
(
label
.
contains
(
"_"
))
{
String
thresholdString
=
label
.
substring
(
label
.
indexOf
(
"_"
)
+
1
);
return
Integer
.
valueOf
(
thresholdString
);
if
(
NumberUtil
.
isInteger
(
thresholdString
))
{
return
Integer
.
valueOf
(
thresholdString
);
}
else
if
(
NumberUtil
.
isDouble
(
thresholdString
))
{
double
v
=
Double
.
valueOf
(
thresholdString
)
*
100
;
return
(
int
)
v
;
}
else
{
return
null
;
}
}
else
{
return
null
;
}
...
...
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