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
ec766456
Commit
ec766456
authored
Dec 12, 2020
by
吴俊凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
三维接口SQL修改
parent
32a014fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
23 deletions
+26
-23
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+26
-23
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
ec766456
...
...
@@ -78,11 +78,11 @@
<select
id=
"countFireEquipByEquipIdPageData"
resultType=
"long"
>
select
count(1) AS total_num
from
from
(
select
b.fire_equipment_id,c.`name`
from f_equipment_fire_equipment b,f_equipment c
b.fire_equipment_id,c.`name`
from f_equipment_fire_equipment b,f_equipment c
where b.equipment_id = #{id} and c.id = b.equipment_id
) sa,
f_fire_equipment a
...
...
@@ -216,9 +216,9 @@
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND (select true from
AND (select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) is not true
</if>
</select>
...
...
@@ -235,9 +235,9 @@
efe.fire_equipment_id = fe.id limit 0,1
) isBind,
frs.name riskSourceName,
(select true from
(select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) as bindStation
from f_fire_equipment fe
left join f_risk_source frs on frs.id = fe.risk_source_id
...
...
@@ -312,7 +312,7 @@
f_fire_equipment_point p
LEFT JOIN f_fire_equipment e ON e.id = p.fire_equipment_id
LEFT JOIN f_dict d on d.id = p.alarm_type
where p.`code` = #{code}
where p.`code` = #{code}
</select>
<select
id=
"listByCodes"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
...
...
@@ -385,7 +385,7 @@
#{item.weight},
#{item.riskSourceId}
)
</foreach>
</foreach>
</insert>
<update
id=
"updateBatch"
>
...
...
@@ -481,7 +481,7 @@
<select
id=
"findById"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
select name from f_fire_equipment where id= #{id}
</select>
<select
id=
"removeIfmeaPointByFireEquipIdAndEquipId"
resultType=
"long"
>
DELETE fmep FROM `f_fmea_equipment_point` fmep
LEFT JOIN wl_equipment_specific_index esi ON esi.id = fmep.equipment_point_id
...
...
@@ -493,26 +493,26 @@
spec.id AS id,
spec.org_code AS org_code,
spec.CODE AS CODE,
detail.
code
AS equip_code,
detail.
CODE
AS equip_code,
detail.NAME AS NAME,
detail.standard AS model,
detail.maintenance_cycle AS maintenance_cycle,
manufatcturer.NAME AS manufatcturer,
detail.brand AS detail,
detail.production_date AS production_date,
-- detail.expiry_date AS effective_date,
sd.amount as number,
unit.name as unit,
sd.amount AS number,
unit.NAME AS unit,
'' AS position3d,
'' AS floor3d,
'' AS is_indoor,
'' AS room,
detail.remark,
detail.creator_id AS create_by,
spec.create_date AS create_date,
'1' equip_status,
detail.video AS video_url,
warehouse.source_id AS risk_source_id,
'' AS position3d,
'' AS floor3d,
'' AS is_indoor,
'' AS room,
warehouse.full_name AS production_area,
(
SELECT
GROUP_CONCAT( fe.NAME )
...
...
@@ -527,8 +527,8 @@
LEFT JOIN wl_equipment_detail detail ON detail.id = spec.equipment_detail_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = spec.id
LEFT JOIN wl_manufacturer_info manufatcturer ON manufatcturer.id = detail.manufacturer_id
LEFT JOIN wl_equipment equipment ON equipment.id
= detail.equipment_id
LEFT JOIN wl_unit unit ON equipment.unit_id
= unit.id
LEFT JOIN wl_equipment equipment ON equipment.id = detail.equipment_id
LEFT JOIN wl_unit unit ON equipment.unit_id = unit.id
LEFT JOIN wl_warehouse_structure warehouse ON warehouse.id = sd.warehouse_structure_id
WHERE
<if
test=
"id != null"
>
...
...
@@ -537,6 +537,7 @@
</select>
<select
id=
"findVideoById"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireEquipment"
>
SELECT
risk.*,
video.id AS id,
video.org_code AS org_code,
video.CODE AS CODE,
...
...
@@ -550,8 +551,8 @@
'' AS number,
'' AS unit,
video.position3d AS position3d,
''
AS floor3d,
''
AS is_indoor,
risk.floor3d
AS floor3d,
risk.is_indoor
AS is_indoor,
'' AS room,
video.remark,
video.creator_id AS create_by,
...
...
@@ -559,6 +560,7 @@
'1' equip_status,
video.url AS video_url,
source.source_id AS risk_source_id,
risk.name AS production_area,
(
SELECT
GROUP_CONCAT( fe.NAME )
...
...
@@ -569,7 +571,8 @@
ffe.video_id = video.id
) protectObjNames
FROM wl_video video
LEFT JOIN wl_video_source source ON source.id =video.id
LEFT JOIN wl_video_source source ON source.video_id =video.id
LEFT JOIN f_risk_source risk ON risk.id = source.source_id
WHERE
<if
test=
"id != null"
>
video.id = #{id}
...
...
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