Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zhxf_java
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
葛齐林
zhxf_java
Commits
988ce245
Commit
988ce245
authored
May 13, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警接口
parent
1639a4e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
AlarmsInfoMapper.xml
...ram/src/main/resources/mapper/alarms/AlarmsInfoMapper.xml
+7
-10
No files found.
microservice-alram/src/main/resources/mapper/alarms/AlarmsInfoMapper.xml
View file @
988ce245
...
@@ -77,10 +77,6 @@
...
@@ -77,10 +77,6 @@
or INSTR(ai.resource_name, #{params})
or INSTR(ai.resource_name, #{params})
or INSTR(ls.station_name, #{params}))
or INSTR(ls.station_name, #{params}))
</if>
</if>
<!--查询未处理的-->
<if
test=
"status == null"
>
and ai.status IN (1,2)
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and ai.status = #{status}
and ai.status = #{status}
</if>
</if>
...
@@ -92,9 +88,6 @@
...
@@ -92,9 +88,6 @@
</foreach>
</foreach>
</if>
</if>
</if>
</if>
<if
test=
'systemId != null and systemId != "" and systemId != "0"'
>
and ai.system_id = #{systemId}
</if>
<if
test=
'stationId != null and stationId != ""'
>
<if
test=
'stationId != null and stationId != ""'
>
and ai.station_id = #{stationId}
and ai.station_id = #{stationId}
</if>
</if>
...
@@ -108,10 +101,11 @@
...
@@ -108,10 +101,11 @@
<!--根据id查询报警信息-->
<!--根据id查询报警信息-->
<select
id=
"queryById"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<select
id=
"queryById"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select ai.*,ls.station_name stationName,lsm.name tierName,lr.code as resourceCode from alarms_info ai
select ai.*,ls.station_name stationName,lsm.name tierName,lr.code as resourceCode
,le.event_name as eventTypeName
from alarms_info ai
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_station ls on lr.station_id = ai.id
left join li_station ls on lr.station_id = ai.id
left join li_station_map lsm on lsm.id = lr.tier_id and lsm.station_id = ai.station_id
left join li_station_map lsm on lsm.id = lr.tier_id and lsm.station_id = ai.station_id
left join link_event le on le.id = ai.event_type
where ai.deleted=0 and ai.id = #{id}
where ai.deleted=0 and ai.id = #{id}
<if
test=
'stationId != null and stationId != ""'
>
<if
test=
'stationId != null and stationId != ""'
>
and ai.station_id = #{stationId}
and ai.station_id = #{stationId}
...
@@ -128,10 +122,11 @@
...
@@ -128,10 +122,11 @@
<!--分页查询-->
<!--分页查询-->
<select
id=
"queryPageByList"
parameterType=
"java.lang.Object"
resultMap=
"BaseResultMap"
>
<select
id=
"queryPageByList"
parameterType=
"java.lang.Object"
resultMap=
"BaseResultMap"
>
select ai.*,lr.type as resourceType,ls.station_name as stationName
select ai.*,lr.type as resourceType,ls.station_name as stationName
,le.event_name as eventTypeName
from alarms_info ai
from alarms_info ai
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_station ls on ls.id = ai.station_id
left join li_station ls on ls.id = ai.station_id
left join link_event le on le.id = ai.event_type
<include
refid=
"queryPageByListClause"
></include>
<include
refid=
"queryPageByListClause"
></include>
<if
test=
"pager.orderCondition != null and pager.orderCondition != ''"
>
<if
test=
"pager.orderCondition != null and pager.orderCondition != ''"
>
${pager.orderCondition}
${pager.orderCondition}
...
@@ -142,10 +137,12 @@
...
@@ -142,10 +137,12 @@
</select>
</select>
<select
id=
"queryAll"
parameterType=
"java.lang.Object"
resultMap=
"BaseResultMap"
>
<select
id=
"queryAll"
parameterType=
"java.lang.Object"
resultMap=
"BaseResultMap"
>
select ai.*,ls.station_name as stationName,lsm.name as tierName from alarms_info ai
select ai.*,ls.station_name as stationName,lsm.name as tierName,le.event_name as eventTypeName
from alarms_info ai
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_resource lr on lr.id = ai.resource_id and lr.station_id = ai.station_id
left join li_station ls on lr.station_id = ls.id and ls.station_id = ai.station_id
left join li_station ls on lr.station_id = ls.id and ls.station_id = ai.station_id
left join li_station_map lsm on lsm.id = lr.tier_id and lsm.station_id = ai.station_id
left join li_station_map lsm on lsm.id = lr.tier_id and lsm.station_id = ai.station_id
left join link_event le on le.id = ai.event_type
where ai.deleted=0
where ai.deleted=0
<if
test=
"params.status!=null "
>
and ai.status = #{params.status}
</if>
<if
test=
"params.status!=null "
>
and ai.status = #{params.status}
</if>
<if
test=
"params.stationId!=null and params.stationId !=''"
>
and lr.station_id = #{params.stationId} and ai.station_id = #{params.stationId}
</if>
<if
test=
"params.stationId!=null and params.stationId !=''"
>
and lr.station_id = #{params.stationId} and ai.station_id = #{params.stationId}
</if>
...
...
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