默认时间改为一小时,只要不是闭区间都改为一小时;
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1505,7 +1505,7 @@ public class DashboardService extends BaseService {
|
||||
List<String> strDateRangeList = new ArrayList<String>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(beginDate1);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm");
|
||||
while (calendar.getTime().compareTo(endDate1)<=0) {
|
||||
dateRangeList.add(calendar.getTime());
|
||||
strDateRangeList.add(sdf.format(calendar.getTime()));
|
||||
|
||||
Reference in New Issue
Block a user