| | |
| | | //用户手动添加问题
|
| | | public boolean add(Object obj) {
|
| | | Deverror_record dev_record=(Deverror_record) obj;
|
| | | String sql=" insert into db_battinf.tb_deverror_record(stationId,record_time,error_descript,uid,picture_num ";
|
| | | String endsql=") values(?,?,?,?,?";
|
| | | String sql=" insert into db_battinf.tb_deverror_record(stationId,record_time,error_descript,error_dispose,uid,picture_num ";
|
| | | String endsql=") values(?,?,?,?,?,?";
|
| | | List list=new ArrayList();
|
| | | list.add(dev_record.getStationId());
|
| | | list.add(dev_record.getRecord_time());
|
| | | list.add(dev_record.getError_descript());
|
| | | list.add(dev_record.getError_dispose());
|
| | | list.add(dev_record.getUid());
|
| | | list.add(dev_record.getPicture_num());
|
| | | if(dev_record.getPicture_num()>=1){
|
| | |
| | | boolean bl=DAOHelper.executeUpdatePicture(DBUtil.getConn(), sql, list);
|
| | | return bl;
|
| | | }
|
| | |
|
| | | //用户处理的结果
|
| | | public boolean update(Object obj) {
|
| | | // TODO Auto-generated method stub
|
| | | return false;
|
| | | 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;
|
| | | }
|
| | |
|
| | | public boolean del(Object obj) {
|
| | |
| | | Page p=binf.getPage();
|
| | | Connection conn=DBUtil.getConn();
|
| | | String numberSql=" SELECT FOUND_ROWS() number";
|
| | | String sql=" select SQL_CALC_FOUND_ROWS distinct tb_deverror_record.num,tb_deverror_record.stationid,record_time,error_descript,error_en,picture_num " +
|
| | | String sql=" select SQL_CALC_FOUND_ROWS distinct tb_deverror_record.num,tb_deverror_record.stationid,record_time,error_descript,error_en,error_dispose,picture_num " +
|
| | | " ,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.uid=? " ;
|
| | | //用户管理
|
| | | 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=? "+
|
| | |
| | | dev_record.setStationName3(rs.getString("stationName3"));
|
| | | dev_record.setStationName5(rs.getString("stationName5"));
|
| | | dev_record.setRecord_time(rs.getTimestamp("record_time"));
|
| | | dev_record.setError_descript(rs.getString("error_descript"));
|
| | | dev_record.setError_descript(rs.getNString("error_descript"));
|
| | | dev_record.setError_en(rs.getInt("error_en"));
|
| | | dev_record.setError_dispose(rs.getNString("error_dispose"));
|
| | | dev_record.setPicture_num(rs.getInt("picture_num"));
|
| | | Page page=new Page();
|
| | | dev_record.setPage(page);
|
| | |
| | | p.setPageSize(10);
|
| | | binf.setPage(p);
|
| | | List list=dimpl.serchByCondition(binf);
|
| | | for (Object object : list) {
|
| | | System.out.println(object);
|
| | | }
|
| | | System.out.println(list.size());
|
| | | }
|
| | |
|