Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
162bd448
Commit
162bd448
authored
Jan 23, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:设备列表是否在用
parent
065548dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+19
-8
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
162bd448
...
@@ -1072,6 +1072,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1072,6 +1072,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
}
}
dto2
.
put
(
"record"
,
dto2
.
get
(
"SEQUENCE_NBR"
));
list
.
add
(
dto2
);
list
.
add
(
dto2
);
}
}
// 获取所有设备的Id
// 获取所有设备的Id
...
@@ -1084,24 +1085,34 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1084,24 +1085,34 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
//
if(!ValidationUtil.isEmpty(installationNoticeEqList) ){
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
){
// equIsUseMap.putAll(installationNoticeEqList.stream().collect(Collectors.toMap(JgInstallationNoticeEq::getEquId, obj -> tr
ue)));
equIsUseMap
.
putAll
(
installationNoticeEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgInstallationNoticeEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldVal
ue
)));
//
}
}
//
if(!ValidationUtil.isEmpty(useRegistrationEqList)){
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
// equIsUseMap.putAll(useRegistrationEqList.stream().collect(Collectors.toMap(JgUseRegistrationEq::getEquId, obj -> tr
ue)));
equIsUseMap
.
putAll
(
useRegistrationEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgUseRegistrationEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldVal
ue
)));
//
}
}
// 查询设备地址
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
useInfo
->
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
()
+
"/"
+
useInfo
.
getAddress
()));
useInfo
->
{
String
fulladdress
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
fulladdress
+=
useInfo
.
getProvinceName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
fulladdress
+=
useInfo
.
getCityName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
fulladdress
+=
useInfo
.
getCountyName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
fulladdress
+=
useInfo
.
getStreetName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
fulladdress
+=
useInfo
.
getAddress
();
return
fulladdress
;
}
)
);
}
}
// 更新设备使用情况和设备地址
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
){
for
(
JSONObject
item
:
list
){
Boolean
isUse
=
equIsUseMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
Boolean
isUse
=
equIsUseMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
//
item.put("IS_USE", !ValidationUtil.isEmpty(isUse) ? isUse ? isUse : false : false);
item
.
put
(
"IS_USE"
,
!
ValidationUtil
.
isEmpty
(
isUse
)
?
isUse
?
isUse
:
false
:
false
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment