81041
2018-10-18 a5adf25f45aa09965e7a3cd4912450512a15ee5c
修改基站状态查询
2个文件已修改
49 ■■■■ 已修改文件
gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dto/ram/Bts_station_state.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
@@ -47,8 +47,8 @@
        Page p=new Page();
        Connection conn=DBUtil.getConn();
        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_poff_tlong,station_fadian_start_time,station_fadian_tlong" +
                   " ,station_diaozhan_start_time,station_diaozhan_tlong,station_temp,station_damp,station_dooropen_start_time,station_dooropen_tlong" +
        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 " +
                   " from db_ram_db.tb_bts_station_state,db_battinf.tb_battinf  " +
                   " where  tb_bts_station_state.dev_id=db_battinf.tb_battinf.FBSDeviceId  " +
@@ -66,28 +66,28 @@
                        b.setDev_id(rs.getInt("dev_id"));
                        b.setRecord_datetime(rs.getTimestamp("record_datetime"));
                        b.setStation_stat(rs.getInt("station_stat"));
                        if(((b.getStation_stat()>>4)&1)==1){
                            b.setStation_stat_diaozhan(1);//掉站
                        }
                        if(((b.getStation_stat()>>3)&1)==1){
                            b.setStation_stat_dooropen(1);//开门
                        }
                        if(((b.getStation_stat()>>2)&1)==1){
                            b.setStation_stat_diaozhan(1);//掉站
                            b.setStation_stat_fadian(1);  //发电
                        }
                        if(((b.getStation_stat()>>1)&1)==1){
                            b.setStation_stat_fadian(1);  //发电
                            b.setStation_stat_xuhang(1);//续航
                        }
                        if((b.getStation_stat()&1)==1){
                            b.setStation_stat_poff(1);    //停电
                        }
                        b.setStation_poff_start_time(rs.getTimestamp("station_poff_start_time"));
                        b.setStation_poff_tlong(rs.getInt("station_poff_tlong"));
                        b.setStation_fadian_start_time(rs.getTimestamp("station_fadian_start_time"));
                        b.setStation_fadian_tlong(rs.getInt("station_fadian_tlong"));
                        b.setStation_diaozhan_start_time(rs.getTimestamp("station_diaozhan_start_time"));
                        b.setStation_diaozhan_tlong(rs.getInt("station_diaozhan_tlong"));
                        b.setStation_temp(rs.getFloat("station_temp"));
                        b.setStation_damp(rs.getFloat("station_damp"));
                        b.setStation_dooropen_start_time(rs.getTimestamp("station_dooropen_start_time"));
                        b.setStation_dooropen_tlong(rs.getInt("station_dooropen_tlong"));
                        b.setStation_xuhang_start_time(rs.getTimestamp("station_xuhang_start_time"));
                        b.setStationName(rs.getString("stationName"));
                        b.setStationName1(rs.getString("stationName1"));
                        b.setStationName2(rs.getString("stationName2"));
@@ -123,14 +123,14 @@
        binf.setStationName1("");
        binf.setStationName2("");
        binf.setStationName3("");
        binf.setStationId("35000004");
        binf.setStationId("");
        Page p=new Page();
        p.setPageCurr(1);
        p.setPageSize(10);
        binf.setPage(p);
        List<Bts_station_state> list=bimpl.serchByCondition(binf);
        for (Bts_station_state bs : list) {
            //System.out.println(bs.getStation_stat_dooropen()+"  "+bs.getStation_stat_diaozhan()+"  "+bs.getStation_stat_fadian()+"   "+bs.getStation_stat_poff());
            System.out.println(bs.getStation_stat_diaozhan()+"  "+bs.getStation_stat_dooropen()+"  "+bs.getStation_stat_fadian()+"   "+bs.getStation_stat_xuhang()+"  "+bs.getStation_stat_poff());
            System.out.println(bs);
        }
    }
gx_tieta/src/com/fgkj/dto/ram/Bts_station_state.java
@@ -29,6 +29,11 @@
    private int station_stat_dooropen;
    private Date station_dooropen_start_time;
    private int station_dooropen_tlong;
    private int station_stat_xuhang;
    private Date station_xuhang_start_time;
    private int station_xuhang_tlong;
    private String note;
    private String stationName;
    private String stationName1;
@@ -195,6 +200,24 @@
    public void setStation_stat_dooropen(int station_stat_dooropen) {
        this.station_stat_dooropen = station_stat_dooropen;
    }
    public int getStation_stat_xuhang() {
        return station_stat_xuhang;
    }
    public void setStation_stat_xuhang(int station_stat_xuhang) {
        this.station_stat_xuhang = station_stat_xuhang;
    }
    public Date getStation_xuhang_start_time() {
        return station_xuhang_start_time;
    }
    public void setStation_xuhang_start_time(Date station_xuhang_start_time) {
        this.station_xuhang_start_time = station_xuhang_start_time;
    }
    public int getStation_xuhang_tlong() {
        return station_xuhang_tlong;
    }
    public void setStation_xuhang_tlong(int station_xuhang_tlong) {
        this.station_xuhang_tlong = station_xuhang_tlong;
    }
    @Override
    public String toString() {
        return "Bts_station_state [num=" + num + ", station_id=" + station_id
@@ -212,7 +235,10 @@
                + ", station_damp=" + station_damp + ", station_stat_dooropen="
                + station_stat_dooropen + ", station_dooropen_start_time="
                + station_dooropen_start_time + ", station_dooropen_tlong="
                + station_dooropen_tlong + ", note=" + note + ", stationName="
                + station_dooropen_tlong + ", station_stat_xuhang="
                + station_stat_xuhang + ", station_xuhang_start_time="
                + station_xuhang_start_time + ", station_xuhang_tlong="
                + station_xuhang_tlong + ", note=" + note + ", stationName="
                + stationName + ", stationName1=" + stationName1
                + ", stationName2=" + stationName2 + ", stationName3="
                + stationName3 + ", page=" + page + "]";
@@ -220,4 +246,5 @@
    
    
    
}