81041
2018-12-03 e6127f8fc2e32360366315e02668ed06483c31e6
修改
4个文件已添加
7个文件已修改
536 ■■■■■ 已修改文件
gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dto/App_bts_comm_task.java 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/App_bts_comm_taskService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/BattMap_informationService.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java
New file
@@ -0,0 +1,36 @@
package com.fgkj.actions;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_inf;
import com.fgkj.services.App_bts_comm_taskService;
public class App_bts_comm_taskAction extends ActionUtil{
    private App_bts_comm_taskService service = new App_bts_comm_taskService();
    private String json;
    private String result;
    //根据省市区机房名称查询
    public String serchByCondition(){
        BattInf binf=getGson("").fromJson(json, BattInf.class);
        User_inf uinf=(User_inf) getUser();
        binf.setNum(uinf.getUId());
        ServiceModel model=service.serchByCondition(binf);
        result=tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
}
gx_tieta/src/com/fgkj/dao/BaseDAO.java
@@ -200,6 +200,8 @@
    
    public static final int  FBS9100_BATTPARAM=98;
    
    public static final int  APP_BTS_COMM_TASK=99;
    public boolean add(Object obj); // 添加
    public boolean update(Object obj); // 更新
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
@@ -3,6 +3,7 @@
import com.fgkj.dao.impl.Alarm_paramImpl;
import com.fgkj.dao.impl.AnnounceImpl;
import com.fgkj.dao.impl.App_ParamImpl;
import com.fgkj.dao.impl.App_bts_comm_taskImpl;
import com.fgkj.dao.impl.BadBatt_monImpl;
import com.fgkj.dao.impl.BadBatt_mon_flagImpl;
import com.fgkj.dao.impl.BattDischarge_paramImpl;
@@ -206,6 +207,7 @@
            case 96:return new  Fbs9100_sysparamImpl();
            case 97:return new  Bts_gprs_stateImpl();
            case 98:return new  Fbs9100_battparamImpl();
            case 99:return new  App_bts_comm_taskImpl();
            default :return null;
        }
    }
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
@@ -3,6 +3,8 @@
import java.util.ArrayList;
import java.util.List;
import com.fgkj.dao.impl.BattInfImpl;
import com.fgkj.dao.impl.Batt_rtstateDAOImpl;
import com.fgkj.dto.BattInf;
public class BattinfGroupFactory {
@@ -102,5 +104,16 @@
        }
        return list;
    }
    //查询当前最大的电池组id
    public static int searchMaxBattgroupId(){
        int BattgroupId_max=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
        int BattgroupId_next=BattgroupId_max+1;
        return BattgroupId_next;
    }
    //查询当前最大的stationid
    public static int searchStationId(){
        int station_max=(new BattInfImpl()).searchMaxId();//当前最大的stationid
        int station_next=station_max+1;
        return station_next;
    }
}
gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java
New file
@@ -0,0 +1,115 @@
package com.fgkj.dao.impl;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.CallBack;
import com.fgkj.dao.DAOHelper;
import com.fgkj.dao.LimitNumberFactory;
import com.fgkj.db.DBUtil;
import com.fgkj.dto.App_bts_comm_task;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Page;
import com.mysql.fabric.xmlrpc.base.Array;
public class App_bts_comm_taskImpl implements BaseDAO,CallBack{
    public List getResults(ResultSet rs) {
        // TODO Auto-generated method stub
        return null;
    }
    public boolean add(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    public boolean update(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    public boolean del(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    public List searchAll() {
        // TODO Auto-generated method stub
        return null;
    }
    //根据省市区机房名称查询(uid放在num中)
    public List serchByCondition(Object obj) {
        BattInf binf=(BattInf) obj;
        Page page=binf.getPage();
        Connection conn=DBUtil.getConn();
        String numberSql=" SELECT FOUND_ROWS() number";
        String sql=" select SQL_CALC_FOUND_ROWS distinct dev_id,thread_id,battgroup_cnt,battgroup_id1,battgroup_index1,battgroup_id2,battgroup_index2,battgroup_id3,battgroup_index3,battgroup_id4,battgroup_index4,connect_time,dev_comm_runtime,break_type " +
                "  ,stationName,stationName1,stationName2,stationName3,stationName5,StationId " +
                " from db_app_sys.tb_app_bts_comm_task,db_battinf.tb_battinf  " +
                " where db_app_sys.tb_app_bts_comm_task.dev_id=db_battinf.tb_battinf.fBSDeviceId " +
                " and stationName1 like ? and stationName2 like ? and stationId like ? and stationName5 like ? " +
                "  and db_app_sys.tb_app_bts_comm_task.dev_id in (" +
                "  select distinct db_battinf.tb_battinf.fBSDeviceId  " +
                "  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 db_battinf.tb_battinf.station_install=1 ) "+
                "  limit ?,? ";
        List<App_bts_comm_task> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationId()+"%","%"+binf.getStationName5()+"%",binf.getNum(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()){
                        App_bts_comm_task atask=new App_bts_comm_task();
                        atask.setDev_id(rs.getInt("dev_id"));
                        atask.setThread_id(rs.getInt("thread_id"));
                        atask.setBattgroup_cnt(rs.getInt("battgroup_cnt"));
                        atask.setBattgroup_id1(rs.getInt("battgroup_id1"));
                        atask.setBattgroup_index1(rs.getInt("battgroup_index1"));
                        atask.setBattgroup_id2(rs.getInt("battgroup_id2"));
                        atask.setBattgroup_index2(rs.getInt("battgroup_index2"));
                        atask.setBattgroup_id3(rs.getInt("battgroup_id3"));
                        atask.setBattgroup_index3(rs.getInt("battgroup_index3"));
                        atask.setBattgroup_id4(rs.getInt("battgroup_id4"));
                        atask.setBattgroup_index4(rs.getInt("battgroup_index4"));
                        atask.setConnect_time(rs.getTimestamp("connect_time"));
                        atask.setDev_comm_runtime(rs.getTimestamp("dev_comm_runtime"));
                        atask.setBreak_type(rs.getInt("break_type"));
                        atask.setStationId(rs.getString("stationId"));
                        atask.setStationName(rs.getString("stationName"));
                        atask.setStationName1(rs.getString("stationName1"));
                        atask.setStationName2(rs.getString("stationName2"));
                        atask.setStationName3(rs.getString("stationName3"));
                        atask.setStationName5(rs.getString("stationName5"));
                        list.add(atask);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        });
        //去掉limit条件后的总数
        int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql);
        //System.out.println("number: "+number);
        if(list!=null&&list.size()>0){
            list.get(list.size()-1).setNum(number);
        }
        return list;
    }
    public List serchByInfo(Object obj) {
        // TODO Auto-generated method stub
        return null;
    }
}
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -17,6 +17,7 @@
import com.fgkj.actions.ActionUtil;
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BattinfGroupFactory;
import com.fgkj.dao.CallBack;
import com.fgkj.dao.DAOHelper;
import com.fgkj.dao.FBS9100_ComBase;
@@ -53,11 +54,12 @@
        //获取当前最大的stationid和battgroupid
        int maxs=42000000;//最大stationid
        int maxb=1000001;//最大battgroupid
        List maxList=(new BattInfImpl()).searchMaxId();
        if(maxList!=null&&maxList.size()>0){
        maxs=BattinfGroupFactory.searchStationId();
        maxb=BattinfGroupFactory.searchMaxBattgroupId();
        /*if(maxList!=null&&maxList.size()>0){
            maxs=(Integer) maxList.get(0)+1;
            maxb=(Integer) maxList.get(1)+1;
        }
            //maxb=(Integer) maxList.get(1)+1;
        }*/
        if(list!=null && list.size()>0){
            for (int i = 0; i < list.size(); i++) {
                BattInf binf=list.get(i);
@@ -110,11 +112,12 @@
                    binf.setStationId((String) listS.get(listS.size()-1));
                }else{
                    //获取当前最大的stationid
                    List maxList=(new BattInfImpl()).searchMaxId();
                    if(maxList!=null&&maxList.size()>0){
                    int maxs=BattinfGroupFactory.searchStationId();
                    binf.setStationId(String.valueOf(maxs));
                    /*if(maxList!=null&&maxList.size()>0){
                        int maxs=(Integer) maxList.get(0)+1;
                        binf.setStationId(String.valueOf(maxs));
                    }
                    }*/
                }
                String sql = "update db_battinf.tb_battinf set StationId='"+binf.getStationId()+"',StationName='"+binf.getStationName()+"',StationName1='"+binf.getStationName1()+"',StationName2='"+binf.getStationName2()+"',StationName3='"+binf.getStationName3()+"',StationName4='"+binf.getStationName4()+"',StationName5='"+binf.getStationName5()+"',StationIp='"+binf.getStationIp()+"',FBSDeviceId="+binf.getFBSDeviceId()+",FbsDeviceIp='"+binf.getFbsDeviceIp()+"',"
                        + "FBSDeviceName='"+binf.getFBSDeviceName()+"',GroupIndexInFBSDevice="+binf.getGroupIndexInFBSDevice()+",BattGroupNum="+binf.getBattGroupNum()+",BattGroupName='"+binf.getBattGroupName()+"',FloatVolLevel="+binf.getFloatVolLevel()+",OfflineVolLevel="+binf.getOfflineVolLevel()+",BattFloatCurrent="+binf.getBattFloatCurrent()+"," +
@@ -354,8 +357,9 @@
        return list;
    }
    //添加电池组时查询出最大的机房id和电池组id
    public List searchMaxId(){
        String sql="select max(stationid) as maxs,max(battgroupid) as maxb from db_battinf.tb_battinf limit 1";
    public int searchMaxId(){
        //,max(battgroupid) as maxb
        String sql="select max(stationid) as stationid_maxs from db_battinf.tb_battinf limit 1";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
            
            public List getResults(ResultSet rs) {
@@ -364,15 +368,15 @@
                    
                    while(rs.next()){
                        int maxs=42000000;
                        int maxb=1000001;
                        if(rs.getString("maxs") != null){
                            maxs=Integer.parseInt(rs.getString("maxs"));
                        //int maxb=1000001;
                        if(rs.getString("stationid_maxs") != null){
                            maxs=Integer.parseInt(rs.getString("stationid_maxs"));
                        }
                        if(rs.getInt("maxb")!=0){
                        /*if(rs.getInt("maxb")!=0){
                            maxb=rs.getInt("maxb");
                        }
                        }*/
                        list.add(maxs);
                        list.add(maxb);
                        //list.add(maxb);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
@@ -381,7 +385,11 @@
                return list;
            }
        });
        return list;
        int stationid=0;
        if(list!=null&&list.size()>0){
            stationid=(Integer) list.get(list.size()-1);
        }
        return stationid;
    }
    //判断新增的电池组是否存在
    public List judgeBatt(Object obj){
gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java
@@ -749,7 +749,33 @@
        }
        return list;
    }
   public static void main(String[] args) {
    //查询出当前存在内存中最大的电池组id(很重要**********)
    public int searchMaxBattgroupId(){
        String sql=" select max(battgroupid) as max_id from db_ram_db.tb_batt_rtstate limit 1";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()){
                        int battgroupid=rs.getInt("battgroupid");
                        list.add(battgroupid);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        });
        int battgroupid=0;
        if(list!=null&&list.size()>0){
            battgroupid=(Integer) list.get(list.size()-1);
        }
        return battgroupid;
    }
    public static void main(String[] args) {
       User_inf uinf=new User_inf();
       uinf.setUId(1001);
       Batt_rtstateDAOImpl bimpl=new Batt_rtstateDAOImpl();
gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
@@ -263,6 +263,35 @@
        }
        return nums;
    }
    //查询具体某机房掉站数(根据station_id )
    public int serchByStationId_diaozhan(Object obj) {
        BattMap_information binformation=(BattMap_information) obj;
        String sql="select count(num) as nums  from db_ram_db.tb_bts_station_state " +
                " where  station_stat&32>1   " +
                " and station_id=?  " +
                " limit 1 ";
        //System.out.println(sql);
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binformation.getStationId()}, new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()){
                        int nums=rs.getInt("nums");
                        list.add(nums);
                    }
                } catch (SQLException e) {
                    e.printStackTrace();
                }
                return list;
            }
        });
        int nums=0;//最后的结果
        if(list!=null&&list.size()>0){
            nums=(Integer) list.get(list.size()-1);
        }
        return nums;
    }
    public List serchByInfo(Object obj) {
        // TODO Auto-generated method stub
        return null;
@@ -282,16 +311,20 @@
        p.setPageCurr(1);
        p.setPageSize(10);
        binf.setPage(p);
        List<Bts_station_state> list=bimpl.serchByCondition(binf);
        /*List<Bts_station_state> list=bimpl.serchByCondition(binf);
        for (Bts_station_state bs : list) {
            //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);
        }
        int nums=bimpl.serchByState(uinf);
        int nums=bimpl.serchByState(uinf);*/
        /*BattMap_information bm=new BattMap_information();
        bm.setStationId("42000570");
        int nums=bimpl.serchByStationId(bm);*/
        //int nums=bimpl.serchByState_diaozhan(uinf);
        BattMap_information bm=new BattMap_information();
        bm.setStationId("42000366");
        int nums=bimpl.serchByStationId_diaozhan(bm);
        System.out.println(nums);
    }
