Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
c5471235
Commit
c5471235
authored
Dec 11, 2020
by
lizehua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改指标查询列表
parent
868da7b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
29 deletions
+40
-29
AlarmMapper.java
...com/yeejoin/amos/fas/business/dao/mapper/AlarmMapper.java
+1
-1
AlarmServiceImpl.java
...join/amos/fas/business/service/impl/AlarmServiceImpl.java
+2
-8
dbTemplate_alarm.xml
...ysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
+37
-20
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/AlarmMapper.java
View file @
c5471235
...
...
@@ -9,7 +9,7 @@ public interface AlarmMapper extends BaseMapper {
long
countPageData
(
CommonPageInfoParam
param
);
long
countAlarmData
();
long
countAlarmData
(
CommonPageInfoParam
param
);
List
<
HashMap
<
String
,
Object
>>
getAlarmMapperPage
(
CommonPageInfoParam
param
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/AlarmServiceImpl.java
View file @
c5471235
...
...
@@ -21,15 +21,9 @@ public class AlarmServiceImpl implements IAlarmService {
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryAlarmPage
(
CommonPageInfoParam
param
)
{
if
(
StringUtil
.
isNotEmpty
(
param
.
getBeginDate
())){
param
.
setBeginDate
(
param
.
getBeginDate
()+
" "
+
"00:00:00"
);
}
if
(
StringUtil
.
isNotEmpty
(
param
.
getEndDate
())){
param
.
setEndDate
(
param
.
getEndDate
()+
" "
+
"23:59:59"
);
}
long
total
=
alarmMapper
.
countAlarmData
();
long
total
=
alarmMapper
.
countAlarmData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
alarmMapper
.
getAlarmSingleMapperPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>
>(
content
,
param
,
total
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
View file @
c5471235
...
...
@@ -27,8 +27,14 @@
<select
id=
"countAlarmData"
resultType=
"long"
>
SELECT
count(a.id) AS total_num
FROM f_alarm a
count(wlesa.id) AS total_num
FROM wl_equipment_specific_alarm wlesa
left join wl_equipment_specific wles on wlesa.equipment_specific_id = wles.id
left join wl_equipment_detail wled on wles.equipment_detail_id = wled.id
where wled.`name` is not null
<if
test=
"protectObj !=null and protectObj != '' "
>
and wled.`name` like concat(concat("%",#{protectObj}),"%")
</if>
<if
test=
"beginDate!=null"
>
and wlesa.create_date >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and wlesa.create_date
<![CDATA[<=]]>
#{endDate}
</if>
</select>
<!--分页查询 -->
<select
id=
"getAlarmMapperPage"
resultType=
"java.util.HashMap"
>
...
...
@@ -73,24 +79,35 @@
<select
id=
"getAlarmSingleMapperPage"
resultType=
"java.util.HashMap"
>
SELECT
f.id,
f.fire_equipment_id as fireEquipmentId,
f.fire_equipment_code as fireEquipmentCode,
f.fire_equipment_name as fireEquipmentName,
f.fire_equipment_point_id as fireEquipmentPointId,
f.fire_equipment_point_code as fireEquipmentPointCode,
f.fire_equipment_point_name as fireEquipmentPointName,
f.fire_equipment_point_value as fireEquipmentPointValue,
f.frequency as frequency,
f.status as status,
f.type as type,
f.create_date as createDate,
f.recovery_date as recoveryDate
FROM f_alarm f
WHERE 1=1
<if
test=
"protectObj !=null and protectObj != '' "
>
and f.fire_equipment_name like concat(concat("%",#{protectObj}),"%")
</if>
<if
test=
"beginDate!=null"
>
and f.create_date >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and f.create_date
<![CDATA[<=]]>
#{endDate}
</if>
wlesa.id,
wlesa.equipment_specific_id as fireEquipmentId,
wles.code as fireEquipmentCode,
wled.`name` as fireEquipmentName,
wlesa.equipment_index_id as fireEquipmentPointId,
wlesa.equipment_specific_index_key as fireEquipmentPointCode,
wlesa.equipment_specific_index_name as fireEquipmentPointName,
CASE
wlesa.equipment_specific_index_value
WHEN 'true' then '是'
WHEN 'false' then '否'
ELSE wlesa.equipment_specific_index_value end
as fireEquipmentPointValue,
wlesa.frequency as frequency,
wlesa.status as status,
CASE
wlesa.type
WHEN 'FIREALARM' THEN '火灾报警'
WHEN 'BREAKDOWN' THEN '故障告警' ELSE wlesa.type
END AS type,
wlesa.create_date as createDate,
wlesa.recovery_date as recoveryDate
FROM wl_equipment_specific_alarm wlesa
left join wl_equipment_specific wles on wlesa.equipment_specific_id = wles.id
left join wl_equipment_detail wled on wles.equipment_detail_id = wled.id
WHERE wled.`name` is not null
<if
test=
"protectObj !=null and protectObj != '' "
>
and wled.`name` like concat(concat("%",#{protectObj}),"%")
</if>
<if
test=
"beginDate!=null"
>
and wlesa.create_date >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and wlesa.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
...
...
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