南昌市物联网技防平台-后台
zengh
2021-06-01 cd2cfd37366002f790a2ed1435962d4eff7d5cec
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -202,7 +202,10 @@
            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2
        </if>
        <if test="dxtype!=null and dxtype == 3">
            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY)  and dtype=3
            and dtype=3
        </if>
        <if test="dxtype!=null and dxtype == 4">
            and dtype!=0
        </if>
        <if test="pid!=null and pid!=''">
            and deptId like concat('%',#{pid},'%')
@@ -412,9 +415,9 @@
   dept.id,
   dept.deviceName,
   dept.deviceNumber,
   dept.deviceType,
   dept.serialNumber,
    dept.serialNumber,
   dept.channelNumber,
   dept.deviceType,
   dept.ownership,
   dept.ownerId,
   dept.devicestate,
@@ -482,7 +485,7 @@
    <!--查询设故障数量-->
    <select id="selectEqCg" resultType="Integer">
        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=3
        select COUNT(*) from sys_equipment where dtype=3
    </select>
    <!--查询所有的设备,不包含故障和警情状态-->
@@ -510,4 +513,40 @@
        </foreach>
    </update>
    <!--查询在线设备数量-->
    <select id="selectOnlineEqNum" resultType="java.lang.Integer">
        select COUNT(*) from sys_equipment where dtype=1 or dtype=2 or dtype=3
    </select>
    <!--获取设备视频播放的信息-->
    <select id="selectEquimentPlayInfo" resultType="org.springblade.jfpt.equipment.entity.EquipmentPlayInfo">
        select * from equipment_play_info
            where
        bmp=#{bmp}
            and
        number=#{number}
            and
        manufacturer =#{manufacturer}
    </select>
<!--    select id,number,serial_number serialNumber,bmp,address from equipment_play_info-->
    <!--新增设备视频播放的信息-->
    <insert id="saveEquipmentPlayInfo">
        INSERT INTO equipment_play_info
        (number, serial_number, manufacturer, bmp, address, create_time)
            VALUES
        (#{number}, #{serialNumber}, #{manufacturer}, #{bmp}, #{address}, #{createTime});
    </insert>
    <!--修改设备视频播放的信息-->
    <update id="updateEquipmentPlayInfo">
        update equipment_play_info
            set
        bmp=#{bmp},address=#{address}
            where
        id=#{id}
    </update>
</mapper>