| | |
| | | <result column="waringType" property="waringType"/> |
| | | <result column="deviceNumber" property="deviceNumber"/> |
| | | <result column="region" property="region"/> |
| | | <result column="addvcd" property="addvcd"/> |
| | | <result column="district" property="district"/> |
| | | <result column="alarmId" property="alarmId"/> |
| | | <result column="level" property="level"/> |
| | | <result column="coordinate" property="coordinate"/> |
| | |
| | | |
| | | <select id="selectAlarmPage" resultMap="alarmResultMap"> |
| | | select a.id,a.alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType, |
| | | a.deviceNumber,a.region,a.addvcd, a.alarmId,a.LEVEL,ST_ASTEXT (a.coordinate) AS coordinate,jd,wd,a.jtype,a.rname from sys_alarm a where 1=1 |
| | | a.deviceNumber,a.region,a.district, a.alarmId,a.LEVEL,jd,wd,a.jtype,a.rname,a.jjTime,a.province,a.city from sys_alarm a where 1=1 |
| | | <if test="alarm.jtype!=null"> |
| | | and a.jtype like concat('%',#{alarm.jtype},'%') |
| | | </if> |
| | | <if test="alarm.galarmPeople!=null"> |
| | | and a.galarmPeople like concat('%',#{alarm.galarmPeople},'%') |
| | | </if> |
| | | <if test="alarm.addvcd!=null"> |
| | | and a.addvcd like concat('%',#{alarm.addvcd},'%') |
| | | <if test="alarm.district!=null"> |
| | | and a.district like concat('%',#{alarm.district},'%') |
| | | </if> |
| | | <if test="alarm.province!=null"> |
| | | and a.province like concat('%',#{alarm.province},'%') |
| | | </if> |
| | | <if test="alarm.city!=null"> |
| | | and a.city like concat('%',#{alarm.city},'%') |
| | | </if> |
| | | <if test="alarm.level!=null"> |
| | | and a.level like concat('%',#{alarm.level},'%') |
| | | </if> |
| | | <if test="alarm.waringType!=null"> |
| | | and a.waringType like concat('%',#{alarm.waringType},'%') |
| | | </if> |
| | | <if test="alarm.beginTime!=null and alarm.beginTime!=''"> |
| | | and a.alarmTime>=#{alarm.beginTime} |
| | | </if> |
| | | <if test="alarm.endTime!=null and alarm.endTime!=''"> |
| | | and a.alarmTime<=#{alarm.endTime} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.czTime, |
| | | a.bz, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | <if test="jtype!=null and jtype!=''"> |
| | | and a.jtype=#{jtype} |
| | | </if> |
| | | <if test="addvcd!=null and addvcd!=''"> |
| | | and a.addvcd=#{addvcd} |
| | | <if test="district!=null and district!=''"> |
| | | and a.district=#{district} |
| | | </if> |
| | | <if test="waringType!=null and waringType!=''"> |
| | | and a.waringType=#{waringType} |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.rname, |
| | | a.LEVEL, |
| | |
| | | a.jtype, |
| | | d.addvnm |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district where 1=1 |
| | | <if test="id!=null and id!=''"> |
| | | and a.id=#{id} |
| | | </if> |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.rname, |
| | | a.LEVEL, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | <if test="id!=null and id!=''"> |
| | | and a.id >#{id} |
| | | </if> |
| | |
| | | <!--新增--> |
| | | <insert id="s" parameterType="org.springblade.jfpt.alarm.entity.Alarm"> |
| | | INSERT INTO sys_alarm (alarmType,alarmPeople,alarmTime,galarmPeople,sex,phoneNumber,place,content,waringType,deviceNumber, |
| | | region,addvcd,alarmId,level,rname,coordinate,jd,wd,jtype) VALUES |
| | | (#{alarmType},#{alarmPeople},#{alarmTime},#{galarmPeople},#{sex},#{phoneNumber},#{place},#{content},#{waringType},#{deviceNumber},#{region},#{addvcd},#{alarmId},#{level},#{rname},POINT(#{jd},#{wd}),#{jd},#{wd},#{jtype}) |
| | | region,district,alarmId,level,rname,coordinate,jd,wd,jtype) VALUES |
| | | (#{alarmType},#{alarmPeople},#{alarmTime},#{galarmPeople},#{sex},#{phoneNumber},#{place},#{content},#{waringType},#{deviceNumber},#{region},#{district},#{alarmId},#{level},#{rname},POINT(#{jd},#{wd}),#{jd},#{wd},#{jtype}) |
| | | </insert> |
| | | |
| | | <update id="updateOne" parameterType="org.springblade.jfpt.alarm.entity.Alarm"> |
| | | update sys_alarm SET alarmType=#{alarmType},alarmPeople=#{alarmPeople},alarmTime=#{alarmTime}, |
| | | galarmPeople=#{galarmPeople},sex=#{sex},phoneNumber=#{phoneNumber},place=#{place}, |
| | | content=#{content},waringType=#{waringType},deviceNumber=#{deviceNumber},region=#{region},addvcd=#{addvcd},alarmId=#{alarmId},level=#{level},rname=#{rname},jd=#{jd},wd=#{wd},coordinate=POINT(#{jd},#{wd}),jtype=#{jtype} where id=#{id} |
| | | content=#{content},waringType=#{waringType},deviceNumber=#{deviceNumber},region=#{region},district=#{district},alarmId=#{alarmId},level=#{level},rname=#{rname},jd=#{jd},wd=#{wd},coordinate=POINT(#{jd},#{wd}),jtype=#{jtype} where id=#{id} |
| | | </update> |
| | | |
| | | |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.LEVEL, |
| | | ST_ASTEXT (a.coordinate ) AS coordinate, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where |
| | | DATE_FORMAT(alarmTime,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(alarmTime,'%Y-%m-%d') <=#{endTime} ORDER BY alarmTime desc |
| | | </select> |
| | | |