Commit 1efd642c authored by 吴俊凯's avatar 吴俊凯

Merge branch 'dev_upgrade' into dev_upgrade-1225

parents b4afff5c 0d5d5664
......@@ -85,4 +85,10 @@ public class ContingencyRo implements Serializable {
@Label("遥信数据")
private HashMap<String, Integer> telesignallingMap;
//消防炮
@Label("消防炮编号")
private String fireMonitorCodes;
@Label("消防炮id")
private String fireMonitorIds;
}
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 设备配置 Mapper 接口
......@@ -69,4 +70,11 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
* @Date 2020/11/17 19:32
*/
EquipmentSpecificForRiskVo getOneById(@Param("id")long id);
/**
* 查询重点设备关联消防炮
* @param equipmentId
* @return
*/
Map queryFireMonitor(@Param("equipmentId") String equipmentId, @Param("code") String fireMonitor);
}
......@@ -31,6 +31,13 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
Map queryForCamera(@Param("equipmentId") String equipmentId );
/**
* 查询重点设备关联视频点位
* @param equipmentId
* @return
*/
Map queryCamera(@Param("equipmentId") String equipmentId);
List<Map<String,Object>> findEquipVideo();
public Boolean existsAlarmPointByEqpPointIdAndEquipId(@Param("pointId") long pointId, @Param("equipmentId") long equipmentId);
......
......@@ -68,6 +68,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value("${emqx.defaultTopic}")
private String defaultTopic;
@Value("${data.type.fireMonitor}")
private String fireMonitor;
@Autowired
private WebMqttComponent webMqttComponent;
......@@ -292,16 +295,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo.setEquipmentCode(equipment.getCode());
contingencyRo.setEquipmentOrgCode(equipment.getOrgCode());
// Map cameraInfo = impAndFireEquipMapper.queryForCamera(String.valueOf(equipment.getId()));//查询重点设备关联视频点位,暂不处理
//
// if (cameraInfo != null) {
// contingencyRo.setCameraCodes(String.valueOf(cameraInfo.get("codes")));
// contingencyRo.setCameraIds(String.valueOf(cameraInfo.get("ids")));
// }
//查询重点设备关联视频点位
Map cameraInfo = impAndFireEquipMapper.queryCamera(String.valueOf(equipment.getId()));
if (cameraInfo != null && !cameraInfo.isEmpty()) {
contingencyRo.setCameraCodes(String.valueOf(cameraInfo.get("codes")));
contingencyRo.setCameraIds(String.valueOf(cameraInfo.get("ids")));
}
// contingencyRo.setMobile("13259783333");
// contingencyRo.setAdminName("admin");
// contingencyRo.setFireEquipmentPosition(fireEquipment.getPosition3d());
//查询重点设备关联消防炮
Map fireMonitorInfo = equipmentSpecificMapper.queryFireMonitor(String.valueOf(equipment.getId()), fireMonitor);
if (fireMonitorInfo != null && !fireMonitorInfo.isEmpty()) {
contingencyRo.setFireMonitorCodes(String.valueOf(fireMonitorInfo.get("codes")));
contingencyRo.setFireMonitorIds(String.valueOf(fireMonitorInfo.get("ids")));
}
List<PreplanPicture> pictures = iPreplanPictureDao.findByEquipmentId(Long.valueOf(equipment.getId()));
if (!CollectionUtils.isEmpty(pictures)) {
......
......@@ -79,7 +79,7 @@ autoSys.push.type=mqtt
#消防视频:xfsp
#消防车:2101
data.type.fireChamber=2101
data.type.fireCar=2101
#消防小室:9301
data.type.fireChamber=9301
#消防水池:9302
......@@ -88,6 +88,8 @@ data.type.pool=9302
data.type.fireFoamRoom=9305
#探测器:8501
data.type.monitorEquipment=8501
#消防炮:3103
data.type.fireMonitor=3103
#灭火器:3104
data.type.extinguisher=3104
#消火栓:3105
......
......@@ -185,4 +185,21 @@
where
wes.id=#{id}
</select>
<select id="queryFireMonitor" resultType="map">
SELECT
GROUP_CONCAT( es.id ) ids,
GROUP_CONCAT( es.`code` ) codes
FROM
`f_equipment_fire_equipment` fe
LEFT JOIN wl_equipment_specific es ON fe.fire_equipment_id = es.id
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
<where>
<if test="equipmentId !=null and equipmentId != ''">
AND fe.equipment_id = #{equipmentId}
</if>
<if test="code !=null and code != ''">
AND ed.`code` LIKE CONCAT(#{code},'%')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -126,6 +126,20 @@
)
</select>
<select id="queryCamera" resultType="map">
SELECT
GROUP_CONCAT(v.id) ids,
GROUP_CONCAT(v.`code`) codes
FROM
wl_video v
RIGHT JOIN wl_video_important_equipment e ON e.video_id = v.id
<where>
<if test="equipmentId !=null and equipmentId != ''">
e.important_equipment_id = #{equipmentId}
</if>
</where>
</select>
<select id="findEquipVideo" resultType="map">
SELECT
eq.`name` equipName,
......
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