didiyu
2018-09-25 be1267c82755ea2217e3e84d6b47661eaf075497
Merge branch 'dev_lxw' of https://didiyu@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
2个文件已添加
8个文件已修改
675 ■■■■ 已修改文件
gx_tieta/.mymetadata 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/.settings/org.eclipse.wst.common.component 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/control.jsp 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/css/common.css 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/css/control_style.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/pages/js/pages/siderbar.js 304 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/BattInfAction.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/db/DBUtil.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/BattInfServices.java 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/.mymetadata
@@ -3,7 +3,7 @@
  type="WEB"
  name="gx_tieta"
  id="myeclipse.1459308958540"
  context-root="/fuguang"
  context-root="/gx_tieta"
  j2ee-spec="5.0"
  archive="gx_tieta.war">
  <attributes>
gx_tieta/.settings/org.eclipse.wst.common.component
@@ -4,6 +4,6 @@
        <wb-resource deploy-path="/" source-path="/WebRoot"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="java-output-path" value="/fuguang/WebRoot/WEB-INF/classes"/>
        <property name="context-root" value="/fuguang"/>
        <property name="context-root" value="/gx_tieta"/>
    </wb-module>
</project-modules>
gx_tieta/WebRoot/control.jsp
@@ -15,6 +15,7 @@
    <link href="css/basic.css" type="text/css" rel="stylesheet" />
    <link href="css/control_style.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="css/BrdwMaint.css">
    <link rel="stylesheet" href="css/common.css">
    <link href="jqueryui/jquery-ui.css" type="text/css" rel="stylesheet" />
    <!-- <link rel="stylesheet" type="text/css" href="css/popup.css"> -->
    <link rel="stylesheet" type="text/css" href="css/popup-tbl.css">
@@ -840,6 +841,7 @@
    <script type="text/javascript" src="js/dischargetest/bts.js"></script>
    <script type="text/javascript" src="js/dischargetest/4016.js"></script>
    <script type="text/javascript" src="pages/js/pages/control-common.js"></script>
    <script type="text/javascript" src="pages/js/pages/siderbar.js"></script>
    <!-- 引入电路图 -->
    <script type="text/javascript" src="js/elecircle.js"></script>
    <script type="text/javascript" src="js/elecircle.content.js"></script>
