南昌市物联网技防平台-后台
zengh
2021-04-23 b3e96428a7ba42f8402f656885218c56d7ae1421
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
@@ -555,15 +555,107 @@
    <select id="getAlarm" resultType="java.util.HashMap">
        SELECT
            *
            a.id,
            a.alarmType,
            a.alarmPeople,
            a.alarmTime,
            a.galarmPeople,
            a.sex,
            a.phoneNumber,
            a.content,
            a.waringType,
            a.bz,
            a.deviceNumber,
            a.region,
            a.district,
            a.vaddress,
            a.aaddress,
            a.alarmId,
            a.LEVEL,
            e.jd,
            e.wd,
            a.jtype,
            a.rname,
            a.jjTime,
            a.province,
            a.city,
            a.cid,
            e.serialNumber,
            e.oneContacts,
            e.ThreeContacts,
            e.twoContacts,
            e.onePhone,
            e.twoPhone,
            e.ThreePhone,
            e.stype,
            e.oneId,
            e.twoId,
            e.threeId,
            e.deptId,
            e.street AS place,
            e.channelNumber
        FROM
            sys_alarm
            sys_alarm a
            LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber
        WHERE
            securityId IS NULL
            AND securityArr LIKE concat('%',#{alarm.securityArr},'%')
    </select>
    <select id="getAlarming" resultType="java.util.HashMap">
        SELECT
            a.id,
            a.alarmType,
            a.alarmPeople,
            a.alarmTime,
            a.galarmPeople,
            a.sex,
            a.phoneNumber,
            a.content,
            a.waringType,
            a.bz,
            a.deviceNumber,
            a.region,
            a.district,
            a.vaddress,
            a.aaddress,
            a.alarmId,
            a.LEVEL,
            e.jd,
            e.wd,
            a.jtype,
            a.rname,
            a.jjTime,
            a.province,
            a.city,
            a.cid,
            e.serialNumber,
            e.oneContacts,
            e.ThreeContacts,
            e.twoContacts,
            e.onePhone,
            e.twoPhone,
            e.ThreePhone,
            e.stype,
            e.oneId,
            e.twoId,
            e.threeId,
            e.deptId,
            e.street AS place,
            e.channelNumber
        FROM
            sys_alarm a
            LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber
        WHERE
            securityId =#{alarm.securityId}
    </select>
    <update id="setAlarm">
        update sys_alarm SET securityId=#{alarm.securityId} where id=#{alarm.id}
    </update>
    <update id="updateVaddress">
        update sys_alarm SET vaddress=#{vaddress},uids=#{uids} where id=#{jid}
    </update>