diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java new file mode 100644 index 0000000..99b03c9 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonthAlarmsResponseInfo { + /** + * 统计告警月份相关信息 + */ + @ApiModelProperty(value = "告警月份") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警站点个数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java new file mode 100644 index 0000000..99b03c9 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonthAlarmsResponseInfo { + /** + * 统计告警月份相关信息 + */ + @ApiModelProperty(value = "告警月份") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警站点个数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java index ca32c24..ae4d3b0 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java @@ -2,9 +2,11 @@ import java.util.List; import com.newfiber.termite.domain.KillRecord; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordSaveRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordUpdateRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordQueryRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; /** * 消杀记录Service接口 @@ -62,4 +64,7 @@ */ List selectList(KillRecordQueryRequest request); + + KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java new file mode 100644 index 0000000..99b03c9 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonthAlarmsResponseInfo { + /** + * 统计告警月份相关信息 + */ + @ApiModelProperty(value = "告警月份") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警站点个数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java index ca32c24..ae4d3b0 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java @@ -2,9 +2,11 @@ import java.util.List; import com.newfiber.termite.domain.KillRecord; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordSaveRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordUpdateRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordQueryRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; /** * 消杀记录Service接口 @@ -62,4 +64,7 @@ */ List selectList(KillRecordQueryRequest request); + + KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java index 42e64ca..84484cc 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java @@ -1,8 +1,12 @@ package com.newfiber.termite.service; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; import com.newfiber.termite.domain.response.statistic.SiteTotalWarnCount; @@ -22,4 +26,8 @@ ProjectStatistic projectWarnTotalCountStatistic(ProjectStatisticRequest request); + WarnMonthAlarmsResponse warnMonthAlarms(WarnMonthAlarmsRequest request); + + WarnMonitoringResponse warnMonitoring(WarnMonitoringRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java new file mode 100644 index 0000000..99b03c9 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonthAlarmsResponseInfo { + /** + * 统计告警月份相关信息 + */ + @ApiModelProperty(value = "告警月份") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警站点个数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java index ca32c24..ae4d3b0 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java @@ -2,9 +2,11 @@ import java.util.List; import com.newfiber.termite.domain.KillRecord; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordSaveRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordUpdateRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordQueryRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; /** * 消杀记录Service接口 @@ -62,4 +64,7 @@ */ List selectList(KillRecordQueryRequest request); + + KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java index 42e64ca..84484cc 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java @@ -1,8 +1,12 @@ package com.newfiber.termite.service; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; import com.newfiber.termite.domain.response.statistic.SiteTotalWarnCount; @@ -22,4 +26,8 @@ ProjectStatistic projectWarnTotalCountStatistic(ProjectStatisticRequest request); + WarnMonthAlarmsResponse warnMonthAlarms(WarnMonthAlarmsRequest request); + + WarnMonitoringResponse warnMonitoring(WarnMonitoringRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java index 4ddff31..96465be 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java @@ -7,6 +7,8 @@ import com.newfiber.common.core.web.domain.BaseEntity; import com.newfiber.common.core.exception.ServiceException; import com.newfiber.common.core.web.service.BaseServiceImpl; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import org.springframework.beans.BeanUtils; @@ -70,4 +72,9 @@ return killRecordMapper.selectByCondition(request); } + @Override + public KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request) { + return new KillRecordAnalysisResponse(); + } + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java index e657041..1b081e9 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/KillRecordController.java @@ -3,6 +3,10 @@ import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; + +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -99,4 +103,14 @@ return success(list); } + + @GetMapping("/analysis") + @ApiOperation(value = "消杀评估", position = 60) + public Result analysis(KillRecordAnalysisRequest request){ + KillRecordAnalysisResponse response = killRecordService.analysis(request); + return success(response); + + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java index 0ad8412..1ee7499 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/StatisticsController.java @@ -4,11 +4,16 @@ import com.newfiber.common.core.web.domain.Result; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; import com.newfiber.termite.domain.response.TermiteInfoResponse; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -80,5 +85,21 @@ return success(response); } + @GetMapping("/warn_month_alarms") + @ApiOperation(value = "告警月份分析", position = 50) + public Result warnMonthAlarms(WarnMonthAlarmsRequest request){ + WarnMonthAlarmsResponse response = statisticsService.warnMonthAlarms(request); + return success(response); + } + + + @GetMapping("/warn_monitoring") + @ApiOperation(value = "监测预警", position = 50) + public Result warnMonitoring(WarnMonitoringRequest request){ + WarnMonitoringResponse response = statisticsService.warnMonitoring(request); + return success(response); + } + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java index cc2871f..f4e9aa7 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/KillRecord.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 消杀记录对象 ter_kill_record * @@ -36,4 +38,25 @@ private String sn; + + @ApiModelProperty(value = "设备地址") + private String location; + + + @ApiModelProperty(value = "累计未告警天数") + private Integer count; + + + /** + * 投药时间 + */ + @ApiModelProperty(value = "投药时间") + private Date druingDatetime; + + + + + + + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java new file mode 100644 index 0000000..7e991ec --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonitoringRequest.java @@ -0,0 +1,11 @@ +package com.newfiber.termite.domain.request; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java new file mode 100644 index 0000000..09a5a88 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/WarnMonthAlarmsRequest.java @@ -0,0 +1,23 @@ +package com.newfiber.termite.domain.request; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +import static cn.hutool.core.date.DatePattern.NORM_DATE_PATTERN; + +@Data +public class WarnMonthAlarmsRequest { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java new file mode 100644 index 0000000..ce3c9da --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/killRecord/KillRecordAnalysisRequest.java @@ -0,0 +1,15 @@ +package com.newfiber.termite.domain.request.killRecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +public class KillRecordAnalysisRequest { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java index f1d8541..d78a468 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/request/statistic/ProjectStatisticRequest.java @@ -1,8 +1,11 @@ package com.newfiber.termite.domain.request.statistic; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponseInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * * @author X.K @@ -17,4 +20,11 @@ @ApiModelProperty(value = "用户编号") private Long userId; + + /** + * 累计告警统计 + */ + @ApiModelProperty(value = "累计告警统计") + private List warnListInfo; + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java new file mode 100644 index 0000000..5701989 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/KillRecordAnalysisResponse.java @@ -0,0 +1,34 @@ +package com.newfiber.termite.domain.response; + + +import com.newfiber.termite.domain.KillRecord; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class KillRecordAnalysisResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编号") + private String projectCode; + + /** + * 消杀站点记录list + */ + private List killRecords; + + /** + * 消杀率 + */ + private Double killRecordsProportion; + + /** + * 累计消杀站点 + */ + private Integer KillRecordAccrual; + +} + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java new file mode 100644 index 0000000..f5a497f --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponse.java @@ -0,0 +1,39 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonitoringResponse { + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 累计告警统计列表 + */ + @ApiModelProperty(value = "累积告警统计") + private List warnmoitoringListInfo; + + + /** + * 累计告警统计天数 + */ + @ApiModelProperty(value = "累计告警天数统计") + private List warnmoitoringDaysListInfo; + + + + + + + + + + + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java new file mode 100644 index 0000000..ab23784 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseDaysInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +@Data +public class WarnMonitoringResponseDaysInfo { + + @ApiModelProperty(value = "累计告警") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警天数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java new file mode 100644 index 0000000..c41c927 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -0,0 +1,28 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +public class WarnMonitoringResponseInfo { + + @ApiModelProperty(value = "设备编号") + private String sn; + + /** + * 当日最早告警时间 + */ + @ApiModelProperty(value = "当日最早告警时间") + private String dailyFirstWarnDatetime; + + /** + * 设备地址 + */ + @ApiModelProperty(value = "设备地址") + private String location; + + /** + * 累计告警天数 + */ + @ApiModelProperty(value = "累计告警天数") + private Integer count; + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java new file mode 100644 index 0000000..35f955b --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponse.java @@ -0,0 +1,54 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + + +@Data +public class WarnMonthAlarmsResponse { + + /** + * 项目编号 + */ + @ApiModelProperty(value = "项目编码") + private String projectCode; + + + /** + * 对应月份告警数据集合 + */ + @ApiModelProperty(value = "对应月份告警数据集合") + private List warnListInfo; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点开始月份") + private String startMonth; + + + /** + * 对应告警站点开始月份 + */ + @ApiModelProperty(value = "对应告警站点结束月份") + private String endMonth; + + + /** + * 对应月份告警站点总数 + */ + @ApiModelProperty(value = "告警站点总数") + private Integer deviceCount; + + + /** + * 对应月份告警站点总数占比 + */ + @ApiModelProperty(value = "告警站点总数占比") + private Double deviceCountProportion; + + +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java new file mode 100644 index 0000000..99b03c9 --- /dev/null +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonthAlarmsResponseInfo.java @@ -0,0 +1,19 @@ +package com.newfiber.termite.domain.response; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +public class WarnMonthAlarmsResponseInfo { + /** + * 统计告警月份相关信息 + */ + @ApiModelProperty(value = "告警月份") + private String warnMonth; + + /** + * 统计告警站点 + */ + @ApiModelProperty(value = "告警站点个数") + private Integer warnNumber; +} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java index ca32c24..ae4d3b0 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IKillRecordService.java @@ -2,9 +2,11 @@ import java.util.List; import com.newfiber.termite.domain.KillRecord; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordSaveRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordUpdateRequest; import com.newfiber.termite.domain.request.killRecord.KillRecordQueryRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; /** * 消杀记录Service接口 @@ -62,4 +64,7 @@ */ List selectList(KillRecordQueryRequest request); + + KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java index 42e64ca..84484cc 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IStatisticsService.java @@ -1,8 +1,12 @@ package com.newfiber.termite.service; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; import com.newfiber.termite.domain.response.statistic.SiteTotalWarnCount; @@ -22,4 +26,8 @@ ProjectStatistic projectWarnTotalCountStatistic(ProjectStatisticRequest request); + WarnMonthAlarmsResponse warnMonthAlarms(WarnMonthAlarmsRequest request); + + WarnMonitoringResponse warnMonitoring(WarnMonitoringRequest request); + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java index 4ddff31..96465be 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/KillRecordServiceImpl.java @@ -7,6 +7,8 @@ import com.newfiber.common.core.web.domain.BaseEntity; import com.newfiber.common.core.exception.ServiceException; import com.newfiber.common.core.web.service.BaseServiceImpl; +import com.newfiber.termite.domain.request.killRecord.KillRecordAnalysisRequest; +import com.newfiber.termite.domain.response.KillRecordAnalysisResponse; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import org.springframework.beans.BeanUtils; @@ -70,4 +72,9 @@ return killRecordMapper.selectByCondition(request); } + @Override + public KillRecordAnalysisResponse analysis(KillRecordAnalysisRequest request) { + return new KillRecordAnalysisResponse(); + } + } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/StatisticsServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/StatisticsServiceImpl.java index e667880..2032c40 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/StatisticsServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/StatisticsServiceImpl.java @@ -1,12 +1,16 @@ package com.newfiber.termite.service.impl; import com.newfiber.termite.domain.*; +import com.newfiber.termite.domain.request.WarnMonitoringRequest; +import com.newfiber.termite.domain.request.WarnMonthAlarmsRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.deviceMonitoringDataRealtime.DeviceMonitoringDataRealtimeQueryRequest; import com.newfiber.termite.domain.request.monitoringWarnRecord.MonitoringWarnRecordQueryRequest; import com.newfiber.termite.domain.request.statistic.ProjectStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnDailySeqStatisticRequest; import com.newfiber.termite.domain.request.statistic.SiteWarnTotalCountStatisticRequest; +import com.newfiber.termite.domain.response.WarnMonitoringResponse; +import com.newfiber.termite.domain.response.WarnMonthAlarmsResponse; import com.newfiber.termite.domain.response.statistic.ProjectStatistic; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.domain.response.statistic.SiteDailyWarnCount; @@ -190,4 +194,14 @@ return projectStatistic; } + @Override + public WarnMonthAlarmsResponse warnMonthAlarms(WarnMonthAlarmsRequest request) { + return new WarnMonthAlarmsResponse(); + } + + @Override + public WarnMonitoringResponse warnMonitoring(WarnMonitoringRequest request) { + return new WarnMonitoringResponse(); + } + }