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
b53c0e34
Commit
b53c0e34
authored
Mar 19, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
17826:【小程序端-电站监控】报警信息>电站报警列表,未处理报警列表没有一条数据
parent
a9365470
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
19 deletions
+28
-19
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+0
-0
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+28
-19
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
b53c0e34
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
View file @
b53c0e34
...
...
@@ -69,7 +69,7 @@ public class TdHygfJpInverterWarnServiceImpl
// }
List
<
TdHygfJpInverterWarnDto
>
list
=
new
ArrayList
<>();
if
(
tdHygfJpInverterWarnDto
.
getStationIds
().
isEmpty
())
{
list
=
this
.
baseMapper
.
list
(
tdHygfJpInverterWarnDto
);
}
else
{
list
=
this
.
baseMapper
.
list
(
tdHygfJpInverterWarnDto
);
...
...
@@ -90,16 +90,23 @@ public class TdHygfJpInverterWarnServiceImpl
}
}
List
<
Long
>
waringIds
=
list
.
stream
().
map
(
tdHygfJpInverterWarnDto1
->
tdHygfJpInverterWarnDto1
.
getCreatedTime
()).
collect
(
Collectors
.
toList
());
if
(
waringIds
.
size
()==
0
)
{
waringIds
=
Arrays
.
asList
(
0L
);
if
(
waringIds
.
size
()
==
0
)
{
waringIds
=
Arrays
.
asList
(
0L
);
}
List
<
HYGFMaintenanceTickets
>
hygfMaintenanceTicketsList
=
hygfMaintenanceTicketsMapper
.
selectList
(
new
QueryWrapper
<
HYGFMaintenanceTickets
>().
in
(
"warning_id"
,
waringIds
));
Set
<
String
>
status
=
hygfMaintenanceTicketsList
.
stream
().
filter
(
hygfmaintenanceTickets
->
tdHygfJpInverterWarnDto
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
)){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"处理中"
);
List
<
HYGFMaintenanceTickets
>
hygfMaintenanceTicketsList
=
hygfMaintenanceTicketsMapper
.
selectList
(
new
QueryWrapper
<
HYGFMaintenanceTickets
>().
in
(
"warning_id"
,
waringIds
));
if
(
hygfMaintenanceTicketsList
.
size
()
>
0
)
{
list
.
forEach
(
i
->
{
List
<
HYGFMaintenanceTickets
>
ticketsList
=
hygfMaintenanceTicketsList
.
stream
().
filter
(
hygfmaintenanceTickets
->
i
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
collect
(
Collectors
.
toList
());
if
(
ObjectUtil
.
isNotEmpty
(
ticketsList
))
{
Set
<
String
>
status
=
ticketsList
.
stream
().
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
))
{
i
.
setTicketStatus
(
"处理中"
);
}
if
(
status
.
contains
(
"已处理"
)&&
status
.
size
()==
1
){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"已处理"
);
if
(
status
.
contains
(
"已处理"
)
&&
status
.
size
()
==
1
)
{
i
.
setTicketStatus
(
"已处理"
);
}
}
});
}
PageInfo
<
TdHygfJpInverterWarnDto
>
page
=
new
PageInfo
(
list
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>();
...
...
@@ -125,8 +132,8 @@ public class TdHygfJpInverterWarnServiceImpl
.
eq
(
JpStation:
:
getThirdStationId
,
tdHygfJpInverterWarnDto
.
getThirdStationId
()));
List
<
HYGFMaintenanceTickets
>
hygfMaintenanceTickets
=
hygfMaintenanceTicketsMapper
.
selectList
(
new
QueryWrapper
<
HYGFMaintenanceTickets
>()
.
eq
(
"warning_id"
,
String
.
valueOf
(
tdHygfJpInverterWarnDto
.
getCreatedTime
()))
.
eq
(
"inverter_sn"
,
String
.
valueOf
(
tdHygfJpInverterWarnDto
.
getSnCode
())));
.
eq
(
"warning_id"
,
String
.
valueOf
(
tdHygfJpInverterWarnDto
.
getCreatedTime
()))
.
eq
(
"inverter_sn"
,
String
.
valueOf
(
tdHygfJpInverterWarnDto
.
getSnCode
())));
if
(
jpStation
!=
null
)
{
tdHygfJpInverterWarnDto
.
setStationName
(
jpStation
.
getName
());
tdHygfJpInverterWarnDto
.
setStationContact
(
jpStation
.
getStationContact
());
...
...
@@ -145,12 +152,12 @@ public class TdHygfJpInverterWarnServiceImpl
tdHygfJpInverterWarnDto
.
setStartTimeFormat
(
TimeUtil
.
dateFormat
(
tdHygfJpInverterWarnDto
.
getStartTime
()));
}
}
if
(
hygfMaintenanceTickets
.
size
()>
0
)
{
if
(
hygfMaintenanceTickets
.
size
()
>
0
)
{
Set
<
String
>
status
=
hygfMaintenanceTickets
.
stream
().
filter
(
hygfmaintenanceTickets
->
tdHygfJpInverterWarnDto
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
))
{
if
(
status
.
contains
(
"未处理"
))
{
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"处理中"
);
}
if
(
status
.
contains
(
"已处理"
)&&
status
.
size
()==
1
)
{
if
(
status
.
contains
(
"已处理"
)
&&
status
.
size
()
==
1
)
{
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"已处理"
);
}
tdHygfJpInverterWarnDto
.
setListTickets
(
hygfMaintenanceTickets
);
...
...
@@ -158,19 +165,20 @@ public class TdHygfJpInverterWarnServiceImpl
return
tdHygfJpInverterWarnDto
;
}
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
this
.
getBaseMapper
().
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,(
current
-
1
)*
size
,
size
,
handlerStatus
);
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
this
.
getBaseMapper
().
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
(
current
-
1
)
*
size
,
size
,
handlerStatus
);
list
.
forEach
(
i
->
{
JpStation
jpStation
=
jpStationServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
JpStation
>()
.
eq
(
JpStation:
:
getThirdStationId
,
i
.
getThirdStationId
()));
if
(
ObjectUtil
.
isNotNull
(
jpStation
))
{
if
(
ObjectUtil
.
isNotNull
(
jpStation
))
{
i
.
setAddress
(
jpStation
.
getAddress
());
i
.
setArea
(
jpStation
.
getArea
());
}
});
return
list
;
}
public
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
){
return
this
.
getBaseMapper
().
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
);
public
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
)
{
return
this
.
getBaseMapper
().
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
);
}
}
\ No newline at end of file
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