From 90acff60761ed769014b34c5cea4c8300ac8f802 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Wed, 05 Jul 2023 14:38:32 +0800 Subject: [PATCH] 监测站点显示修改 --- screen-api/src/main/java/com/moral/api/pojo/form/dataDisplay/MonitorPointDataDisplayForm.java | 91 ++++++++++++++++++++++++--------------------- 1 files changed, 49 insertions(+), 42 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 86df41a..cc43b35 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 @@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; +import java.util.List; /** * @ClassName MonitorPointDataDisplayForm @@ -20,21 +21,27 @@ /* * ������id - * */ - private Integer monitorPointId; + */ +// private Integer monitorPointId; + + + /** + * mac��� + */ + private List<String> macs; /* * ������������ * */ - @DateTimeFormat(pattern = "yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH") + @JsonFormat(pattern = "yyyy-MM-dd HH", timezone = "GMT+8") private Date startTime; /* * ������������ * */ - @DateTimeFormat(pattern = "yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH") + @JsonFormat(pattern = "yyyy-MM-dd HH", timezone = "GMT+8") private Date endTime; /* @@ -45,41 +52,41 @@ /* * ������������������������ * */ - public boolean valid() { - if (monitorPointId == null) - return false; - if (reportType == null) { - if (startTime == null || endTime == null) - return false; - //������������������������������������������ - 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.HOURLY_REPORT)) { - //������������������������������������������ - Date previousHour = DateUtils.getDateOfMin(new Date(), -60); - startTime = DateUtils.getHourlyStartTime(previousHour); - } else if (reportType.equals(Constants.DAILY_REPORT)) { - //������������������������������������ - Date yesterday = DateUtils.getDateOfDay(new Date(),-1); - startTime = DateUtils.getDailyStartTime(yesterday); - } else if (reportType.equals(Constants.WEEKLY_REPORT)) { - //������������������������������������ - Date previous = DateUtils.getDateOfDay(new Date(),-7); - startTime = DateUtils.getWeeklyStartTime(previous); - 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; - } - return true; - } +// public boolean valid() { +// if (monitorPointId == null) +// return false; +// if (reportType == null) { +// if (startTime == null || endTime == null) +// return false; +// //������������������������������������������ +// 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.HOURLY_REPORT)) { +// //������������������������������������������ +// Date previousHour = DateUtils.getDateOfMin(new Date(), -60); +// startTime = DateUtils.getHourlyStartTime(previousHour); +// } else if (reportType.equals(Constants.DAILY_REPORT)) { +// //������������������������������������ +// Date yesterday = DateUtils.getDateOfDay(new Date(),-1); +// startTime = DateUtils.getDailyStartTime(yesterday); +// } else if (reportType.equals(Constants.WEEKLY_REPORT)) { +// //������������������������������������ +// Date previous = DateUtils.getDateOfDay(new Date(),-7); +// startTime = DateUtils.getWeeklyStartTime(previous); +// 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; +// } +// return true; +// } } -- Gitblit v1.8.0