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 b074af6c
authored
Mar 26, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.scense_param_val统一json解析获取对应字段,其余逻辑不变
1 parent
02c9e76a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 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 @
b074af6
...
...
@@ -146,7 +146,7 @@ public class SceneService {
private
boolean
getTriggerResult
(
long
rangeBegintTime
,
ScenseData
condition
,
int
conditionType
)
{
String
key
=
condition
.
getParamKey
();
String
value
=
condition
.
getParamValue
();
//
log.info("fz====scenseId:"+condition.getSceneId()+"===key:"+key+"==VAL:"+value);
log
.
info
(
"fz====scenseId:"
+
condition
.
getSceneId
()+
"===key:"
+
key
+
"==VAL:"
+
value
);
//scene_condition_status设备状态
if
(
Constants
.
CONDITION_STATUS
.
equals
(
key
))
{
//value为设备状态的条件数组
...
...
@@ -159,7 +159,7 @@ public class SceneService {
try
{
paramValue
=
JSON
.
parseObject
(
value
,
ScenseParamValue
.
class
);
}
catch
(
Exception
e
)
{
log
.
info
(
"JSON解析异常:ScenseParamValue===="
+
condition
.
getId
()+
"===conditionType:"
+
conditionType
,
e
);
log
.
info
(
"JSON解析异常:ScenseParamValue===="
+
e
.
getMessage
()+
"===conditionId:"
+
condition
.
getId
()+
"===conditionType:"
+
conditionTyp
e
);
return
false
;
}
//参数一,设备id
...
...
@@ -178,7 +178,7 @@ public class SceneService {
}
//根据logic逻辑码,判断触发条件与数据库中实际的值,判断是否满足
//
log.info("fz===scenseId:"+condition.getSceneId()+"===condition_val:"+deviceOrderValue+"====realval:"+status.getDeviceOrderValue() );
log
.
info
(
"fz===scenseId:"
+
condition
.
getSceneId
()+
"===condition_val:"
+
deviceOrderValue
+
"====realval:"
+
status
.
getDeviceOrderValue
()
);
return
ELogic
.
getValueByCode
(
logic
,
deviceOrderValue
,
status
.
getDeviceOrderValue
());
}
...
...
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