ah_jjzhgd_service/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/XcIndexMapper.xml

24 lines
1.2 KiB
XML
Raw Normal View History

2024-03-30 16:40:01 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.securitycontrol.screen.mapper.XcIndexMapper">
<select id="getProDetails" resultType="com.securitycontrol.entity.system.base.vo.ProVo">
select pro_brief AS proBrief,pro_id AS proId
from tb_project
where bid_code=#{bidCode}
</select>
<!--查询环境检测数据-->
<select id="getProJcData" resultType="com.securitycontrol.entity.screen.vo.DeviceValueVo">
select bdd.device_name deviceName,tdd.mode_name modelName,
tdv.val,tdv.is_warn isWarn,tdv.create_time createTime,sd.dict_name deviceType
from tb_pro_bd bd
INNER join tb_bd_device bdd on bdd.bd_id=bd.id and bdd.del_flage=0
LEFT JOIN sys_dict sd on sd.dict_code=bdd.devic_type
left join tb_device_detail tdd on tdd.device_id=bdd.device_id and tdd.del_flag=0
left join tb_device_value tdv on tdd.id=tdv.attribute_id
where tdd.mode_name is not null and sd.dict_code=#{typeCode}
and bd.bid_code=#{bidCode}
</select>
</mapper>