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
03064ffa
Commit
03064ffa
authored
Jan 05, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(物联报表): 告警数据统计错误
parent
90a5fb20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+3
-6
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+4
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
03064ffa
...
@@ -1649,9 +1649,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1649,9 +1649,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
alarmMap
.
put
(
"fault_equip_num"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"fault_equip_num"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"fault_equip_num"
)));
alarmMap
.
put
(
"fault_equip_num"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"fault_equip_num"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"fault_equip_num"
)));
// 故障信息条数
// 故障信息条数
alarmMap
.
put
(
"alarm_info_num"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"fault_info_num"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"fault_info_num"
)));
alarmMap
.
put
(
"alarm_info_num"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"fault_info_num"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"fault_info_num"
)));
if
(
Integer
.
parseInt
(
alarmMap
.
get
(
"alarm_info_num"
).
toString
())
==
0
)
{
continue
;
}
// 设备故障率
// 设备故障率
alarmMap
.
put
(
"faultEquipPercent"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"faultEquipPercent"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"faultEquipPercent"
)));
alarmMap
.
put
(
"faultEquipPercent"
,
ObjectUtils
.
isEmpty
(
alarm
.
get
(
"faultEquipPercent"
))
?
""
:
String
.
valueOf
(
alarm
.
get
(
"faultEquipPercent"
)));
// 报警设备总数
// 报警设备总数
...
@@ -1863,9 +1860,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1863,9 +1860,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
else
{
}
else
{
listItem
.
put
(
"alarmEquipNum"
,
String
.
valueOf
(
0
));
listItem
.
put
(
"alarmEquipNum"
,
String
.
valueOf
(
0
));
}
}
if
(
Integer
.
parseInt
(
listItem
.
get
(
"alarmEquipNum"
).
toString
())
==
0
)
{
continue
;
}
// listItem.put("alarmEquipNum", ObjectUtils.isEmpty(weekItem.get("alarmEquipNum")) ? "" : String.valueOf(weekItem.get("alarmEquipNum")));
// listItem.put("alarmEquipNum", ObjectUtils.isEmpty(weekItem.get("alarmEquipNum")) ? "" : String.valueOf(weekItem.get("alarmEquipNum")));
// 7日告警条数
// 7日告警条数
if
(!
ObjectUtils
.
isEmpty
(
weekItem
.
get
(
"type_code"
))
&&
!
ObjectUtils
.
isEmpty
(
weekItem
.
get
(
"code"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
weekItem
.
get
(
"type_code"
))
&&
!
ObjectUtils
.
isEmpty
(
weekItem
.
get
(
"code"
)))
{
...
@@ -1874,6 +1868,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1874,6 +1868,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
else
{
}
else
{
listItem
.
put
(
"trueNum"
,
String
.
valueOf
(
0
));
listItem
.
put
(
"trueNum"
,
String
.
valueOf
(
0
));
}
}
if
(
Integer
.
parseInt
(
listItem
.
get
(
"trueNum"
).
toString
())
==
0
)
{
continue
;
}
list
.
add
(
listItem
);
list
.
add
(
listItem
);
}
}
}
else
{
}
else
{
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
03064ffa
...
@@ -4222,8 +4222,8 @@
...
@@ -4222,8 +4222,8 @@
and FIND_IN_SET( #{systemId},e.system_id)
and FIND_IN_SET( #{systemId},e.system_id)
AND e.equipment_code = spec.equipment_code
AND e.equipment_code = spec.equipment_code
AND e.index_key = spec_index.equipment_index_key
AND e.index_key = spec_index.equipment_index_key
AND e.report_date >= DATE_FORMAT(#{startDate},'%
y
-%m-%d')
AND e.report_date >= DATE_FORMAT(#{startDate},'%
Y
-%m-%d')
AND e.report_date
<
= DATE_FORMAT(#{endDate},'%
y
-%m-%d')
AND e.report_date
<
= DATE_FORMAT(#{endDate},'%
Y
-%m-%d')
),
),
0
0
) AS alarmEquipNum
) AS alarmEquipNum
...
@@ -4239,7 +4239,7 @@
...
@@ -4239,7 +4239,7 @@
)temp LEFT JOIN wl_equipment_index wei on temp.equipment_index_id = wei.id
)temp LEFT JOIN wl_equipment_index wei on temp.equipment_index_id = wei.id
)temp1 on temp.system_id = temp1.systemId and temp.code = temp1.code
)temp1 on temp.system_id = temp1.systemId and temp.code = temp1.code
group by type_code
group by
code,
type_code
ORDER BY temp.name
ORDER BY temp.name
</select>
</select>
<select
id=
"selectAlarms"
resultType=
"java.lang.Integer"
>
<select
id=
"selectAlarms"
resultType=
"java.lang.Integer"
>
...
@@ -4383,7 +4383,7 @@
...
@@ -4383,7 +4383,7 @@
LEFT JOIN wl_equipment_detail detail ON spec.equipment_detail_id = detail.id
LEFT JOIN wl_equipment_detail detail ON spec.equipment_detail_id = detail.id
LEFT JOIN wl_equipment equipment ON equipment.id =detail.equipment_id
LEFT JOIN wl_equipment equipment ON equipment.id =detail.equipment_id
left join f_fire_fighting_system s on FIND_IN_SET(s.id,spec.system_id)
left join f_fire_fighting_system s on FIND_IN_SET(s.id,spec.system_id)
where FIND_IN_SET(#{systemId} , spec.system_id)
and spec.create_date
<
#{endDate}
where FIND_IN_SET(#{systemId} , spec.system_id)
AND equipment.is_iot = 1
GROUP BY code,s.id, name ORDER BY system_id, code ) a) as a1
GROUP BY code,s.id, name ORDER BY system_id, code ) a) as a1
GROUP BY a1.system_id
GROUP BY a1.system_id
) as b
) as b
...
...
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