| | |
| | | <?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.whyc.mapper.DevalarmDataMapper" > |
| | | <resultMap id="devAlarmRes" type="DevalarmData"> |
| | | <resultMap id="devAlarmRes" type="com.whyc.pojo.DevalarmData"> |
| | | <result property="num" column="num"></result> |
| | | <result property="devId" column="dev_id"></result> |
| | | <result property="devIp" column="dev_ip"></result> |
| | |
| | | FROM db_alarm.tb_devalarm_data,db_battinf.tb_battinf |
| | | <where> |
| | | tb_devalarm_data.dev_id=db_battinf.tb_battinf.FbsDeviceId |
| | | <if test="stationName1!=''"> |
| | | and stationname1=#{stationName1} |
| | | <if test="par.stationName1!=''"> |
| | | and stationname1=#{par.stationName1} |
| | | </if> |
| | | <if test="stationName1=''"> |
| | | and stationname1!=#{stationName1} |
| | | |
| | | <if test="par.stationName!=''"> |
| | | and stationname=#{par.stationName} |
| | | </if> |
| | | <if test="stationName!=''"> |
| | | and stationname=#{stationName} |
| | | |
| | | <if test="par.almType!=0 and par.almType!=null"> |
| | | and alm_type=#{par.almType} |
| | | </if> |
| | | <if test="stationName=''"> |
| | | and stationname!=#{stationName} |
| | | </if> |
| | | <if test="almType!=0 and almType!=null"> |
| | | and alm_type=#{almType} |
| | | </if> |
| | | <if test="almType==0"> |
| | | and alm_type!=#{almType} |
| | | </if> |
| | | <if test="almIsConfirmed!=null"> |
| | | and db_alarm.tb_devalarm_data.alm_is_confirmed=#{almIsConfirmed} |
| | | |
| | | <if test="par.almIsConfirmed!=null"> |
| | | and db_alarm.tb_devalarm_data.alm_is_confirmed=#{par.almIsConfirmed} |
| | | </if> |
| | | and db_alarm.tb_devalarm_data.dev_id in(select distinct db_battinf.tb_battinf.FbsDeviceId |
| | | from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId |
| | | and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | and db_user.tb_user_inf.uid=#{uId}) |
| | | and db_user.tb_user_inf.uid=#{par.uId}) |
| | | </where> |
| | | ORDER BY alm_start_time desc ,dev_name asc |
| | | </select> |