(1)境内源IP报表加入对界面时间字段的处理
(2)时间字段的处理放到baseController中 (3)界面ajax函数缩减为1个公用的函数
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.nis.domain.log;
|
package com.nis.domain.log;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import com.nis.domain.BaseEntity;
|
import com.nis.domain.BaseEntity;
|
||||||
@@ -35,7 +36,9 @@ public class SearchReport extends BaseEntity<SearchReport>{
|
|||||||
private String reportBusinessType;
|
private String reportBusinessType;
|
||||||
private String searchBusinessType;
|
private String searchBusinessType;
|
||||||
private String searchReportStartTime;
|
private String searchReportStartTime;
|
||||||
|
private Date reportStartTime;
|
||||||
private String searchReportEndTime;
|
private String searchReportEndTime;
|
||||||
|
private Date reportEndTime;
|
||||||
private String searchService;
|
private String searchService;
|
||||||
private HashMap<String,Object> searchCondition;
|
private HashMap<String,Object> searchCondition;
|
||||||
public static final String searchConditionSplitor=",";
|
public static final String searchConditionSplitor=",";
|
||||||
@@ -47,6 +50,34 @@ public class SearchReport extends BaseEntity<SearchReport>{
|
|||||||
//界面查询的时间
|
//界面查询的时间
|
||||||
private String reportTime;
|
private String reportTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reportStartTime
|
||||||
|
* @return reportStartTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Date getReportStartTime() {
|
||||||
|
return reportStartTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param reportStartTime the reportStartTime to set
|
||||||
|
*/
|
||||||
|
public void setReportStartTime(Date reportStartTime) {
|
||||||
|
this.reportStartTime = reportStartTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* reportEndTime
|
||||||
|
* @return reportEndTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Date getReportEndTime() {
|
||||||
|
return reportEndTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param reportEndTime the reportEndTime to set
|
||||||
|
*/
|
||||||
|
public void setReportEndTime(Date reportEndTime) {
|
||||||
|
this.reportEndTime = reportEndTime;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* reportTime
|
* reportTime
|
||||||
* @return reportTime
|
* @return reportTime
|
||||||
|
|||||||
@@ -243,6 +243,89 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
return sdf.parse(date);
|
return sdf.parse(date);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* isLeapYear(计算是否为闰年)
|
||||||
|
* (这里描述这个方法适用条件 – 可选)
|
||||||
|
* @param years
|
||||||
|
* @return
|
||||||
|
*boolean
|
||||||
|
* @exception
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static boolean isLeapYear(int years){
|
||||||
|
Calendar calendar=Calendar.getInstance();
|
||||||
|
calendar.set(years,Calendar.DECEMBER,31);
|
||||||
|
if(calendar.get(Calendar.DAY_OF_YEAR)==366){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* setLastDayOfMonth(设置天为月末最后一天)
|
||||||
|
* (这里描述这个方法适用条件 – 可选)
|
||||||
|
* @param cal
|
||||||
|
*void
|
||||||
|
* @exception
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static void setLastDayOfMonth(Calendar cal){
|
||||||
|
switch(cal.get(Calendar.MONTH)){
|
||||||
|
case 0:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:{
|
||||||
|
if(DateUtils.isLeapYear(cal.get(Calendar.YEAR))){
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 29);
|
||||||
|
}else{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 28);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 30);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 30);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 30);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 30);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 11:{
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param args
|
* @param args
|
||||||
* @throws ParseException
|
* @throws ParseException
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.nis.web.controller;
|
package com.nis.web.controller;
|
||||||
import java.beans.PropertyEditorSupport;
|
import java.beans.PropertyEditorSupport;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -45,6 +48,7 @@ import com.nis.exceptions.MaatConvertException;
|
|||||||
import com.nis.util.Configurations;
|
import com.nis.util.Configurations;
|
||||||
//import com.nis.main.ConvertTool;
|
//import com.nis.main.ConvertTool;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
import com.nis.util.DateUtil;
|
||||||
import com.nis.util.DateUtils;
|
import com.nis.util.DateUtils;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.JsonMapper;
|
import com.nis.util.JsonMapper;
|
||||||
@@ -1001,5 +1005,114 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
return msg.toString();
|
return msg.toString();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* setReportSearchTime(报表查询设置开始时间与结束时间)
|
||||||
|
* (这里描述这个方法适用条件 – 可选)
|
||||||
|
* @param bean
|
||||||
|
* @throws ParseException
|
||||||
|
*void
|
||||||
|
* @exception
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public void setReportSearchTime(SearchReport bean) throws ParseException{
|
||||||
|
SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT);
|
||||||
|
String reportTime=bean.getReportTime();
|
||||||
|
if(StringUtils.isNotBlank(reportTime)){
|
||||||
|
Calendar startCal=Calendar.getInstance();
|
||||||
|
startCal.setTime(getReportTime(reportTime));
|
||||||
|
startCal.set(Calendar.MINUTE, 0);
|
||||||
|
startCal.set(Calendar.SECOND, 0);
|
||||||
|
startCal.set(Calendar.MILLISECOND, 0);
|
||||||
|
Calendar endCal=Calendar.getInstance();
|
||||||
|
endCal.setTime(getReportTime(reportTime));
|
||||||
|
endCal.set(Calendar.MINUTE, 59);
|
||||||
|
endCal.set(Calendar.SECOND, 59);
|
||||||
|
endCal.set(Calendar.MILLISECOND, 0);
|
||||||
|
if(bean.getReportType()==Constants.REPORT_TYPE_HOUR){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
endCal.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_DAY){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
startCal.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
endCal.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
DateUtils.setLastDayOfMonth(endCal);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
startCal.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
startCal.set(Calendar.MONTH, 0);
|
||||||
|
endCal.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
DateUtils.setLastDayOfMonth(endCal);
|
||||||
|
endCal.set(Calendar.MONTH, 11);
|
||||||
|
}
|
||||||
|
bean.setReportStartTime(startCal.getTime());
|
||||||
|
bean.setReportEndTime(endCal.getTime());
|
||||||
|
bean.setSearchReportStartTime(sdf.format(startCal.getTime()));
|
||||||
|
bean.setSearchReportEndTime(sdf.format(endCal.getTime()));
|
||||||
|
}else{
|
||||||
|
Date date=new Date();
|
||||||
|
bean.setReportEndTime(date);
|
||||||
|
bean.setSearchReportEndTime(sdf.format(date));
|
||||||
|
Calendar startCal=Calendar.getInstance();
|
||||||
|
startCal.setTime(date);
|
||||||
|
startCal.set(Calendar.MINUTE, 0);
|
||||||
|
startCal.set(Calendar.SECOND, 0);
|
||||||
|
startCal.set(Calendar.MILLISECOND, 0);
|
||||||
|
if(bean.getReportType()==Constants.REPORT_TYPE_HOUR){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_DAY){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
startCal.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
||||||
|
startCal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
startCal.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
startCal.set(Calendar.MONTH, 0);
|
||||||
|
}
|
||||||
|
bean.setReportStartTime(startCal.getTime());
|
||||||
|
bean.setSearchReportStartTime(sdf.format(startCal.getTime()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
logger.info("search start time "+bean.getSearchReportStartTime());
|
||||||
|
logger.info("search end time "+bean.getSearchReportEndTime());
|
||||||
|
}
|
||||||
|
public List<String> getDateTitiles(SearchReport bean){
|
||||||
|
SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT);
|
||||||
|
List<String> titles=new ArrayList<String>();
|
||||||
|
Calendar cal=Calendar.getInstance();
|
||||||
|
cal.setTime(bean.getReportStartTime());
|
||||||
|
while(cal.getTimeInMillis()<bean.getReportEndTime().getTime()){//构造标题
|
||||||
|
//报表时间单位加一
|
||||||
|
if(bean.getReportType()==Constants.REPORT_TYPE_HOUR){
|
||||||
|
titles.add(sdf.format(cal.getTime()).substring(0,13));
|
||||||
|
cal.add(Calendar.HOUR_OF_DAY, 1);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_DAY){
|
||||||
|
titles.add(sdf.format(cal.getTime()).substring(0,10));
|
||||||
|
cal.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
||||||
|
titles.add(sdf.format(cal.getTime()).substring(0,7));
|
||||||
|
cal.add(Calendar.MONTH, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return titles;
|
||||||
|
}
|
||||||
|
public Date getReportTime(String reportTime) throws ParseException{
|
||||||
|
Pattern datePattern=Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}$");
|
||||||
|
Pattern monthPattern=Pattern.compile("^[0-9]{4}-[0-9]{2}$");
|
||||||
|
Pattern yearPattern=Pattern.compile("^[0-9]{4}$");
|
||||||
|
Matcher matcher=datePattern.matcher(reportTime);
|
||||||
|
if(matcher.matches()){
|
||||||
|
return new SimpleDateFormat("yyyy-MM-dd").parse(reportTime);
|
||||||
|
}else{
|
||||||
|
matcher=monthPattern.matcher(reportTime);
|
||||||
|
if(matcher.matches()){
|
||||||
|
return new SimpleDateFormat("yyyy-MM").parse(reportTime);
|
||||||
|
}else{
|
||||||
|
matcher=yearPattern.matcher(reportTime);
|
||||||
|
if(matcher.matches()){
|
||||||
|
return new SimpleDateFormat("yyyy").parse(reportTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.nis.web.controller.report;
|
package com.nis.web.controller.report;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -11,6 +12,7 @@ import java.util.List;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
@@ -19,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import com.nis.domain.FunctionServiceDict;
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.basics.ServiceDictInfo;
|
import com.nis.domain.basics.ServiceDictInfo;
|
||||||
import com.nis.domain.configuration.RequestInfo;
|
|
||||||
import com.nis.domain.log.SearchReport;
|
import com.nis.domain.log.SearchReport;
|
||||||
import com.nis.domain.report.NtcSrcipDomesticReport;
|
import com.nis.domain.report.NtcSrcipDomesticReport;
|
||||||
import com.nis.domain.report.ReportResult;
|
import com.nis.domain.report.ReportResult;
|
||||||
@@ -50,47 +51,19 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
|||||||
}
|
}
|
||||||
bean.setSearchService(serviceId.toString());
|
bean.setSearchService(serviceId.toString());
|
||||||
}
|
}
|
||||||
String reportTime=bean.getReportTime();
|
|
||||||
bean.setSearchBusinessType("1");
|
bean.setSearchBusinessType("1");
|
||||||
ReportResult<NtcSrcipDomesticReport> result=new ReportResult<>();
|
ReportResult<NtcSrcipDomesticReport> result=new ReportResult<>();
|
||||||
StringBuffer url=new StringBuffer(Constants.LOG_BASE_URL+Constants.NTC_SERVICE_REPORT+"?");
|
StringBuffer url=new StringBuffer(Constants.LOG_BASE_URL+Constants.NTC_SERVICE_REPORT+"?");
|
||||||
bean.setPageSize(-1);
|
bean.setPageSize(-1);
|
||||||
bean.setFields("srcProvince,srcCity,sum,reportTime");
|
bean.setFields("srcProvince,srcCity,sum,reportTime");
|
||||||
String format=Constants.SEARCH_DATEFORMAT;
|
try {
|
||||||
SimpleDateFormat sdf=new SimpleDateFormat(format);
|
this.setReportSearchTime(bean);
|
||||||
Date date=new Date();
|
} catch (ParseException e1) {
|
||||||
bean.setSearchReportEndTime(sdf.format(date));
|
// TODO Auto-generated catch block
|
||||||
Calendar cal=Calendar.getInstance();
|
e1.printStackTrace();
|
||||||
cal.set(Calendar.MINUTE, 0);
|
|
||||||
cal.set(Calendar.SECOND, 0);
|
|
||||||
cal.set(Calendar.MILLISECOND, 0);
|
|
||||||
if(bean.getReportType()==Constants.REPORT_TYPE_HOUR){
|
|
||||||
cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
||||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_DAY){
|
|
||||||
cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
||||||
cal.set(Calendar.DAY_OF_MONTH, 1);
|
|
||||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
|
||||||
cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
||||||
cal.set(Calendar.DAY_OF_MONTH, 1);
|
|
||||||
cal.set(Calendar.MONTH, 0);
|
|
||||||
}
|
|
||||||
logger.info("search start time "+sdf.format(cal.getTime()));
|
|
||||||
logger.info("search end time "+sdf.format(date));
|
|
||||||
bean.setSearchReportStartTime(sdf.format(cal.getTime()));
|
|
||||||
List<String> titles=new ArrayList<String>();
|
|
||||||
while(cal.getTime().getTime()<date.getTime()){//构造标题
|
|
||||||
//报表时间单位加一
|
|
||||||
if(bean.getReportType()==Constants.REPORT_TYPE_HOUR){
|
|
||||||
titles.add(sdf.format(cal.getTime()).substring(0,13));
|
|
||||||
cal.add(Calendar.HOUR_OF_DAY, 1);
|
|
||||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_DAY){
|
|
||||||
titles.add(sdf.format(cal.getTime()).substring(0,10));
|
|
||||||
cal.add(Calendar.DAY_OF_MONTH, 1);
|
|
||||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
|
||||||
titles.add(sdf.format(cal.getTime()).substring(0,7));
|
|
||||||
cal.add(Calendar.MONTH, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
List<String> titles=this.getDateTitiles(bean);
|
||||||
model.addAttribute("titles", titles);
|
model.addAttribute("titles", titles);
|
||||||
// try {
|
// try {
|
||||||
// result=result.getReport(url.toString(), bean);
|
// result=result.getReport(url.toString(), bean);
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ import com.nis.web.controller.BaseController;
|
|||||||
public class NtcTagReportController extends BaseController {
|
public class NtcTagReportController extends BaseController {
|
||||||
@RequestMapping("/ajaxNtcTagReport")
|
@RequestMapping("/ajaxNtcTagReport")
|
||||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||||
// if (bean.getReportType() == null) {
|
|
||||||
// bean.setReportType(1);
|
|
||||||
// }
|
|
||||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId());
|
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId());
|
||||||
List<ServiceDictInfo> labels=serviceDictInfoService.findAllLableDict();
|
List<ServiceDictInfo> labels=serviceDictInfoService.findAllLableDict();
|
||||||
model.addAttribute("labels", labels);
|
model.addAttribute("labels", labels);
|
||||||
|
|||||||
@@ -23,19 +23,19 @@
|
|||||||
$("#searchForm")[0].reset();
|
$("#searchForm")[0].reset();
|
||||||
});
|
});
|
||||||
if(!"${bean.reportBusinessType}"){
|
if(!"${bean.reportBusinessType}"){
|
||||||
ajaxGetLabelReport();
|
ajaxReport("/report/ajaxNtcTagReport","#label");
|
||||||
}else if("${bean.reportBusinessType}"=="label_report"){
|
}else if("${bean.reportBusinessType}"=="label_report"){
|
||||||
ajaxGetLabelReport();
|
ajaxReport("/report/ajaxNtcTagReport","#label");
|
||||||
}else if("${bean.reportBusinessType}"=="lwhh_report"){
|
}else if("${bean.reportBusinessType}"=="lwhh_report"){
|
||||||
ajaxGetLwhhReport();
|
ajaxReport("/report/ajaxNtcLwhhReport","#lwhh");
|
||||||
}else if("${bean.reportBusinessType}"=="src_ip_report"){
|
}else if("${bean.reportBusinessType}"=="src_ip_report"){
|
||||||
ajaxGetSrcIpReport();
|
ajaxReport("/report/ajaxNtcSrcipDomesticReport","#srcIp");
|
||||||
}else if("${bean.reportBusinessType}"=="attr_type_report"){
|
}else if("${bean.reportBusinessType}"=="attr_type_report"){
|
||||||
ajaxGetXzReport();
|
ajaxReport("/report/ajaxNtcXzReport","#attrType");
|
||||||
}else if("${bean.reportBusinessType}"=="dest_ip_report"){
|
}else if("${bean.reportBusinessType}"=="dest_ip_report"){
|
||||||
ajaxGetDestIpReport();
|
ajaxReport("/report/ajaxNtcDestIpReport","#destIp");
|
||||||
}else if("${bean.reportBusinessType}"=="isp_report"){
|
}else if("${bean.reportBusinessType}"=="isp_report"){
|
||||||
ajaxGetIspReport();
|
ajaxReport("/report/ajaxNtcIspReport","#entranceId");
|
||||||
}
|
}
|
||||||
$("[name='reportType']").each(function(){
|
$("[name='reportType']").each(function(){
|
||||||
var type='${bean.reportType}';
|
var type='${bean.reportType}';
|
||||||
@@ -47,17 +47,17 @@
|
|||||||
$("#reportBusinessType").val($(this).data("bussiness"));
|
$("#reportBusinessType").val($(this).data("bussiness"));
|
||||||
if(!$(this).parent("li").hasClass("active")){
|
if(!$(this).parent("li").hasClass("active")){
|
||||||
if($(this).data("bussiness")=="label_report"){
|
if($(this).data("bussiness")=="label_report"){
|
||||||
ajaxGetLabelReport();
|
ajaxReport("/report/ajaxNtcTagReport","#label");
|
||||||
}else if($(this).data("bussiness")=="lwhh_report"){
|
}else if($(this).data("bussiness")=="lwhh_report"){
|
||||||
ajaxGetLwhhReport();
|
ajaxReport("/report/ajaxNtcLwhhReport","#lwhh");
|
||||||
}else if($(this).data("bussiness")=="src_ip_report"){
|
}else if($(this).data("bussiness")=="src_ip_report"){
|
||||||
ajaxGetSrcIpReport();
|
ajaxReport("/report/ajaxNtcSrcipDomesticReport","#srcIp");
|
||||||
}else if($(this).data("bussiness")=="attr_type_report"){
|
}else if($(this).data("bussiness")=="attr_type_report"){
|
||||||
ajaxGetXzReport();
|
ajaxReport("/report/ajaxNtcXzReport","#attrType");
|
||||||
}else if($(this).data("bussiness")=="dest_ip_report"){
|
}else if($(this).data("bussiness")=="dest_ip_report"){
|
||||||
ajaxGetDestIpReport();
|
ajaxReport("/report/ajaxNtcDestIpReport","#destIp");
|
||||||
}else if($(this).data("bussiness")=="isp_report"){
|
}else if($(this).data("bussiness")=="isp_report"){
|
||||||
ajaxGetIspReport();
|
ajaxReport("/report/ajaxNtcIspReport","#entranceId");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -78,104 +78,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var ajaxGetLabelReport=function(){
|
var ajaxReport=function(url,target){
|
||||||
loading('<spring:message code="onloading"/>');
|
loading('<spring:message code="onloading"/>');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
async:false,
|
async:false,
|
||||||
url:'${ctx}/report/ajaxNtcTagReport',
|
url:'${ctx}'+url,///report/ajaxNtcTagReport
|
||||||
data:{
|
data:{
|
||||||
"action":$('[name="action"]').val(),
|
"action":$('[name="action"]').val(),
|
||||||
"reportType":$('[name="reportType"]').val()
|
"reportType":$('[name="reportType"]').val(),
|
||||||
|
"reportTime":$('[name="reportTime"]').val()
|
||||||
},
|
},
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success:function(data){
|
success:function(data){
|
||||||
$("#label").html(data);
|
$(target).html(data);//#label
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var ajaxGetLwhhReport=function(){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
async:false,
|
|
||||||
url:'${ctx}/report/ajaxNtcLwhhReport',
|
|
||||||
data:{
|
|
||||||
"action":$('[name="action"]').val(),
|
|
||||||
"reportType":$('[name="reportType"]').val()
|
|
||||||
},
|
|
||||||
dataType:"html",
|
|
||||||
success:function(data){
|
|
||||||
$("#lwhh").html(data);
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var ajaxGetSrcIpReport=function(){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
async:false,
|
|
||||||
url:'${ctx}/report/ajaxNtcSrcipDomesticReport',
|
|
||||||
data:{
|
|
||||||
"action":$('[name="action"]').val(),
|
|
||||||
"reportType":$('[name="reportType"]').val()
|
|
||||||
},
|
|
||||||
dataType:"html",
|
|
||||||
success:function(data){
|
|
||||||
$("#srcIp").html(data);
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var ajaxGetXzReport=function(){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
async:false,
|
|
||||||
url:'${ctx}/report/ajaxNtcXzReport',
|
|
||||||
data:{
|
|
||||||
"action":$('[name="action"]').val(),
|
|
||||||
"reportType":$('[name="reportType"]').val()
|
|
||||||
},
|
|
||||||
dataType:"html",
|
|
||||||
success:function(data){
|
|
||||||
$("#attrType").html(data);
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var ajaxGetDestIpReport=function(){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
async:false,
|
|
||||||
url:'${ctx}/report/ajaxNtcDestIpReport',
|
|
||||||
data:{
|
|
||||||
"action":$('[name="action"]').val(),
|
|
||||||
"reportType":$('[name="reportType"]').val()
|
|
||||||
},
|
|
||||||
dataType:"html",
|
|
||||||
success:function(data){
|
|
||||||
$("#destIp").html(data);
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var ajaxGetIspReport=function(){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
async:false,
|
|
||||||
url:'${ctx}/report/ajaxNtcIspReport',
|
|
||||||
data:{
|
|
||||||
"action":$('[name="action"]').val(),
|
|
||||||
"reportType":$('[name="reportType"]').val()
|
|
||||||
},
|
|
||||||
dataType:"html",
|
|
||||||
success:function(data){
|
|
||||||
$("#entranceId").html(data);
|
|
||||||
closeTip();
|
closeTip();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user