From eba6f1988c6a7e37e619a27e493b17c244979070 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Thu, 30 Sep 2021 16:11:29 +0800
Subject: [PATCH] screen-aqi            完成获取监测站数据接口

---
 screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 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..16b8cc4 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,12 +51,13 @@
         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(startTime!=null&&endTime!=null)
+                return false;
             if (reportType.equals(Constants.HOURYLYREPORT)) {
                 //������������������������������������������
                 Date previousHour = DateUtils.getDateOfMin(new Date(), -60);
@@ -69,10 +70,12 @@
                 //������������������������������������
                 Date previous = DateUtils.getDateOfDay(new Date(),-7);
                 startTime = DateUtils.getWeeklyStartTime(previous);
+                endTime = DateUtils.getWeeklyEndTime(previous);
             } else if (reportType.equals(Constants.MONTHLYREPORT)) {
                 //������������������������������������
                 Date lastMonthFirstDay = DateUtils.getFirstDayOfLastMonth();
                 startTime = DateUtils.getMonthlyStartTime(lastMonthFirstDay);
+                endTime = DateUtils.getMonthlyEndTime(lastMonthFirstDay);
             } else
                 return false;
         }

--
Gitblit v1.8.0