Merge branch 'dev_lxw' of https://whyccjj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | Connection conn=DBUtil.getConn();
|
| | | String numberSql=" SELECT FOUND_ROWS() number";
|
| | | String sql="select SQL_CALC_FOUND_ROWS distinct tb_batt_endurance.num,tb_batt_endurance.deviceid,tb_batt_endurance.stationid,real_cap,tb_batt_endurance.moncapstd,real_curr,endurance_theory_timelong,endurance_actual_timelong,is_out_stand " +
|
| | | ",db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.StationName1,db_battinf.tb_battinf.StationName2 " +
|
| | | ",db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.StationName1,db_battinf.tb_battinf.StationName2,db_battinf.tb_battinf.StationName5 " +
|
| | | " from web_site.tb_batt_endurance,db_battinf.tb_battinf " +
|
| | | " where tb_batt_endurance.stationid=db_battinf.tb_battinf.stationid "+
|
| | | " and tb_batt_endurance.stationid in (" +
|
| | |
| | | " 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=? ) " ;
|
| | | //机房筛选
|
| | | String stationSql=" and db_battinf.tb_battinf.StationName like ? and db_battinf.tb_battinf.StationName1 like ? and db_battinf.tb_battinf.StationName2 like ?";
|
| | | String stationSql=" and db_battinf.tb_battinf.StationName like ? and db_battinf.tb_battinf.StationName1 like ? and db_battinf.tb_battinf.StationName2 like ? and db_battinf.tb_battinf.StationName5 like ?";
|
| | | sql+=stationSql;
|
| | | //实际续航时间
|
| | | String timelongSqlT=" and endurance_actual_timelong<=? ";//小于某一时间
|
| | |
| | |
|
| | |
|
| | | //System.out.println(sql);
|
| | | List<Batt_endurance> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{bendurance.getNum(),"%"+bendurance.getStationName()+"%","%"+bendurance.getStationName1()+"%","%"+bendurance.getStationName2()+"%",bendurance.getEndurance_actual_timelong(),bendurance.getIs_out_stand()
|
| | | List<Batt_endurance> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{bendurance.getNum(),"%"+bendurance.getStationName()+"%","%"+bendurance.getStationName1()+"%","%"+bendurance.getStationName2()+"%","%"+bendurance.getStationName5()+"%",bendurance.getEndurance_actual_timelong(),bendurance.getIs_out_stand()
|
| | | ,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | b.setStationName(rs.getString("stationname"));
|
| | | b.setStationName1(rs.getString("stationname1"));
|
| | | b.setStationName2(rs.getString("stationname2"));
|
| | | b.setStationName5(rs.getString("stationname5"));
|
| | | Page p=new Page();
|
| | | b.setPage(p);
|
| | | list.add(b);
|
| | |
| | | //机房事件统计
|
| | | public List serchByCondition(Object obj) {
|
| | | final BattInf binf=(BattInf) obj;
|
| | | String sql="select station_id,dev_id,station_event_type,record_datetime,station_event_trig ,tb_battinf.StationName,tb_battinf.StationName1,tb_battinf.StationName2,tb_battinf.StationName3 " +
|
| | | String sql="select station_id,dev_id,station_event_type,record_datetime,station_event_trig ,tb_battinf.StationName,tb_battinf.StationName1,tb_battinf.StationName2,tb_battinf.StationName3,tb_battinf.StationName5 " +
|
| | | " from db_alarm.tb_bts_station_event,db_battinf.tb_battinf " +
|
| | | " where tb_bts_station_event.dev_id=tb_battinf.FBSDeviceId " +
|
| | | " and tb_bts_station_event.station_id in (" +
|
| | | " select distinct db_battinf.tb_battinf.stationid " +
|
| | | " from db_battinf.tb_battinf " +
|
| | | " 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_bts_station_event.station_id 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=?" +
|
| | | " ) " +
|
| | | " and record_datetime>=? and record_datetime<=? " +
|
| | | " and stationname1 like ? and stationname2 like ? and stationname3 like ? and stationid like ? " ;
|
| | | " and stationname1 like ? and stationname2 like ? and stationname3 like ? and stationname5 like ? and stationid like ? " ;
|
| | | /*//事件筛选
|
| | | String eventSqlT=" and station_event_type!=? ";
|
| | | String eventSqlF=" and station_event_type=? ";
|
| | |
| | | String orderSql=" order by station_id,record_datetime,station_event_type asc ";
|
| | | sql+=orderSql;
|
| | | //System.err.println(sql);
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),binf.getBattInUseDate(),binf.getBattInUseDate1(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationId()+"%"}, new CallBack() {
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),binf.getBattInUseDate(),binf.getBattInUseDate1(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationName5()+"%","%"+binf.getStationId()+"%"}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | |
| | | " from db_alarm.tb_bts_station_event,db_battinf.tb_battinf " +
|
| | | " where tb_bts_station_event.dev_id=tb_battinf.FBSDeviceId " +
|
| | | " and tb_bts_station_event.station_id in (" +
|
| | | " select distinct db_battinf.tb_battinf.stationid " +
|
| | | " from db_battinf.tb_battinf " +
|
| | | " 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=? ) " +
|
| | | " 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=?" +
|
| | | " ) " +
|
| | | " and dev_id=? " +
|
| | | " and record_datetime>=? and record_datetime<=? ";
|
| | | //基站状态
|
| | |
| | | bmd.setPage(p);
|
| | | bmd.setBinf(binf);
|
| | | bmd.setUinf(uinf);
|
| | | List<Bts_station_event> list=bimpl.serchByCondition(binf);
|
| | | /*List<Bts_station_event> list=bimpl.serchByCondition(binf);
|
| | | System.out.println(list.size());
|
| | | for (Bts_station_event b : list) {
|
| | | System.out.println(b.getNote()+" "+b.getDev_id()+" "+b.getStation_event_type_poff()+" "+b.getStation_event_type_xuhang()+" "+b.getStation_event_type_fadian()+" "+b.getStation_event_type_diaozhan()+" "+b.getStation_event_type_dooropen()+" "+b.getStation_event_type_tempup()+" "+b.getStation_event_type_templow()+" "+b.getStation_event_type_dampup()+" "+b.getStation_event_type_damplow()+" "+b.getStationName());
|
| | | }
|
| | | }*/
|
| | | Bts_station_event b=new Bts_station_event();
|
| | | b.setNum(1002);
|
| | | b.setDev_id(910000001);
|
| | |
| | | page.setPageCurr(1);
|
| | | page.setPageSize(10);
|
| | | b.setPage(page);
|
| | | /*List list=bimpl.serchByInfo(b);
|
| | | System.out.println(list.size());*/
|
| | | List list=bimpl.serchByInfo(b);
|
| | | System.out.println(list.size());
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | String numberSql="SELECT FOUND_ROWS() number";//存放总数
|
| | | String sql="select SQL_CALC_FOUND_ROWS distinct station_id,dev_id,record_datetime,station_stat,station_poff_start_time,station_fadian_start_time" +
|
| | | " ,station_diaozhan_start_time,station_temp,station_damp,station_dooropen_start_time,station_xuhang_start_time" +
|
| | | " ,tb_battinf.stationname,tb_battinf.stationname1,tb_battinf.stationname2,tb_battinf.stationname3 " +
|
| | | " ,tb_battinf.stationname,tb_battinf.stationname1,tb_battinf.stationname2,tb_battinf.stationname3,tb_battinf.stationname5 " +
|
| | | " from db_ram_db.tb_bts_station_state,db_battinf.tb_battinf " +
|
| | | " where tb_bts_station_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " +
|
| | | " and tb_battinf.stationname1 like ? and tb_battinf.stationname2 like ? and tb_battinf.stationname3 like ? " +
|
| | | " and tb_battinf.stationname1 like ? and tb_battinf.stationname2 like ? and tb_battinf.stationname3 like ? and tb_battinf.stationname5 like ? " +
|
| | | " and stationid like ? " ;
|
| | | /*" and tb_bts_station_state.station_id in (" +
|
| | | " select distinct db_battinf.tb_battinf.stationid " +
|
| | |
| | | String orderSql=" limit ? ,? ";
|
| | | sql+=orderSql;
|
| | | //System.out.println(sql);
|
| | | List<Bts_station_state> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationId()+"%",binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()},new CallBack() {
|
| | | List<Bts_station_state> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationName5()+"%","%"+binf.getStationId()+"%",binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()},new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | |
| | | b.setStationName1(rs.getString("stationName1"));
|
| | | b.setStationName2(rs.getString("stationName2"));
|
| | | b.setStationName3(rs.getString("stationName3"));
|
| | | b.setStationName5(rs.getString("stationName5"));
|
| | | Page page=new Page();
|
| | | b.setPage(page);
|
| | | list.add(b);
|
| | |
| | | private String stationName;
|
| | | private String stationName1;//省级
|
| | | private String stationName2;//市级
|
| | | |
| | | private String stationName5;//区县
|
| | | private Page page;//分页
|
| | | public int getNum() {
|
| | | return num;
|
| | |
| | | public void setPage(Page page) {
|
| | | this.page = page;
|
| | | }
|
| | | public String getStationName5() {
|
| | | return stationName5;
|
| | | }
|
| | | public void setStationName5(String stationName5) {
|
| | | this.stationName5 = stationName5;
|
| | | }
|
| | | @Override
|
| | | public String toString() {
|
| | | return "Batt_endurance [num=" + num + ", deviceId=" + deviceId
|
| | |
| | | + ", endurance_actual_timelong=" + endurance_actual_timelong
|
| | | + ", is_out_stand=" + is_out_stand + ", note=" + note
|
| | | + ", stationName=" + stationName + ", stationName1="
|
| | | + stationName1 + ", stationName2=" + stationName2 + ", page="
|
| | | + page + "]";
|
| | | + stationName1 + ", stationName2=" + stationName2
|
| | | + ", stationName5=" + stationName5 + ", page=" + page + "]";
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | }
|
| | |
| | | private String stationName1;
|
| | | private String stationName2;
|
| | | private String stationName3;
|
| | | private String stationName5;
|
| | | private Page page;
|
| | |
|
| | |
|
| | |
| | | public void setStation_xuhang_tlong(int station_xuhang_tlong) {
|
| | | this.station_xuhang_tlong = station_xuhang_tlong;
|
| | | }
|
| | | public String getStationName5() {
|
| | | return stationName5;
|
| | | }
|
| | | public void setStationName5(String stationName5) {
|
| | | this.stationName5 = stationName5;
|
| | | }
|
| | | @Override
|
| | | public String toString() {
|
| | | return "Bts_station_state [num=" + num + ", station_id=" + station_id
|
| | |
| | | + station_xuhang_tlong + ", note=" + note + ", stationName="
|
| | | + stationName + ", stationName1=" + stationName1
|
| | | + ", stationName2=" + stationName2 + ", stationName3="
|
| | | + stationName3 + ", page=" + page + "]";
|
| | | + stationName3 + ", stationName5=" + stationName5 + ", page="
|
| | | + page + "]";
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | |
| | | }
|