流量统计app,协议详情支持多条件查询 最多10个
This commit is contained in:
@@ -301,12 +301,19 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="protocolList")
|
@RequestMapping(value="protocolList")
|
||||||
@ResponseBody
|
@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>();
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST;
|
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST;
|
||||||
try {
|
try {
|
||||||
url=urlAddDate(url,beginDate,endDate);
|
url=urlAddDate(url,beginDate,endDate);
|
||||||
|
if(protoType!=null){
|
||||||
|
for (Integer dom : protoType) {
|
||||||
|
if(dom!=null){
|
||||||
|
url=url+"&protoType="+dom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
String string = HttpClientUtil.get(url);
|
String string = HttpClientUtil.get(url);
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||||
@@ -372,14 +379,18 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="appList")
|
@RequestMapping(value="appList")
|
||||||
@ResponseBody
|
@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>();
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST;
|
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST;
|
||||||
try {
|
try {
|
||||||
url=urlAddDate(url,beginDate,endDate);
|
url=urlAddDate(url,beginDate,endDate);
|
||||||
if(!StringUtil.isEmpty(appType)){
|
if(appType!=null){
|
||||||
url=url+"&appType="+appType;
|
for (Integer dom : appType) {
|
||||||
|
if(dom!=null){
|
||||||
|
url=url+"&appType="+dom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String string = HttpClientUtil.get(url);
|
String string = HttpClientUtil.get(url);
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="social_app"/></span>
|
<span class="selectpicker form-control" ><spring:message code="social_app"/></span>
|
||||||
</div>
|
</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>
|
<option value=""><spring:message code="select"/></option>
|
||||||
<c:forEach items="${fns:getCodeList('appCode')}" var="dict" >
|
<c:forEach items="${fns:getCodeList('appCode')}" var="dict" >
|
||||||
<option value="${dict.code}"><spring:message code="${dict.item}"></spring:message></option>
|
<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},
|
data:{"beginDate":start,"endDate":end,"appType":appType},
|
||||||
async:false,
|
async:false,
|
||||||
timeout:10000,
|
timeout:10000,
|
||||||
|
traditional:true,
|
||||||
success:function (data){
|
success:function (data){
|
||||||
if(data!=null&&data.length>0&&data[0].error!=null){
|
if(data!=null&&data.length>0&&data[0].error!=null){
|
||||||
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
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}'});"/>
|
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'${endDate}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="pull-left">
|
<div class="pull-left">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="protocol_type"/></span>
|
<span class="selectpicker form-control" ><spring:message code="protocol_type"/></span>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div> --%>
|
</div>
|
||||||
|
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
<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){
|
function ajaxProtocolList(start,end){
|
||||||
// var protoType=$("#protoType").val();
|
var protoType=$("#protoType").val();
|
||||||
loading();
|
loading();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${ctx}/dashboard/traffic/protocolList',
|
url: '${ctx}/dashboard/traffic/protocolList',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data:{"beginDate":start,"endDate":end},
|
data:{"beginDate":start,"endDate":end,"protoType":protoType},
|
||||||
async:false,
|
async:false,
|
||||||
timeout:40000,
|
timeout:40000,
|
||||||
// traditional:true,
|
traditional:true,
|
||||||
beforeSend:function(){
|
beforeSend:function(){
|
||||||
loading();
|
loading();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user