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 c7623aee
authored
Apr 15, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]产品名称修改
1 parent
8b354337
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
src/main/java/com/glsx/smart/service/impl/SmartSceneServiceImpl.java
src/main/java/com/glsx/smart/service/impl/SmartSceneServiceImpl.java
View file @
c7623ae
...
...
@@ -390,8 +390,14 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
if
(
CollectionUtils
.
isEmpty
(
orderResponseList
))
{
context
=
MessageFormat
.
format
(
"您配置的{0}场景已在{1} 成功执行"
,
scene_name
,
new
Date
());
}
else
{
List
<
String
>
names
=
orderResponseList
.
stream
().
map
(
p
->
p
.
getDeviceName
()).
collect
(
Collectors
.
toList
());
context
=
MessageFormat
.
format
(
"您配置的{0}场景已在{1}触发执行,但因以下设备{2}未能执行成功,请关注以上设备状态"
,
scene_name
,
new
Date
(),
names
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderResponseList
.
size
();
i
++){
OrderResponse
orderResponse
=
orderResponseList
.
get
(
i
);
String
deviceName
=
orderResponse
.
getDeviceName
();
String
message
=
orderResponse
.
getMessage
();
sb
.
append
(
deviceName
).
append
(
message
).
append
(
","
);
}
context
=
MessageFormat
.
format
(
"您配置的{0}场景已在{1}触发执行,但因以下设备{2}未能执行成功,请关注以上设备状态"
,
scene_name
,
new
Date
(),
sb
.
toString
().
substring
(
0
,
sb
.
toString
().
length
()-
1
));
}
return
context
;
}
...
...
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