70 lines
3.5 KiB
XML
70 lines
3.5 KiB
XML
<?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.sercurityControl.proteam.mapper.UavPatrolMapper">
|
|
<!-- 获取无人机设备列表 -->
|
|
<select id="getUavData" resultType="com.sercurityControl.proteam.domain.UavEntity">
|
|
SELECT DISTINCT dev.MAC_ID macId,
|
|
dev.device_name title,
|
|
dev.PUID puId,
|
|
dev.IP_ADDRESS ipAddress,
|
|
dev.state isOnline,
|
|
dev.DEVICE_TYPE ballType,
|
|
dev.gb_code gbNumber,
|
|
dev.UPDATE_TIME updateTime,
|
|
'0' AS parentId,
|
|
dev.pro_id AS bidCode,
|
|
dev.t_code AS tCode,
|
|
dev.t_name AS tName,
|
|
dev.td_code AS tdCode,
|
|
dev.tw_code AS teCode
|
|
FROM t_device dev
|
|
LEFT JOIN t_ball_type tb ON tb.id = dev.type_code
|
|
WHERE tb.type_code like 'wrj%'
|
|
</select>
|
|
|
|
|
|
<select id="getUavBandProList" resultType="com.sercurityControl.proteam.domain.UAVBandProEntity">
|
|
select DISTINCT td.MAC_ID as macId,
|
|
td.device_name as deviceName,
|
|
td.PRO_ID as proId,
|
|
case when td.PRO_ID is not null then tp.bid_name else '' end as proName
|
|
from t_device td
|
|
left join jj_bid_project tp on td.PRO_ID = tp.bid_no
|
|
LEFT JOIN t_ball_type tb ON tb.id = td.type_code
|
|
WHERE tb.type_code like 'wrj%'
|
|
</select>
|
|
<select id="getProList" resultType="com.sercurityControl.proteam.domain.UAVBandProEntity">
|
|
select DISTINCT bidding_section_name proName, bidding_section_code id
|
|
from jj_class_meetting
|
|
where delete_flag = 0
|
|
and current_constr_date = CURRENT_DATE()
|
|
</select>
|
|
|
|
<update id="updateBand">
|
|
update t_device
|
|
set PRO_ID = #{proName} where MAC_ID = #{macId}
|
|
</update>
|
|
<select id="getClass" resultType="com.sercurityControl.proteam.domain.ClassData">
|
|
select tc.id classId,
|
|
so.org_name org,
|
|
tc.bidding_section_name bidName,
|
|
ju.unit_name sgdw,
|
|
tc.re_assessment_risk_level AS riskLevel,
|
|
jcmi.work_manage AS workManager,
|
|
jcmi.work_manage_phone AS workManagerPhone,
|
|
tc.current_constr_date AS workDay,
|
|
tc.current_constr_headcount AS sgNum,
|
|
CONCAT(jcmi.work_site) AS workPosition,
|
|
td.mac_id AS macId,
|
|
td.puid AS puid
|
|
FROM jj_class_meetting tc
|
|
left join jj_class_metting_info jcmi on tc.id=jcmi.class_id
|
|
left join jj_unit ju on ju.unified_social_credit_id=tc.constr_unified_social_credit_id
|
|
left join jj_unit ju2 on ju2.unified_social_credit_id=tc.supervision_social_credit_code
|
|
left join jj_ball jbl on jbl.id =tc.camera_id2
|
|
LEFT JOIN t_device AS td ON td.t_code = jbl.camera_no
|
|
LEFT JOIN sys_org AS so ON so.org_id = tc.build_unit_code
|
|
WHERE tc.bidding_section_code = #{bidCode} and tc.delete_flag=0
|
|
and tc.current_constr_date = CURRENT_DATE()
|
|
</select>
|
|
</mapper> |