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
9dfe3ebf
Commit
9dfe3ebf
authored
Jan 24, 2024
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
72c5331d
a238fbac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
35 deletions
+36
-35
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+36
-35
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 @
9dfe3ebf
...
...
@@ -1078,42 +1078,43 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
list
)){
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
"SEQUENCE_NBR"
).
toString
()).
collect
(
Collectors
.
toList
());
}
//查询设备是否正在使用
//设备的使用标识是,安装告知和使用登记中有使用记录。
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
){
equIsUseMap
.
putAll
(
installationNoticeEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgInstallationNoticeEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
equIsUseMap
.
putAll
(
useRegistrationEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgUseRegistrationEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
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
){
Boolean
isUse
=
equIsUseMap
.
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
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
if
(!
ValidationUtil
.
isEmpty
(
equIds
)){
//查询设备是否正在使用
//设备的使用标识是,安装告知和使用登记中有使用记录。
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
){
equIsUseMap
.
putAll
(
installationNoticeEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgInstallationNoticeEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
equIsUseMap
.
putAll
(
useRegistrationEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgUseRegistrationEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
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
){
Boolean
isUse
=
equIsUseMap
.
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
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
}
}
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
result
.
setRecords
(
list
);
result
.
setTotal
(
totle
);
...
...
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