Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
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 69219925
authored
Apr 13, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 获取场景或者模板详情调整--think.wang
1 parent
1788da76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
src/main/java/com/glsx/smart/service/impl/SmartTemplateParamServiceImpl.java
src/main/java/com/glsx/smart/service/impl/SmartTemplateParamServiceImpl.java
View file @
6921992
...
...
@@ -7,10 +7,7 @@ import com.glsx.smart.dao.entity.SmartDeviceOrder;
import
com.glsx.smart.dao.entity.SmartDeviceOrdervalue
;
import
com.glsx.smart.dao.entity.SmartScenceSupstatus
;
import
com.glsx.smart.dao.entity.SmartTemplateParam
;
import
com.glsx.smart.dao.mapper.SmartDeviceOrderMapper
;
import
com.glsx.smart.dao.mapper.SmartDeviceOrdervalueMapper
;
import
com.glsx.smart.dao.mapper.SmartScenceSupstatusMapper
;
import
com.glsx.smart.dao.mapper.SmartTemplateParamMapper
;
import
com.glsx.smart.dao.mapper.*
;
import
com.glsx.smart.exception.BusinessException
;
import
com.glsx.smart.exception.ResultEnum
;
import
com.glsx.smart.service.SmartTemplateParamService
;
...
...
@@ -35,6 +32,9 @@ public class SmartTemplateParamServiceImpl implements SmartTemplateParamService
private
SmartTemplateParamMapper
templateParamMapper
;
@Resource
private
SmartProductTypeMapper
productTypeMapper
;
@Resource
private
SmartDeviceOrderMapper
deviceOrderMapper
;
@Resource
...
...
@@ -76,12 +76,15 @@ public class SmartTemplateParamServiceImpl implements SmartTemplateParamService
//触发条件设备状态
if
(
Constants
.
SCENE_CONDITION_STATUS
.
equals
(
data
.
getParamKey
())){
Long
orderId
=
jsonObject
.
getLong
(
"orderId"
);
Long
typeId
=
jsonObject
.
getLong
(
"select"
);
SmartScenceSupstatus
supstatus
=
supstatusMapper
.
selectByPrimaryKey
(
orderId
);
jsonObject
.
put
(
"orderName"
,
supstatus
.
getSceneSupstatusValue
());
jsonObject
.
put
(
"productName"
,
productTypeMapper
.
selectByPrimaryKey
(
typeId
).
getTypeName
());
}
//执行内容设备功能
if
(
Constants
.
SCENE_CONTENT_DEVICE
.
equals
(
data
.
getParamKey
())){
Long
orderId
=
jsonObject
.
getLong
(
"orderId"
);
Long
typeId
=
jsonObject
.
getLong
(
"select"
);
SmartDeviceOrder
order
=
deviceOrderMapper
.
selectByPrimaryKey
(
orderId
);
jsonObject
.
put
(
"orderName"
,
order
.
getOrderValue
());
if
(
"2"
.
equals
(
order
.
getOrderType
())){
...
...
@@ -89,6 +92,7 @@ public class SmartTemplateParamServiceImpl implements SmartTemplateParamService
orderValueMapper
.
selectByPrimaryKey
(
jsonObject
.
getLong
(
"valueId"
));
jsonObject
.
put
(
"valueName"
,
orderValue
.
getDeviceStatusValue
());
}
jsonObject
.
put
(
"productName"
,
productTypeMapper
.
selectByPrimaryKey
(
typeId
).
getTypeName
());
}
data
.
setParamValue
(
JSON
.
toJSONString
(
jsonObject
));
}
...
...
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