Commit c46de4ff authored by lizehua's avatar lizehua

去除报错,以及修改查询数据sql

parent f01a5c93
......@@ -57,8 +57,6 @@ public interface FireEquipMapper extends BaseMapper {
EquipDetailsResponse findEquipDetailsById(@Param("id") Long id);
List<EquipCommunicationData> findAllEquipPointInfo();
EquipCommunicationData findOneByPointCode(@Param("code") String code);
void saveBatch(List<FireEquipmentParam> list);
......
......@@ -97,8 +97,6 @@ public interface IEquipmentService {
*/
List<Equipment> findAll();
void findAllEquipPointInfo();
EquipCommunicationData findFireEquipmentByPointCode(String code);
EquipCommunicationData findFireEquipDataByPointCode(String code);
......
......@@ -324,25 +324,6 @@
</where>
</select>
<select id="findAllEquipPointInfo" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">
SELECT
p.`code` pointCode,
p.`name` pointName,
f.`name` equimentName,
f.id equimentId,
e.id fireEquipmentId,
e.`name` fireEquipmentName,
e.code fireEquipmentCode,
p.type,
d.dict_value alarmType,
p.unit
FROM
f_fire_equipment_point p
LEFT JOIN f_fire_equipment e ON e.id = p.fire_equipment_id
LEFT JOIN f_equipment_fire_equipment fe ON fe.fire_equipment_id = e.id
LEFT JOIN f_equipment f ON f.id = fe.equipment_id
LEFT JOIN f_dict d on d.id = p.alarm_type
</select>
<select id="findOneByPointCode" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">
SELECT
......
......@@ -974,7 +974,6 @@
fe.is_indoor as inDoor,
case
when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id)
when fe.equip_classify = 2 then CONCAT('video',fe.id)
when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id)
end as `key`,
fe.name,
......@@ -1007,7 +1006,6 @@
fe.name as title,
case
when fe.equip_classify = 0 then 'monitorEquipment'
when fe.equip_classify = 2 then 'video'
when fe.equip_classify = 3 then 'fireEquipment'
end as type,
fe.org_code as orgCode,
......@@ -1117,6 +1115,40 @@
where rs.id is not null
AND s.position3d != '' AND s.position3d is not null
UNION ALL
SELECT
wlv.CODE,
wlv.id,
'' AS inDoor,
CONCAT( 'video', wlv.id ) AS `key`,
wlv.NAME,
'' AS LEVEL,
'' AS levelStr,
'' AS objKey,
CONCAT(
'{"x":',
substring_index( wlv.position3d, ',', 1 ),
',"y":',
substring_index( substring_index( wlv.position3d, ',', - 2 ), ',', 1 ),
',"z":',
substring_index( wlv.position3d, ',', - 1 ),
'}'
)
as positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
FALSE AS `showInfo`,
wlv.NAME AS title,
'video' AS type,
wlv.org_code AS orgCode,
'' AS riskSourceId,
0 AS frequency,
FALSE AS twinkle
FROM
wl_video wlv
WHERE
wlv.position3d != ''
AND wlv.position3d IS NOT NULL
union all
select
w.code,
w.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