From bb41cb569a6c6a886c0ffc44482d02cb5e35eec9 Mon Sep 17 00:00:00 2001 From: liangfan Date: Wed, 15 May 2024 14:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=82=E6=98=8C=E7=89=88=E6=9C=AC=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service-api/suichang-api/pom.xml | 31 +++++ .../java/com/hnac/hzims/suichang/entity/Demo.java | 10 ++ .../hnac/hzims/suichang/feign/ISuichangClient.java | 29 +++++ .../com/hnac/hzims/suichang/util/DateUtil.java | 138 +++++++++++++++++++++ .../hnac/hzims/suichang/util/MemoryPagination.java | 39 ++++++ .../hnac/hzims/suichang/vo/AvgMonitorCountVo.java | 43 +++++++ .../com/hnac/hzims/suichang/vo/AvgMonitorReq.java | 29 +++++ .../com/hnac/hzims/suichang/vo/AvgMonitorVo.java | 54 ++++++++ .../hnac/hzims/suichang/vo/EcologicalFlowVo.java | 80 ++++++++++++ .../hzims/suichang/vo/ExamStationFlowDataReq.java | 37 ++++++ .../suichang/vo/ExamStationFlowReportDayVo.java | 60 +++++++++ .../suichang/vo/ExamStationFlowReportDetailVo.java | 33 +++++ .../hzims/suichang/vo/ExamStationFlowReportVo.java | 49 ++++++++ .../hnac/hzims/suichang/vo/FlowWarnQueryDTO.java | 26 ++++ .../com/hnac/hzims/suichang/vo/FlowWarnVo.java | 45 +++++++ .../java/com/hnac/hzims/suichang/vo/ImageReq.java | 33 +++++ .../java/com/hnac/hzims/suichang/vo/ImageVo.java | 28 +++++ .../hnac/hzims/suichang/vo/MissingImagesRes.java | 22 ++++ .../hzims/suichang/vo/RealMonitorExportDTO.java | 46 +++++++ .../com/hnac/hzims/suichang/vo/RealMonitorRes.java | 27 ++++ .../suichang/vo/RealMonitorSingleInfoReq.java | 27 ++++ .../hzims/suichang/vo/RealMonitorSingleInfoVo.java | 25 ++++ .../com/hnac/hzims/suichang/vo/RealMonitorVo.java | 47 +++++++ .../hnac/hzims/suichang/vo/StationQueryReq.java | 21 ++++ .../com/hnac/hzims/suichang/vo/StationTreeRes.java | 25 ++++ .../com/hnac/hzims/suichang/vo/StationTypeVo.java | 70 +++++++++++ .../java/com/hnac/hzims/suichang/vo/StationVo.java | 45 +++++++ .../suichang/vo/StatisticsFlowDataDetailVo.java | 40 ++++++ .../hzims/suichang/vo/StatisticsFlowDataReq.java | 29 +++++ .../hzims/suichang/vo/StatisticsFlowDataVo.java | 37 ++++++ 30 files changed, 1225 insertions(+) create mode 100644 hzims-service-api/suichang-api/pom.xml create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java create mode 100644 hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java diff --git a/hzims-service-api/suichang-api/pom.xml b/hzims-service-api/suichang-api/pom.xml new file mode 100644 index 0000000..018e6d5 --- /dev/null +++ b/hzims-service-api/suichang-api/pom.xml @@ -0,0 +1,31 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + suichang-api + + + 8 + 8 + UTF-8 + + + + + + com.alibaba + easyexcel + 3.0.5 + + + + + + \ No newline at end of file diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java new file mode 100644 index 0000000..f6aa071 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java @@ -0,0 +1,10 @@ +package com.hnac.hzims.suichang.entity; + +/** + * @Author: liangfan + * @Date: 2024-03-08 15:06 + * @Description: + */ + +public class Demo { +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java new file mode 100644 index 0000000..fd61e11 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.suichang.feign; + +import com.hnac.hzims.suichang.vo.StationQueryReq; +import com.hnac.hzims.suichang.vo.StationVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + +@FeignClient( + value = "suichang" +) +public interface ISuichangClient { + String API_PREFIX = "/suichangClient"; + + String GET_STATION_BY_REQ = API_PREFIX + "/getStationListByReq"; + + String GET_DATA = API_PREFIX + "/getData"; + + @GetMapping(GET_STATION_BY_REQ) + List getStationListByReq(StationQueryReq req); + + @GetMapping(GET_DATA) + List> getData(String stcd, Integer accessRules, Integer saveTimeType, Integer timeInterval, + LocalDateTime startTime, LocalDateTime endTime); + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java new file mode 100644 index 0000000..b09590e --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java @@ -0,0 +1,138 @@ +package com.hnac.hzims.suichang.util; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.Month; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class DateUtil { + public static Map getStartEnd(String yearMonth) { + Map data = new HashMap<>(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + Date begin = sdf.parse(yearMonth + "-01 00:00:00"); + // 最大天数 + Date endSt = sdf.parse(yearMonth + "-" + getMaxDayByYearMonth(begin) + " 23:59:59"); + data.put("start", begin); + data.put("end", endSt); + } catch (ParseException e) { + e.printStackTrace(); + } + return data; + } + + public static int getMaxDayByYearMonth(Date start) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(start); + return calendar.getActualMaximum(Calendar.DAY_OF_MONTH); + } + + public static LocalDateTime getStartOfLastQuarter(LocalDateTime dateTime) { + int currentMonth = dateTime.getMonthValue(); + int currentYear = dateTime.getYear(); + + // 计算上个季度的开始月份 + int startMonthOfLastQuarter = (currentMonth - 1) / 3 * 3 + 1; + if (startMonthOfLastQuarter > currentMonth) { + // 如果当前月份在上个季度之后,则回到上一年的相应季度 + startMonthOfLastQuarter -= 3; + currentYear--; + } + + // 获取上个季度的开始时间(该季度的第一个月的第一天午夜) + return LocalDateTime.of(currentYear, startMonthOfLastQuarter, 1, 0, 0); + } + + public static LocalDateTime getEndOfLastQuarter(LocalDateTime dateTime) { + LocalDateTime startOfLastQuarter = getStartOfLastQuarter(dateTime); + + // 获取上个季度的结束时间(该季度的最后一个月的最后一天午夜) + int endMonthOfLastQuarter = startOfLastQuarter.getMonthValue() + 2; + int endYearOfLastQuarter = startOfLastQuarter.getYear(); + if (endMonthOfLastQuarter > 12) { + // 如果结束月份超过12,则回到下一年的相应月份 + endMonthOfLastQuarter -= 12; + endYearOfLastQuarter++; + } + + return LocalDateTime.of(endYearOfLastQuarter, endMonthOfLastQuarter, 1, 0, 0); + } + + public static LocalDateTime getStartOfHalfYear(LocalDateTime dateTime) { + int month = dateTime.getMonthValue(); + int year = dateTime.getYear(); + if (month <= 6) { + // 如果是上半年,则获取去年下半年的开始时间(7月1日) + year--; + return LocalDateTime.of(year, Month.JULY, 1, 0, 0); + } else { + return LocalDateTime.of(year, Month.JANUARY, 1, 0, 0); + } + } + + + public static LocalDateTime getEndOfHalfYear(LocalDateTime dateTime) { + int month = dateTime.getMonthValue(); + int year = dateTime.getYear(); + if (month <= 6) { + // 如果是上半年,则获取去年下半年的结束时间(1月1日) + return LocalDateTime.of(year, Month.JANUARY, 1, 0, 0, 0); + } else { + return LocalDateTime.of(year, Month.JULY, 1, 0, 0, 0); + } + + } + + public static long getHoursPassedToday() { + // 获取当前时间 + LocalTime currentTime = LocalTime.now(); + // 获取今天的开始时间(午夜0点) + LocalTime midnight = LocalTime.MIDNIGHT; + // 计算时间差,单位为小时 + return ChronoUnit.HOURS.between(midnight, currentTime); + } + + public static LocalDateTime getEndTime(String time) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + java.time.LocalDate timeDate = java.time.LocalDate.parse(time, formatter); + LocalDateTime resultTime = LocalDateTime.of(timeDate, LocalTime.MIDNIGHT); + // 比较两个时间的大小 + LocalDateTime now = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0).withNano(0); + if (now.compareTo(resultTime) > 0) { + resultTime = LocalDateTime.of(timeDate, LocalTime.MAX); + } else { + resultTime = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); + } + return resultTime; + } + + public static LocalDateTime getEndTimeByDay(String time) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + java.time.LocalDate timeDate = java.time.LocalDate.parse(time, formatter); + return LocalDateTime.of(timeDate, LocalTime.MIDNIGHT).plusDays(1); + } + + public static LocalDateTime getStartTime(String time) { + // 创建一个 DateTimeFormatter 对象来解析日期字符串 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + java.time.LocalDate startDate = java.time.LocalDate.parse(time, formatter); + // 结合 LocalDate 和 LocalTime 创建 LocalDateTime 对象 + LocalDateTime startTime = LocalDateTime.of(startDate, LocalTime.MIDNIGHT); + return startTime; + } + + public static String getStringTime(LocalDateTime time) { + // 创建一个 DateTimeFormatter 对象,用于定义你想要的格式 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + // 使用 formatter 将 LocalDateTime 转换为 String + return time.format(formatter); + } +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java new file mode 100644 index 0000000..82d5ee4 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java @@ -0,0 +1,39 @@ +package com.hnac.hzims.suichang.util; + +import org.springframework.util.CollectionUtils; + +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author tanghaihao + * @date 2023年07月12日 17:15 + */ +public class MemoryPagination { + /** + * 内存分页 + * + * @param records 待分页的数据 + * @param pageNum 当前页码 + * @param pageSize 每页显示的条数 + * @return 分页之后的数据 + */ + public static List pagination(List records, int pageNum, int pageSize) { + if (CollectionUtils.isEmpty(records)) { + return Collections.emptyList(); + } + int totalCount = records.size() ; + int remainder = totalCount % pageSize; + int pageCount = (remainder > 0) ? totalCount / pageSize + 1 : totalCount / pageSize; + if (remainder == 0) { + return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); + } else { + if (pageNum == pageCount) { + return records.stream().skip((pageNum - 1) * pageSize).limit(totalCount).collect(Collectors.toList()); + } else { + return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); + } + } + } +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java new file mode 100644 index 0000000..d21ef16 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java @@ -0,0 +1,43 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class AvgMonitorCountVo { + + /** + * 电站名称 + */ + private String name; + /** + * 核定下限流量 + */ + private BigDecimal flowValue; + /** + * 考核天数 + */ + private Long count; + /** + * 合格天数 + */ + private Integer passCount; + /** + * 合格率 + */ + private String passPre; + + + private List infos; + + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java new file mode 100644 index 0000000..2f08a77 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; +import org.springblade.core.mp.support.Query; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class AvgMonitorReq extends Query { + + /** + * 电站名称 + */ + private String name; + /** + * 开始时间 + */ + private String startTime; + /** + * 结束时间 + */ + private String endTime; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java new file mode 100644 index 0000000..c17ebd5 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java @@ -0,0 +1,54 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class AvgMonitorVo { + + /** + * 电站名称 + */ + private String name; + /** + * 核定下限流量 + */ + private BigDecimal flowValue; + /** + * 日均流量 + */ + private String avgFlow; + /** + * 实时流量 + */ + private String realFlow; + /** + * 现在的时间 + */ + private String dateNow; + + /** + * 经度(东经) + */ + private BigDecimal lgtd; + /** + * 纬度(北纬) + */ + private BigDecimal lttd; + /** + * 类型 1无节制电站 2流量计电站 + */ + private String stationType; + /** + * 上报率 + */ + private String passPre; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java new file mode 100644 index 0000000..028e033 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java @@ -0,0 +1,80 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class EcologicalFlowVo { + + /** + * 电站数 + */ + private Integer allStationListSize; + /** + * 无节制电站 + */ + private Integer noLimitStationListSize; + /** + * 流量计电站 + */ + private Integer flowStationListSize; + /** + * 昨日达标率 + */ + private String yesterdayFinishPer; + /** + * 昨日达标数量 + */ + private Integer yesterdayFinishCount; + /** + * 上月达标数量 + */ + private Integer monthFinishCount; + /** + * 上月达标率 + */ + private String monthFinishPer; + + /** + * 周达标率 + */ + private String weekFinishPer; + /** + * 季达标率 + */ + private String quarterFinishPer; + /** + * 半年达标率 + */ + private String halfYearFinishPer; + /** + * 年达标率 + */ + private String yearFinishPer; + /** + * 今天上报率 + */ + private String reportTodayPre; + /** + * 今天预警数 + */ + private Integer warnTodayCount; + /** + * 昨天上报率 + */ + private String reportYesTerdayPre; + /** + * 昨天预警数 + */ + private Integer warnYesTerdayCount; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java new file mode 100644 index 0000000..e03806f --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; +import org.springblade.core.mp.support.Query; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class ExamStationFlowDataReq extends Query { + + /** + * 电站名称 + */ + private String name; + /** + * 开始时间 + */ + private String startTime; + /** + * 结束时间 + */ + private String endTime; + + /** + * 1 无节制电站 2 流量计电站 + */ + private String stationType; + /** + * 是否达标 + */ + private String isPass; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java new file mode 100644 index 0000000..1e94e57 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java @@ -0,0 +1,60 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author: liangfan + * @Date: 2024-03-15 18:33 + * @Description: + */ +@Data +public class ExamStationFlowReportDayVo { + + + /** + * 电站名称 + */ + private String name; + /** + * 所属区域 + */ + private String areaName; + + /** + * 状态 + */ + private String status; + /** + * 日泄放比 + */ + private String dayOutFlowPre; + /** + * 核定流量 + */ + private BigDecimal flowValue; + /** + * 前日日均流量 + */ + private BigDecimal yesTerDayAvgFlowValue; + /** + * 瞬时流量 + */ + private BigDecimal realFlowValue; + + /** + * 今日平均流量 + */ + private BigDecimal toDayAvgFlowValue; + + /** + * 实际下泄流量 + */ + private BigDecimal realOutFlow; + /** + * 核定下泄流量 + */ + private BigDecimal outFlow; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java new file mode 100644 index 0000000..9099ad6 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java @@ -0,0 +1,33 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author: liangfan + * @Date: 2024-03-15 18:41 + * @Description: + */ +@Data +public class ExamStationFlowReportDetailVo { + + /** + * 核定流量 + */ + private BigDecimal ecologicalFlowValue; + /** + * 日均流量 + */ + private BigDecimal flowValue; + + /** + * 时间 + */ + private String tm; + + /** + * 是否合格 + */ + private String isPass; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java new file mode 100644 index 0000000..8451be3 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java @@ -0,0 +1,49 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author: liangfan + * @Date: 2024-03-15 18:33 + * @Description: + */ +@Data +public class ExamStationFlowReportVo { + + + /** + * 电站名称 + */ + private String name; + /** + * 所属区域 + */ + private String areaName; + /** + * 核定下限流量 + */ + private BigDecimal flowValue; + /** + * 考核天数 + */ + private Long count; + /** + * 合格天数 + */ + private Integer passCount; + /** + * 合格率 + */ + private String passPre; + + /** + * 是否合格 + */ + private String isPass; + + + private List infos; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java new file mode 100644 index 0000000..07d9656 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-20 17:23 + * @Description: + */ +@Data +public class FlowWarnQueryDTO { + /** + * 开始时间 + */ + private String startTime; + + + /** + * 结束时间 + */ + private String endTime; + /** + * 站点id + */ + private String objectCode; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java new file mode 100644 index 0000000..629e5bf --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java @@ -0,0 +1,45 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-19 10:00 + * @Description: + */ +@Data +public class FlowWarnVo { + /** + * 站点名称 + */ + String name; + /** + * 消息内容 + */ + String content; + /** + * 发送时间 + */ + String sendTime; + + /** + * 发送人id + */ + String receiveUserId; + /** + * 发送人姓名 + */ + String receiveUserName; + /** + * 业务对象来源(数据平台、水库等) + */ + String objectSource; + + /** + * 业务对象编码 + */ + String objectCode; + + String alarmLevel; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java new file mode 100644 index 0000000..7fd99e5 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java @@ -0,0 +1,33 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-21 19:04 + * @Description: + */ + +@Data +public class ImageReq { + /** + * 开始时间 + */ + private String startTime; + /** + * 结束时间 + */ + private String endTime; + /** + * 站点名称 + */ + private String name; + /** + * 设备编码 + */ + private String deviceCode; + /** + * 正常 异常 + */ + private String status; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java new file mode 100644 index 0000000..2d8533f --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-21 19:04 + * @Description: + */ + +@Data +public class ImageVo { + + private Long id; + + private String stcd; + + private String time; + + private String data; + + private String manualpath; + + private String name; + + private String status; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java new file mode 100644 index 0000000..10dfeaa --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-21 19:33 + * @Description: + */ +@Data +public class MissingImagesRes { + + String deviceCode; + + String name; + + String area; + + String month; + + String monthMissingPre; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java new file mode 100644 index 0000000..4e2c0b3 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java @@ -0,0 +1,46 @@ +package com.hnac.hzims.suichang.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class RealMonitorExportDTO { + + /** + * 电站名称 + */ + @ExcelProperty(value = "电站名称", index = 0) + private String name; + /** + * 核定下限流量 + */ + @ExcelProperty(value = "核定流量(m³/s)", index = 1) + private BigDecimal flowValue; + /** + * 监测流量 + */ + @ExcelProperty(value = "监测流量(m³/s)", index = 2) + private String realFlow; + + /** + * 上报个数 + */ + @ExcelProperty(value = "上报数(个)", index = 3) + private Integer reportCount; + + /** + * 时间 + */ + @ExcelProperty(value = "时间", index = 4) + private String dateNow; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java new file mode 100644 index 0000000..86e0c3c --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class RealMonitorRes { + + /** + * 电站名称 + */ + private List realMonitorVos; + /** + * 应上报条数 + */ + private Long reportCount; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java new file mode 100644 index 0000000..07bafd9 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; +import org.springblade.core.mp.support.Query; + +/** + * @Author: liangfan + * @Date: 2024-03-14 09:56 + * @Description: + */ +@Data +public class RealMonitorSingleInfoReq extends Query { + + /** + * 设备编号 + */ + private String deviceCode; + + /** + * 开始时间 + */ + private String startTime; + /** + * 结束时间 + */ + private String endTime; +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java new file mode 100644 index 0000000..80738ed --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.suichang.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +/** + * @Author: liangfan + * @Date: 2024-03-14 09:56 + * @Description: + */ +@Data +public class RealMonitorSingleInfoVo { + /** + * 实时值 + */ + @ExcelProperty(value = "流量值", index = 0) + private String value; + + /** + * 时间 + */ + @ExcelProperty(value = "监测时间", index = 1) + private String tm; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java new file mode 100644 index 0000000..71505a7 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java @@ -0,0 +1,47 @@ +package com.hnac.hzims.suichang.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class RealMonitorVo { + /** + * 设备编号 + */ + private String deviceCode; + + /** + * 电站名称 + */ + private String name; + /** + * 核定下限流量 + */ + private BigDecimal flowValue; + /** + * 监测流量 + */ + private String realFlow; + + /** + * 上报个数 + */ + private Integer reportCount; + + /** + * 时间 + */ + private String dateNow; + + private String areaName; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java new file mode 100644 index 0000000..98cc6dc --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class StationQueryReq { + + /** + * 电站名称 + */ + private String name; + + private String stationType; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java new file mode 100644 index 0000000..771346f --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Author: liangfan + * @Date: 2024-03-25 17:21 + * @Description: + */ + +@Data +public class StationTreeRes { + StationVo stationVo; + /** + * 数量 + */ + int count; + /** + * 视频点位list + */ + List child; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java new file mode 100644 index 0000000..a38aadd --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java @@ -0,0 +1,70 @@ +package com.hnac.hzims.suichang.vo; + +import com.baomidou.mybatisplus.annotation.SqlCondition; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.mp.support.QueryField; + +/** + * @Author: liangfan + * @Date: 2024-03-25 17:11 + * @Description: + */ + +@Data +public class StationTypeVo { + + @ApiModelProperty("主键ID") + private Long id; + + @ApiModelProperty("视频源配置名称") + private String name; + + @ApiModelProperty("站点ID") + private String stationId; + + @ApiModelProperty("机构ID") + private Long deptId; + + @ApiModelProperty("是否平台接入") + private Integer isHikvideo; + + @ApiModelProperty("类型") + private String type; + + @ApiModelProperty("视频类型;暂只包括清污机类型") + private String videoType; + + @ApiModelProperty("数据源地址") + private String liveSourceAddress; + + @ApiModelProperty("视频源编码") + private String pointCode; + + @ApiModelProperty("代理API网关nginx服务器ip端口") + private String videoHost; + + @ApiModelProperty("秘钥appkey") + private String appKey; + + @ApiModelProperty("秘钥appSecret") + private String appSecret; + + @ApiModelProperty("排序") + private Integer sort; + + @ApiModelProperty("站點排序") + private Integer stationSort; + + @ApiModelProperty("萤石云地址") + private String ysyUrl; + + @ApiModelProperty("视频归属类型 1代表防汛安全,2代表运行安全,3生态流量监视") + private Integer videoOwerType; + + @ApiModelProperty("拼音") + private String pingyin; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java new file mode 100644 index 0000000..053b8e6 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java @@ -0,0 +1,45 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class StationVo { + + /** + * 名称 + */ + private String name; + /** + * 设备编号 + */ + private String deviceCode; + + + /** + * 核定流量 + */ + private BigDecimal flowValue; + + /** + * 电站类型 1 无节制电站 2流量计电站 + */ + private String stationType; + + /** + * 经度(东经) + */ + private BigDecimal lgtd; + /** + * 纬度(北纬) + */ + private BigDecimal lttd; + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java new file mode 100644 index 0000000..c35d2ff --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java @@ -0,0 +1,40 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class StatisticsFlowDataDetailVo { + + /** + * 电站名称 + */ + private String name; + + /** + * 核定流量 + */ + private String flowValue; + + /** + * 考核天数 + */ + private Integer examDays; + /** + * 合格天数 + */ + private Integer examPassDays = 0; + /** + * 合格率 + */ + private String examPassDayPre = "0.00%"; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java new file mode 100644 index 0000000..3f8bc28 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; +import org.springblade.core.mp.support.Query; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class StatisticsFlowDataReq extends Query { + + /** + * 电站名称 + */ + private String name; + /** + * 开始时间 + */ + private String startTime; + /** + * 结束时间 + */ + private String endTime; + + +} diff --git a/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java new file mode 100644 index 0000000..5c22822 --- /dev/null +++ b/hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.suichang.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/31 9:37 + */ +@Data +public class StatisticsFlowDataVo { + /** + * 区域名称 + */ + private String areaName; + /** + * 考核电站个数 + */ + private Integer examCount; + /** + * 达标电站个数 + */ + private Integer passCount; + /** + * 达标率 + */ + private String passPre; + /** + * 报表数据 + */ + private List detail; + + +}