gx_tieta/WebRoot/batt-traffic-statistics1.jsp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/dao/impl/BattMap_informationImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/dao/impl/StationtrafficImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/dto/BattMap_information.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/global_zh_CN.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
gx_tieta/WebRoot/batt-traffic-statistics1.jsp
@@ -15,7 +15,7 @@ <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <title>流量统计</title> <!--流量统计--> <title>机房流量统计查询</title> <!--流量统计--> <link rel="stylesheet" type="text/css" href="pages/css/base.css"> <link rel="stylesheet" type="text/css" href="jqueryui/jquery-ui.min.js"> <link rel="stylesheet" type="text/css" href="src/css/layui.css"> @@ -31,12 +31,13 @@ <div class="layui-page-container"> <!-- 条件筛选 --> <div class="layui-page-filter"> <div class="page-filter-header layui-page-filter-fweight">流量统计</div> <div class="page-filter-header layui-page-filter-fweight">机房流量统计查询</div> <div class="page-filter-content"> <table> <tr class="layui-page-filter-tbl-header layui-page-filter-fweight"> <td>省</td> <!-- 省 --> <td>市</td> <!-- 市 --> <td>区/县</td> <!-- 市 --> <td><s:text name="Computer_name"/></td> <!-- 机房名称 --> <td>统计方式</td> <td colspan="2">时间段</td> @@ -64,6 +65,19 @@ </div> </div> </td> <td> <div class="layui-form" lay-filter="countyFilter"> <div class="layui-form-item"> <div class="layui-input-block"> <select name="county" id="county" lay-filter="county"> <option value="">请选择区/县</option> </select> </div> </div> </div> </td> <td> <div class="layui-form" lay-filter="homeFilter"> <div class="layui-form-item"> @@ -236,15 +250,69 @@ createLayuiSelect(ele, list); form.render('select', 'cityFilter'); // 查询区县 searchCounty(); } }); } // 切换市-区县 form.on('select(city)', function(data) { // 查询区县 searchCounty(); }); // 查询区/县 function searchCounty(isLoad) { // 构造查询条件 var tmp = { StationName1: $("#province").val(), StationName2: $("#city").val() }; // 是否添加等待 if(isLoad) { filterLoad = layer.load(); } // 根据构造条件查询内容 $.ajax({ type: 'post', async: true, url: 'BattInfAction!serchStationName5', dataType: 'json', data: "json = "+JSON.stringify(tmp), success: function(result) { var rs = JSON.parse(result.result); //console.info(rs); var list = []; // option结果集 var ele = $('#county'); // 目标select if(rs.code == 1) { var data = rs.data; list.push(getLayuiSelect('请选择区/县', '', {}, undefined)); // 遍历查询结果 for(var i=0; i<data.length; i++) { var _data = data[i]; var _tmp = getLayuiSelect(_data.StationName5, _data.StationName5, {}, _data); //console.info(_tmp); list.push(_tmp); } }else { list.push(getLayuiSelect('暂无区/县', '', {}, undefined)); } // 根据对象数组生成下拉列表 createLayuiSelect(ele, list); form.render('select', 'countyFilter'); // 查询机房 searchHome(); } }); } // 切换市-机房 form.on('select(city)', function(data) { // 查询机房 // 切换市-区县 form.on('select(county)', function(data) { // 查询区县 searchHome(); }); @@ -253,7 +321,8 @@ // 构造查询条件 var tmp = { StationName1:$("#province").val(), StationName2:$("#city").val() StationName2:$("#city").val(), StationName5:$("#county").val(), }; // 根据构造条件查询内容 $.ajax({ @@ -298,9 +367,9 @@ ,cellMinWidth: 80 ,cols: [[ {field:'timeSlot', title:'统计时间段', align:'center', width: 380} ,{field:'province', title:'省', align:'center'} ,{field:'city', title:'市', align:'center'} ,{field:'home', title:'机房名称', align:'center'} ,{field:'province', title:'省', align:'center',width:200} ,{field:'city', title:'市', align:'center',width:200} ,{field:'home', title:'机房名称', align:'center',width:600} ,{field:'flowSize', title:'流量', align:'center'} ]] ,data:[] @@ -338,6 +407,7 @@ layer.close(loading); // 解析获取的json var rs = JSON.parse(result.result); console.info(rs); // 初始化数据结果 tOptions.data = []; if(rs.code == 1) { @@ -350,7 +420,7 @@ tmp.province = _data.stationName1; tmp.city = _data.stationName2; tmp.home = _data.stationName; tmp.flowSize = tranfficCount(_data.nowflow); tmp.flowSize = tranfficCount(_data.dayflow); tOptions.data.push(tmp); } }else { gx_tieta/src/com/fgkj/dao/impl/BattMap_informationImpl.java
@@ -225,7 +225,7 @@ //9.1查询已经添加物理信息的机房(用户管理的,3.根据具体id查询告警信息等) public List serchInBattMapByUid3(Object obj) { BattMap_information binfor=(BattMap_information) obj; String sql="select distinct tb_battmap_information.num,tb_battmap_information.StationId,tb_battmap_information.StationName,address,longitude,latitude,information,db_battinf.tb_battinf.FBSDeviceId,tb_battinf.stationName1,tb_battinf.stationName2,tb_battinf.stationName3 " + String sql="select distinct tb_battmap_information.num,tb_battmap_information.StationId,tb_battmap_information.StationName,address,longitude,latitude,information,db_battinf.tb_battinf.FBSDeviceId,tb_battinf.stationName1,tb_battinf.stationName2,tb_battinf.stationName3,tb_battinf.stationName5 " + " from web_site.tb_battmap_information,db_battinf.tb_battinf " + " where tb_battmap_information.StationId=db_battinf.tb_battinf.StationId " + " and tb_battmap_information.StationId in (" + @@ -249,6 +249,7 @@ binformation.setStationName1(rs.getString("stationName1")); binformation.setStationName2(rs.getString("stationName2")); binformation.setStationName3(rs.getString("stationName3")); binformation.setStationName5(rs.getString("stationName5")); binformation.setAddress(rs.getString("address")); binformation.setLongitude(rs.getDouble("longitude")); binformation.setLatitude(rs.getDouble("latitude")); gx_tieta/src/com/fgkj/dao/impl/StationtrafficImpl.java
@@ -66,11 +66,11 @@ // 时间段 String perid_Time = ""; Calendar now = Calendar.getInstance(); int nowflow=0; int dayflow=0; try { while(rs.next()){ int nowflows=rs.getInt("nowflow"); int dayflows=rs.getInt("dayflow"); // 年份,季度,月份 Date dev_recordtime = rs.getTimestamp("record_time"); // 获取具体年份,月份和该月的总天数 @@ -97,16 +97,16 @@ } //System.out.println(perid_Times+" "+perid_Time+" "+nowflows); if(perid_Times.equals(perid_Time)){ nowflow+=nowflows; dayflow+=dayflows; }else{ if(perid_Time.equals("")){ perid_Time=perid_Times; nowflow+=nowflows; dayflow+=dayflows; continue; } Stationtraffic st=new Stationtraffic(); st.setDev_id(rs.getInt("dev_id")); st.setNowflow(nowflow); st.setDayflow(dayflow); st.setStationName(rs.getString("stationName")); st.setStationName1(rs.getString("stationName1")); st.setStationName2(rs.getString("stationName2")); @@ -114,15 +114,15 @@ st.setStationName5(rs.getString("stationName5")); st.setNote(perid_Time); list.add(st); nowflow=0; nowflow+=nowflows; dayflow=0; dayflow+=dayflows; perid_Time=perid_Times; } if(rs.isLast()){ Stationtraffic st=new Stationtraffic(); st.setDev_id(rs.getInt("dev_id")); st.setNowflow(nowflow); st.setDayflow(dayflow); st.setStationName(rs.getString("stationName")); st.setStationName1(rs.getString("stationName1")); st.setStationName2(rs.getString("stationName2")); gx_tieta/src/com/fgkj/dto/BattMap_information.java
@@ -15,6 +15,7 @@ private String stationName1; private String stationName2; private String stationName3; private String stationName5; public BattMap_information() { super(); @@ -110,6 +111,8 @@ } @Override public String toString() { return "BattMap_information [num=" + num + ", StationId=" + StationId @@ -118,7 +121,8 @@ + ", information=" + information + ", FBSDeviceId=" + FBSDeviceId + ", page=" + page + ", stationName1=" + stationName1 + ", stationName2=" + stationName2 + ", stationName3=" + stationName3 + "]"; + ", stationName3=" + stationName3 + ", stationName5=" + stationName5 + "]"; } @@ -152,6 +156,16 @@ } public String getStationName5() { return stationName5; } public void setStationName5(String stationName5) { this.stationName5 = stationName5; } gx_tieta/src/global_zh_CN.properties
@@ -1098,4 +1098,7 @@ ################## batt-fault-manage.jsp ############################## Problem_feedback = \u95ee\u9898\u53cd\u9988 Station_problem_record = \u673a\u623f\u95ee\u9898\u8bb0\u5f55 ################## batt-traffic-statistics1.jsp ############################## Station_traffic_statist = \u673a\u623f\u6d41\u91cf\u7edf\u8ba1\u67e5\u8be2