didiyu
2018-09-28 97db75238a96a75f41bafd469548c2a84ba37080
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -354,6 +354,14 @@
      }else{
         baseSql+=station1SqlF;
      }
      //用于维护区
      String station2SqlT=" and stationname2!=? ";//全部
      String station2SqlF=" and stationname2=? ";
      if(binf.getStationName2().equals("")){
         baseSql+=station2SqlT;
      }else{
         baseSql+=station2SqlF;
      }
      //用于机房站点
      String stationSqlT=" and stationname!=? ";//全部
      String stationSqlF=" and stationname=? ";
@@ -373,7 +381,7 @@
      String endSql=" order by stationid ";
      sql=baseSql+endSql;
      //System.out.println(sql);
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName2(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
         
         public List getResults(ResultSet rs) {
            List list=new ArrayList();
@@ -3304,12 +3312,12 @@
   //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
   public List serchStationName3(Object obj){
      BattInf binf=(BattInf) obj;
      String sql="select DISTINCT StationName1,StationName2,StationName3,stationid,fbsdeviceid,FBSDeviceName  " +
      String sql="select DISTINCT StationName,StationName1,StationName2,StationName3,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 ?  " +
            " ORDER BY CONVERT( StationName3 USING gbk ) COLLATE gbk_chinese_ci ASC ";
            " 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()+"%"},new CallBack() {
         
         public List getResults(ResultSet rs) {
@@ -3317,6 +3325,7 @@
               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"));
@@ -3340,7 +3349,7 @@
   public List serchBattByStation(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 " +
            "from db_battinf.tb_battinf  where StationName1 like ? and StationName2 like ?  and  StationName3 like ?  ";
            "from db_battinf.tb_battinf  where StationName1 like ? and StationName2 like ?  and  StationName like ?  ";
       //机房id
      String idSqlT=" and  Stationid like ? ";
      sql+=idSqlT;
@@ -3352,7 +3361,7 @@
      //排序
      String orderSql=" ORDER BY StationName1,battgroupId ";
      //System.out.println(sql);
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationId()+"%",binf.getNum()},new CallBack() {
      List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName()+"%","%"+binf.getStationId()+"%",binf.getNum()},new CallBack() {
         
         public List getResults(ResultSet rs) {
            List list = new ArrayList();