Commit bc36d2dd authored by maoying's avatar maoying

修改预案查询

parent b8b7a750
package com.yeejoin.amos.fas.business.dao.mapper; package com.yeejoin.amos.fas.business.dao.mapper;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import com.yeejoin.amos.fas.dao.entity.Equipment; import com.yeejoin.amos.fas.dao.entity.Equipment;
import com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment; import com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment;
import com.yeejoin.amos.fas.dao.entity.FireEquipment; import com.yeejoin.amos.fas.dao.entity.FireEquipment;
...@@ -36,4 +37,6 @@ public interface ImpAndFireEquipMapper extends BaseMapper { ...@@ -36,4 +37,6 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
public Boolean existsAlarmPointByEqpPointIdAndEquipId(@Param("pointId") long pointId, @Param("equipmentId") long equipmentId); public Boolean existsAlarmPointByEqpPointIdAndEquipId(@Param("pointId") long pointId, @Param("equipmentId") long equipmentId);
// Boolean containGroupedPoint(long id); // Boolean containGroupedPoint(long id);
EquipmentSpecificIndexVo findFireEqupmentByCode(String code);
} }
...@@ -1024,9 +1024,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1024,9 +1024,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@javax.transaction.Transactional @javax.transaction.Transactional
public String processFireEqumtData(AlarmParam deviceData) throws Exception { public String processFireEqumtData(AlarmParam deviceData) throws Exception {
EquipmentSpecificIndexVo equipmentSpecificIndexVo = new EquipmentSpecificIndexVo(); EquipmentSpecificIndexVo equipmentSpecificIndexVo = impAndFireEquipMapper.findFireEqupmentByCode(deviceData.getPointCode());
equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode())); // new EquipmentSpecificIndexVo();
equipmentSpecificIndexVo.setType("FIREALARM"); // equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
// equipmentSpecificIndexVo.setType("FIREALARM");
TopicEntityVo topicEntity = new TopicEntityVo(); TopicEntityVo topicEntity = new TopicEntityVo();
topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo)); topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo));
......
...@@ -158,4 +158,15 @@ ...@@ -158,4 +158,15 @@
and ep.id = #{pointId} and ep.id = #{pointId}
</select> </select>
<select id="findFireEqupmentByCode" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
id as equipmentSpecificId,
'FIREALARM' as type
FROM
wl_equipment_specific
WHERE
`code` = #{code}
LIMIT 1
</select>
</mapper> </mapper>
\ No newline at end of file
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