Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-rest-admin-job-archetype
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5f4730c6
authored
Mar 29, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.触发条件值判断,如果输入值value为空,则读取order_value
1 parent
6501ef83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
glsx-rest-admin-job/src/main/java/cn/com/glsx/smartdevice/service/SceneService.java
glsx-rest-admin-job/src/main/java/cn/com/glsx/smartdevice/service/SceneService.java
View file @
5f4730c
...
@@ -169,7 +169,16 @@ public class SceneService {
...
@@ -169,7 +169,16 @@ public class SceneService {
//参数三,逻辑(1:<,2:>,3:=)
//参数三,逻辑(1:<,2:>,3:=)
int
logic
=
Integer
.
parseInt
(
paramValue
.
getOrderCondition
());
int
logic
=
Integer
.
parseInt
(
paramValue
.
getOrderCondition
());
//参数四,值
//参数四,值
String
deviceOrderValue
=
paramValue
.
getValue
();
//输入值
String
Value
=
paramValue
.
getValue
();
if
(
StringUtils
.
isEmpty
(
Value
)){
Value
=
paramValue
.
getOrderVal
();
if
(
StringUtils
.
isEmpty
(
Value
)){
log
.
info
(
"设备触发状态值不存在===deviceId:"
+
deviceId
+
"===deviceOrderCode:"
+
deviceOrderCode
+
"===conditionType:"
+
conditionType
);
return
false
;
}
}
DeviceStatus
status
=
deviceStatusMapper
.
getByIdAndCode
(
deviceId
,
deviceOrderCode
);
DeviceStatus
status
=
deviceStatusMapper
.
getByIdAndCode
(
deviceId
,
deviceOrderCode
);
if
(
null
==
status
){
if
(
null
==
status
){
...
@@ -178,8 +187,8 @@ public class SceneService {
...
@@ -178,8 +187,8 @@ public class SceneService {
}
}
//根据logic逻辑码,判断触发条件与数据库中实际的值,判断是否满足
//根据logic逻辑码,判断触发条件与数据库中实际的值,判断是否满足
log
.
info
(
"fz===scenseId:"
+
condition
.
getSceneId
()+
"===condition_val:"
+
deviceOrder
Value
+
"====realval:"
+
status
.
getDeviceOrderValue
()+
"===logic:"
+
logic
);
log
.
info
(
"fz===scenseId:"
+
condition
.
getSceneId
()+
"===condition_val:"
+
Value
+
"====realval:"
+
status
.
getDeviceOrderValue
()+
"===logic:"
+
logic
);
return
ELogic
.
getValueByCode
(
logic
,
deviceOrder
Value
,
status
.
getDeviceOrderValue
());
return
ELogic
.
getValueByCode
(
logic
,
Value
,
status
.
getDeviceOrderValue
());
}
}
//scene_condition_time指定时间
//scene_condition_time指定时间
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment