From 2dee01ae6f13a72b1d2ba9ca3d1ffbea72ab513b Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Sat, 09 Oct 2021 08:59:28 +0800 Subject: [PATCH] screen-aqi 增加监测因子对比图接口 --- screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java b/screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java index 21083f0..86df41a 100644 --- a/screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java +++ b/screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java @@ -51,28 +51,31 @@ if (reportType == null) { if (startTime == null || endTime == null) return false; - reportType = Constants.DAILYREPORT; //������������������������������������������ String endTimeStr = DateUtils.dateToDateString(endTime,"yyyy-MM-dd"); endTimeStr+=" 23:59:59"; endTime = DateUtils.getDate(endTimeStr,"yyyy-MM-dd HH:mm:ss"); } else { - if (reportType.equals(Constants.HOURYLYREPORT)) { + if(startTime!=null&&endTime!=null) + return false; + if (reportType.equals(Constants.HOURLY_REPORT)) { //������������������������������������������ Date previousHour = DateUtils.getDateOfMin(new Date(), -60); startTime = DateUtils.getHourlyStartTime(previousHour); - } else if (reportType.equals(Constants.DAILYREPORT)) { + } else if (reportType.equals(Constants.DAILY_REPORT)) { //������������������������������������ Date yesterday = DateUtils.getDateOfDay(new Date(),-1); startTime = DateUtils.getDailyStartTime(yesterday); - } else if (reportType.equals(Constants.WEEKLYREPORT)) { + } else if (reportType.equals(Constants.WEEKLY_REPORT)) { //������������������������������������ Date previous = DateUtils.getDateOfDay(new Date(),-7); startTime = DateUtils.getWeeklyStartTime(previous); - } else if (reportType.equals(Constants.MONTHLYREPORT)) { + endTime = DateUtils.getWeeklyEndTime(previous); + } else if (reportType.equals(Constants.MONTHLY_REPORT)) { //������������������������������������ Date lastMonthFirstDay = DateUtils.getFirstDayOfLastMonth(); startTime = DateUtils.getMonthlyStartTime(lastMonthFirstDay); + endTime = DateUtils.getMonthlyEndTime(lastMonthFirstDay); } else return false; } -- Gitblit v1.8.0