Commit bc36d2dd authored by maoying's avatar maoying

修改预案查询

parent b8b7a750
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.EquipmentFireEquipment;
import com.yeejoin.amos.fas.dao.entity.FireEquipment;
......@@ -35,5 +36,7 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
public Boolean existsAlarmPointByEqpPointIdAndEquipId(@Param("pointId") long pointId, @Param("equipmentId") long equipmentId);
// Boolean containGroupedPoint(long id);
EquipmentSpecificIndexVo findFireEqupmentByCode(String code);
}
......@@ -1024,9 +1024,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@javax.transaction.Transactional
public String processFireEqumtData(AlarmParam deviceData) throws Exception {
EquipmentSpecificIndexVo equipmentSpecificIndexVo = new EquipmentSpecificIndexVo();
equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
equipmentSpecificIndexVo.setType("FIREALARM");
EquipmentSpecificIndexVo equipmentSpecificIndexVo = impAndFireEquipMapper.findFireEqupmentByCode(deviceData.getPointCode());
// new EquipmentSpecificIndexVo();
// equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
// equipmentSpecificIndexVo.setType("FIREALARM");
TopicEntityVo topicEntity = new TopicEntityVo();
topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo));
......
......@@ -157,5 +157,16 @@
and fe.equipment_id = #{equipmentId}
and ep.id = #{pointId}
</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>
\ 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