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
af162784
Commit
af162784
authored
Apr 02, 2024
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务23724 :消防巡检列表API优化
parent
ff3abd7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+19
-17
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
af162784
...
@@ -190,24 +190,26 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -190,24 +190,26 @@ public class CheckServiceImpl implements ICheckService {
return
new
PageImpl
<>(
content
,
param
,
total
);
return
new
PageImpl
<>(
content
,
param
,
total
);
}
}
content
=
checkMapper
.
getPeopleCheckPage
(
param
);
content
=
checkMapper
.
getPeopleCheckPage
(
param
);
String
checkIds
=
String
.
join
(
","
,
content
.
stream
().
map
(
CheckInfoVo:
:
getId
).
collect
(
Collectors
.
toList
()));
FeignClientResult
responseModel
=
new
FeignClientResult
();
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
();
try
{
responseModel
=
idxFeign
.
queryDefectByCodes
(
new
ArrayList
<>(),
checkIds
);
result
=
(
List
)
responseModel
.
getResult
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Map
<
String
,
Map
<
String
,
String
>>
checkIdMap
=
new
HashMap
<>();
if
(
result
!=
null
&&
0
<
result
.
size
())
{
checkIdMap
=
result
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"checkId"
),
t
->
t
,
(
k1
,
k2
)
->
k2
));
}
for
(
CheckInfoVo
infoVo
:
content
)
{
for
(
CheckInfoVo
infoVo
:
content
)
{
FeignClientResult
responseModel
=
new
FeignClientResult
();
if
(!
ObjectUtils
.
isEmpty
(
checkIdMap
)
&&
checkIdMap
.
containsKey
(
infoVo
.
getId
())
&&
!
ObjectUtils
.
isEmpty
(
checkIdMap
.
get
(
infoVo
.
getId
())))
{
List
result
=
new
ArrayList
();
Map
<
String
,
String
>
map
=
checkIdMap
.
get
(
infoVo
.
getId
());
try
{
DefectVo
vo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
DefectVo
.
class
);
responseModel
=
idxFeign
.
queryDefectByCodes
(
new
ArrayList
<>(),
infoVo
.
getId
());
infoVo
.
setError
(
vo
.
getDefectDescribe
());
result
=
(
List
)
responseModel
.
getResult
();
infoVo
.
setProblemNum
(
vo
.
getDefectNum
());
}
catch
(
Exception
e
)
{
infoVo
.
setHandleStatus
(
String
.
valueOf
(
vo
.
getDefectStatus
()));
e
.
printStackTrace
();
}
List
<
DefectVo
>
res
=
new
ArrayList
();
if
(
result
!=
null
&&
0
<
result
.
size
())
{
for
(
Object
object
:
result
)
{
DefectVo
vo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
),
DefectVo
.
class
);
res
.
add
(
vo
);
}
infoVo
.
setError
(
ObjectUtils
.
isEmpty
(
res
.
get
(
0
))
?
""
:
res
.
get
(
0
).
getDefectDescribe
());
infoVo
.
setProblemNum
(
ObjectUtils
.
isEmpty
(
res
.
get
(
0
))
?
""
:
res
.
get
(
0
).
getDefectNum
());
infoVo
.
setHandleStatus
(
ObjectUtils
.
isEmpty
(
res
.
get
(
0
))
?
""
:
String
.
valueOf
(
res
.
get
(
0
).
getDefectStatus
()));
}
}
}
}
return
new
PageImpl
<>(
content
,
param
,
total
);
return
new
PageImpl
<>(
content
,
param
,
total
);
...
...
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