diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java index e7f03a08b..14ad1aeae 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java @@ -301,12 +301,19 @@ public class TrafficStatisticsInfoController extends BaseController { */ @RequestMapping(value="protocolList") @ResponseBody - public List protocolList(Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){ + public List protocolList(Model model,Integer[] protoType,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){ Map fromJsonList = new HashMap(); List list = new ArrayList(); String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST; try { url=urlAddDate(url,beginDate,endDate); + if(protoType!=null){ + for (Integer dom : protoType) { + if(dom!=null){ + url=url+"&protoType="+dom; + } + } + } String string = HttpClientUtil.get(url); Gson gson = new GsonBuilder().create(); fromJsonList = gson.fromJson(string, new TypeToken(){}.getType()); @@ -372,14 +379,18 @@ public class TrafficStatisticsInfoController extends BaseController { */ @RequestMapping(value="appList") @ResponseBody - public List appList(@RequestParam(value="appType",required=false)Integer appType,@RequestParam(value="beginDate",required=false)String beginDate,@RequestParam(value="endDate",required=false)String endDate){ + public List appList(@RequestParam(value="appType",required=false)Integer[] appType,@RequestParam(value="beginDate",required=false)String beginDate,@RequestParam(value="endDate",required=false)String endDate){ Map fromJsonList = new HashMap(); List list = new ArrayList(); String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST; try { url=urlAddDate(url,beginDate,endDate); - if(!StringUtil.isEmpty(appType)){ - url=url+"&appType="+appType; + if(appType!=null){ + for (Integer dom : appType) { + if(dom!=null){ + url=url+"&appType="+dom; + } + } } String string = HttpClientUtil.get(url); Gson gson = new GsonBuilder().create(); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp index 078506490..a62a0db11 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp @@ -60,7 +60,7 @@
- @@ -156,6 +156,7 @@ function ajaxAppList(start,end){ data:{"beginDate":start,"endDate":end,"appType":appType}, async:false, timeout:10000, + traditional:true, success:function (data){ if(data!=null&&data.length>0&&data[0].error!=null){ top.$.jBox.tip("", ""); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp index 4710ff84f..9d1ee76ee 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp @@ -45,7 +45,7 @@ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'${endDate}'});"/> - <%--
+
@@ -57,7 +57,7 @@
-
--%> +
@@ -138,16 +138,16 @@ function searchList(){ } } function ajaxProtocolList(start,end){ -// var protoType=$("#protoType").val(); + var protoType=$("#protoType").val(); loading(); $.ajax({ url: '${ctx}/dashboard/traffic/protocolList', type: 'get', dataType: "json", - data:{"beginDate":start,"endDate":end}, + data:{"beginDate":start,"endDate":end,"protoType":protoType}, async:false, timeout:40000, -// traditional:true, + traditional:true, beforeSend:function(){ loading(); },