|
@@ -0,0 +1,62 @@
|
|
|
|
+package com.jiayue.biz.service.impl;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.jiayue.biz.domain.*;
|
|
|
|
+import com.jiayue.biz.eunms.WindDirectionEnum;
|
|
|
|
+import com.jiayue.biz.mapper.WindTowerDataParentTableMapper;
|
|
|
|
+import com.jiayue.biz.service.*;
|
|
|
|
+import com.jiayue.biz.util.CalculationUtil;
|
|
|
|
+import com.jiayue.biz.util.DateMomentUtil;
|
|
|
|
+import com.jiayue.biz.util.DateTimeUtil;
|
|
|
|
+import com.jiayue.common.utils.DateUtil;
|
|
|
|
+import flanagan.analysis.ProbabilityPlot;
|
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
|
+import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.math.RoundingMode;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 首页Service业务层处理
|
|
|
|
+ *
|
|
|
|
+ * @author L.ym
|
|
|
|
+ * @date 2022-05-11
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+@AllArgsConstructor
|
|
|
|
+public class DataAnalysisServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper, WindTowerDataParentTable> implements DataAnalysisPdfService {
|
|
|
|
+ private final WindTowerInfoServiceImpl windTowerInfoService;
|
|
|
|
+ private final WindTowerCalculationDataServiceImpl windTowerCalculationDataService;
|
|
|
|
+ private final EquipmentAttributeService equipmentAttributeService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private final RealTimeDisplayService realTimeDisplayService;
|
|
|
|
+
|
|
|
|
+ private final WindDirectionStatisticsDataServiceImpl windDirectionStatisticsDataService;
|
|
|
|
+ private final WindTowerDataParentTableService windTowerDataParentTableService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Object> generatePDF(String equipmentId, String height, Date startDay, Date endDay) {
|
|
|
|
+ //如果结束时间大于现在时间
|
|
|
|
+ if (DateUtil.date().getTime() < endDay.getTime()) {
|
|
|
|
+ //将结束时间设置为昨天结束时间
|
|
|
|
+ endDay = DateUtil.endOfDay(DateUtil.yesterday());
|
|
|
|
+ }
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ long realityCount = 0;//数据实际条数
|
|
|
|
+ // 一年的计算数据
|
|
|
|
+ startDay = DateUtil.beginOfMonth(startDay);
|
|
|
|
+ endDay = DateUtil.endOfMonth(endDay);
|
|
|
|
+
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|