gx_tieta/src/com/fgkj/dto/App_bts_comm_task.java
New file
@@ -0,0 +1,181 @@
package com.fgkj.dto;
import java.io.Serializable;
import java.util.Date;
public class App_bts_comm_task implements Serializable{
    private int num;
    private int thread_id;
    private int dev_id;
    private int battgroup_cnt;
    private int battgroup_id1;
    private int battgroup_index1;
    private int battgroup_id2;
    private int battgroup_index2;
    private int battgroup_id3;
    private int battgroup_index3;
    private int battgroup_id4;
    private int battgroup_index4;
    private Date connect_time;
    private Date dev_comm_runtime;
    private int break_type;//break_type :0,成功连接;1,找不到对应dev_id;2,通信异常断开
    private String stationName;
    private String stationName1;
    private String stationName2;
    private String stationName3;
    private String stationName5;
    private String stationId;
    private String note;
    public int getNum() {
        return num;
    }
    public void setNum(int num) {
        this.num = num;
    }
    public int getThread_id() {
        return thread_id;
    }
    public void setThread_id(int thread_id) {
        this.thread_id = thread_id;
    }
    public int getDev_id() {
        return dev_id;
    }
    public void setDev_id(int dev_id) {
        this.dev_id = dev_id;
    }
    public int getBattgroup_cnt() {
        return battgroup_cnt;
    }
    public void setBattgroup_cnt(int battgroup_cnt) {
        this.battgroup_cnt = battgroup_cnt;
    }
    public int getBattgroup_id1() {
        return battgroup_id1;
    }
    public void setBattgroup_id1(int battgroup_id1) {
        this.battgroup_id1 = battgroup_id1;
    }
    public int getBattgroup_index1() {
        return battgroup_index1;
    }
    public void setBattgroup_index1(int battgroup_index1) {
        this.battgroup_index1 = battgroup_index1;
    }
    public int getBattgroup_id2() {
        return battgroup_id2;
    }
    public void setBattgroup_id2(int battgroup_id2) {
        this.battgroup_id2 = battgroup_id2;
    }
    public int getBattgroup_index2() {
        return battgroup_index2;
    }
    public void setBattgroup_index2(int battgroup_index2) {
        this.battgroup_index2 = battgroup_index2;
    }
    public int getBattgroup_id3() {
        return battgroup_id3;
    }
    public void setBattgroup_id3(int battgroup_id3) {
        this.battgroup_id3 = battgroup_id3;
    }
    public int getBattgroup_index3() {
        return battgroup_index3;
    }
    public void setBattgroup_index3(int battgroup_index3) {
        this.battgroup_index3 = battgroup_index3;
    }
    public int getBattgroup_id4() {
        return battgroup_id4;
    }
    public void setBattgroup_id4(int battgroup_id4) {
        this.battgroup_id4 = battgroup_id4;
    }
    public int getBattgroup_index4() {
        return battgroup_index4;
    }
    public void setBattgroup_index4(int battgroup_index4) {
        this.battgroup_index4 = battgroup_index4;
    }
    public Date getConnect_time() {
        return connect_time;
    }
    public void setConnect_time(Date connect_time) {
        this.connect_time = connect_time;
    }
    public Date getDev_comm_runtime() {
        return dev_comm_runtime;
    }
    public void setDev_comm_runtime(Date dev_comm_runtime) {
        this.dev_comm_runtime = dev_comm_runtime;
    }
    public int getBreak_type() {
        return break_type;
    }
    public void setBreak_type(int break_type) {
        this.break_type = break_type;
    }
    public String getNote() {
        return note;
    }
    public void setNote(String note) {
        this.note = note;
    }
    public String getStationName() {
        return stationName;
    }
    public void setStationName(String stationName) {
        this.stationName = stationName;
    }
    public String getStationName1() {
        return stationName1;
    }
    public void setStationName1(String stationName1) {
        this.stationName1 = stationName1;
    }
    public String getStationName2() {
        return stationName2;
    }
    public void setStationName2(String stationName2) {
        this.stationName2 = stationName2;
    }
    public String getStationName3() {
        return stationName3;
    }
    public void setStationName3(String stationName3) {
        this.stationName3 = stationName3;
    }
    public String getStationName5() {
        return stationName5;
    }
    public void setStationName5(String stationName5) {
        this.stationName5 = stationName5;
    }
    public String getStationId() {
        return stationId;
    }
    public void setStationId(String stationId) {
        this.stationId = stationId;
    }
    @Override
    public String toString() {
        return "App_bts_comm_task [num=" + num + ", thread_id=" + thread_id
                + ", dev_id=" + dev_id + ", battgroup_cnt=" + battgroup_cnt
                + ", battgroup_id1=" + battgroup_id1 + ", battgroup_index1="
                + battgroup_index1 + ", battgroup_id2=" + battgroup_id2
                + ", battgroup_index2=" + battgroup_index2 + ", battgroup_id3="
                + battgroup_id3 + ", battgroup_index3=" + battgroup_index3
                + ", battgroup_id4=" + battgroup_id4 + ", battgroup_index4="
                + battgroup_index4 + ", connect_time=" + connect_time
                + ", dev_comm_runtime=" + dev_comm_runtime + ", break_type="
                + break_type + ", stationName=" + stationName
                + ", stationName1=" + stationName1 + ", stationName2="
                + stationName2 + ", stationName3=" + stationName3
                + ", stationName5=" + stationName5 + ", stationId=" + stationId
                + ", note=" + note + "]";
    }
}
gx_tieta/src/com/fgkj/services/App_bts_comm_taskService.java
New file
@@ -0,0 +1,33 @@
package com.fgkj.services;
import java.util.ArrayList;
import java.util.List;
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dto.ServiceModel;
public class App_bts_comm_taskService {
    private BaseDAO dao;
    private ServiceModel model;
    public App_bts_comm_taskService() {
        super();
        dao=BaseDAOFactory.getBaseDAO(BaseDAO.APP_BTS_COMM_TASK);
        model=new ServiceModel();
    }
    //根据省市区机房名称查询
    public ServiceModel serchByCondition(Object obj){
        List list =dao.serchByCondition(obj);
        if(list!=null&&list.size()>0){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
}
gx_tieta/src/com/fgkj/services/BattMap_informationService.java
@@ -109,6 +109,7 @@
        int numAlarm=0;
        int numPlan=0;
        int numPoff=0;
        int dianzhanNum=0;
        if(list!=null&&list.size()>0){
            for(int i=0;i<list.size();i++){                
                state="item-normal";
@@ -119,10 +120,11 @@
                    binf.setFBSDeviceId(binformation.getFBSDeviceId());
                    state=(new Fbs9100_stateImpl().seachDevNow(binf));
                }else{
                    numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation);  //停电数
                    numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation);  //停电数
                    dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation);    //掉站数
                    numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation);                //落后总数
                    numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation);        //告警总数
                    numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);    //延迟总数
                    //numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);    //延迟总数
                    if(numPoff>0){ 
                        state="item-poff";                             //停电
                    }else{
@@ -132,8 +134,11 @@
                            if(numAlarm > 0){
                                state="item-warn";                                //告警机房
                            }else{
                                if(numPlan > 0){
                                /*if(numPlan > 0){
                                    state="item-timeout";                        //延迟机房
                                }*/
                                if(dianzhanNum>0){
                                    state="item-diaozhan";
                                }
                            }
                        }
@@ -147,7 +152,8 @@
                model.setMsgO(String.valueOf(numPoff));         //停电数
                model.setCode(numAlarm);        //告警总数
                model.setSum(numBadBatt);        //落后总数
                model.setNewsum(numPlan);        //延时总数
                //model.setNewsum(numPlan);        //延时总数
                model.setMsgT(String.valueOf(dianzhanNum));   //掉站
                model.setMsg(state);            //61850状态
                model.setMsgN(binformation.getFBSDeviceId().toString());
                listAll.add(model);
@@ -163,6 +169,8 @@
        int numBadBatt=0;
        int numAlarm=0;
        int numPlan=0;
        int numPoff=0;
        int dianzhanNum=0;
        if(list!=null&&list.size()>0){
            for(int i=0;i<list.size();i++){
                state="item-normal";
@@ -173,25 +181,36 @@
                    binf.setFBSDeviceId(binformation.getFBSDeviceId());
                    state=(new Fbs9100_stateImpl().seachDevNow(binf));
                }else{
                    numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation);  //停电数
                    dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation);    //掉站数
                    numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation);                //落后总数
                    numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation);        //告警总数
                    numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);    //延迟总数
                    if(numBadBatt>0){
                        state="item-behind";                                    //落后机房
                    //numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);    //延迟总数
                    if(numPoff>0){
                        state="item-poff";                             //停电
                    }else{
                        if(numAlarm > 0){
                            state="item-warn";                                //告警机房
                        if(numBadBatt>0){
                            state="item-behind";                                    //落后机房
                        }else{
                            if(numPlan > 0){
                                state="item-timeout";                        //延迟机房
                            if(numAlarm > 0){
                                state="item-warn";                                //告警机房
                            }else{
                                /*if(numPlan > 0){
                                    state="item-timeout";                        //延迟机房
                                }*/
                                if(dianzhanNum>0){
                                    state="item-diaozhan";
                                }
                            }
                        }
                    }
                }
                model.setData(list.get(i));
                model.setMsgO(String.valueOf(numPoff));         //停电数
                model.setCode(numAlarm);        //告警总数
                model.setSum(numBadBatt);        //落后总数
                model.setNewsum(numPlan);        //延时总数
                //model.setNewsum(numPlan);        //延时总数
                model.setMsgT(String.valueOf(dianzhanNum));   //掉站
                model.setMsg(state);            //61850状态
                model.setMsgN(binformation.getFBSDeviceId().toString());
                listAll.add(model);
@@ -210,10 +229,14 @@
                    int numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation);
                    int numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation);
                    int numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);
                    int numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation);  //停电数
                    int dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation);    //掉站数
                    model.setData(list.get(i));
                    model.setCode(numAlarm);        //告警总数
                    model.setSum(numBadBatt);        //落后总数
                    model.setNewsum(numPlan);        //延时总数
                    model.setMsgO(String.valueOf(numPoff));         //停电数
                    model.setMsgT(String.valueOf(dianzhanNum));   //掉站
                    listAll.add(model);
                }
            }