| | |
| | | //用户手动添加问题
|
| | | 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,error_dispose,uid,uname,picture_num ";
|
| | | String sql=" insert into db_battinf.tb_deverror_record(stationId,record_time,error_descript,error_dispose,uid,uname,picture_num,error_state ";
|
| | | String endsql=") values(?,?,?,?,?,?,?";
|
| | | List list=new ArrayList();
|
| | | list.add(dev_record.getStationId());
|
| | |
| | | list.add(dev_record.getUid());
|
| | | list.add(dev_record.getUname());
|
| | | list.add(dev_record.getPicture_num());
|
| | | list.add(dev_record.getError_state());
|
| | | if(dev_record.getPicture_num()>=1){
|
| | | sql+=",picture_one";
|
| | | endsql+=",? ";
|
| | |
| | | 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,error_dispose,picture_num,solve_uid,solve_picture_num,uid,uname,solve_uname,solve_record_time " +
|
| | | 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,error_state,solve_uid,solve_picture_num,uid,uname,solve_uname,solve_record_time " +
|
| | | " ,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 ? " ;
|
| | | //问题类型
|
| | | String errSqlT=" and error_state!=?";
|
| | | String errSqlF=" and error_state=?";
|
| | | if(binf.getMonCount()==-1) {
|
| | | sql+=errSqlT;
|
| | | }else {
|
| | | sql+=errSqlF;
|
| | | }
|
| | | //用户管理
|
| | | 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=? "+
|
| | |
| | | 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(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()}, new CallBack() {
|
| | | ,binf.getMonCount(),binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | |
| | | dev_record.setError_en(rs.getInt("error_en"));
|
| | | dev_record.setError_dispose(rs.getString("error_dispose"));
|
| | | dev_record.setPicture_num(rs.getInt("picture_num"));
|
| | | dev_record.setError_state(rs.getInt("error_state"));
|
| | | dev_record.setUid(rs.getInt("uid"));
|
| | | dev_record.setUname(rs.getString("uname"));
|
| | | dev_record.setSolve_uid(rs.getInt("solve_uid"));
|
| | |
| | | binf.setStationName3("");
|
| | | binf.setStationName5("");
|
| | | binf.setStationId("");
|
| | | binf.setMonCount(-1);
|
| | | Page p=new Page();
|
| | | p.setPageCurr(1);
|
| | | p.setPageSize(10);
|
| | |
| | | private Date record_time;
|
| | | private String error_descript;//问题描述
|
| | | private String error_dispose;//问题处理
|
| | | |
| | | private int error_state;//问题类型
|
| | | private int error_en; //问题是否解决
|
| | | private String note;
|
| | | private Page page;
|
| | |
| | | public void setSolve_record_time(Date solve_record_time) {
|
| | | this.solve_record_time = solve_record_time;
|
| | | }
|
| | | public int getError_state() {
|
| | | return error_state;
|
| | | }
|
| | | public void setError_state(int error_state) {
|
| | | this.error_state = error_state;
|
| | | }
|
| | | @Override
|
| | | public String toString() {
|
| | | return "Deverror_record [num=" + num + ", stationId=" + stationId
|
| | | + ", stationName=" + stationName + ", stationName1="
|
| | | + stationName1 + ", stationName2=" + stationName2
|
| | | + ", stationName3=" + stationName3 + ", stationName5="
|
| | | + stationName5 + ", record_time=" + record_time
|
| | | + ", error_descript=" + error_descript + ", error_dispose="
|
| | | + error_dispose + ", error_en=" + error_en + ", note=" + note
|
| | | + ", page=" + page + ", uid=" + uid + ", uname=" + uname
|
| | | + ", picture_one=" + picture_one + ", picture_two="
|
| | | + picture_two + ", picture_three=" + picture_three
|
| | | + ", picture_four=" + picture_four + ", picture_num="
|
| | | + picture_num + ", solve_uid=" + solve_uid + ", solve_uname="
|
| | | + solve_uname + ", solve_picture_one=" + solve_picture_one
|
| | | + ", solve_picture_two=" + solve_picture_two
|
| | | + ", solve_picture_three=" + solve_picture_three
|
| | | + ", solve_picture_four=" + solve_picture_four
|
| | | + ", solve_picture_num=" + solve_picture_num
|
| | | + ", solve_record_time=" + solve_record_time + "]";
|
| | | return "Deverror_record [num=" + num + ", stationId=" + stationId + ", stationName=" + stationName
|
| | | + ", stationName1=" + stationName1 + ", stationName2=" + stationName2 + ", stationName3=" + stationName3
|
| | | + ", stationName5=" + stationName5 + ", record_time=" + record_time + ", error_descript="
|
| | | + error_descript + ", error_dispose=" + error_dispose + ", error_state=" + error_state + ", error_en="
|
| | | + error_en + ", note=" + note + ", page=" + page + ", uid=" + uid + ", uname=" + uname
|
| | | + ", picture_one=" + picture_one + ", picture_two=" + picture_two + ", picture_three=" + picture_three
|
| | | + ", picture_four=" + picture_four + ", picture_num=" + picture_num + ", solve_uid=" + solve_uid
|
| | | + ", solve_uname=" + solve_uname + ", solve_picture_one=" + solve_picture_one + ", solve_picture_two="
|
| | | + solve_picture_two + ", solve_picture_three=" + solve_picture_three + ", solve_picture_four="
|
| | | + solve_picture_four + ", solve_picture_num=" + solve_picture_num + ", solve_record_time="
|
| | | + solve_record_time + "]";
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | |
| | | }
|