@@ -1111,7 +1113,7 @@
        }
        
        
        seachAllStation();
        //seachAllStation();
        //查询所有机房
        function seachAllStation(){
            $.ajax({     
@@ -2672,17 +2674,6 @@
                $(this).attr('href', 'charge-test.jsp?battgroupId='+BattGroupId+"&stationId="+batt.StationId);
            });
        });
        $(function() {
            $('#ele_content').resizable({
                minWidth: 240,
                maxWidth: 520,
                handles: 'e',
                edge: 10
            });
        });
    
    $(function(){
        //启动查询电池充放电状态的线程
@@ -3944,6 +3935,51 @@
            $('.confirm').hide();
            $('.confirm-mask').hide();
        }
        // siderbar模块
        $(function() {
            var TreeView = GLOBAL.pages.TreeView;
            var first = GLOBAL.pages.siderbar.first;    // 一级导航
            var second = GLOBAL.pages.siderbar.second;    // 二级导航
            var third = GLOBAL.pages.siderbar.third;    // 三级导航
            var fourth = GLOBAL.pages.siderbar.fourth;    // 四级导航
            var treeView = new TreeView($('#lside'));
            // 设置容器可拖动
            $('#ele_content').resizable({
                handles: 'e',
                maxWidth: 520,
                minWidth: 200,
                alsoResize: $('#lside'),
                resize:function() {
                    treeView.setContainer();
                }
            });
            // 生成一级导航-省
            first(treeView, treeView.container);
            // 省->市
            treeView.ele.on('click', '.province', function() {
                var province = $(this).data('attr');
                second(treeView, $(this).parent(), province);
            });
            // 市->机房
            treeView.ele.on('click', '.city', function() {
                var city = $(this).data('attr');
                third(treeView, $(this).parent(), city);
            });
            // 机房->电池组
            treeView.ele.on('click', '.home', function() {
                var home = $(this).data('attr');
                var tmp = {
                    StationId: home.StationId
                };
                console.info(tmp);
                fourth(treeView, $(this).parent(), tmp);
            });
        });
    </script>
    <script type="text/javascript" src="js/Title.js"></script>
    <script type="text/javascript" src="js/control.js"></script>
gx_tieta/WebRoot/css/common.css
New file
@@ -0,0 +1,70 @@
/* side-bar-menu模块 */
.whyc-sider-menu-container {
    overflow: hidden;
}
.whyc-sider-menu {
    height: 100%;
    background-color: #272822;
    font-size: 14px;
    overflow: hidden;
    overflow-y: auto;
}
/* first */
.whyc-sider-menu>ul>li>a>i.fa {
    margin-left: .5em;
}
/* second */
.whyc-sider-menu>ul>li>ul>li>a>i.fa {
    margin-left: 1em;
}
/* third */
.whyc-sider-menu>ul>li>ul>li>ul>li>a>i.fa {
    margin-left: 1.5em;
}
/* fourth */
.whyc-sider-menu>ul>li>ul>li>ul>li>ul>li>a>i.fa {
    margin-left: 2em;
}
.whyc-sider-menu i.fa {
    color:  #676863;
    font-size:  22px;
    vertical-align: middle;
    margin-right: .5em;
}
.sider-menu-folder, .sider-menu-file {
    display: block;
    padding: .3em 0;
    color:  #cfcfc2;
    white-space: nowrap;
}
.sider-menu-folder:hover, .sider-menu-file:hover {
    background-color:  #494a45;
    text-decoration: none;
}
.sider-menu-file.active {
    color: #FFFFFF;
    background-color: #818280;
}
.sider-menu-open>a>.fa-caret-right {
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}
.whyc-sider-menu>ul ul {
    display: none;
}
.whyc-sider-menu .sider-menu-open>ul {
    display: block;
}
.ui-resizable-e {
    width: 10px;
}
.whyc-sider-menu .sider-menu-open>.treeView-progressBar-container {
    display: block;
}
.whyc-sider-menu .treeView-progressBar-container {
    display: none;
}
gx_tieta/WebRoot/css/control_style.css
@@ -55,7 +55,6 @@
    width: 100%;
    height:460px;
    background: white;
    overflow:scroll;
    position: relative;
}
#lside>ul{
gx_tieta/WebRoot/pages/js/pages/siderbar.js
New file
@@ -0,0 +1,304 @@
;(function($, window, document, gl) {
    // 定义TreeView的命名空间
    gl.namespace('pages.TreeView');
    /**
    * @param jquery ele jQuery 对象
    * @param Object first 第一层的数据对象
    */
    var TreeView = function (ele, options) {
        this.ele = ele;
        this.container;
        this.init(options);
    };
    var _prop = TreeView.prototype;
    // 初始化容器并设置基础的点击事件
    _prop.init = function(options) {
        var _this = this;
        // 清空容器
        this.ele.addClass('whyc-sider-menu-container');
        this.ele.text('');
        var whycTreeView = $('<div class="whyc-sider-menu"></div>');
        this.ele.append(whycTreeView);
        this.container = whycTreeView;
        this.setContainer();
        //this.resize(options);
        // 给容器内容添加绑定事件
        this.ele.off('click.treeView.folder').on('click.treeView.folder', '.sider-menu-folder', function() {
            $(this).parent().toggleClass('sider-menu-open');
        });
        this.ele.off('click.treeView.file').on('click.treeView.file', '.sider-menu-file', function() {
            if(!$(this).hasClass('active')) {
                _this.ele.find('.sider-menu-file').removeClass('active');
                $(this).addClass('active');
            }
        });
    };
    // 设置resizable
    _prop.resize = function(options) {
        var _this = this;
        var defaults = {
            minWidth: 200,
            maxWidth: 400
        };
        var opts = $.extend({}, defaults, options || {});
        if(this.ele.resizable) {
            this.ele.resizable({
                handles: 'e',
                maxWidth: opts.maxWidth,
                minWidth: opts.minWidth,
                alsoResize: this.container,
                stop:function() {
                    _this.container.height('100%');
                }
            });
        }
    };
    // 设置容器的宽度
    _prop.setContainer = function() {
        var eleWidth = this.ele.width();
        this.container.width(eleWidth+20);
    };
    // 生成列表
    _prop.treeView = function(container, data, flush) {
        var defaults = {
            file: false
        };
        // 存在ul且当前不允许刷新
        if(container.find('ul').length !=0 && !flush) {
            return;
        }else if(flush) {
            container.text('');
        }
        // 删除等待框
        this.delProgress(container);
        // 生成元素
        var _ul = $('<ul></ul>');
        for(var i=0; i<data.length; i++) {
            var _data = $.extend({}, defaults, data[i]);
            // 设置内容容器
            var _li = $('<li></li>');
            var _a = $('<a href="javascript:;" class="sider-menu-folder"></a>');
            _a.addClass(_data.cla);
            var _i = $('<i class="fa fa fa-caret-right"></i>');
            var _span = $('<span>'+_data.txt+'</span>');
            if(_data.file) {
                _a = $('<a href="javascript:;" class="sider-menu-file"></a>');
                _i = $('<i class="fa"></i>');
            }
            _a.append(_i);
            _a.append(_span);
            _li.append(_a);
            // 存储生成元素的值
            _a.data('attr', _data.attr);
            _ul.append(_li);
        }
        container.append(_ul);
    };
    // 获取folder的一条数据
    _prop.getFolder = function (txt, cla, attr) {
        var tmp = {};
        tmp.txt = txt;
        tmp.cla = cla;
        tmp.attr = attr;
        return tmp;
    };
    // 获取file的一条数据
    _prop.getFile =function(txt, cla, attr) {
        var tmp = {};
        tmp.txt = txt;
        tmp.cla = cla;
        tmp.file = true;
        tmp.attr = attr;
        return tmp;
    };
    // 添加progressBar
    _prop.addProgress = function(container) {
        // 存在就不用再添加
        if(container.find('.treeView-progressBar-container').length != 0) {
            return;
        }
        var cont = $('<div class="treeView-progressBar-container" style="margin-left: 15px; margin-right: 15px;"></div>');
        var progress = $('<div class="treeView-progressBar"></div>');
        var progressLabel = '<div class="progress-label">加载...</div>';
        progress.append(progressLabel);
        cont.append(progress);
        container.append(cont);
        // 设置样式
        progress.progressbar({
            value: false,
            change: function() {
                progressLabel.text( progressbar.progressbar( "value" ) + "%" );
            },
            complete: function() {
                progressLabel.text( "完成!" );
            }
        });
    };
    // 移除progressBar
    _prop.delProgress = function(container) {
        container.find('.treeView-progressBar-container').remove();
    };
    // 添加到gl.pages.TreeView的命名空间下
    gl.pages.TreeView = TreeView;
})(jQuery, window, document, GLOBAL);
// 定义页面中的siderbar组件
;(function($, window, document, gl, undefined) {
    gl.namespace('pages.siderbar');
    // 生成一级导航-省
    function first(treeView, container) {
        //treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchAllStation",
            async:true,
            dataType:'json',
            data:null,
            success: function(data){
                var rs = JSON.parse(data.result);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName1, 'province', __data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.first = first;
    // 生成二级导航-市
    function second(treeView, container, data) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName2",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName2, 'city', __data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.second = second;
    // 生成 三级导航-机房
    function third(treeView, container, data) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName3",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName3, 'home', __data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.third = third;
    // 生成 三级导航-电池组
    function fourth(treeView, container, data) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchBattByStation",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                console.info(rs);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    console.log(_data);
                    return;
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName3, 'eleGroup', __data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.fourth = fourth;
})(jQuery, window, document, GLOBAL);
gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -243,13 +243,7 @@
        return SUCCESS;
    }
    
    //查询所有的机房
    public String serchAllStation(){
        User_inf u = (User_inf)getUser();
        ServiceModel model = service.serchAllStation(u);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    
    //搜索机房或电池组
    public String serchStationOrBattgroup(){
@@ -258,9 +252,39 @@
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    //根据机房id查询机房下的电池组信息
    //查询所有的省份(左侧导航第一层,查所有的省份,num中存放uid)
    public String serchAllStation(){
        User_inf u = (User_inf)getUser();
        BattInf binf=new BattInf();
        binf.setNum(u.getUId());
        ServiceModel model = service.serchAllStation(binf);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    //查询管理的市(左侧导航第二层,查所有的市,num中存放uid)
    public String serchStationName2(){
        User_inf u = (User_inf)getUser();
        BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
        binf.setNum(u.getUId());
        ServiceModel model = service.serchStationName2(binf);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
    public String serchStationName3(){
        User_inf u = (User_inf)getUser();
        BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
        binf.setNum(u.getUId());
        ServiceModel model = service.serchStationName3(binf);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
    public String serchBattByStation(){
        BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
        User_inf u = (User_inf)getUser();
        binf.setNum(u.getUId());
        //System.out.println(binf);
        ServiceModel model = service.serchBattByStation(binf);
        result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
        return SUCCESS;
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -3244,83 +3244,107 @@
        
    }
    //查询所有的机房
    //查询所有的省份(左侧导航第一层,查所有的省份,num中存放uid)
    public List serchAllStation(Object obj){
        User_inf uinf=(User_inf) obj;
        String sql="select DISTINCT stationid,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationName6,StationName7,StationName8,StationName9,fBSDeviceId  " +
        BattInf binf=(BattInf) obj;;
        String sql="select DISTINCT StationName1 " +
                " FROM db_battinf.tb_battinf " +
                " where 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=?" +
                " )";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()},new CallBack() {
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum()},new CallBack() {
            
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                String conStr="-";//连接机房名称的符号
                try {
                    while(rs.next()){
                        BattInf batt = new BattInf();
                        String stationName="";
                        if(!rs.getString("StationName1").trim().equals("")){
                            stationName+=rs.getString("StationName1");
                    try {
                        while(rs.next()){
                            BattInf batt = new BattInf();
                            batt.setStationName1(rs.getString("stationName1"));
                            list.add(batt);
                        }
                        if(!rs.getString("StationName2").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName2");
                        }
                        if(!rs.getString("StationName3").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName3");
                        }
                        if(!rs.getString("StationName4").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName4");
                        }
                        if(!rs.getString("StationName5").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName5");
                        }
                        if(!rs.getString("StationName6").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName6");
                        }
                        if(!rs.getString("StationName7").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName7");
                        }
                        if(!rs.getString("StationName8").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName8");
                        }
                        if(!rs.getString("StationName9").trim().equals("")){
                            stationName+=conStr;
                            stationName+=rs.getString("StationName9");
                        }
                        batt.setStationName(stationName);
                        batt.setStationId(rs.getString("StationId"));
                        batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
                        list.add(batt);
                    } catch (SQLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        } );
        return list;
    }
    //根据机房id查询机房下的电池组信息
    //查询管理的市(左侧导航第二层,查所有的市,num中存放uid)
    public List serchStationName2(Object obj){
        BattInf binf=(BattInf) obj;
        String sql="select DISTINCT StationName1,StationName2  " +
                " FROM db_battinf.tb_battinf " +
                " where 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=?" +
                " ) and StationName1 like ?";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%"},new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                    try {
                        while(rs.next()){
                            BattInf batt = new BattInf();
                            batt.setStationName1(rs.getString("stationName1"));
                            batt.setStationName2(rs.getString("stationName2"));
                            list.add(batt);
                        }
                    } catch (SQLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                return list;
            }
        } );
        return list;
    }
    //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
    public List serchStationName3(Object obj){
        BattInf binf=(BattInf) obj;
        String sql="select DISTINCT StationName3,stationid,fbsdeviceid  " +
                " FROM db_battinf.tb_battinf " +
                " where 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=?" +
                " ) and StationName1 like ? and StationName2 like ? ";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                    try {
                        while(rs.next()){
                            BattInf batt = new BattInf();
                            batt.setStationName3(rs.getString("stationName3"));
                            batt.setStationId(rs.getString("stationId"));
                            batt.setFBSDeviceId(rs.getInt("fBSDeviceId"));
                            list.add(batt);
                        }
                    } catch (SQLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                return list;
            }
        } );
        return list;
    }
    //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
    public List serchBattByStation(Object obj){
        BattInf binf=(BattInf) obj;
        String sql="select DISTINCT StationName,StationId,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice " +
                "from db_battinf.tb_battinf  where stationid=? " +
                "and 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=?" +
                " ) " +
                "ORDER BY StationName1,battgroupId ";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{binf.getStationId()},new CallBack() {
        //System.out.println(sql);
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{binf.getStationId(),binf.getNum()},new CallBack() {
            
            public List getResults(ResultSet rs) {
                List list = new ArrayList();
                String conStr="-";//连接机房名称的符号
                try {
                    while (rs.next()) {
                        BattInf batt = new BattInf();
gx_tieta/src/com/fgkj/db/DBUtil.java
@@ -15,9 +15,10 @@
    //private static String username="website";
    //private static String password="amtb3737";
    
    //private static String url="jdbc:mysql://118.89.139.230:3360/db_user";
    private static String username="root";
    private static String password="lmx8688139";
    //private static String url="jdbc:mysql://118.89.139.230:3360/db_user";
    private static String url="jdbc:mysql://123.207.82.239:3360/db_user";
    //private static String url="jdbc:mysql://192.168.0.34:3360/db_user";
    //private static String url="jdbc:mysql://127.0.0.1:3360/db_user";
gx_tieta/src/com/fgkj/services/BattInfServices.java
@@ -641,21 +641,7 @@
        }
        return model;
    }
    //查询所有的机房
    public ServiceModel serchAllStation(Object obj){
        List list=((BattInfImpl)dao).serchAllStation(obj);
        if (list != null && list.size() > 0) {
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setData(list);
            model.setMsg("查询失败!");
        }
        //System.out.println(model);
        return model;
    }
    //搜索机房或电池组
    public ServiceModel serchStationOrBattgroup(Object obj){
        List list=((BattInfImpl)dao).serchStationOrBattgroup(obj);
@@ -671,7 +657,49 @@
        //System.out.println(list.size());
        return model;
    }
    //根据机房id查询机房下的电池组信息
    //查询所有的省份(左侧导航第一层,查所有的省份)
    public ServiceModel serchAllStation(Object obj){
        List list=((BattInfImpl)dao).serchAllStation(obj);
        if (list != null && list.size() > 0) {
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setData(list);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //查询管理的市(左侧导航第二层,查所有的市,num中存放uid)
    public ServiceModel serchStationName2(Object obj){
        List list=((BattInfImpl)dao).serchStationName2(obj);
        if (list != null && list.size() > 0) {
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setData(list);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
    public ServiceModel serchStationName3(Object obj){
        List list=((BattInfImpl)dao).serchStationName3(obj);
        if (list != null && list.size() > 0) {
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setData(list);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
    public ServiceModel serchBattByStation(Object obj){
        List list=((BattInfImpl)dao).serchBattByStation(obj);
        if (list != null && list.size() > 0) {
@@ -683,7 +711,6 @@
            model.setData(list);
            model.setMsg("查询失败!");
        }
        //System.out.println(model);
        return model;
    }
    //查询所有的电池组数