|
@@ -0,0 +1,69 @@
|
|
|
+package com.bizmatics.mhfire.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.bizmatics.common.core.bean.CommonPage;
|
|
|
+import com.bizmatics.common.core.util.DateUtils;
|
|
|
+import com.bizmatics.mhfire.service.AlertService;
|
|
|
+import com.bizmatics.mhfire.service.vo.AlertStatisticsVO;
|
|
|
+import com.bizmatics.mhfire.service.vo.AlertVO;
|
|
|
+import com.bizmatics.mhfire.service.vo.FireSiteVO;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author yq
|
|
|
+ * @date 2021/5/28 14:53
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class AlertServiceImpl implements AlertService {
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<AlertStatisticsVO> getAlertStatisticsByHouse() {
|
|
|
+ List<AlertStatisticsVO> list = new ArrayList<>();
|
|
|
+ Date date = new Date();
|
|
|
+ for (int i = 0; i < 24; i++) {
|
|
|
+ date = DateUtils.setHours(date, i);
|
|
|
+ date.setMinutes(0);
|
|
|
+ date.setSeconds(0);
|
|
|
+ date.setMinutes(59);
|
|
|
+ date.setSeconds(59);
|
|
|
+ }
|
|
|
+ //TODO 没有找见对应数据,数据来源其他平台
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<AlertStatisticsVO> getAlertStatisticsByMonth() {
|
|
|
+ List<AlertStatisticsVO> list = new ArrayList<>();
|
|
|
+ Date date = new Date();
|
|
|
+ for (int i = 0; i < 12; i++) {
|
|
|
+ DateUtils.setMonths(date,i);
|
|
|
+ Date firstDayOfMonth = DateUtils.getFirstDayOfMonth(date);
|
|
|
+ Date lastDayOfMonth = DateUtils.getLastDayOfMonth(date);
|
|
|
+ }
|
|
|
+ //TODO 没有找见对应数据,数据来源其他平台
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonPage<AlertVO> page(Integer current, Integer size, String startTime, String endTime) {
|
|
|
+ Page<Map<String, Object>> page = new Page<>(current, size);
|
|
|
+
|
|
|
+ List<AlertVO> list = new ArrayList<>();
|
|
|
+ //TODO 站点信息调用其他平台接口
|
|
|
+ return new CommonPage<>(list, page.getTotal(), page.getSize(), page.getCurrent());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<AlertStatisticsVO> getAlertStatistics(String startTime, String endTime) {
|
|
|
+ List<AlertStatisticsVO> list = new ArrayList<>();
|
|
|
+ //TODO 数据来源于其他平台
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+}
|