81041
2018-10-30 3d52dbf0f5ade85d431a02a20383c46248fc190e
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -3407,10 +3407,10 @@
      } );
      return list;
   }
   //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
   public List serchStationName3(Object obj){
   //查询管理的县/区(左侧导航第三层,查所有的县/区)
   public List serchStationName5(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,stationid,fbsdeviceid,FBSDeviceName  " +
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,stationName5,stationid,fbsdeviceid,FBSDeviceName  " +
            " FROM db_battinf.tb_battinf " +
            " where StationId in(" +
            " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
@@ -3427,6 +3427,7 @@
                     batt.setStationName1(rs.getString("stationName1"));
                     batt.setStationName2(rs.getString("stationName2"));
                     batt.setStationName3(rs.getString("stationName3"));
                     batt.setStationName5(rs.getString("stationName5"));
                     batt.setStationId(rs.getString("stationId"));
                     batt.setFBSDeviceName(rs.getString("fBSDeviceName"));
                     batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
@@ -3441,14 +3442,14 @@
      } );
      return list;
   }
   //查询管理的机房(左侧导航第三层,查所有的机房)
   public List serchStationName3_all(Object obj){
   //查询管理的县/区(左侧导航第三层,查所有的县/区)
   public List serchStationName5_all(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,stationid,fbsdeviceid,FBSDeviceName  " +
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,stationName5,stationid,fbsdeviceid,FBSDeviceName  " +
            " FROM db_battinf.tb_battinf " +
            " where StationName1 like ? and StationName2 like ?  " +
            " ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
         
         public List getResults(ResultSet rs) {
            List list=new ArrayList();
@@ -3459,6 +3460,75 @@
                     batt.setStationName1(rs.getString("stationName1"));
                     batt.setStationName2(rs.getString("stationName2"));
                     batt.setStationName3(rs.getString("stationName3"));
                     batt.setStationName5(rs.getString("stationName5"));
                     batt.setStationId(rs.getString("stationId"));
                     batt.setFBSDeviceName(rs.getString("fBSDeviceName"));
                     batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
                     list.add(batt);
                  }
               } catch (SQLException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
               }
            return list;
         }
      } );
      return list;
   }
   //查询管理的机房(左侧导航第四层,查所有的机房,num中存放uid)
   public List serchStationName3(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,StationName5,stationid,fbsdeviceid,FBSDeviceName  " +
            " FROM db_battinf.tb_battinf " +
            " where StationId in(" +
            " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
            " ) and StationName1 like ? and StationName2 like ? and StationName5 like ?  " +
            " ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%"},new CallBack() {
         public List getResults(ResultSet rs) {
            List list=new ArrayList();
               try {
                  while(rs.next()){
                     BattInf batt = new BattInf();
                     batt.setStationName(rs.getString("stationName"));
                     batt.setStationName1(rs.getString("stationName1"));
                     batt.setStationName2(rs.getString("stationName2"));
                     batt.setStationName3(rs.getString("stationName3"));
                     batt.setStationName5(rs.getString("stationName5"));
                     batt.setStationId(rs.getString("stationId"));
                     batt.setFBSDeviceName(rs.getString("fBSDeviceName"));
                     batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
                     list.add(batt);
                  }
               } catch (SQLException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
               }
            return list;
         }
      } );
      return list;
   }
   //查询管理的机房(左侧导航第四层,查所有的机房)
   public List serchStationName3_all(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,StationName5,stationid,fbsdeviceid,FBSDeviceName  " +
            " FROM db_battinf.tb_battinf " +
            " where StationName1 like ? and StationName2 like ?  and StationName5 like ? " +
            " ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%"},new CallBack() {
         public List getResults(ResultSet rs) {
            List list=new ArrayList();
               try {
                  while(rs.next()){
                     BattInf batt = new BattInf();
                     batt.setStationName(rs.getString("stationName"));
                     batt.setStationName1(rs.getString("stationName1"));
                     batt.setStationName2(rs.getString("stationName2"));
                     batt.setStationName3(rs.getString("stationName3"));
                     batt.setStationName5(rs.getString("stationName5"));
                     batt.setStationId(rs.getString("stationId"));
                     batt.setFBSDeviceName(rs.getString("fBSDeviceName"));
                     batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
@@ -3475,7 +3545,7 @@
   }
   
   
   //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
   //根据机房id查询机房下的电池组信息(左侧导航第五层,根据机房查询下面的电池组,num中存放uid)
   public List serchBattByStation(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationName1,StationName2,StationId,stationid_ex,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice,Load_curr,DisCurrMax " +
@@ -3530,7 +3600,7 @@
      });
      return list;
      }
   //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
   //根据机房id查询机房下的电池组信息(左侧导航第五层,根据机房查询下面的电池组,num中存放uid)
   public List serchBattByStation_all(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName,StationId,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice " +