Commit 0c437db9 authored by maoying's avatar maoying

修改三维推送数据逻辑

parent 4fb69dff
...@@ -190,17 +190,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -190,17 +190,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
sendWaterLevel(formInstanceVo); sendWaterLevel(formInstanceVo);
} }
} }
if (topicEntity.getSimulationDate().equals("false") && nameKeys.contains(typeCode) && indexStateIsChange(equipmentSpecificIndex)) { if ("false".equals(topicEntity.getSimulationDate()) && nameKeys.contains(typeCode) && indexStateIsChange(equipmentSpecificIndex)) {
log.info("指标值没有发生变化: " + equipmentSpecificIndex.getIotCode() + "-" + equipmentSpecificIndex.getNameKey() + ":" + equipmentSpecificIndex.getValue()); log.info("指标值没有发生变化: " + equipmentSpecificIndex.getIotCode() + "-" + equipmentSpecificIndex.getNameKey() + ":" + equipmentSpecificIndex.getValue());
// 三维屏指标状态推送 // 三维屏指标状态推送,没有绑定模型的设备不需要推送至三维
if("true".equals(equipmentSpecific.getPush3D())){
equipmentSpecificIndex.setId(equipmentSpecific.getId()); equipmentSpecificIndex.setId(equipmentSpecific.getId());
equipmentSpecificIndex.setName(equipmentSpecific.getName()); equipmentSpecificIndex.setName(equipmentSpecific.getName());
equipmentSpecificIndex.setCode(equipmentSpecific.getCode()); equipmentSpecificIndex.setCode(equipmentSpecific.getCode());
equipmentSpecificIndex.setType("equip"); equipmentSpecificIndex.setType("equip");
String msg = JSON.toJSONString(equipmentSpecificIndex); String msg = JSON.toJSONString(equipmentSpecificIndex);
String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus"); String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus");
webMqttComponent.publish(title, msg); webMqttComponent.publish(title, msg);
}
} }
Equipment equipment = topicEntity.getEquipment() == null ? impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId) : topicEntity.getEquipment(); Equipment equipment = topicEntity.getEquipment() == null ? impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId) : topicEntity.getEquipment();
...@@ -258,6 +260,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -258,6 +260,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
webMqttComponent.publish(topicOne, JSON.toJSONString(view3dService.getSafetyIndexInfoByDate(equipmentSpecific.getOrgCode(), dateString))); webMqttComponent.publish(topicOne, JSON.toJSONString(view3dService.getSafetyIndexInfoByDate(equipmentSpecific.getOrgCode(), dateString)));
refreshFireSafety(equipmentSpecific.getOrgCode()); refreshFireSafety(equipmentSpecific.getOrgCode());
String monitorData = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData");
webMqttComponent.publish(monitorData, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
} else { } else {
// 监测数据逻辑 // 监测数据逻辑
log.info("(监测)Message type is: " + specificIndexType); log.info("(监测)Message type is: " + specificIndexType);
......
...@@ -53,4 +53,10 @@ public class EquipmentSpecificForRiskVo { ...@@ -53,4 +53,10 @@ public class EquipmentSpecificForRiskVo {
* 位置详情 * 位置详情
*/ */
private String description; private String description;
@ApiModelProperty(value = "是否推送三维端")
private String push3D = "true";
@ApiModelProperty(value = "设备类型编码")
private String equipmentCode = "";
} }
...@@ -212,19 +212,20 @@ ...@@ -212,19 +212,20 @@
</select> </select>
<select id="getOneById" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificForRiskVo"> <select id="getOneById" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificForRiskVo">
select select
wes.id as id, wes.id as id,
wed.name as name, wed.name as name,
wes.equipment_detail_id as equipmentDetailId, wes.equipment_detail_id as equipmentDetailId,
wes.qr_code as qrCode, wes.qr_code as qrCode,
wes.code as code, wes.code as code,
wes.org_code as orgCode wes.org_code as orgCode,
wes.equipment_code as equipmentCode,
IF(substr(wes.equipment_code ,1,4) = '9204','true','false') as push3D
from from
wl_equipment_specific wes wl_equipment_specific wes
left join left join
wl_equipment_detail wed ON wed.id = wes.equipment_detail_id wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
where where wes.id=#{id}
wes.id=#{id}
</select> </select>
<select id="queryFireMonitor" resultType="map"> <select id="queryFireMonitor" resultType="map">
SELECT SELECT
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
wl_equipment_specific wes wl_equipment_specific wes
LEFT JOIN wl_equipment_index ei ON ei.id = wes.realtime_iot_index_id LEFT JOIN wl_equipment_index ei ON ei.id = wes.realtime_iot_index_id
WHERE WHERE
ei.is_iot = 1 ei.is_iot = 1 and substr(cat.code ,1,4) = '9204'
<if test="value != null and value != ''"> <if test="value != null and value != ''">
AND wes.realtime_iot_index_value = #{value} AND wes.realtime_iot_index_value = #{value}
</if> </if>
......
...@@ -204,7 +204,6 @@ ...@@ -204,7 +204,6 @@
ala.`status` = 1 ala.`status` = 1
AND ( AND (
ala.type = 'FIREALARM' ala.type = 'FIREALARM'
OR ala.type = 'BREAKDOWN'
) )
ORDER BY ORDER BY
ala.update_date DESC ala.update_date DESC
...@@ -231,8 +230,7 @@ ...@@ -231,8 +230,7 @@
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wles.id LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
WHERE WHERE
wlei.type_code != 'BREAKDOWN' wlei.type_code != 'FIREALARM'
AND wlei.type_code != 'FIREALARM'
AND ( AND (
wlesi.`value` = 'true' wlesi.`value` = 'true'
OR wlesi.`value` = 'false' OR wlesi.`value` = 'false'
......
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