| | |
| | | //查询管理的县/区(左侧导航第三层,查所有的县/区)
|
| | | public List serchStationName5(Object obj){
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql="select DISTINCT stationName5,StationName,StationName1,StationName2,StationName3,stationid,fbsdeviceid,FBSDeviceName " +
|
| | | String sql="select DISTINCT stationName5,StationName1,StationName2 " +
|
| | | " 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( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
|
| | | //System.out.println(sql);
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | 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) {
|
| | |
| | | //查询管理的县/区(左侧导航第三层,查所有的县/区)
|
| | | public List serchStationName5_all(Object obj){
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql="select DISTINCT stationName5,StationName,StationName1,StationName2,StationName3,stationid,fbsdeviceid,FBSDeviceName " +
|
| | | String sql="select DISTINCT stationName5,StationName1,StationName2 " +
|
| | | " FROM db_battinf.tb_battinf " +
|
| | | " where StationName1 like ? and StationName2 like ? " +
|
| | | " ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
|
| | |
| | | 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) {
|
| | |
| | | //List<BattInf> list=biml.serchGroupAssess(bmd);
|
| | | //List<BattInf> list=biml.serchMakeGroup(binf);
|
| | | //List<BattInf> list=biml.serchGroupByInfor(binf);
|
| | | List<BattInf> list=biml.searchInform1(bmd);
|
| | | for (BattInf b : list) {
|
| | | //List<BattInf> list=biml.searchInform1(bmd);
|
| | | List<BattInf> list=biml.serchStationName5(binf);
|
| | | /*for (BattInf b : list) {
|
| | | System.out.println(b);
|
| | | }
|
| | | }*/
|
| | | System.out.println(list.size());
|
| | | }
|
| | |
|