Commit ec766456 authored by 吴俊凯's avatar 吴俊凯

三维接口SQL修改

parent 32a014fc
...@@ -493,26 +493,26 @@ ...@@ -493,26 +493,26 @@
spec.id AS id, spec.id AS id,
spec.org_code AS org_code, spec.org_code AS org_code,
spec.CODE AS CODE, spec.CODE AS CODE,
detail.code AS equip_code, detail.CODE AS equip_code,
detail.NAME AS NAME, detail.NAME AS NAME,
detail.standard AS model, detail.standard AS model,
detail.maintenance_cycle AS maintenance_cycle, detail.maintenance_cycle AS maintenance_cycle,
manufatcturer.NAME AS manufatcturer, manufatcturer.NAME AS manufatcturer,
detail.brand AS detail, detail.brand AS detail,
detail.production_date AS production_date, detail.production_date AS production_date,
-- detail.expiry_date AS effective_date, sd.amount AS number,
sd.amount as number, unit.NAME AS unit,
unit.name as unit, '' AS position3d,
'' AS floor3d,
'' AS is_indoor,
'' AS room,
detail.remark, detail.remark,
detail.creator_id AS create_by, detail.creator_id AS create_by,
spec.create_date AS create_date, spec.create_date AS create_date,
'1' equip_status, '1' equip_status,
detail.video AS video_url, detail.video AS video_url,
warehouse.source_id AS risk_source_id, warehouse.source_id AS risk_source_id,
'' AS position3d, warehouse.full_name AS production_area,
'' AS floor3d,
'' AS is_indoor,
'' AS room,
( (
SELECT SELECT
GROUP_CONCAT( fe.NAME ) GROUP_CONCAT( fe.NAME )
...@@ -537,6 +537,7 @@ ...@@ -537,6 +537,7 @@
</select> </select>
<select id="findVideoById" resultType="com.yeejoin.amos.fas.dao.entity.FireEquipment"> <select id="findVideoById" resultType="com.yeejoin.amos.fas.dao.entity.FireEquipment">
SELECT SELECT
risk.*,
video.id AS id, video.id AS id,
video.org_code AS org_code, video.org_code AS org_code,
video.CODE AS CODE, video.CODE AS CODE,
...@@ -550,8 +551,8 @@ ...@@ -550,8 +551,8 @@
'' AS number, '' AS number,
'' AS unit, '' AS unit,
video.position3d AS position3d, video.position3d AS position3d,
'' AS floor3d, risk.floor3d AS floor3d,
'' AS is_indoor, risk.is_indoor AS is_indoor,
'' AS room, '' AS room,
video.remark, video.remark,
video.creator_id AS create_by, video.creator_id AS create_by,
...@@ -559,6 +560,7 @@ ...@@ -559,6 +560,7 @@
'1' equip_status, '1' equip_status,
video.url AS video_url, video.url AS video_url,
source.source_id AS risk_source_id, source.source_id AS risk_source_id,
risk.name AS production_area,
( (
SELECT SELECT
GROUP_CONCAT( fe.NAME ) GROUP_CONCAT( fe.NAME )
...@@ -569,7 +571,8 @@ ...@@ -569,7 +571,8 @@
ffe.video_id = video.id ffe.video_id = video.id
) protectObjNames ) protectObjNames
FROM wl_video video 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 WHERE
<if test="id != null"> <if test="id != null">
video.id = #{id} video.id = #{id}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment