| | |
| | | //用户处理的结果
|
| | | public boolean update(Object obj) {
|
| | | Deverror_record dev_record=(Deverror_record) obj;
|
| | | System.out.println(dev_record);
|
| | | String sql=" update db_battinf.tb_deverror_record set error_dispose=?,error_en=? where num=? ";
|
| | | boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{dev_record.getError_dispose(),dev_record.getError_en(),dev_record.getNum()});
|
| | | return bl;
|
| | |
| | | " ,db_battinf.tb_battinf.stationname,stationname1,stationname2,stationname3,stationname5 " +
|
| | | " from db_battinf.tb_deverror_record,db_battinf.tb_battinf " +
|
| | | " where tb_deverror_record.stationid=tb_battinf.stationid " +
|
| | | " and tb_deverror_record.stationid like ? and stationname1 like ? and stationname2 like ? and stationname5 like ? " +
|
| | | " and tb_deverror_record.uid=? and error_en=0 " ;
|
| | | " and tb_deverror_record.stationid like ? and stationname1 like ? and stationname2 like ? and stationname5 like ? " ;
|
| | | //用户管理
|
| | | String userSql=" and db_battinf.tb_battinf.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=? "+
|
| | |
| | | sql+=orderSql;
|
| | | String limitSql=" limit ?,? ";
|
| | | sql+=limitSql;
|
| | | List<Deverror_record> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationId()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%",binf.getNum()
|
| | | List<Deverror_record> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationId()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%"
|
| | | ,binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | //去掉limit条件后的总数
|
| | | int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql);
|
| | | if(list!=null&&list.size()>0){
|
| | | list.get(list.size()-1).getPage().setPageSize(number);
|
| | | list.get(list.size()-1).getPage().setPageAll(number);
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
| | | p.setPageSize(10);
|
| | | binf.setPage(p);
|
| | | List list=dimpl.serchByCondition(binf);
|
| | | for (Object object : list) {
|
| | | System.out.println(object);
|
| | | }
|
| | | System.out.println(list.size());
|
| | | }
|
| | |
|