From 63d9ecbf93cf5b3582a8f7e08702fceeb1cc7b22 Mon Sep 17 00:00:00 2001 From: LiJun <LiJun@192.168.10.12> Date: 星期五, 26 十月 2018 14:20:01 +0800 Subject: [PATCH] 机房实时状态查询时未设置选中的查看异常状态时不查询没有异常的机房实时状态信息 --- gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 55 insertions(+), 4 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java index d1bd387..7ebfd56 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java @@ -60,9 +60,59 @@ " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " + " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + - " where db_user.tb_user_inf.uid=? ) " + - " and tb_battinf.stationname1 like ? and tb_battinf.stationname2 like ? and tb_battinf.stationname3 like ? " + - " and stationid like ? limit ? ,? "; + " where db_user.tb_user_inf.uid=? and tb_battinf.stationname1 like ? and tb_battinf.stationname2 like ? and tb_battinf.stationname3 like ? ) " + + " and stationid like ? " ; + if(binf.getBattGroupNum()>1){ + sql+=" and ( "; + } + //鎺夌珯 + String diaozhanSql=" ((station_stat&32)>1) "; + if((binf.getBattGroupNum()&32)>1){ + sql+=diaozhanSql; + } + if((binf.getBattGroupNum()&16)>1&&(binf.getBattGroupNum()>32)){ + sql+=" or "; + } + //寮�闂� + String dooropenSql=" ((station_stat&16)>1) "; + if((binf.getBattGroupNum()&16)>1){ + sql+=dooropenSql; + } + if((binf.getBattGroupNum()&8)>1&&(binf.getBattGroupNum()>16)){ + sql+=" or "; + } + //鍙戠數 + String fadianSql=" ((station_stat&8)>1) "; + if((binf.getBattGroupNum()&8)>1){ + sql+=fadianSql; + } + if((binf.getBattGroupNum()&4)>1&&(binf.getBattGroupNum()>8)){ + sql+=" or "; + } + //缁埅 + String xuhangSql=" ((station_stat&4)>1) "; + if((binf.getBattGroupNum()&4)>1){ + sql+=xuhangSql; + } + if((binf.getBattGroupNum()&2)>1&&(binf.getBattGroupNum()>4)){ + sql+=" or "; + } + //鍋滅數 + String poffSql=" ((station_stat&2)>1) "; + if((binf.getBattGroupNum()&2)>1){ + sql+=poffSql; + } + + if(binf.getBattGroupNum()>1){ + sql+=" ) "; + } + if(binf.getBattGroupNum()==0){ + sql+=" and station_stat<0 "; //褰撴病鏈夐�夋嫨鎯宠鏌ョ湅鐨勬満鎴垮紓甯哥姸鎬佹槸绛涢�� + } + //鍒嗛〉 + String orderSql=" limit ? ,? "; + sql+=orderSql; + //System.out.println(sql); List<Bts_station_state> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationId()+"%",(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()},new CallBack() { public List getResults(ResultSet rs) { @@ -163,11 +213,12 @@ binf.setStationName2(""); binf.setStationName3(""); binf.setStationId(""); + binf.setBattGroupNum(36); User_inf uinf=new User_inf(); uinf.setUId(1002); Page p=new Page(); p.setPageCurr(1); - p.setPageSize(1); + p.setPageSize(10); binf.setPage(p); List<Bts_station_state> list=bimpl.serchByCondition(binf); for (Bts_station_state bs : list) { -- Gitblit v1.9.1