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
fa575ee1
Commit
fa575ee1
authored
Aug 11, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备告警sql
parent
8bd08217
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
7 deletions
+50
-7
AlarmController.java
...yeejoin/amos/fas/business/controller/AlarmController.java
+1
-1
AlarmMapper.java
...com/yeejoin/amos/fas/business/dao/mapper/AlarmMapper.java
+4
-0
AlarmServiceImpl.java
...join/amos/fas/business/service/impl/AlarmServiceImpl.java
+2
-2
dbTemplate_alarm.xml
...ysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
+43
-4
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/AlarmController.java
View file @
fa575ee1
...
...
@@ -32,7 +32,7 @@ public class AlarmController extends BaseController {
/**
* 风险等级分页查询
*
* @param
id
* @param
queryRequests
* @return
*/
@Permission
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/AlarmMapper.java
View file @
fa575ee1
...
...
@@ -9,6 +9,10 @@ public interface AlarmMapper extends BaseMapper {
long
countPageData
(
CommonPageInfoParam
param
);
long
countAlarmData
();
List
<
HashMap
<
String
,
Object
>>
getAlarmMapperPage
(
CommonPageInfoParam
param
);
List
<
HashMap
<
String
,
Object
>>
getAlarmSingleMapperPage
(
CommonPageInfoParam
param
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/AlarmServiceImpl.java
View file @
fa575ee1
...
...
@@ -27,8 +27,8 @@ public class AlarmServiceImpl implements IAlarmService {
if
(
StringUtil
.
isNotEmpty
(
param
.
getEndDate
())){
param
.
setEndDate
(
param
.
getEndDate
()+
" "
+
"23:59:59"
);
}
long
total
=
alarmMapper
.
count
PageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
alarmMapper
.
getAlarm
MapperPage
(
param
);
long
total
=
alarmMapper
.
count
AlarmData
(
);
List
<
HashMap
<
String
,
Object
>>
content
=
alarmMapper
.
getAlarm
SingleMapperPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
View file @
fa575ee1
...
...
@@ -24,6 +24,12 @@
<if
test=
"endDate!=null"
>
and a.alarm_time
<![CDATA[<=]]>
#{endDate}
</if>
</trim>
</select>
<select
id=
"countAlarmData"
resultType=
"long"
>
SELECT
count(a.id) AS total_num
FROM f_alarm a
</select>
<!--分页查询 -->
<select
id=
"getAlarmMapperPage"
resultType=
"java.util.HashMap"
>
SELECT
...
...
@@ -31,15 +37,20 @@
sa.code,
sa.equip_code as equipCode,
sa.name,
sa.prod
uction_area prod
Area,
sa.prodArea,
sa.protectObj,
a.alarm_time AS alarmTime,
a.alarm_type AS alarmType
a.create_date AS createDate,
a.type AS type,
a.fire_equipment_point_name AS pointName,
a.frequency AS frequency,
a.status AS status,
a.recovery_date AS recoveryDate
FROM `f_alarm` a
inner join
(
select
b.fire_equipment_id,c.`name` as protectObj,d.*
b.fire_equipment_id,c.`name` as protectObj,d.
production_area as prodArea,d.
*
from
f_equipment_fire_equipment b,f_equipment c, f_fire_equipment d
where
...
...
@@ -58,4 +69,31 @@
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<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>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
</mapper>
\ 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