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
e4297db6
Commit
e4297db6
authored
May 11, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物联报表附件
parent
edfe5a18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
13 deletions
+79
-13
ReportAlarmDto.java
...main/java/com/yeejoin/equipmanage/dto/ReportAlarmDto.java
+39
-0
EquipmentSpecificAlarmMapper.java
...join/equipmanage/mapper/EquipmentSpecificAlarmMapper.java
+2
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+32
-8
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+6
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/ReportAlarmDto.java
0 → 100644
View file @
e4297db6
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/**
* @author keyong
* @title: ReportAlarmDto
* <pre>
* @description: TODO
* </pre>
* @date 2024/5/11 9:56
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ReportAlarmDto
{
private
String
equipmentSpecificId
;
private
String
specificName
;
private
String
location
;
private
String
equipmentSpecificIndexName
;
private
String
alamContent
;
private
BigDecimal
alarmNum
;
private
String
createDate
;
private
String
updateDate
;
private
String
type
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificAlarmMapper.java
View file @
e4297db6
...
@@ -11,6 +11,7 @@ import com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO;
...
@@ -11,6 +11,7 @@ import com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIotAlarmVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIotAlarmVO
;
import
com.yeejoin.equipmanage.common.utils.CommonPageInfoParam
;
import
com.yeejoin.equipmanage.common.utils.CommonPageInfoParam
;
import
com.yeejoin.equipmanage.common.vo.EquipAlarmLineVo
;
import
com.yeejoin.equipmanage.common.vo.EquipAlarmLineVo
;
import
com.yeejoin.equipmanage.dto.ReportAlarmDto
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -235,5 +236,5 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
...
@@ -235,5 +236,5 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
void
clearAlarmData
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
);
void
clearAlarmData
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
);
List
<
Map
<
String
,
Object
>
>
getAlarmDetailByDate
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"sysId"
)
Long
sysId
);
List
<
ReportAlarmDto
>
getAlarmDetailByDate
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"sysId"
)
Long
sysId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
e4297db6
...
@@ -30,6 +30,7 @@ import com.yeejoin.equipmanage.common.enums.*;
...
@@ -30,6 +30,7 @@ import com.yeejoin.equipmanage.common.enums.*;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.controller.EquipmentDetailController
;
import
com.yeejoin.equipmanage.controller.EquipmentDetailController
;
import
com.yeejoin.equipmanage.dto.ReportAlarmDto
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
...
@@ -63,6 +64,7 @@ import java.nio.charset.StandardCharsets;
...
@@ -63,6 +64,7 @@ import java.nio.charset.StandardCharsets;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
java
.
lang
.
String
.
valueOf
;
import
static
java
.
lang
.
String
.
valueOf
;
...
@@ -1602,7 +1604,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1602,7 +1604,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// 系统循环数据填充
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
systemList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
systemList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>
>
attachAlarmList
=
new
ArrayList
<>();
List
<
ReportAlarmDto
>
attachAlarmList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
system
))
{
if
(!
CollectionUtils
.
isEmpty
(
system
))
{
// 换流站信息
// 换流站信息
if
(!
ObjectUtils
.
isEmpty
(
system
.
get
(
0
).
get
(
"stationName"
))){
if
(!
ObjectUtils
.
isEmpty
(
system
.
get
(
0
).
get
(
"stationName"
))){
...
@@ -1622,7 +1624,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1622,7 +1624,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
sys
.
get
(
"id"
))));
List
<
ReportAlarmDto
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
sys
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
@@ -1723,6 +1725,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1723,6 +1725,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"datalist"
,
systemList
);
map
.
put
(
"datalist"
,
systemList
);
}
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
attachAlarmList
))
{
Map
<
String
,
List
<
ReportAlarmDto
>>
listMap
=
attachAlarmList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReportAlarmDto:
:
getEquipmentSpecificId
));
List
<
ReportAlarmDto
>
dtos
=
new
ArrayList
<>();
for
(
List
<
ReportAlarmDto
>
list
:
listMap
.
values
())
{
dtos
.
addAll
(
list
);
}
attachAlarmList
=
dtos
;
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
}
else
{
return
null
;
return
null
;
...
@@ -1817,7 +1827,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1817,7 +1827,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"time"
,
startDate
+
"至"
+
endDate
);
map
.
put
(
"time"
,
startDate
+
"至"
+
endDate
);
// 系统循环数据填充
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>
>
attachAlarmList
=
new
ArrayList
<>();
List
<
ReportAlarmDto
>
attachAlarmList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
...
@@ -1827,7 +1837,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1827,7 +1837,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
List
<
ReportAlarmDto
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
@@ -1944,6 +1954,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1944,6 +1954,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"data"
,
dataList
);
map
.
put
(
"data"
,
dataList
);
}
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
attachAlarmList
))
{
Map
<
String
,
List
<
ReportAlarmDto
>>
listMap
=
attachAlarmList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReportAlarmDto:
:
getEquipmentSpecificId
));
List
<
ReportAlarmDto
>
dtos
=
new
ArrayList
<>();
for
(
List
<
ReportAlarmDto
>
list
:
listMap
.
values
())
{
dtos
.
addAll
(
list
);
}
attachAlarmList
=
dtos
;
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
}
else
{
return
null
;
return
null
;
...
@@ -2024,7 +2042,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2024,7 +2042,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// 系统循环数据填充
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>
>
attachAlarmList
=
new
ArrayList
<>();
List
<
ReportAlarmDto
>
attachAlarmList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
...
@@ -2034,7 +2052,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2034,7 +2052,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
List
<
ReportAlarmDto
>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startTime
,
endTime
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
@@ -2152,12 +2170,18 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2152,12 +2170,18 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"data"
,
dataList
);
map
.
put
(
"data"
,
dataList
);
}
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
attachAlarmList
))
{
Map
<
String
,
List
<
ReportAlarmDto
>>
listMap
=
attachAlarmList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReportAlarmDto:
:
getEquipmentSpecificId
));
List
<
ReportAlarmDto
>
dtos
=
new
ArrayList
<>();
for
(
List
<
ReportAlarmDto
>
list
:
listMap
.
values
())
{
dtos
.
addAll
(
list
);
}
attachAlarmList
=
dtos
;
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
return
map
;
return
map
;
}
}
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
e4297db6
...
@@ -1601,15 +1601,17 @@
...
@@ -1601,15 +1601,17 @@
DELETE FROM wl_equipment_alarm_report_day WHERE equipment_specific_id = #{equipmentSpecificId};
DELETE FROM wl_equipment_alarm_report_day WHERE equipment_specific_id = #{equipmentSpecificId};
</delete>
</delete>
<select
id=
"getAlarmDetailByDate"
resultType=
"
Map
"
>
<select
id=
"getAlarmDetailByDate"
resultType=
"
com.yeejoin.equipmanage.dto.ReportAlarmDto
"
>
SELECT
SELECT
wlesa.equipment_specific_id,
wlesa.equipment_specific_id
AS equipmentSpecificId
,
wlesa.equipment_specific_name AS specificName,
wlesa.equipment_specific_name AS specificName,
wlesa.location AS location,
wlesa.location AS location,
wlesa.equipment_specific_index_name,
wlesa.equipment_specific_index_name
AS equipmentSpecificIndexName
,
concat(wlesa.equipment_specific_name, wlesa.equipment_specific_index_name) AS alamContent,
concat(wlesa.equipment_specific_name, wlesa.equipment_specific_index_name) AS alamContent,
IFNULL(SUM(wlesa.frequency), 0) AS alarmNum,
IFNULL(SUM(wlesa.frequency), 0) AS alarmNum,
DATE_FORMAT(wlesa.update_date, '%Y-%m-%d %H:%i:%s') AS createDate
wlesa.type AS type,
DATE_FORMAT(wlesa.update_date, '%Y-%m-%d %H:%i:%s') AS updateDate,
DATE_FORMAT(wlesa.create_date, '%Y-%m-%d %H:%i:%s') AS createDate
FROM
FROM
`wl_equipment_specific_alarm` `wlesa`
`wl_equipment_specific_alarm` `wlesa`
<where>
<where>
...
...
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