From 4f149d9dd30b7703990ba376fc42d54edd7328d2 Mon Sep 17 00:00:00 2001 From: 81041 <81041@192.168.10.31> Date: 星期三, 31 十月 2018 17:28:18 +0800 Subject: [PATCH] 机房停电查询添加区县 --- gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java | 21 +++++++++++++++------ 1 files changed, 15 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 e8f42a8..cb870ad 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/Deverror_recordImpl.java @@ -54,10 +54,18 @@ " 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 " + - " order by record_time desc " + - " limit ?,? "; - List<Deverror_record> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationId()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%" + " and tb_deverror_record.uid=? and error_en=0 " ; + //鐢ㄦ埛绠$悊 + 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+=userSql; + + String orderSql=" order by record_time desc "; + 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() ,binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()}, new CallBack() { public List getResults(ResultSet rs) { @@ -103,7 +111,7 @@ BattInf binf=new BattInf(); binf.setNum(1002); binf.setStationName(""); - binf.setStationName1(""); + binf.setStationName1("婀栧寳鐪�"); binf.setStationName2(""); binf.setStationName3(""); binf.setStationName5(""); @@ -112,7 +120,8 @@ p.setPageCurr(1); p.setPageSize(10); binf.setPage(p); - dimpl.serchByCondition(binf); + List list=dimpl.serchByCondition(binf); + System.out.println(list.size()); } } -- Gitblit v1.9.1