流量统计app,协议详情支持多条件查询 最多10个
This commit is contained in:
@@ -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<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
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<Map>(){}.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<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
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();
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="social_app"/></span>
|
||||
</div>
|
||||
<select id="appType" name="appType" class="selectpicker form-control input-medium" data-live-search="true" data-live-search-placeholder="search">
|
||||
<select id="appType" name="appType" class="selectpicker form-control input-medium" data-max-options="10" data-selected-text-format="count > 2" multiple data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getCodeList('appCode')}" var="dict" >
|
||||
<option value="${dict.code}"><spring:message code="${dict.item}"></spring:message></option>
|
||||
@@ -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("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'${endDate}'});"/>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="pull-left">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="protocol_type"/></span>
|
||||
@@ -57,7 +57,7 @@
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user