阻断监测统计接口 修改五分钟粒度 数据返回日期格式
This commit is contained in:
@@ -320,12 +320,17 @@ public class TrafficReportService extends BaseLogService {
|
||||
// entrance1.addAll(entrance2);
|
||||
if (!StringUtil.isEmpty(entrance1)) {
|
||||
// Map<String, Comparable> m = new HashMap<String, Comparable>();
|
||||
Date beginDate = DateUtils.parseDate(begin);
|
||||
Date endDate = DateUtils.parseDate(end);
|
||||
// Date beginDate = ;
|
||||
|
||||
Long beginDate = DateUtils.getTimeByType(DateUtils.parseDate(begin).getTime(),
|
||||
(Integer.valueOf(searchBusinessType) - 1));
|
||||
Long endDate = DateUtils.getTimeByType(DateUtils.parseDate(end).getTime(),
|
||||
(Integer.valueOf(searchBusinessType) - 1));
|
||||
|
||||
Date endDateTimes = new Date(endDate);
|
||||
List<Date> dateRangeList = new ArrayList<Date>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(beginDate);
|
||||
calendar.setTime(new Date(beginDate));
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
int trend_time_interval = 0;
|
||||
int unit = 0;
|
||||
@@ -345,7 +350,7 @@ public class TrafficReportService extends BaseLogService {
|
||||
unit = Calendar.YEAR;
|
||||
trend_time_interval = 1;
|
||||
}
|
||||
while (calendar.getTime().compareTo(endDate) < 0) {
|
||||
while (calendar.getTime().compareTo(endDateTimes) < 0) {
|
||||
dateRangeList.add(calendar.getTime());
|
||||
calendar.add(unit, trend_time_interval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user