From cf7bca577b04b817c9536e0b9a029f18c42d5d75 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Fri, 18 Jan 2019 09:33:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=8F=90=E4=BA=A4=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A1=8C=E4=B8=BA=E6=90=9C=E7=B4=A2=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/TrafficStatisticsReportController.java | 10 +++++----- .../webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp | 2 +- .../WEB-INF/views/dashboard/trafficUserBehavior.jsp | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java index 8593cc1be..a1f24ef78 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java @@ -87,11 +87,11 @@ public class TrafficStatisticsReportController extends BaseController { // statTime=DateUtils.getDate()+" 00:00:00"; // 默认今天 // endTime=DateUtils.getDateTime(); - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cal.getTime());// 获取到完整的时间 - cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); - statTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cal.getTime()); + Calendar time = Calendar.getInstance(); + endTime = DateUtils.formatDateTimeByParm(time.getTime(),"yyyy-MM-dd HH")+":00:00"; + time.add(Calendar.HOUR_OF_DAY, -1); + statTime = DateUtils.formatDateTimeByParm(time.getTime(),"yyyy-MM-dd HH")+":00:00";; + bean.setSearchFoundStartTime(statTime); bean.setSearchFoundEndTime(endTime); statTime = URLEncoder.encode(statTime, "UTF-8"); diff --git a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp index ffde806c0..ae7183090 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp @@ -79,7 +79,7 @@ body {

-

c2s 0 | s2c 0

+

in 0 | out 0

0 bps
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp index b207a3362..a2d38a1ae 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp @@ -130,7 +130,6 @@ } $("#pageNo").val(n); $("#pageSize").val(s); -// $("#searchForm").attr("action","${ctx}/traffic/userBehavior"); $("#searchForm").submit(); return false; } @@ -244,7 +243,7 @@ + value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTimeByFormat('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false,'yyyy-MM-dd hh')"/>
@@ -253,14 +252,14 @@
+ value="${log.searchFoundEndTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTimeByFormat('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false,'yyyy-MM-dd hh')"/>
- +
- +