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 ac15dc6d
authored
Apr 12, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 远程设备条件处理注释添加--think.wang
1 parent
bc55c653
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
src/main/java/com/glsx/smart/service/impl/SmartProductTypeServiceImpl.java
src/main/java/com/glsx/smart/service/impl/SmartProductTypeServiceImpl.java
View file @
ac15dc6
...
@@ -177,6 +177,7 @@ public class SmartProductTypeServiceImpl extends BaseService implements SmartPro
...
@@ -177,6 +177,7 @@ public class SmartProductTypeServiceImpl extends BaseService implements SmartPro
if
(
CollectionUtils
.
isEmpty
(
productList
)){
if
(
CollectionUtils
.
isEmpty
(
productList
)){
return
arrayList
;
return
arrayList
;
}
}
//获取设备类型列表
List
<
SmartProductType
>
list
;
List
<
SmartProductType
>
list
;
if
(
status
==
1
){
if
(
status
==
1
){
list
=
productTypeMapper
.
getAllConditionList
();
list
=
productTypeMapper
.
getAllConditionList
();
...
@@ -194,12 +195,13 @@ public class SmartProductTypeServiceImpl extends BaseService implements SmartPro
...
@@ -194,12 +195,13 @@ public class SmartProductTypeServiceImpl extends BaseService implements SmartPro
list
.
stream
().
forEach
(
index
->{
list
.
stream
().
forEach
(
index
->{
typeMap
.
put
(
index
.
getId
(),
index
);
typeMap
.
put
(
index
.
getId
(),
index
);
});
});
//远程设备数据封装
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
JSONObject
object
=
array
.
getJSONObject
(
i
);
JSONObject
object
=
array
.
getJSONObject
(
i
);
String
productId
=
object
.
getString
(
"product_id"
);
String
productId
=
object
.
getString
(
"product_id"
);
SmartProduct
product
=
this
.
compareProductId
(
productList
,
productId
);
SmartProduct
product
=
this
.
compareProductId
(
productList
,
productId
);
if
(
product
==
null
){
if
(
product
==
null
){
break
;
continue
;
}
}
SmartProductType
productType
=
typeMap
.
get
(
product
.
getTypeId
());
SmartProductType
productType
=
typeMap
.
get
(
product
.
getTypeId
());
if
(
productType
!=
null
){
if
(
productType
!=
null
){
...
...
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