From d489aed2de688a18d6aaf76ae3630b24d56c8ee4 Mon Sep 17 00:00:00 2001 From: 81041 <81041@192.168.10.27> Date: 星期二, 06 十一月 2018 16:06:01 +0800 Subject: [PATCH] gprs使用REPLACE --- gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java index ca27a60..27ebc9d 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java @@ -87,8 +87,7 @@ " ,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=? "+ @@ -99,7 +98,7 @@ 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) { @@ -115,9 +114,9 @@ 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.getNString("error_descript")); + dev_record.setError_descript(rs.getString("error_descript")); dev_record.setError_en(rs.getInt("error_en")); - dev_record.setError_dispose(rs.getNString("error_dispose")); + dev_record.setError_dispose(rs.getString("error_dispose")); dev_record.setPicture_num(rs.getInt("picture_num")); Page page=new Page(); dev_record.setPage(page); @@ -133,7 +132,7 @@ //鍘绘帀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; } @@ -176,6 +175,9 @@ p.setPageSize(10); binf.setPage(p); List list=dimpl.serchByCondition(binf); + for (Object object : list) { + System.out.println(object); + } System.out.println(list.size()); } -- Gitblit v1.9.1