| | |
| | | + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
|
| | | ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate " +
|
| | | " From db_battinf.tb_battinf " +
|
| | | " Where StationName like ? and StationName1 like ? " +
|
| | | " Where StationName like ? and StationName1 like ? and StationName2 like ? " +
|
| | | " order by StationId " +
|
| | | " limit ?,?";
|
| | | List<BattInf> list=DAOHelper.executeQueryLimit(sql,conn, new Object[]{"%"+binf.getStationName()+"%","%"+binf.getStationName1()+"%",(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()},new CallBack() {
|
| | | List<BattInf> list=DAOHelper.executeQueryLimit(sql,conn, new Object[]{"%"+binf.getStationName()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%",(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()},new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list = new ArrayList<BattInf>();
|
| | |
| | | // batt.setStationName(rs.getString("StationName"));
|
| | | batt.setBattGroupName(rs.getString("battGroupName"));
|
| | | batt.setMonCount(rs.getInt("monCount"));
|
| | | batt.setMonNum(Integer.parseInt(rs.getString("signalname").split("#")[0]));
|
| | | //batt.setMonNum(Integer.parseInt(rs.getString("signalname").split("#")[0]));
|
| | | //System.out.println(batt);
|
| | | list.add(batt);
|
| | | }
|
| | |
| | | " 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=?" +
|
| | | " )";
|
| | | " ) ORDER BY CONVERT( StationName1 USING gbk ) COLLATE gbk_chinese_ci ASC";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum()},new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | " 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 StationName1 like ? " +
|
| | | " ORDER BY CONVERT( StationName2 USING gbk ) COLLATE gbk_chinese_ci ASC ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%"},new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
|
| | | public List serchStationName3(Object obj){
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql="select DISTINCT StationName3,stationid,fbsdeviceid " +
|
| | | String sql="select DISTINCT StationName1,StationName2,StationName3,stationid,fbsdeviceid " +
|
| | | " 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 StationName1 like ? and StationName2 like ? " +
|
| | | " ORDER BY CONVERT( StationName3 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) {
|
| | |
| | | try {
|
| | | while(rs.next()){
|
| | | BattInf batt = new BattInf();
|
| | | batt.setStationName1(rs.getString("stationName1"));
|
| | | batt.setStationName2(rs.getString("stationName2"));
|
| | | batt.setStationName3(rs.getString("stationName3"));
|
| | | batt.setStationId(rs.getString("stationId"));
|
| | | batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
|
| | |
| | | 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 stationid=? " +
|
| | | "and StationId in(" +
|
| | | "from db_battinf.tb_battinf where StationName1 like ? and StationName2 like ? and StationName3 like ? ";
|
| | | //机房id
|
| | | String idSqlT=" and Stationid like ? ";
|
| | | sql+=idSqlT;
|
| | | //用户管理
|
| | | String userSql=" and 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=?" +
|
| | | " ) " +
|
| | | "ORDER BY StationName1,battgroupId ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{binf.getNum(),binf.getStationId()},new CallBack() {
|
| | | " ) ";
|
| | | sql+=userSql;
|
| | | //排序
|
| | | 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() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list = new ArrayList();
|
| | |
| | |
|
| | | BattInfImpl biml = new BattInfImpl();
|
| | | BattInf binf = new BattInf();
|
| | | binf.setBattGroupId(0);
|
| | | binf.setBattGroupId(1000967);
|
| | | binf.setStationName("内蒙古");
|
| | | binf.setStationName1("内蒙古");
|
| | |
|
| | |
| | | bmd.setUinf(uinf);
|
| | | //List<BattInf> list = biml.serchByConditionNew(bmd);
|
| | | //List<BattInf> list=biml.serchByTestType(bmd);
|
| | | List<BattInf> list=biml.serchGroupAssess(bmd);
|
| | | //List<BattInf> list=biml.serchGroupAssess(bmd);
|
| | | List<BattInf> list=biml.serchByMonNum(binf);
|
| | | for (BattInf b : list) {
|
| | | System.out.println(b);
|
| | | }
|