默认时间改为一小时,只要不是闭区间都改为一小时;

This commit is contained in:
dongxiaoyan
2018-12-23 21:10:23 +08:00
parent 2e30d562a5
commit 829be054fb
3 changed files with 62 additions and 9 deletions

View File

@@ -922,9 +922,9 @@ public class DashboardServiceController extends BaseRestController {
cal.add(Calendar.HOUR_OF_DAY, -1);
beginDate = sdf.format(cal.getTime());
}else if((beginDate == null || "".equals(beginDate)) && (endDate != null && !"".equals(endDate))){
beginDate = DateUtils.getSpecifiedDayBefore(endDate)+" "+endDate.substring(11);
beginDate = DateUtils.getSpecifiedHourBefore(endDate);
}else if((endDate == null || "".equals(endDate)) && (beginDate != null && !"".equals(beginDate))){
endDate = DateUtils.getSpecifiedDayAfter(beginDate)+" "+beginDate.substring(11);
endDate = DateUtils.getSpecifiedHourAfter(beginDate);
}
// 带查询时间查询所有
List<Map> portActiveChart = dashboardService.findTrafficPortActive(beginDate, endDate,port);