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
dabef013
Commit
dabef013
authored
Dec 07, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
0465b044
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
139 additions
and
139 deletions
+139
-139
dbTemplate_fier_station.xml
.../src/main/resources/db/mapper/dbTemplate_fier_station.xml
+139
-139
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station.xml
View file @
dabef013
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper"
>
<select
id=
"queryOne"
resultType=
"java.util.Map"
>
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor AS isIndoor,
fs.picture,
fs.risk_source_id as riskSourceId
FROM
f_fire_station fs
WHERE
fs.id = ${id}
</select>
<select
id=
"queryCountForFireEqumntPage"
resultType=
"long"
>
SELECT
count(1)
FROM
f_fire_station_equipment fs
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
WHERE
fs.fire_station_id = ${fireStationId}
</select>
<select
id=
"queryForFireEqumntPage"
resultType=
"java.util.Map"
>
SELECT
fs.fire_station_id,
fs.number numberInStation,
fs.unit unitInStation,
f.*,
frs.name riskSourceName
FROM
f_fire_station_equipment fs
left join f_fire_equipment f ON fs.fire_equipment_id = f.id
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
fs.fire_station_id = ${fireStationId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
<select
id=
"queryCountForPage"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
f_fire_station fs
WHERE
1=1
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%';
</if>
</select>
<select
id=
"queryForPage"
resultType=
"java.util.Map"
>
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor as isIndoor,
frs.name riskSourceName
FROM
f_fire_station fs
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
1=1
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%'
</if>
LIMIT ${start},${length} ;
</select>
<select
id=
"queryForList"
resultType=
"java.util.Map"
>
SELECT
*
FROM
f_fire_station fs
WHERE
1=1
<if
test=
"name!=null"
>
AND fs.name LIKE '%${name}%'
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%';
</if>
</select>
<select
id=
"queryEquipCountById"
resultType=
"java.util.Map"
>
SELECT
fe.`name`,
SUM(fse.number) count,
fe.unit
FROM
`f_fire_station_equipment` fse
LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id
WHERE
fire_station_id = #{id}
GROUP BY
fe.`name`,fe.unit
</select>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper"
>
<select
id=
"queryOne"
resultType=
"java.util.Map"
>
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor AS isIndoor,
fs.picture,
fs.risk_source_id as riskSourceId
FROM
f_fire_station fs
WHERE
fs.id = ${id}
</select>
<select
id=
"queryCountForFireEqumntPage"
resultType=
"long"
>
SELECT
count(1)
FROM
f_fire_station_equipment fs
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
WHERE
fs.fire_station_id = ${fireStationId}
</select>
<select
id=
"queryForFireEqumntPage"
resultType=
"java.util.Map"
>
SELECT
fs.fire_station_id,
fs.number numberInStation,
fs.unit unitInStation,
f.*,
frs.name riskSourceName
FROM
f_fire_station_equipment fs
left join f_fire_equipment f ON fs.fire_equipment_id = f.id
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
fs.fire_station_id = ${fireStationId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
<select
id=
"queryCountForPage"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
f_fire_station fs
WHERE
1=1
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%';
</if>
</select>
<select
id=
"queryForPage"
resultType=
"java.util.Map"
>
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor as isIndoor,
frs.name riskSourceName
FROM
f_fire_station fs
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
1=1
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%'
</if>
LIMIT ${start},${length} ;
</select>
<select
id=
"queryForList"
resultType=
"java.util.Map"
>
select
bu.id,
bu .name,
'1' as type
from
wl_building as bu
left join wl_equipment_category as cat on bu.equipment_code = cat.id
where substr(cat.code ,1,4) = '9301'
<if
test=
"name!=null"
>
AND fs.name LIKE '%${name}%'
</if>
<if
test=
"code!=null"
>
AND fs.`code` LIKE '%${code}%'
</if>
<if
test=
"type!=null"
>
AND fs.`type` LIKE '%${type}%';
</if>
</select>
<select
id=
"queryEquipCountById"
resultType=
"java.util.Map"
>
SELECT
fe.`name`,
SUM(fse.number) count,
fe.unit
FROM
`f_fire_station_equipment` fse
LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id
WHERE
fire_station_id = #{id}
GROUP BY
fe.`name`,fe.unit
</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