| | |
| | | <result column="vaddress" property="vaddress"/> |
| | | <result column="aaddress" property="aaddress"/> |
| | | <result column="uids" property="uids"/> |
| | | <result column="securityArr" property="securityArr"/> |
| | | <result column="securityId" property="securityId"/> |
| | | </resultMap> |
| | | |
| | | <sql id="alarmCondition"> |
| | | <if test="alarm.id!=null"> |
| | | and a.id = #{alarm.id} |
| | | </if> |
| | | <if test="alarm.jtype!=null"> |
| | | and a.jtype like concat('%',#{alarm.jtype},'%') |
| | | </if> |
| | |
| | | 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, |
| | | a.securityArr,a.securityId, |
| | | e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone, |
| | | e.stype, |
| | | e.oneId, |
| | |
| | | |
| | | |
| | | <update id="updateJtype"> |
| | | update sys_alarm SET jtype=#{jtype},bz=#{bz} |
| | | update sys_alarm SET jtype=#{jtype} |
| | | |
| | | <if test="bz!=null and bz!=''"> |
| | | ,bz=#{bz} |
| | | </if> |
| | | |
| | | <if test="securityArr!=null and id!=''"> |
| | | ,securityArr =#{securityArr} |
| | |
| | | |
| | | <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},'%') |
| | | |
| | | <if test="alarm.securityArr!=null and alarm.securityArr!=''"> |
| | | securityId IS NULL |
| | | AND securityArr LIKE concat('%',#{alarm.securityArr},'%') |
| | | </if> |
| | | |
| | | <if test="alarm.id!=null and alarm.id!=''"> |
| | | a.id = #{alarm.id} |
| | | </if> |
| | | |
| | | |
| | | </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> |