whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.fgkj.mapper.impl;
 
import java.util.List;
 
import com.fgkj.dto.Dev_param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
 
public interface Dev_paramMapper{
 
    //给设备添加参数
    public boolean add(Object obj) ;
 
    //修改设备参数(单个)
    @Update("update db_param.tb_dev_param set alm_high_coe=#{alm_high_coe},alm_low_coe=#{alm_low_coe},alm_high_level=#{alm_high_level},alm_low_level=#{alm_low_level}" +
            ",alm_high_en=#{alm_high_en},alm_low_en=#{alm_low_en} where dev_id=#{dev_id} and alm_id=#{alm_id}")
     public int update(Dev_param obj);
  
    public boolean del(Object obj) ;
 
    //查询所有设备的所有的告警参数
    @Select(" select distinct(db_param.tb_dev_param.num),dev_id,alm_id,alm_name,alm_high_coe,alm_low_coe,alm_high_level," +
            " alm_low_level,alm_high_en,alm_low_en," +
            " db_battinf.tb_battinf.stationname " +
            " from db_param.tb_dev_param,db_battinf.tb_battinf " +
            " where db_param.tb_dev_param.dev_id=db_battinf.tb_battinf.FBSDeviceId " +
            " order by db_param.tb_dev_param.num asc")
    public List<Dev_param> searchAll() ;
 
    //根据设备id和告警类型查设备告警参数
    public List serchByCondition(Dev_param obj);
 
    //查询所有存在设备告警参数的机房
    @Select("select distinct(dev_id),db_battinf.tb_battinf.stationname " +
            " from  db_param.tb_dev_param,db_battinf.tb_battinf " +
            " where db_param.tb_dev_param.dev_id=db_battinf.tb_battinf.FBSDeviceId " +
            " order by dev_id asc ")
    public List<Dev_param> serchAllDevId();
 
    //根据设备id查询设备对应的告警参数种类
    @Select("select distinct(alm_id) from  db_param.tb_dev_param where dev_id=#{dev_id} ")
    public List<Dev_param> serchByInfo(Dev_param obj);
 
    //根据设备id查询设备所有的参数
    public List serchParamById(Dev_param obj) ;
}