From 623750abaad8f2cd7ccdf4c8bb9d3a7635e47ce5 Mon Sep 17 00:00:00 2001 From: huangzj <826100833@qq.com> Date: Thu, 25 May 2023 09:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/algorithm/constant/DataParam.java | 18 + .../enums/AlgorithmResponseEnum.java | 2 + .../pojo/param/AppProjectQueryParm.java | 3 + .../pojo/param/CsEquipmentAlarmAddParm.java | 75 +++ .../pojo/param/CsEquipmentAlarmPageParm.java | 67 +++ .../param/CsEquipmentTransferAddParm.java | 48 ++ .../pojo/param/CsEventDetailPageParm.java | 54 ++ .../pojo/param/CsStatLimitRatePageParm.java | 54 ++ .../pojo/param/ThdDataQueryParm.java | 47 ++ .../pojo/po/AppLineTopologyDiagramPO.java | 2 +- .../algorithm/pojo/po/CsEquipmentAlarmPO.java | 99 ++++ .../pojo/po/CsEquipmentTransferPO.java | 116 ++++ .../algorithm/pojo/po/CsEventDetailPO.java | 214 +++++++ .../com/njcn/algorithm/pojo/po/CsLinePO.java | 73 +++ .../algorithm/pojo/po/CsStatLimitRateDPO.java | 245 ++++++++ .../algorithm/pojo/vo/CsEquipmentAlarmVO.java | 82 +++ .../pojo/vo/CsEquipmentTransferVO.java | 68 +++ .../algorithm/pojo/vo/CsEventDetailVO.java | 152 +++++ .../algorithm/pojo/vo/CsStatLimitRateDVO.java | 179 ++++++ .../com/njcn/algorithm/pojo/vo/ThdDataVO.java | 34 ++ .../njcn/algorithm/utils/ReflectUtils.java | 133 +++++ pqs-algorithm/algorithm-boot/pom.xml | 18 + .../algorithm/AlgorithmBootApplication.java | 2 + .../CsEquipmentTransferPOController.java | 57 ++ .../alarm/CsEquipmentAlarmController.java | 65 +++ .../alarm/CsEventDetailPOController.java | 47 ++ .../alarm/CsStatLimitRateDPOController.java | 45 ++ .../dataset/StableDataController.java | 89 +++ .../algorithm/mapper/AppProjectMapper.java | 11 +- .../mapper/CsEquipmentAlarmPOMapper.java | 14 + .../mapper/CsEquipmentTransferPOMapper.java | 15 + .../mapper/CsEventDetailPOMapper.java | 19 + .../njcn/algorithm/mapper/CsLinePOMapper.java | 15 + .../mapper/CsStatLimitRateDPOMapper.java | 20 + .../mapping/CsEquipmentAlarmPOMapper.xml | 25 + .../mapping/CsEquipmentTransferPOMapper.xml | 25 + .../mapper/mapping/CsEventDetailPOMapper.xml | 72 +++ .../mapper/mapping/CsLinePOMapper.xml | 25 + .../mapping/CsStatLimitRateDPOMapper.xml | 133 +++++ .../service/CsEquipmentAlarmPOService.java | 30 + .../service/CsEquipmentTransferPOService.java | 35 ++ .../service/CsEventDetailPOService.java | 21 + .../algorithm/service/CsLinePOService.java | 20 + .../service/CsStatLimitRateDPOService.java | 21 + .../algorithm/service/StableDataService.java | 29 + .../service/impl/AppProjectServiceImpl.java | 41 +- .../impl/CsEquipmentAlarmPOServiceImpl.java | 99 ++++ .../CsEquipmentTransferPOServiceImpl.java | 58 ++ .../impl/CsEventDetailPOServiceImpl.java | 36 ++ .../service/impl/CsLinePOServiceImpl.java | 29 + .../impl/CsStatLimitRateDPOServiceImpl.java | 32 ++ .../service/impl/StableDataServiceImpl.java | 163 ++++++ .../src/main/resources/influx-starter手册.md | 172 ++++++ .../njcn/common/pojo/constant/ServerInfo.java | 8 + .../swagger/config/Knife4jSwaggerConfig.java | 6 +- .../influx/imapper/HaronicRatioMapper.java | 23 + .../influx/imapper/PowerQualityMapper.java | 22 + .../influx/pojo/po/HarmonicRatioData.java | 529 ++++++++++++++++++ .../njcn/influx/pojo/po/PowerQualityData.java | 347 ++++++++++++ .../influx/service/HaronicRatioService.java | 26 + .../influx/service/PowerQualityService.java | 25 + .../service/impl/HaronicRatioServiceImpl.java | 49 ++ .../service/impl/PowerQualityServiceImpl.java | 49 ++ .../com/njcn/system/enums/DicDataEnum.java | 14 + .../njcn/system/enums/DicDataTypeEnum.java | 4 + 65 files changed, 4326 insertions(+), 24 deletions(-) create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/constant/DataParam.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmAddParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmPageParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentTransferAddParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEventDetailPageParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsStatLimitRatePageParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/ThdDataQueryParm.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentAlarmPO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentTransferPO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEventDetailPO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsLinePO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsStatLimitRateDPO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentAlarmVO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentTransferVO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEventDetailVO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsStatLimitRateDVO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ThdDataVO.java create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/utils/ReflectUtils.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/CsEquipmentTransferPOController.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEquipmentAlarmController.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEventDetailPOController.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsStatLimitRateDPOController.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/dataset/StableDataController.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentAlarmPOMapper.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentTransferPOMapper.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEventDetailPOMapper.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsLinePOMapper.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsStatLimitRateDPOMapper.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentAlarmPOMapper.xml create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentTransferPOMapper.xml create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEventDetailPOMapper.xml create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsLinePOMapper.xml create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsStatLimitRateDPOMapper.xml create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentAlarmPOService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentTransferPOService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEventDetailPOService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsLinePOService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsStatLimitRateDPOService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/StableDataService.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentAlarmPOServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentTransferPOServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEventDetailPOServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsLinePOServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsStatLimitRateDPOServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/StableDataServiceImpl.java create mode 100644 pqs-algorithm/algorithm-boot/src/main/resources/influx-starter手册.md create mode 100644 pqs-influx/src/main/java/com/njcn/influx/imapper/HaronicRatioMapper.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/imapper/PowerQualityMapper.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/pojo/po/HarmonicRatioData.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/pojo/po/PowerQualityData.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/service/HaronicRatioService.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/service/PowerQualityService.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/service/impl/HaronicRatioServiceImpl.java create mode 100644 pqs-influx/src/main/java/com/njcn/influx/service/impl/PowerQualityServiceImpl.java diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/constant/DataParam.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/constant/DataParam.java new file mode 100644 index 000000000..b923bf1a2 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/constant/DataParam.java @@ -0,0 +1,18 @@ +package com.njcn.algorithm.constant; + + +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * 常量类 + * @author qijian + * @version 1.0.0 + * @date 2022年11月11日 09:56 + */ +public interface DataParam { + List phases = Stream.of("A","B","C","T").collect(Collectors.toList()); + List statMethods = Stream.of("avg","max","min","cp95").collect(Collectors.toList()); + +} diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java index 282daa43d..0f2cbe273 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java @@ -18,6 +18,8 @@ public enum AlgorithmResponseEnum { DICT_DATA_ERROR("A00501","暂无此字典表类型"), NDID_ERROR("A00502","存在相同的ndid"), DATA_ERROR("A00503","存在相同的数据"), + LINE_DATA_ERROR ("A00504","设备下监测点数据缺失"), + ; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/AppProjectQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/AppProjectQueryParm.java index 39eae6958..f1d434fe7 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/AppProjectQueryParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/AppProjectQueryParm.java @@ -29,6 +29,9 @@ public class AppProjectQueryParm { @ApiModelProperty(value="项目Id") private String projectId; + @ApiModelProperty(value="工程id") + private String engineeringId; + @ApiModelProperty(value="起始时间") // @NotNull(message="起始时间不能为空!") private String startTime; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmAddParm.java new file mode 100644 index 000000000..f5f2cfbff --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmAddParm.java @@ -0,0 +1,75 @@ +package com.njcn.algorithm.pojo.param; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; +import java.util.Date; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEquipmentAlarmAddParm { + + + /** + * 项目Id + */ + @ApiModelProperty(value = "项目Id") + @NotBlank(message="项目Id不能为空!") + private String projectId; + + /** + * 设备id + */ + @ApiModelProperty(value = "设备id") + @NotBlank(message="设备id不能为空!") + private String equipmentId; + + /** + * 告警信息 + */ + @ApiModelProperty(value = "告警信息") + private String alarmMsg; + + /** + * 告警级别(字典表) + */ + @ApiModelProperty(value = "告警级别") + @NotBlank(message="告警级别不能为空!") + private String alarmLevel; + + /** + * 开始时间 + */ + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message="开始时间不能为空!") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message="结束时间不能为空!") + private LocalDateTime endTime; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmPageParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmPageParm.java new file mode 100644 index 000000000..fc9176b87 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentAlarmPageParm.java @@ -0,0 +1,67 @@ +package com.njcn.algorithm.pojo.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEquipmentAlarmPageParm { + @NotNull(message="当前页不能为空!") + @Min(value = 1, message = "当前页不能为0") + @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true) + private Integer currentPage; + /**显示条数*/ + @NotNull(message="显示条数不能为空!") + @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true) + private Integer pageSize; + + /** + * 项目Id + */ + @ApiModelProperty(value = "项目Id") + private String projectId; + + /** + * 设备id + */ + @ApiModelProperty(value = "设备id") + private String equipmentId; + + + /** + * 告警级别(字典表) + */ + @ApiModelProperty(value = "告警级别") + private String alarmLevel; + + /** + * 开始时间 + */ + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime endTime; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentTransferAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentTransferAddParm.java new file mode 100644 index 000000000..063947f35 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEquipmentTransferAddParm.java @@ -0,0 +1,48 @@ +package com.njcn.algorithm.pojo.param; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEquipmentTransferAddParm { + + + + @ApiModelProperty(value = "项目Id") + private String projectId; + + + + @ApiModelProperty(value = "移交/恢复设备id集用,分割") + private String equipmentIds; + + @ApiModelProperty(value = "发起人") + private String promoter; + + + @ApiModelProperty(value = "移交人") + private String transferor; + + /** + * 事件类型(权限转移,数据恢复) + */ + @ApiModelProperty(value = "事件类型") + private String eventType; + + + @ApiModelProperty(value = "备注") + private String remark; + + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEventDetailPageParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEventDetailPageParm.java new file mode 100644 index 000000000..d519f6a81 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEventDetailPageParm.java @@ -0,0 +1,54 @@ +package com.njcn.algorithm.pojo.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEventDetailPageParm { + @NotNull(message="当前页不能为空!") + @Min(value = 1, message = "当前页不能为0") + @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true) + private Integer currentPage; + /**显示条数*/ + @NotNull(message="显示条数不能为空!") + @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true) + private Integer pageSize; + + /** + * 项目Id + */ + @ApiModelProperty(value = "项目Id") + private String projectId; + + /** + * 开始时间 + */ + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime endTime; + + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsStatLimitRatePageParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsStatLimitRatePageParm.java new file mode 100644 index 000000000..00ccbcab6 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsStatLimitRatePageParm.java @@ -0,0 +1,54 @@ +package com.njcn.algorithm.pojo.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsStatLimitRatePageParm { + @NotNull(message="当前页不能为空!") + @Min(value = 1, message = "当前页不能为0") + @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true) + private Integer currentPage; + /**显示条数*/ + @NotNull(message="显示条数不能为空!") + @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true) + private Integer pageSize; + + /** + * 项目Id + */ + @ApiModelProperty(value = "项目Id") + private String projectId; + + /** + * 开始时间 + */ + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime endTime; + + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/ThdDataQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/ThdDataQueryParm.java new file mode 100644 index 000000000..91d23da85 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/ThdDataQueryParm.java @@ -0,0 +1,47 @@ +package com.njcn.algorithm.pojo.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class ThdDataQueryParm { + + + private String devId; + + private String statisticalName; + + + /** + * 开始时间 + */ + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message="开始时间不能为空!") + private String startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message="结束时间不能为空!") + private String endTime; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/AppLineTopologyDiagramPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/AppLineTopologyDiagramPO.java index 9ec3e63e6..317df0f15 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/AppLineTopologyDiagramPO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/AppLineTopologyDiagramPO.java @@ -32,7 +32,7 @@ public class AppLineTopologyDiagramPO extends BaseEntity { /** * 监测点ID */ - @MppMultiId(value = "line_id") + @TableField(value = "line_id") private String lineId; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentAlarmPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentAlarmPO.java new file mode 100644 index 000000000..120445dfc --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentAlarmPO.java @@ -0,0 +1,99 @@ +package com.njcn.algorithm.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDateTime; +import java.util.Date; +import lombok.Data; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_equipment_alarm") +public class CsEquipmentAlarmPO extends BaseEntity { + /** + * id + */ + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "id") + private String id; + + /** + * 项目Id + */ + @TableField(value = "project_id") + private String projectId; + + /** + * 设备id + */ + @TableField(value = "equipment_id") + private String equipmentId; + + /** + * 告警信息 + */ + @TableField(value = "alarm_msg") + private String alarmMsg; + + /** + * 告警级别(字典表) + */ + @TableField(value = "alarm_level") + private String alarmLevel; + + /** + * 开始时间 + */ + @TableField(value = "start_time") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @TableField(value = "end_time") + private LocalDateTime endTime; + + /** + * 状态(0:删除 1:正常) + */ + @TableField(value = "`status`") + private String status; + + + + public static final String COL_ID = "id"; + + public static final String COL_PROJECT_ID = "project_id"; + + public static final String COL_EQUIPMENT_ID = "equipment_id"; + + public static final String COL_ALARM_MSG = "alarm_msg"; + + public static final String COL_ALARM_LEVEL = "alarm_level"; + + public static final String COL_START_TIME = "start_time"; + + public static final String COL_END_TIME = "end_time"; + + public static final String COL_STATUS = "status"; + + public static final String COL_CREATE_BY = "create_by"; + + public static final String COL_CREATE_TIME = "create_time"; + + public static final String COL_UPDATE_BY = "update_by"; + + public static final String COL_UPDATE_TIME = "update_time"; +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentTransferPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentTransferPO.java new file mode 100644 index 000000000..45a5b4059 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEquipmentTransferPO.java @@ -0,0 +1,116 @@ +package com.njcn.algorithm.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import lombok.Data; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_equipment_transfer") +public class CsEquipmentTransferPO { + /** + * id + */ + @TableId(value = "id", type = IdType.ASSIGN_UUID) + private String id; + + /** + * 项目Id + */ + @TableField(value = "project_id") + private String projectId; + + /** + * 移交/恢复设备id集用,分割 + */ + @TableField(value = "equipment_ids") + private String equipmentIds; + + /** + * 发起人 + */ + @TableField(value = "promoter") + private String promoter; + + /** + * transferor + */ + @TableField(value = "transferor") + private String transferor; + + /** + * 事件类型(权限转移,数据恢复) + */ + @TableField(value = "event_type") + private String eventType; + + /** + * 备注 + */ + @TableField(value = "remark") + private String remark; + + /** + * 状态(0:删除 1:未注册 2:注册 3:接入) + */ + @TableField(value = "`status`") + private Integer status; + + /** + * 创建用户 + */ + @TableField(value = "create_by") + private String createBy; + + /** + * 创建时间 + */ + @TableField(value = "create_time") + private Date createTime; + + /** + * 更新用户 + */ + @TableField(value = "update_by") + private String updateBy; + + /** + * 更新时间 + */ + @TableField(value = "update_time") + private Date updateTime; + + public static final String COL_ID = "id"; + + public static final String COL_PROJECT_ID = "project_id"; + + public static final String COL_EQUIPMENT_IDS = "equipment_ids"; + + public static final String COL_PROMOTER = "promoter"; + + public static final String COL_TRANSFEROR = "transferor"; + + public static final String COL_EVENT_TYPE = "event_type"; + + public static final String COL_REMARK = "remark"; + + public static final String COL_STATUS = "status"; + + public static final String COL_CREATE_BY = "create_by"; + + public static final String COL_CREATE_TIME = "create_time"; + + public static final String COL_UPDATE_BY = "update_by"; + + public static final String COL_UPDATE_TIME = "update_time"; +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEventDetailPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEventDetailPO.java new file mode 100644 index 000000000..9a6eccd44 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEventDetailPO.java @@ -0,0 +1,214 @@ +package com.njcn.algorithm.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + +/** + * Description: + * Date: 2023/5/17 10:51【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_event_detail") +public class CsEventDetailPO { + /** + * 暂时事件ID + */ + @TableId(value = "event_id", type = IdType.ASSIGN_UUID) + private String eventId; + + /** + * 监测点ID + */ + @TableField(value = "measurement_point_id") + private String measurementPointId; + + /** + * 统计指标类型 + */ + @TableField(value = "event_type") + private String eventType; + + /** + * 暂降原因(字典表PQS_Dicdata) + */ + @TableField(value = "advance_reason") + private String advanceReason; + + /** + * 暂降类型(字典表PQS_Dicdata) + */ + @TableField(value = "advance_type") + private String advanceType; + + /** + * 事件关联分析表Guid + */ + @TableField(value = "eventass_index") + private String eventassIndex; + + @TableField(value = "dq_time") + private Double dqTime; + + /** + * 特征值计算更新时间(外键PQS_Relevance的Time字段) + */ + @TableField(value = "deal_time") + private Date dealTime; + + /** + * 默认事件个数为0 + */ + @TableField(value = "num") + private Integer num; + + /** + * 波形文件是否从装置招到本地(0:未招,1:已招)默认值为0 + */ + @TableField(value = "file_flag") + private Boolean fileFlag; + + /** + * 特征值计算标志(0,未处理;1,已处理; 2,已处理,无结果;3,计算失败)默认值为0 + */ + @TableField(value = "deal_flag") + private Boolean dealFlag; + + /** + * 处理结果第一条事件发生时间(读comtra文件获取) + */ + @TableField(value = "first_time") + private Date firstTime; + + /** + * 处理结果第一条事件暂降类型(字典表PQS_Dicdata) + */ + @TableField(value = "first_type") + private String firstType; + + /** + * 处理结果第一条事件发生时间毫秒(读comtra文件获取) + */ + @TableField(value = "first_ms") + private BigDecimal firstMs; + + /** + * 暂降能量 + */ + @TableField(value = "energy") + private Double energy; + + /** + * 暂降严重度 + */ + @TableField(value = "severity") + private Double severity; + + /** + * 暂降源与监测位置关系 Upper:上游;Lower :下游;Unknown :未知;为空则是未计算 + */ + @TableField(value = "sagsource") + private String sagsource; + + /** + * 开始时间 + */ + @TableField(value = "start_time") + private Date startTime; + + /** + * 持续时间,单位秒 + */ + @TableField(value = "duration") + private BigDecimal duration; + + /** + * 特征幅值 + */ + @TableField(value = "feature_amplitude") + private BigDecimal featureAmplitude; + + /** + * 相别 + */ + @TableField(value = "phase") + private String phase; + + /** + * 事件描述 + */ + @TableField(value = "event_describe") + private String eventDescribe; + + /** + * 波形路径 + */ + @TableField(value = "wave_path") + private String wavePath; + + /** + * 暂态事件上送时间 + */ + @TableField(value = "create_time") + private Date createTime; + + @TableField(value = "transient_value") + private Double transientValue; + + public static final String COL_EVENT_ID = "event_id"; + + public static final String COL_MEASUREMENT_POINT_ID = "measurement_point_id"; + + public static final String COL_EVENT_TYPE = "event_type"; + + public static final String COL_ADVANCE_REASON = "advance_reason"; + + public static final String COL_ADVANCE_TYPE = "advance_type"; + + public static final String COL_EVENTASS_INDEX = "eventass_index"; + + public static final String COL_DQ_TIME = "dq_time"; + + public static final String COL_DEAL_TIME = "deal_time"; + + public static final String COL_NUM = "num"; + + public static final String COL_FILE_FLAG = "file_flag"; + + public static final String COL_DEAL_FLAG = "deal_flag"; + + public static final String COL_FIRST_TIME = "first_time"; + + public static final String COL_FIRST_TYPE = "first_type"; + + public static final String COL_FIRST_MS = "first_ms"; + + public static final String COL_ENERGY = "energy"; + + public static final String COL_SEVERITY = "severity"; + + public static final String COL_SAGSOURCE = "sagsource"; + + public static final String COL_START_TIME = "start_time"; + + public static final String COL_DURATION = "duration"; + + public static final String COL_FEATURE_AMPLITUDE = "feature_amplitude"; + + public static final String COL_PHASE = "phase"; + + public static final String COL_EVENT_DESCRIBE = "event_describe"; + + public static final String COL_WAVE_PATH = "wave_path"; + + public static final String COL_CREATE_TIME = "create_time"; + + public static final String COL_TRANSIENT_VALUE = "transient_value"; +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsLinePO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsLinePO.java new file mode 100644 index 000000000..d847af06a --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsLinePO.java @@ -0,0 +1,73 @@ +package com.njcn.algorithm.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.Date; + +import com.njcn.db.bo.BaseEntity; +import lombok.Data; + +/** + * + * Description: + * Date: 2023/5/18 14:01【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_line") +public class CsLinePO extends BaseEntity { + /** + * 监测点id + */ + @TableId(value = "line_id", type = IdType.ASSIGN_UUID) + private String lineId; + + /** + * 装置id + */ + @TableField(value = "dev_id") + private String devId; + + /** + * 监测点名称 + */ + @TableField(value = "`name`") + private String name; + + /** + * 字典表:安装位置(负载侧,电网侧, 输出侧) + */ + @TableField(value = "`position`") + private String position; + + /** + * 电压等级 + */ + @TableField(value = "vol_grade") + private String volGrade; + + /** + * PT变比 + */ + @TableField(value = "pt_ratio") + private BigDecimal ptRatio; + + /** + * CT变比 + */ + @TableField(value = "ct_ratio") + private BigDecimal ctRatio; + + /** + * 状态(0:删除 1:正常) + */ + @TableField(value = "`status`") + private Integer status; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsStatLimitRateDPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsStatLimitRateDPO.java new file mode 100644 index 000000000..aa575c89c --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsStatLimitRateDPO.java @@ -0,0 +1,245 @@ +package com.njcn.algorithm.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import lombok.Data; + +/** + * + * Description: + * Date: 2023/5/17 13:45【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_stat_limit_rate_d") +public class CsStatLimitRateDPO { + @TableField(value = "time_id") + private Date timeId; + + @TableField(value = "my_index") + private String myIndex; + + @TableField(value = "phasic_type") + private String phasicType; + + @TableField(value = "all_time") + private Integer allTime; + + @TableField(value = "flicker_all_time") + private Integer flickerAllTime; + + @TableField(value = "freq_dev_overtime") + private Integer freqDevOvertime; + + @TableField(value = "voltage_dev_overtime") + private Integer voltageDevOvertime; + + @TableField(value = "ubalance_overtime") + private Integer ubalanceOvertime; + + @TableField(value = "flicker_overtime") + private Integer flickerOvertime; + + @TableField(value = "uaberrance_overtime") + private Integer uaberranceOvertime; + + @TableField(value = "uharm_2_overtime") + private Integer uharm2Overtime; + + @TableField(value = "uharm_3_overtime") + private Integer uharm3Overtime; + + @TableField(value = "uharm_4_overtime") + private Integer uharm4Overtime; + + @TableField(value = "uharm_5_overtime") + private Integer uharm5Overtime; + + @TableField(value = "uharm_6_overtime") + private Integer uharm6Overtime; + + @TableField(value = "uharm_7_overtime") + private Integer uharm7Overtime; + + @TableField(value = "uharm_8_overtime") + private Integer uharm8Overtime; + + @TableField(value = "uharm_9_overtime") + private Integer uharm9Overtime; + + @TableField(value = "uharm_10_overtime") + private Integer uharm10Overtime; + + @TableField(value = "uharm_11_overtime") + private Integer uharm11Overtime; + + @TableField(value = "uharm_12_overtime") + private Integer uharm12Overtime; + + @TableField(value = "uharm_13_overtime") + private Integer uharm13Overtime; + + @TableField(value = "uharm_14_overtime") + private Integer uharm14Overtime; + + @TableField(value = "uharm_15_overtime") + private Integer uharm15Overtime; + + @TableField(value = "uharm_16_overtime") + private Integer uharm16Overtime; + + @TableField(value = "uharm_17_overtime") + private Integer uharm17Overtime; + + @TableField(value = "uharm_18_overtime") + private Integer uharm18Overtime; + + @TableField(value = "uharm_19_overtime") + private Integer uharm19Overtime; + + @TableField(value = "uharm_20_overtime") + private Integer uharm20Overtime; + + @TableField(value = "uharm_21_overtime") + private Integer uharm21Overtime; + + @TableField(value = "uharm_22_overtime") + private Integer uharm22Overtime; + + @TableField(value = "uharm_23_overtime") + private Integer uharm23Overtime; + + @TableField(value = "uharm_24_overtime") + private Integer uharm24Overtime; + + @TableField(value = "uharm_25_overtime") + private Integer uharm25Overtime; + + @TableField(value = "iharm_2_overtime") + private Integer iharm2Overtime; + + @TableField(value = "iharm_3_overtime") + private Integer iharm3Overtime; + + @TableField(value = "iharm_4_overtime") + private Integer iharm4Overtime; + + @TableField(value = "iharm_5_overtime") + private Integer iharm5Overtime; + + @TableField(value = "iharm_6_overtime") + private Integer iharm6Overtime; + + @TableField(value = "iharm_7_overtime") + private Integer iharm7Overtime; + + @TableField(value = "iharm_8_overtime") + private Integer iharm8Overtime; + + @TableField(value = "iharm_9_overtime") + private Integer iharm9Overtime; + + @TableField(value = "iharm_10_overtime") + private Integer iharm10Overtime; + + @TableField(value = "iharm_11_overtime") + private Integer iharm11Overtime; + + @TableField(value = "iharm_12_overtime") + private Integer iharm12Overtime; + + @TableField(value = "iharm_13_overtime") + private Integer iharm13Overtime; + + @TableField(value = "iharm_14_overtime") + private Integer iharm14Overtime; + + @TableField(value = "iharm_15_overtime") + private Integer iharm15Overtime; + + @TableField(value = "iharm_16_overtime") + private Integer iharm16Overtime; + + @TableField(value = "iharm_17_overtime") + private Integer iharm17Overtime; + + @TableField(value = "iharm_18_overtime") + private Integer iharm18Overtime; + + @TableField(value = "iharm_19_overtime") + private Integer iharm19Overtime; + + @TableField(value = "iharm_20_overtime") + private Integer iharm20Overtime; + + @TableField(value = "iharm_21_overtime") + private Integer iharm21Overtime; + + @TableField(value = "iharm_22_overtime") + private Integer iharm22Overtime; + + @TableField(value = "iharm_23_overtime") + private Integer iharm23Overtime; + + @TableField(value = "iharm_24_overtime") + private Integer iharm24Overtime; + + @TableField(value = "iharm_25_overtime") + private Integer iharm25Overtime; + + @TableField(value = "inuharm_1_overtime") + private Integer inuharm1Overtime; + + @TableField(value = "inuharm_2_overtime") + private Integer inuharm2Overtime; + + @TableField(value = "inuharm_3_overtime") + private Integer inuharm3Overtime; + + @TableField(value = "inuharm_4_overtime") + private Integer inuharm4Overtime; + + @TableField(value = "inuharm_5_overtime") + private Integer inuharm5Overtime; + + @TableField(value = "inuharm_6_overtime") + private Integer inuharm6Overtime; + + @TableField(value = "inuharm_7_overtime") + private Integer inuharm7Overtime; + + @TableField(value = "inuharm_8_overtime") + private Integer inuharm8Overtime; + + @TableField(value = "inuharm_9_overtime") + private Integer inuharm9Overtime; + + @TableField(value = "inuharm_10_overtime") + private Integer inuharm10Overtime; + + @TableField(value = "inuharm_11_overtime") + private Integer inuharm11Overtime; + + @TableField(value = "inuharm_12_overtime") + private Integer inuharm12Overtime; + + @TableField(value = "inuharm_13_overtime") + private Integer inuharm13Overtime; + + @TableField(value = "inuharm_14_overtime") + private Integer inuharm14Overtime; + + @TableField(value = "inuharm_15_overtime") + private Integer inuharm15Overtime; + + @TableField(value = "inuharm_16_overtime") + private Integer inuharm16Overtime; + + @TableField(value = "i_neg_overtime") + private Integer iNegOvertime; +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentAlarmVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentAlarmVO.java new file mode 100644 index 000000000..8c49e9041 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentAlarmVO.java @@ -0,0 +1,82 @@ +package com.njcn.algorithm.pojo.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import java.time.LocalDateTime; +import java.util.Date; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@TableName(value = "cs_equipment_alarm") +public class CsEquipmentAlarmVO extends BaseEntity { + /** + * id + */ + private String id; + + + /** + * 项目Id + */ + private String projectId; + /** + * 项目名称 + */ + private String projectName; + + /** + * 设备id + */ + private String equipmentId; + + /** + * 设备名称 + */ + private String equipmentName; + + /** + * 告警信息 + */ + private String alarmMsg; + + /** + * 告警级别(字典表) + */ + private String alarmLevel; + + /** + * 告警级别名称 + */ + private String alarmLevelName; + + /** + * 开始时间 + */ + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime endTime; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentTransferVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentTransferVO.java new file mode 100644 index 000000000..71f9e7539 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEquipmentTransferVO.java @@ -0,0 +1,68 @@ +package com.njcn.algorithm.pojo.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import lombok.Data; + +import java.util.Date; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEquipmentTransferVO extends BaseEntity { + /** + * id + */ + private String id; + + /** + * 项目Id + */ + private String projectId; + + private String projectName; + + /** + * 移交/恢复设备id集用,分割 + */ + private String equipmentIds; + + private String equipmentNames; + + + /** + * 发起人 + */ + private String promoter; + + /** + * transferor + */ + private String transferor; + + /** + * 事件类型(权限转移,数据恢复) + */ + private String eventType; + + /** + * 备注 + */ + private String remark; + + /** + * 状态(0:删除 1:未注册 2:注册 3:接入) + */ + private Boolean status; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEventDetailVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEventDetailVO.java new file mode 100644 index 000000000..9951c984e --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEventDetailVO.java @@ -0,0 +1,152 @@ +package com.njcn.algorithm.pojo.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Description: + * Date: 2023/5/17 10:51【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEventDetailVO { + + private String projectId; + + private String projectName; + + private String subId; + + private String subName; + /** + * 暂时事件ID + */ + private String eventId; + + /** + * 监测点ID + */ + private String measurementPointId; + + private String lineName; + + + /** + * 统计指标类型 + */ + private String eventType; + + /** + * 暂降原因(字典表PQS_Dicdata) + */ + private String advanceReason; + + /** + * 暂降类型(字典表PQS_Dicdata) + */ + private String advanceType; + + /** + * 事件关联分析表Guid + */ + private String eventassIndex; + + private Double dqTime; + + /** + * 特征值计算更新时间(外键PQS_Relevance的Time字段) + */ + private Date dealTime; + + /** + * 默认事件个数为0 + */ + private Integer num; + + /** + * 波形文件是否从装置招到本地(0:未招,1:已招)默认值为0 + */ + private String fileFlag; + + /** + * 特征值计算标志(0,未处理;1,已处理; 2,已处理,无结果;3,计算失败)默认值为0 + */ + private String dealFlag; + + /** + * 处理结果第一条事件发生时间(读comtra文件获取) + */ + private Date firstTime; + + /** + * 处理结果第一条事件暂降类型(字典表PQS_Dicdata) + */ + private String firstType; + + /** + * 处理结果第一条事件发生时间毫秒(读comtra文件获取) + */ + private BigDecimal firstMs; + + /** + * 暂降能量 + */ + private Double energy; + + /** + * 暂降严重度 + */ + private Double severity; + + /** + * 暂降源与监测位置关系 Upper:上游;Lower :下游;Unknown :未知;为空则是未计算 + */ + private String sagsource; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 持续时间,单位秒 + */ + private BigDecimal duration; + + /** + * 特征幅值 + */ + private BigDecimal featureAmplitude; + + /** + * 相别 + */ + private String phase; + + /** + * 事件描述 + */ + private String eventDescribe; + + /** + * 波形路径 + */ + private String wavePath; + + /** + * 暂态事件上送时间 + */ + private Date createTime; + + private Double transientValue; + + +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsStatLimitRateDVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsStatLimitRateDVO.java new file mode 100644 index 000000000..73154a062 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsStatLimitRateDVO.java @@ -0,0 +1,179 @@ +package com.njcn.algorithm.pojo.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.Date; + +/** + * + * Description: + * Date: 2023/5/17 13:45【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsStatLimitRateDVO { + + private String projectId; + + private String projectName; + + private String subId; + + private String subName; + + private Date timeId; + + private String myIndex; + + private String lineName; + + private String phasicType; + + private Integer allTime; + + private Integer flickerAllTime; + + private Integer freqDevOvertime; + + private Integer voltageDevOvertime; + + private Integer ubalanceOvertime; + + private Integer flickerOvertime; + + private Integer uaberranceOvertime; + + private Integer uharm2Overtime; + + private Integer uharm3Overtime; + + private Integer uharm4Overtime; + + private Integer uharm5Overtime; + + private Integer uharm6Overtime; + + private Integer uharm7Overtime; + + private Integer uharm8Overtime; + + private Integer uharm9Overtime; + + private Integer uharm10Overtime; + + private Integer uharm11Overtime; + + private Integer uharm12Overtime; + + private Integer uharm13Overtime; + + private Integer uharm14Overtime; + + private Integer uharm15Overtime; + + private Integer uharm16Overtime; + + private Integer uharm17Overtime; + + private Integer uharm18Overtime; + + private Integer uharm19Overtime; + + private Integer uharm20Overtime; + + private Integer uharm21Overtime; + + private Integer uharm22Overtime; + + private Integer uharm23Overtime; + + private Integer uharm24Overtime; + + private Integer uharm25Overtime; + + private Integer iharm2Overtime; + + private Integer iharm3Overtime; + + private Integer iharm4Overtime; + + private Integer iharm5Overtime; + + private Integer iharm6Overtime; + + private Integer iharm7Overtime; + + private Integer iharm8Overtime; + + private Integer iharm9Overtime; + + private Integer iharm10Overtime; + + private Integer iharm11Overtime; + + private Integer iharm12Overtime; + + private Integer iharm13Overtime; + + private Integer iharm14Overtime; + + private Integer iharm15Overtime; + + private Integer iharm16Overtime; + + private Integer iharm17Overtime; + + private Integer iharm18Overtime; + + private Integer iharm19Overtime; + + private Integer iharm20Overtime; + + private Integer iharm21Overtime; + + private Integer iharm22Overtime; + + private Integer iharm23Overtime; + + private Integer iharm24Overtime; + + private Integer iharm25Overtime; + + private Integer inuharm1Overtime; + + private Integer inuharm2Overtime; + + private Integer inuharm3Overtime; + + private Integer inuharm4Overtime; + + private Integer inuharm5Overtime; + + private Integer inuharm6Overtime; + + private Integer inuharm7Overtime; + + private Integer inuharm8Overtime; + + private Integer inuharm9Overtime; + + private Integer inuharm10Overtime; + + private Integer inuharm11Overtime; + + private Integer inuharm12Overtime; + + private Integer inuharm13Overtime; + + private Integer inuharm14Overtime; + + private Integer inuharm15Overtime; + + private Integer inuharm16Overtime; + + private Integer iNegOvertime; +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ThdDataVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ThdDataVO.java new file mode 100644 index 000000000..f3c258f04 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ThdDataVO.java @@ -0,0 +1,34 @@ +package com.njcn.algorithm.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +/** + * Description: + * Date: 2023/5/18 9:14【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class ThdDataVO { + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime time; + private String LineId; + private String position; + + private String Phase; + private String StatMethod; + + private String statisticalIndex; + private String statisticalName; + + + private Double statisticalData; + + +} diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/utils/ReflectUtils.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/utils/ReflectUtils.java new file mode 100644 index 000000000..5a40fb44f --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/utils/ReflectUtils.java @@ -0,0 +1,133 @@ +package com.njcn.algorithm.utils; + +import com.njcn.algorithm.pojo.vo.ThdDataVO; +import org.apache.commons.lang3.StringUtils; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +public class ReflectUtils { + /** + * 通过字段名从对象或对象的父类中得到字段的值 + * @param object 对象实例 + * @param fieldName 字段名 + * @return 字段对应的值 + * @throws Exception + */ + public static Object getValue(Object object, String fieldName) { + if (object == null) { + return null; + } + if (StringUtils.isBlank(fieldName)) { + return null; + } + Field field = null; + Class clazz = object.getClass(); + for (; clazz != Object.class; clazz = clazz.getSuperclass()) { + try { + field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + return field.get(object); + } catch (Exception e) { + //这里甚么都不要做!并且这里的异常必须这样写,不能抛出去。 + //如果这里的异常打印或者往外抛,则就不会执行clazz = clazz.getSuperclass(),最后就不会进入到父类中了 + } + } + return null; + } + + + /** + * 通过字段名从对象或对象的父类中得到字段的值(调用字典的get方法) + * @param object 对象实例 + * @param fieldName 字段名 + * @return 字段对应的值 + * @throws Exception + */ + public static Object getValueOfGet(Object object, String fieldName) throws Exception { + if (object == null) { + return null; + } + if (StringUtils.isBlank(fieldName)) { + return null; + } + Field field = null; + Class clazz = object.getClass(); + for (; clazz != Object.class; clazz = clazz.getSuperclass()) { + try { + field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + + PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); + //获得get方法 + Method getMethod = pd.getReadMethod(); + //执行get方法返回一个Object + return getMethod.invoke(object); + } catch (Exception e) { + //这里甚么都不要做!并且这里的异常必须这样写,不能抛出去。 + //如果这里的异常打印或者往外抛,则就不会执行clazz = clazz.getSuperclass(),最后就不会进入到父类中了 + } + } + + return null; + } + + /** + * 通过字段名从对象或对象的父类中得到字段的值(调用字典的get方法,可以取出复杂的对象的值) + * @param object 对象实例 + * @param fieldName 字段名 + * @return 字段对应的值 + * @throws Exception + */ + public static Object getValueOfGetIncludeObjectFeild(Object object, String fieldName) + throws Exception { + + if (object == null) { + return null; + } + if (StringUtils.isBlank(fieldName)) { + return null; + } + + if(HashMap.class.equals(object.getClass())){ + return ((Map)object).get(fieldName); + } + + Field field = null; + Class clazz = object.getClass(); + for (; clazz != Object.class; clazz = clazz.getSuperclass()) { + try { + if (fieldName.contains(".")) { + // 如:operatorUser.name、operatorUser.org.name,递归调用 + String[] splitFiledName = fieldName.split("\\."); + return getValueOfGetIncludeObjectFeild( + getValueOfGetIncludeObjectFeild(object, splitFiledName[0]), + splitFiledName[1]); + } + field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + + PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); + //获得get方法 + Method getMethod = pd.getReadMethod(); + //执行get方法返回一个Object + return getMethod.invoke(object); + } catch (Exception e) { + //这里甚么都不要做!并且这里的异常必须这样写,不能抛出去。 + //如果这里的异常打印或者往外抛,则就不会执行clazz = clazz.getSuperclass(),最后就不会进入到父类中了 + } + } + + return null; + } + + + + public static void main(String[] args) throws Exception { + ThdDataVO t = new ThdDataVO(); + t.setLineId("222"); + System.out.println(ReflectUtils.getValue(t,"LineId")); + } +} diff --git a/pqs-algorithm/algorithm-boot/pom.xml b/pqs-algorithm/algorithm-boot/pom.xml index 38a9e7b2d..dc51cc9b1 100644 --- a/pqs-algorithm/algorithm-boot/pom.xml +++ b/pqs-algorithm/algorithm-boot/pom.xml @@ -68,6 +68,24 @@ 1.0.0 compile + + com.njcn + pqs-influx + 0.0.1-SNAPSHOT + compile + + + + com.squareup.okhttp3 + okhttp + 4.9.0 + + + com.squareup.okhttp3 + logging-interceptor + 4.9.0 + + algorithm-boot diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/AlgorithmBootApplication.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/AlgorithmBootApplication.java index fa54819fd..51c715bca 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/AlgorithmBootApplication.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/AlgorithmBootApplication.java @@ -9,10 +9,12 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.DependsOn; @Slf4j @MapperScan("com.njcn.**.mapper") @EnableFeignClients(basePackages = "com.njcn") +@DependsOn("proxyMapperRegister") @SpringBootApplication(scanBasePackages = "com.njcn") public class AlgorithmBootApplication { diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/CsEquipmentTransferPOController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/CsEquipmentTransferPOController.java new file mode 100644 index 000000000..07af5d92f --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/CsEquipmentTransferPOController.java @@ -0,0 +1,57 @@ +package com.njcn.algorithm.controller.Equipment; +import com.njcn.algorithm.pojo.param.CsEquipmentDeliveryAddParm; +import com.njcn.algorithm.pojo.param.CsEquipmentTransferAddParm; +import com.njcn.algorithm.pojo.po.CsEquipmentTransferPO; +import com.njcn.algorithm.service.CsEquipmentTransferPOService; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** +* (cs_equipment_transfer)表控制层 +* +* @author xxxxx +*/ +@Slf4j +@RestController +@RequestMapping("/EquipmentTransfer") +@Api(tags = " 设备转移/恢复") +@AllArgsConstructor +public class CsEquipmentTransferPOController extends BaseController { + + private final CsEquipmentTransferPOService csEquipmentTransferPOService; + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/addEquipmentTransfer") + @ApiOperation("新增设备转移申请") + @ApiImplicitParam(name = "csEquipmentTransferAddParm", value = "新增项目参数", required = true) + public HttpResult add(@RequestBody @Validated CsEquipmentTransferAddParm csEquipmentTransferAddParm){ + String methodDescribe = getMethodDescribe("add"); + + Boolean flag = csEquipmentTransferPOService.add (csEquipmentTransferAddParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe); + } + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/passEquipmentTransfer") + @ApiOperation("设备转移申请通过") + @ApiImplicitParam(name = "ids", value = "设备转移申请id", required = true) + public HttpResult pass(@RequestParam("ids") List ids){ + String methodDescribe = getMethodDescribe("add"); + + Boolean flag = csEquipmentTransferPOService.pass (ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe); + } + +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEquipmentAlarmController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEquipmentAlarmController.java new file mode 100644 index 000000000..fc9120e00 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEquipmentAlarmController.java @@ -0,0 +1,65 @@ +package com.njcn.algorithm.controller.alarm; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsDevModelAddParm; +import com.njcn.algorithm.pojo.param.CsDevModelQueryParm; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmAddParm; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmPageParm; +import com.njcn.algorithm.pojo.po.CsDevModelPO; +import com.njcn.algorithm.pojo.vo.CsDevModelPageVO; +import com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO; +import com.njcn.algorithm.service.CsEquipmentAlarmPOService; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * Description: + * Date: 2023/5/16 16:33【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Slf4j +@RestController +@RequestMapping("/EquipmentAlarm") +@Api(tags = "设备警告") +@AllArgsConstructor +public class CsEquipmentAlarmController extends BaseController { + + private final CsEquipmentAlarmPOService csEquipmentAlarmPOService; + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/add") + @ApiOperation("新增设备警告") + @ApiImplicitParam(name = "csEquipmentAlarmAddParm", value = "新增设备警告参数", required = true) + public HttpResult add(@RequestBody @Validated CsEquipmentAlarmAddParm csEquipmentAlarmAddParm){ + String methodDescribe = getMethodDescribe("add"); + CsEquipmentAlarmVO csEquipmentAlarmVO = csEquipmentAlarmPOService.add (csEquipmentAlarmAddParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEquipmentAlarmVO, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryPage") + @ApiOperation("设备警告分页查询") + @ApiImplicitParam(name = "csEquipmentAlarmPageParm", value = "设备警告查询参数", required = true) + public HttpResult> queryPage(@RequestBody @Validated CsEquipmentAlarmPageParm csEquipmentAlarmPageParm ){ + String methodDescribe = getMethodDescribe("queryPage"); + + IPage page = csEquipmentAlarmPOService.queryPage (csEquipmentAlarmPageParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); + } + +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEventDetailPOController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEventDetailPOController.java new file mode 100644 index 000000000..60bb67596 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsEventDetailPOController.java @@ -0,0 +1,47 @@ +package com.njcn.algorithm.controller.alarm; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmPageParm; +import com.njcn.algorithm.pojo.param.CsEventDetailPageParm; +import com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO; +import com.njcn.algorithm.pojo.vo.CsEventDetailVO; +import com.njcn.algorithm.service.CsEventDetailPOService; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** +* (cs_event_detail)表控制层 +* +* @author xxxxx +*/ +@Slf4j +@RestController +@RequestMapping("/EventAlarm") +@Api(tags = "暂态警告") +@AllArgsConstructor +public class CsEventDetailPOController extends BaseController { + + private final CsEventDetailPOService csEventDetailPOService; + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryPage") + @ApiOperation("暂态警告分页查询") + @ApiImplicitParam(name = "csEventDetailPageParm", value = "暂态警告查询参数", required = true) + public HttpResult> queryPage(@RequestBody @Validated CsEventDetailPageParm csEventDetailPageParm ){ + String methodDescribe = getMethodDescribe("queryPage"); + + IPage page = csEventDetailPOService.queryPage (csEventDetailPageParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsStatLimitRateDPOController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsStatLimitRateDPOController.java new file mode 100644 index 000000000..60310ce00 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/alarm/CsStatLimitRateDPOController.java @@ -0,0 +1,45 @@ +package com.njcn.algorithm.controller.alarm; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsStatLimitRatePageParm; +import com.njcn.algorithm.pojo.vo.CsStatLimitRateDVO; +import com.njcn.algorithm.service.CsStatLimitRateDPOService; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + + +/** +* (cs_stat_limit_rate_d)表控制层 +* +* @author xxxxx +*/ +@Slf4j +@RestController +@RequestMapping("/LimitRateAlarm") +@Api(tags = "稳态警告") +@AllArgsConstructor +public class CsStatLimitRateDPOController extends BaseController { + + + private final CsStatLimitRateDPOService csStatLimitRateDPOService; + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryPage") + @ApiOperation("设备模板分页查询") + @ApiImplicitParam(name = "csStatLimitRatePageParm", value = "设备警告查询参数", required = true) + public HttpResult> queryPage(@RequestBody @Validated CsStatLimitRatePageParm csStatLimitRatePageParm ){ + String methodDescribe = getMethodDescribe("queryPage"); + + IPage page = csStatLimitRateDPOService.queryPage (csStatLimitRatePageParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/dataset/StableDataController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/dataset/StableDataController.java new file mode 100644 index 000000000..44bf62d62 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/dataset/StableDataController.java @@ -0,0 +1,89 @@ +package com.njcn.algorithm.controller.dataset; + +import com.njcn.algorithm.pojo.param.CsDataEffectiveQueryParm; +import com.njcn.algorithm.pojo.param.ThdDataQueryParm; +import com.njcn.algorithm.pojo.vo.AppBaseInformationVO; +import com.njcn.algorithm.pojo.vo.CsDataEffectiveVO; +import com.njcn.algorithm.pojo.vo.ThdDataVO; +import com.njcn.algorithm.service.StableDataService; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Description: + * Date: 2023/5/18 8:51【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Slf4j +@RestController +@RequestMapping("/stable") +@Api(tags = "稳态数据展示") +@AllArgsConstructor +public class StableDataController extends BaseController { + + private final StableDataService stableDataService; + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryFisrtThdData") + @ApiOperation("查询谐波畸变率实时数据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "devId", value = "设备id", required = true), + @ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true) + }) + public HttpResult> queryFisrtThdData(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) { + String methodDescribe = getMethodDescribe("queryThdData"); + List list = stableDataService.queryThdData(devId, statisticalName); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryThdDataByTime") + @ApiOperation("查询时间段内谐波畸变率") + @ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true) + public HttpResult> queryThdDataByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) { + String methodDescribe = getMethodDescribe("queryThdDataByTime"); + List list = stableDataService.queryThdDataByTime(thdDataQueryParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryFisrtThdContent") + @ApiOperation("查询谐波含量实时数据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "devId", value = "设备id", required = true), + @ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true) + }) + public HttpResult> queryFisrtThdContent(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) { + String methodDescribe = getMethodDescribe("queryFisrtThdContent"); + List list = stableDataService.queryFisrtThdContent(devId, statisticalName); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryThdContentByTime") + @ApiOperation("查询时间段内谐波畸变率") + @ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true) + public HttpResult> queryThdContentByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) { + String methodDescribe = getMethodDescribe("queryThdContentByTime"); + List list = stableDataService.queryThdContentByTime(thdDataQueryParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + + } +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/AppProjectMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/AppProjectMapper.java index be54c6397..76eaa5529 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/AppProjectMapper.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/AppProjectMapper.java @@ -29,19 +29,25 @@ public interface AppProjectMapper extends MppBaseMapper { // "\tb.file_path topologyDiagramPath,\n" + // "\ta.lng lng,\n" + // "\ta.lat lat,\n" + - "\ta.`status` STATUS,\n" + + "\tc.name engineering_name,\n" + + "\ta.description description,\n"+ + "\ta.engineering_id engineering_id,\n" + + "\ta.`status` STATUS,\n" + "\ta.create_by create_by,\n" + "\ta.create_time create_time,\n" + "\ta.update_by update_by,\n" + "\ta.update_time update_time\n" + "FROM\n" + "\tcs_project a\n" + - "LEFT JOIN cs_topology_diagram b ON a.id = b.project_id\n" + + "LEFT JOIN cs_engineering c on a.engineering_id=c.id \n" + "WHERE\n" + "\t1 = 1 AND a.status=\"1\"\n" , "", "AND a.id = #{temp.projectId} "+ "", + "", + "AND a.engineering_id = #{temp.engineeringId} "+ + "", "", "AND a.create_time <= #{temp.endTime}" + "", @@ -51,6 +57,7 @@ public interface AppProjectMapper extends MppBaseMapper { "", "AND a.`name` like concat('%',#{temp.searchValue},'%')", "", + " order by a.create_time desc", ""} ) Page getPageVo(Page returnpage, @Param("temp")AppProjectQueryParm appProjectQueryParm); diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentAlarmPOMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentAlarmPOMapper.java new file mode 100644 index 000000000..a8421d5f0 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentAlarmPOMapper.java @@ -0,0 +1,14 @@ +package com.njcn.algorithm.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.algorithm.pojo.po.CsEquipmentAlarmPO; + +/** + * Description: + * Date: 2023/5/16 16:25【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEquipmentAlarmPOMapper extends BaseMapper { +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentTransferPOMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentTransferPOMapper.java new file mode 100644 index 000000000..3fe9fa6ca --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEquipmentTransferPOMapper.java @@ -0,0 +1,15 @@ +package com.njcn.algorithm.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.algorithm.pojo.po.CsEquipmentTransferPO; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEquipmentTransferPOMapper extends BaseMapper { +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEventDetailPOMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEventDetailPOMapper.java new file mode 100644 index 000000000..316d36a4a --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEventDetailPOMapper.java @@ -0,0 +1,19 @@ +package com.njcn.algorithm.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.algorithm.pojo.param.CsEventDetailPageParm; +import com.njcn.algorithm.pojo.po.CsEventDetailPO; +import com.njcn.algorithm.pojo.vo.CsEventDetailVO; +import org.apache.ibatis.annotations.Param; + +/** + * Description: + * Date: 2023/5/17 10:51【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEventDetailPOMapper extends BaseMapper { + Page queryPage(Page returnpage,@Param("csEventDetailPageParm") CsEventDetailPageParm csEventDetailPageParm); +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsLinePOMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsLinePOMapper.java new file mode 100644 index 000000000..da6b06b18 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsLinePOMapper.java @@ -0,0 +1,15 @@ +package com.njcn.algorithm.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.algorithm.pojo.po.CsLinePO; + +/** + * + * Description: + * Date: 2023/5/18 14:01【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsLinePOMapper extends BaseMapper { +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsStatLimitRateDPOMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsStatLimitRateDPOMapper.java new file mode 100644 index 000000000..973ec2451 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsStatLimitRateDPOMapper.java @@ -0,0 +1,20 @@ +package com.njcn.algorithm.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.algorithm.pojo.param.CsStatLimitRatePageParm; +import com.njcn.algorithm.pojo.po.CsStatLimitRateDPO; +import com.njcn.algorithm.pojo.vo.CsStatLimitRateDVO; +import org.apache.ibatis.annotations.Param; + +/** + * + * Description: + * Date: 2023/5/17 13:45【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsStatLimitRateDPOMapper extends BaseMapper { + Page queryPage(Page returnpage,@Param("csStatLimitRatePageParm") CsStatLimitRatePageParm csStatLimitRatePageParm); +} \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentAlarmPOMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentAlarmPOMapper.xml new file mode 100644 index 000000000..049cf3135 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentAlarmPOMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + id, project_id, equipment_id, alarm_msg, alarm_level, start_time, end_time, `status`, + create_by, create_time, update_by, update_time + + \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentTransferPOMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentTransferPOMapper.xml new file mode 100644 index 000000000..a191ee38b --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentTransferPOMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + id, project_id, equipment_ids, promoter, transferor, event_type, remark, `status`, + create_by, create_time, update_by, update_time + + \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEventDetailPOMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEventDetailPOMapper.xml new file mode 100644 index 000000000..4be652cac --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEventDetailPOMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + event_id, measurement_point_id, event_type, advance_reason, advance_type, eventass_index, + dq_time, deal_time, num, file_flag, deal_flag, first_time, first_type, first_ms, + energy, severity, sagsource, start_time, duration, feature_amplitude, phase, event_describe, + wave_path, create_time, transient_value + + + + \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsLinePOMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsLinePOMapper.xml new file mode 100644 index 000000000..eb3bfa832 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsLinePOMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + line_id, dev_id, `name`, `position`, vol_grade, pt_ratio, ct_ratio, `status`, create_by, + create_time, update_by, update_time + + \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsStatLimitRateDPOMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsStatLimitRateDPOMapper.xml new file mode 100644 index 000000000..e8ea4b204 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsStatLimitRateDPOMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + time_id, my_index, phasic_type, all_time, flicker_all_time, freq_dev_overtime, voltage_dev_overtime, + ubalance_overtime, flicker_overtime, uaberrance_overtime, uharm_2_overtime, uharm_3_overtime, + uharm_4_overtime, uharm_5_overtime, uharm_6_overtime, uharm_7_overtime, uharm_8_overtime, + uharm_9_overtime, uharm_10_overtime, uharm_11_overtime, uharm_12_overtime, uharm_13_overtime, + uharm_14_overtime, uharm_15_overtime, uharm_16_overtime, uharm_17_overtime, uharm_18_overtime, + uharm_19_overtime, uharm_20_overtime, uharm_21_overtime, uharm_22_overtime, uharm_23_overtime, + uharm_24_overtime, uharm_25_overtime, iharm_2_overtime, iharm_3_overtime, iharm_4_overtime, + iharm_5_overtime, iharm_6_overtime, iharm_7_overtime, iharm_8_overtime, iharm_9_overtime, + iharm_10_overtime, iharm_11_overtime, iharm_12_overtime, iharm_13_overtime, iharm_14_overtime, + iharm_15_overtime, iharm_16_overtime, iharm_17_overtime, iharm_18_overtime, iharm_19_overtime, + iharm_20_overtime, iharm_21_overtime, iharm_22_overtime, iharm_23_overtime, iharm_24_overtime, + iharm_25_overtime, inuharm_1_overtime, inuharm_2_overtime, inuharm_3_overtime, inuharm_4_overtime, + inuharm_5_overtime, inuharm_6_overtime, inuharm_7_overtime, inuharm_8_overtime, inuharm_9_overtime, + inuharm_10_overtime, inuharm_11_overtime, inuharm_12_overtime, inuharm_13_overtime, + inuharm_14_overtime, inuharm_15_overtime, inuharm_16_overtime, i_neg_overtime + + + + \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentAlarmPOService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentAlarmPOService.java new file mode 100644 index 000000000..7da482436 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentAlarmPOService.java @@ -0,0 +1,30 @@ +package com.njcn.algorithm.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmAddParm; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmPageParm; +import com.njcn.algorithm.pojo.po.CsEquipmentAlarmPO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO; + +/** + * + * Description: + * Date: 2023/5/16 16:24【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEquipmentAlarmPOService extends IService{ + + /** + * @Description: 新增设备警告 + * @Param: + * @return: com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO + * @Author: clam + * @Date: 2023/5/17 + */ + CsEquipmentAlarmVO add(CsEquipmentAlarmAddParm csEquipmentAlarmAddParm); + + IPage queryPage(CsEquipmentAlarmPageParm csEquipmentAlarmPageParm); +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentTransferPOService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentTransferPOService.java new file mode 100644 index 000000000..87f525340 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEquipmentTransferPOService.java @@ -0,0 +1,35 @@ +package com.njcn.algorithm.service; + +import com.njcn.algorithm.pojo.param.CsEquipmentTransferAddParm; +import com.njcn.algorithm.pojo.po.CsEquipmentTransferPO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEquipmentTransferPOService extends IService{ + + /** + * @Description: add + * @Param: + * @return: java.lang.Boolean + * @Author: clam + * @Date: 2023/5/17 + */ + Boolean add(CsEquipmentTransferAddParm csEquipmentTransferAddParm); + /** + * @Description: 设备转移申请通过 + * @Param: + * @return: java.lang.Boolean + * @Author: clam + * @Date: 2023/5/17 + */ + Boolean pass(List ids); + } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEventDetailPOService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEventDetailPOService.java new file mode 100644 index 000000000..0a45b6501 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEventDetailPOService.java @@ -0,0 +1,21 @@ +package com.njcn.algorithm.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsEventDetailPageParm; +import com.njcn.algorithm.pojo.po.CsEventDetailPO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.algorithm.pojo.vo.CsEventDetailVO; + +/** + * + * Description: + * Date: 2023/5/17 10:49【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsEventDetailPOService extends IService{ + + + IPage queryPage(CsEventDetailPageParm csEventDetailPageParm); + } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsLinePOService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsLinePOService.java new file mode 100644 index 000000000..754bb5194 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsLinePOService.java @@ -0,0 +1,20 @@ +package com.njcn.algorithm.service; + +import com.njcn.algorithm.pojo.po.CsLinePO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * + * Description: + * Date: 2023/5/18 14:01【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsLinePOService extends IService{ + + + List queryByDevId(String devId); + } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsStatLimitRateDPOService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsStatLimitRateDPOService.java new file mode 100644 index 000000000..a3a66067d --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsStatLimitRateDPOService.java @@ -0,0 +1,21 @@ +package com.njcn.algorithm.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.njcn.algorithm.pojo.param.CsStatLimitRatePageParm; +import com.njcn.algorithm.pojo.po.CsStatLimitRateDPO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.algorithm.pojo.vo.CsStatLimitRateDVO; + +/** + * + * Description: + * Date: 2023/5/17 13:45【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface CsStatLimitRateDPOService extends IService{ + + + IPage queryPage(CsStatLimitRatePageParm csStatLimitRatePageParm); + } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/StableDataService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/StableDataService.java new file mode 100644 index 000000000..b354fb221 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/StableDataService.java @@ -0,0 +1,29 @@ +package com.njcn.algorithm.service; + +import com.njcn.algorithm.pojo.param.ThdDataQueryParm; +import com.njcn.algorithm.pojo.vo.ThdDataVO; + +import java.util.List; + +/** + * Description: + * Date: 2023/5/18 14:39【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface StableDataService { + List queryThdData(String devId, String statisticalName); + /** + * @Description: 查询时间段内谐波畸变率 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2023/5/23 + */ + List queryThdDataByTime(ThdDataQueryParm thdDataQueryParm); + + List queryFisrtThdContent(String devId, String statisticalName); + + List queryThdContentByTime(ThdDataQueryParm thdDataQueryParm); +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/AppProjectServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/AppProjectServiceImpl.java index c313d1201..af00c28b5 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/AppProjectServiceImpl.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/AppProjectServiceImpl.java @@ -104,26 +104,27 @@ public class AppProjectServiceImpl extends MppServiceImpl returnpage = new Page<> (appProjectQueryParm.getCurrentPage ( ), appProjectQueryParm.getPageSize ( )); returnpage = appProjectMapper.getPageVo (returnpage, appProjectQueryParm); - Page appProjectPOPage = new Page<> (appProjectQueryParm.getCurrentPage ( ), appProjectQueryParm.getPageSize ( )); - QueryWrapper queryWrapper = new QueryWrapper ( ); - queryWrapper.eq ("status", "1"). - eq (StringUtils.isNotBlank (appProjectQueryParm.getProjectId ( )), "id", appProjectQueryParm.getProjectId ( )). - le (StringUtils.isNotBlank (appProjectQueryParm.getEndTime ( )), "create_time", appProjectQueryParm.getEndTime ( )). - ge (StringUtils.isNotBlank (appProjectQueryParm.getStartTime ( )), "create_time", appProjectQueryParm.getStartTime ( )). - like (StringUtils.isNotBlank (appProjectQueryParm.getSearchValue ( )), "name", appProjectQueryParm.getSearchValue ( )); - Page appProjectPOPage1 = appProjectMapper.selectPage (appProjectPOPage, queryWrapper); - List collect = appProjectPOPage1.getRecords ( ).stream ( ).map (temp -> { - AppProjectVO vo = new AppProjectVO ( ); - BeanUtils.copyProperties (temp, vo); - AppTopologyDiagramQueryParm appTopologyDiagramQueryParm = new AppTopologyDiagramQueryParm ( ); - appTopologyDiagramQueryParm.setProjectId (vo.getId ( )); - List appTopologyDiagramVOList = appTopologyDiagramService.queryAppTopologyDiagram (appTopologyDiagramQueryParm); - List collect1 = appTopologyDiagramVOList.stream ( ).map (AppTopologyDiagramVO::getFilePath).collect (Collectors.toList ( )); - vo.setTopologyDiagramPaths (collect1); - return vo; - } - - ).collect (Collectors.toList ( )); +// Page appProjectPOPage = new Page<> (appProjectQueryParm.getCurrentPage ( ), appProjectQueryParm.getPageSize ( )); +// QueryWrapper queryWrapper = new QueryWrapper ( ); +// queryWrapper.eq ("status", "1"). +// eq (StringUtils.isNotBlank (appProjectQueryParm.getProjectId ( )), "id", appProjectQueryParm.getProjectId ( )). +// eq (StringUtils.isNotBlank (appProjectQueryParm.getEngineeringId ( )), "engineering_id", appProjectQueryParm.getEngineeringId ( )). +// le (StringUtils.isNotBlank (appProjectQueryParm.getEndTime ( )), "create_time", appProjectQueryParm.getEndTime ( )). +// ge (StringUtils.isNotBlank (appProjectQueryParm.getStartTime ( )), "create_time", appProjectQueryParm.getStartTime ( )). +// like (StringUtils.isNotBlank (appProjectQueryParm.getSearchValue ( )), "name", appProjectQueryParm.getSearchValue ( )); +// Page appProjectPOPage1 = appProjectMapper.selectPage (appProjectPOPage, queryWrapper); +// List collect = appProjectPOPage1.getRecords ( ).stream ( ).map (temp -> { +// AppProjectVO vo = new AppProjectVO ( ); +// BeanUtils.copyProperties (temp, vo); +// AppTopologyDiagramQueryParm appTopologyDiagramQueryParm = new AppTopologyDiagramQueryParm ( ); +// appTopologyDiagramQueryParm.setProjectId (vo.getId ( )); +// List appTopologyDiagramVOList = appTopologyDiagramService.queryAppTopologyDiagram (appTopologyDiagramQueryParm); +// List collect1 = appTopologyDiagramVOList.stream ( ).map (AppTopologyDiagramVO::getFilePath).collect (Collectors.toList ( )); +// vo.setTopologyDiagramPaths (collect1); +// return vo; +// } +// +// ).collect (Collectors.toList ( )); return returnpage; } } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentAlarmPOServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentAlarmPOServiceImpl.java new file mode 100644 index 000000000..5d1aa0da9 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentAlarmPOServiceImpl.java @@ -0,0 +1,99 @@ +package com.njcn.algorithm.service.impl; + +import com.alibaba.cloud.commons.lang.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.algorithm.mapper.AppProjectMapper; +import com.njcn.algorithm.mapper.CsEquipmentDeliveryMapper; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmAddParm; +import com.njcn.algorithm.pojo.param.CsEquipmentAlarmPageParm; +import com.njcn.algorithm.pojo.po.AppProjectPO; +import com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO; +import com.njcn.algorithm.pojo.vo.CsEdDataVO; +import com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.pojo.po.DictData; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.algorithm.mapper.CsEquipmentAlarmPOMapper; +import com.njcn.algorithm.pojo.po.CsEquipmentAlarmPO; +import com.njcn.algorithm.service.CsEquipmentAlarmPOService; +import org.springframework.transaction.annotation.Transactional; + +/** + * + * Description: + * Date: 2023/5/16 16:24【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class CsEquipmentAlarmPOServiceImpl extends ServiceImpl implements CsEquipmentAlarmPOService{ + + private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper; + private final AppProjectMapper appProjectMapper; + private final DicDataFeignClient dicDataFeignClient; + + @Override + @Transactional(rollbackFor = {Exception.class}) + public CsEquipmentAlarmVO add(CsEquipmentAlarmAddParm csEquipmentAlarmAddParm) { + CsEquipmentAlarmPO csEquipmentAlarmPO = new CsEquipmentAlarmPO(); + BeanUtils.copyProperties(csEquipmentAlarmAddParm,csEquipmentAlarmPO); + csEquipmentAlarmPO.setStatus("1"); + this.save(csEquipmentAlarmPO); + + CsEquipmentAlarmVO csEquipmentAlarmVO = new CsEquipmentAlarmVO(); + this.poToVO(csEquipmentAlarmPO, csEquipmentAlarmVO); + + log.info("新增设备警告:{}", csEquipmentAlarmVO.toString()); + return csEquipmentAlarmVO; + + + + } + + @Override + public IPage queryPage(CsEquipmentAlarmPageParm csEquipmentAlarmPageParm) { + Page returnpage = new Page<> (csEquipmentAlarmPageParm.getCurrentPage ( ), csEquipmentAlarmPageParm.getPageSize ( )); + Page queryPage = new Page<> (csEquipmentAlarmPageParm.getCurrentPage ( ), csEquipmentAlarmPageParm.getPageSize ( )); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("status", "1"); + queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getProjectId()),CsEquipmentAlarmPO.COL_PROJECT_ID,csEquipmentAlarmPageParm.getProjectId()); + queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getEquipmentId()),CsEquipmentAlarmPO.COL_EQUIPMENT_ID,csEquipmentAlarmPageParm.getEquipmentId()); + queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getAlarmLevel()),CsEquipmentAlarmPO.COL_ALARM_LEVEL,csEquipmentAlarmPageParm.getAlarmLevel()); + queryWrapper.ge(Objects.nonNull(csEquipmentAlarmPageParm.getStartTime()),CsEquipmentAlarmPO.COL_START_TIME,csEquipmentAlarmPageParm.getStartTime()); + queryWrapper.le(Objects.nonNull(csEquipmentAlarmPageParm.getStartTime()),CsEquipmentAlarmPO.COL_START_TIME,csEquipmentAlarmPageParm.getEndTime()); + + queryWrapper.orderByDesc("create_time"); + Page csEquipmentAlarmPOPage = this.getBaseMapper().selectPage(queryPage, queryWrapper); + List collect = csEquipmentAlarmPOPage.getRecords().stream().map(temp -> { + CsEquipmentAlarmVO csEquipmentAlarmVO = new CsEquipmentAlarmVO(); + this.poToVO(temp, csEquipmentAlarmVO); + return csEquipmentAlarmVO; + }).collect(Collectors.toList()); + returnpage.setRecords(collect); + return returnpage; + } + + private void poToVO(CsEquipmentAlarmPO csEquipmentAlarmPO, CsEquipmentAlarmVO csEquipmentAlarmVO) { + BeanUtils.copyProperties(csEquipmentAlarmPO,csEquipmentAlarmVO); + CsEquipmentDeliveryPO csEquipmentDeliveryPO = csEquipmentDeliveryMapper.selectById(csEquipmentAlarmPO.getEquipmentId()); + csEquipmentAlarmVO.setEquipmentName(csEquipmentDeliveryPO.getName()); + DictData data = dicDataFeignClient.getDicDataById(csEquipmentAlarmPO.getAlarmLevel()).getData(); + csEquipmentAlarmVO.setAlarmLevelName(data.getName()); + AppProjectPO appProjectPO = appProjectMapper.selectById(csEquipmentAlarmPO.getProjectId()); + csEquipmentAlarmVO.setProjectName(appProjectPO.getName()); + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentTransferPOServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentTransferPOServiceImpl.java new file mode 100644 index 000000000..2bb18b820 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentTransferPOServiceImpl.java @@ -0,0 +1,58 @@ +package com.njcn.algorithm.service.impl; + +import com.njcn.algorithm.pojo.param.CsEquipmentTransferAddParm; +import com.njcn.common.pojo.enums.common.DataStateEnum; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.algorithm.mapper.CsEquipmentTransferPOMapper; +import com.njcn.algorithm.pojo.po.CsEquipmentTransferPO; +import com.njcn.algorithm.service.CsEquipmentTransferPOService; +import org.springframework.transaction.annotation.Transactional; + +/** + * + * Description: + * Date: 2023/5/17 15:40【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class CsEquipmentTransferPOServiceImpl extends ServiceImpl implements CsEquipmentTransferPOService{ + + @Override + @Transactional(rollbackFor = {Exception.class}) + public Boolean add(CsEquipmentTransferAddParm csEquipmentTransferAddParm) { + CsEquipmentTransferPO csEquipmentTransferPO = new CsEquipmentTransferPO(); + BeanUtils.copyProperties(csEquipmentTransferAddParm, csEquipmentTransferPO); + csEquipmentTransferPO.setStatus(DataStateEnum.ENABLE.getCode()); + boolean save = this.save(csEquipmentTransferPO); + log.info("插入成功"); + + return save; + } + + @Override + @Transactional(rollbackFor = {Exception.class}) + public Boolean pass(List ids) { + + ids.forEach(id -> { + CsEquipmentTransferPO csEquipmentTransferPO = this.getById(id); + String equipmentIds = csEquipmentTransferPO.getEquipmentIds(); + String[] split = equipmentIds.split(","); + + this.updateById(csEquipmentTransferPO); + log.info("更新成功"); + + }); + + return null; + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEventDetailPOServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEventDetailPOServiceImpl.java new file mode 100644 index 000000000..01f107476 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEventDetailPOServiceImpl.java @@ -0,0 +1,36 @@ +package com.njcn.algorithm.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.algorithm.pojo.param.CsEventDetailPageParm; +import com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO; +import com.njcn.algorithm.pojo.vo.CsEventDetailVO; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.algorithm.mapper.CsEventDetailPOMapper; +import com.njcn.algorithm.pojo.po.CsEventDetailPO; +import com.njcn.algorithm.service.CsEventDetailPOService; +/** + * + * Description: + * Date: 2023/5/17 10:49【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class CsEventDetailPOServiceImpl extends ServiceImpl implements CsEventDetailPOService{ + + @Override + public IPage queryPage(CsEventDetailPageParm csEventDetailPageParm) { + Page returnpage = new Page<> (csEventDetailPageParm.getCurrentPage ( ), csEventDetailPageParm.getPageSize ( )); + returnpage = this.getBaseMapper().queryPage(returnpage,csEventDetailPageParm); + return returnpage; + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsLinePOServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsLinePOServiceImpl.java new file mode 100644 index 000000000..7b524f83d --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsLinePOServiceImpl.java @@ -0,0 +1,29 @@ +package com.njcn.algorithm.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.algorithm.mapper.CsLinePOMapper; +import com.njcn.algorithm.pojo.po.CsLinePO; +import com.njcn.algorithm.service.CsLinePOService; +/** + * + * Description: + * Date: 2023/5/18 14:01【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +public class CsLinePOServiceImpl extends ServiceImpl implements CsLinePOService{ + + @Override + public List queryByDevId(String devId) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("dev_id", devId); + List csLinePOList = this.list(queryWrapper); + return csLinePOList; + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsStatLimitRateDPOServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsStatLimitRateDPOServiceImpl.java new file mode 100644 index 000000000..809a7551a --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsStatLimitRateDPOServiceImpl.java @@ -0,0 +1,32 @@ +package com.njcn.algorithm.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.algorithm.pojo.param.CsStatLimitRatePageParm; +import com.njcn.algorithm.pojo.vo.CsEventDetailVO; +import com.njcn.algorithm.pojo.vo.CsStatLimitRateDVO; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.algorithm.mapper.CsStatLimitRateDPOMapper; +import com.njcn.algorithm.pojo.po.CsStatLimitRateDPO; +import com.njcn.algorithm.service.CsStatLimitRateDPOService; +/** + * + * Description: + * Date: 2023/5/17 13:45【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +public class CsStatLimitRateDPOServiceImpl extends ServiceImpl implements CsStatLimitRateDPOService{ + + @Override + public IPage queryPage(CsStatLimitRatePageParm csStatLimitRatePageParm) { + Page returnpage = new Page<> (csStatLimitRatePageParm.getCurrentPage ( ), csStatLimitRatePageParm.getPageSize ( )); + returnpage = this.getBaseMapper().queryPage(returnpage,csStatLimitRatePageParm); + return returnpage; + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/StableDataServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/StableDataServiceImpl.java new file mode 100644 index 000000000..ea8e49fcf --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/StableDataServiceImpl.java @@ -0,0 +1,163 @@ +package com.njcn.algorithm.service.impl; + +import com.alibaba.nacos.client.naming.utils.CollectionUtils; +import com.njcn.algorithm.constant.DataParam; +import com.njcn.algorithm.enums.AlgorithmResponseEnum; +import com.njcn.algorithm.pojo.param.ThdDataQueryParm; +import com.njcn.algorithm.pojo.po.CsLinePO; +import com.njcn.algorithm.pojo.vo.ThdDataVO; +import com.njcn.algorithm.service.CsLinePOService; +import com.njcn.algorithm.service.StableDataService; +import com.njcn.algorithm.utils.ReflectUtils; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.influx.pojo.po.HarmonicRatioData; +import com.njcn.influx.pojo.po.PowerQualityData; +import com.njcn.influx.service.HaronicRatioService; +import com.njcn.influx.service.PowerQualityService; +import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.time.Instant; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + * Description: + * Date: 2023/5/18 14:39【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +public class StableDataServiceImpl implements StableDataService { + + private final CsLinePOService csLinePOService; + private final PowerQualityService PowerQualityService; + private final HaronicRatioService haronicRatioService; + + @Override + public List queryThdData(String devId, String statisticalName) { + List thdDataVOList = new ArrayList<>(); + List csLinePOList = csLinePOService.queryByDevId(devId); + Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); + List firstPowerQuality = PowerQualityService.getFirstPowerQuality(collect, statisticalName); + + csLinePOList.forEach(temp->{ + DataParam.phases.forEach(phase->{ + DataParam.statMethods.forEach(method -> { + ThdDataVO thdDataVO = new ThdDataVO(); + thdDataVO.setLineId(temp.getLineId()); + thdDataVO.setPosition(temp.getPosition()); + thdDataVO.setStatisticalName(statisticalName); + thdDataVO.setPhase(phase); + thdDataVO.setStatMethod(method); + Double statisticalValue = 0.00; + List collect1 = firstPowerQuality.stream().filter(powerQualityData -> Objects.equals(powerQualityData.getPhase(), phase) && + Objects.equals(powerQualityData.getStatMethod(), method) + ).collect(Collectors.toList()); + if(!CollectionUtils.isEmpty(collect1)){ + statisticalValue= (Double) ReflectUtils.getValue(collect1.get(0), statisticalName); + } + thdDataVO.setStatisticalData(statisticalValue); + thdDataVOList.add(thdDataVO); + }); + }); + + }); + + return thdDataVOList; + } + + @Override + public List queryThdDataByTime(ThdDataQueryParm thdDataQueryParm) { + List thdDataVOList = new ArrayList<>(); + List csLinePOList = csLinePOService.queryByDevId(thdDataQueryParm.getDevId()); + Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); + List firstPowerQuality = PowerQualityService.getPowerQuality(collect, thdDataQueryParm.getStatisticalName(), thdDataQueryParm.getStartTime(), thdDataQueryParm.getEndTime()); + + csLinePOList.forEach(temp->{ + DataParam.phases.forEach(phase->{ + DataParam.statMethods.forEach(method -> { + ThdDataVO thdDataVO = new ThdDataVO(); + thdDataVO.setLineId(temp.getLineId()); + thdDataVO.setPosition(temp.getPosition()); + thdDataVO.setStatisticalName(thdDataQueryParm.getStatisticalName()); + thdDataVO.setPhase(phase); + thdDataVO.setStatMethod(method); + Double statisticalValue = 0.00; + List collect1 = firstPowerQuality.stream().filter(powerQualityData -> Objects.equals(powerQualityData.getPhase(), phase) && + Objects.equals(powerQualityData.getStatMethod(), method) + ).collect(Collectors.toList()); + if(!CollectionUtils.isEmpty(collect1)){ + statisticalValue= (Double) ReflectUtils.getValue(collect1.get(0), thdDataQueryParm.getStatisticalName()); + } + thdDataVO.setStatisticalData(statisticalValue); + thdDataVOList.add(thdDataVO); + }); + }); + + }); + + return thdDataVOList; + } + + @Override + public List queryFisrtThdContent(String devId, String statisticalName) { + List thdDataVOList = new ArrayList<>(); + List csLinePOList = csLinePOService.queryByDevId(devId); + Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); + List harmonicRatioList = haronicRatioService.getFirstHaronicRatio(collect, statisticalName); + harmonicRatioList.forEach(temp->{ + ThdDataVO thdDataVO = new ThdDataVO(); + BeanUtils.copyProperties(temp,thdDataVO); + thdDataVO.setStatisticalName(statisticalName); + thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime()); + String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition(); + thdDataVO.setPosition(position); + Double statisticalValue = 0.00; + statisticalValue= (Double) ReflectUtils.getValue(temp, statisticalName); + thdDataVO.setStatisticalData(statisticalValue); + + thdDataVOList.add(thdDataVO); + + }); + + return thdDataVOList; + } + + @Override + public List queryThdContentByTime(ThdDataQueryParm thdDataQueryParm) { + List thdDataVOList = new ArrayList<>(); + List csLinePOList = csLinePOService.queryByDevId(thdDataQueryParm.getDevId()); + Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); + List harmonicRatioList = haronicRatioService.getHaronicRatio(collect, thdDataQueryParm.getStatisticalName(),thdDataQueryParm.getStartTime(), thdDataQueryParm.getEndTime()); + harmonicRatioList.forEach(temp->{ + ThdDataVO thdDataVO = new ThdDataVO(); + BeanUtils.copyProperties(temp,thdDataVO); + thdDataVO.setStatisticalName(thdDataQueryParm.getStatisticalName()); + thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime()); + String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition(); + thdDataVO.setPosition(position); + Double statisticalValue = 0.00; + statisticalValue= (Double) ReflectUtils.getValue(temp, thdDataQueryParm.getStatisticalName()); + thdDataVO.setStatisticalData(statisticalValue); + + thdDataVOList.add(thdDataVO); + + }); + + return thdDataVOList; + } +} diff --git a/pqs-algorithm/algorithm-boot/src/main/resources/influx-starter手册.md b/pqs-algorithm/algorithm-boot/src/main/resources/influx-starter手册.md new file mode 100644 index 000000000..2ffc616e9 --- /dev/null +++ b/pqs-algorithm/algorithm-boot/src/main/resources/influx-starter手册.md @@ -0,0 +1,172 @@ +> 前言: +> +> ​ 为了方便开发中使用influx时序数据库,摒弃了在代码中拼接查询sql语句,确保查询结果的准确性之余提高代码的阅读性。同时优化处理了部分开发过程遇到的问题: +> +> * 时区问题:开发者无需关注,默认为 tz('Asia/Shanghai') +> * 返回的Instant类型的时间,在序列化到前端页面时,格式不对,添加:@JsonSerialize(using = InstantDateSerializer.class)处理解决 +> * 同时由于influx针对or查询时,超过100个连接是性能会有比较严重的影响,提供了influx的正则表达式的查询方法:InfluxQueryWrapper.regular(),此方案还待测试检查 + +#### 1、快速上手 + +​ 目前没有采用泛型的方式,是因为想返回实体更灵活,可以指定任意想要映射的实体。 + +```java +//两个构造方法: + +/*** + * 返回和查询用的同一个实体 + * @param measurement 查询目标表 + */ +public InfluxQueryWrapper(Class measurement) { + this.measurement = measurement; + this.resultEntity = measurement; + this.initSql(); +} +/*** + * 返回和查询用的不是同一个实体 + * @param measurement 查询目标表 + * @param resultEntity 返回映射实体 + */ +public InfluxQueryWrapper(Class measurement, Class resultEntity) { + this.measurement = measurement; + this.resultEntity = resultEntity; + this.initSql(); +} +``` + +​ 初始化完成后,便已经确定目标measurement(influx表名)以及返回实体。 + +###### 示例: + +```java + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); +//生成 select * from "data_flicker" tz('Asia/Shanghai') +``` + +#### 2、函数使用 + +##### 2.1、select + +​ select(ICFunction... fieldsStr):此函数指定查询返回的那几个字段 + +###### 示例: + +```java + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); + influxQueryWrapper.select(DataFlicker::getTime); +//生成 select time from "data_flicker" tz('Asia/Shanghai') +``` + +##### 2.2、count统计 + +​ count(ICFunction columnName):累计总数; + +​ count(ICFunction columnName, ICFunction resultName):累计总数,返回属性名不同 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); + influxQueryWrapper.count(DataFlicker::getTime,StatisticsResult::getValue); +//生成 select COUNT("time") as value from "data_flicker" tz('Asia/Shanghai') +``` + +> 类似的还有:mean平均值、median中位数、mode最常出现的值、spread最大与最小值的差、sum求和、abs绝对值、max最大值、min最小值 + +##### 2.3、top最大值的几条记录 + +​ top(ICFunction columnName, int num):最大值的一个结果集合 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); + influxQueryWrapper.top(DataFlicker::getTime,5); +//生成最大的前5某个属性的集合 +//select TOP("time",5) as value from "data_flicker" tz('Asia/Shanghai') +``` + +> 类似的还有:bottom最小值的几条记录 + +##### 2.4、maxSamePrefixAndSuffix针对前缀或后缀相同的属性批量处理最大值 + +​ maxSamePrefixAndSuffix(String prefix, String suffix, List diffContent):开发过程中遇到表字段前后缀一致时,需要批量处理的。 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); +influxQueryWrapper.maxSamePrefixAndSuffix("v_","",timesList); +//生成最大的前5某个属性的集合 +//select MAX("v_1") as v_1,MAX("v_2") as v_2,MAX("v_3") as v_3,MAX("v_4") as v_4 as value from "data_v" tz('Asia/Shanghai') +``` + +> 类似的还有:minSamePrefixAndSuffix针对前缀或后缀相同的属性批量处理最小值 + +##### 2.5、percentile百分之?最大值 + +​ 目前灿能项目常用于cp95最大值 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); + influxQueryWrapper.percentile(DataFlicker::getTime,95); +//select PERCENTILE("time",95) as value from "data_flicker" tz('Asia/Shanghai') +``` + +##### 2.6、between区间 + +​ between(ICFunction fieldName, Object val1, Object val2):作为条件区间语句生成 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); +influxQueryWrapper.between(DataFlicker::getTime,"2022-04-30 16:00:00","2022-05-30 16:00:00"); +//select * from "data_flicker" where time >='2022-04-30 16:00:00' AND time <='2022-05-30 16:00:00' tz('Asia/Shanghai') +``` + +##### 2.7、eq等于 + +​ eq(ICFunction columnName, Object columnValue):指定某字段等于xxx + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class); +influxQueryWrapper.eq(DataFlicker::getTime,"2022-05-30 16:00:00"); +//select * from "data_flicker" where time ='2022-04-30 16:00:00' tz('Asia/Shanghai') +``` + +> 类似的还有:ne不等于、gt大于、ge大于等于、lt小于、le小于等于 + +##### 2.8、or拼接多条件 + +​ or(ICFunction fieldName, List columnValues):查询某字段等于集合内的值时的结果,类似于关系数据库的in函数; + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); +influxQueryWrapper.or(DataV::getLineId,lineList); +//select * from "data_v" where (line_id = "111" or line_id = "222") tz('Asia/Shanghai') +``` + +##### 2.9、regular正则模糊查询 + +​ regular(ICFunction fieldName, List columnValues):查询条件有多个选项时,效果等同于关系型数据库的in,同时or的内容如果超过100个选项时会带来严重的性能问题,查询很慢,可以调整为正则模糊查询 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); +influxQueryWrapper.regular(DataV::getLineId,lineList); +//select * from "data_v" where line_id =~/^111|222|333$/ tz('Asia/Shanghai') +``` + +##### 2.10、groupBy分组 + +> influxdb只能针对tag去分组 + +​ groupBy(ICFunction... columnName):以tag去分组; + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); +influxQueryWrapper.groupBy(DataV::getLineId,DataV::getGualityFlag); +//select * from "data_v" group by line_id,quality_flag tz('Asia/Shanghai') +``` + +##### 2.11、timeDesc以时间降序 + +```java +InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); +influxQueryWrapper.timeDesc(); +//select * from "data_v" order by time desc tz('Asia/Shanghai') +``` + +> 类似的还有:timeAsc以时间升序 \ No newline at end of file diff --git a/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java b/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java index 4276112ef..25341f2e9 100644 --- a/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java +++ b/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java @@ -28,5 +28,13 @@ public interface ServerInfo { String ALGORITHM_BOOT = "algorithm-boot"; String CS_SYSTEM_BOOT = "cs_system_boot"; + String CS_WARN_BOOT = "cs_warn_boot"; + + String CS_EVENT_BOOT = "cs_event_boot"; + + String CS_HARMONIC_BOOT = "cs_harmonic_boot"; + + String CS_REPORT_BOOT = "cs_report_boot"; + } diff --git a/pqs-common/common-swagger/src/main/java/com/njcn/swagger/config/Knife4jSwaggerConfig.java b/pqs-common/common-swagger/src/main/java/com/njcn/swagger/config/Knife4jSwaggerConfig.java index 5db27b282..951c0d2d0 100644 --- a/pqs-common/common-swagger/src/main/java/com/njcn/swagger/config/Knife4jSwaggerConfig.java +++ b/pqs-common/common-swagger/src/main/java/com/njcn/swagger/config/Knife4jSwaggerConfig.java @@ -66,7 +66,11 @@ public class Knife4jSwaggerConfig { "com.njcn.process.controller", "com.njcn.advance.controller", "com.njcn.algorithm.controller", - "com.njcn.access.controller" + "com.njcn.access.controller", + "com.njcn.csdevice.controller", + "com.njcn.cswarn.controller", + "com.njcn.csharmonic.controller", + "com.njcn.cssystem.controller" ) .collect(Collectors.toList()); List grantTypes = new ArrayList<>(); diff --git a/pqs-influx/src/main/java/com/njcn/influx/imapper/HaronicRatioMapper.java b/pqs-influx/src/main/java/com/njcn/influx/imapper/HaronicRatioMapper.java new file mode 100644 index 000000000..4aa065b7a --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/imapper/HaronicRatioMapper.java @@ -0,0 +1,23 @@ +package com.njcn.influx.imapper; + +import com.njcn.influx.base.InfluxDbBaseMapper; +import com.njcn.influx.pojo.po.HarmonicRatioData; +import com.njcn.influx.pojo.po.PowerQualityData; +import com.njcn.influx.query.InfluxQueryWrapper; + +import java.util.List; + +/** + * 类的介绍: + * + * @author xuyang + * @version 1.0.0 + * @createTime 2023/5/5 14:39 + */ + +public interface HaronicRatioMapper extends InfluxDbBaseMapper { + + List getFirstHaronicRatio(InfluxQueryWrapper influxQueryWrapper); + + List getHaronicRatio(InfluxQueryWrapper influxQueryWrapper); +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/imapper/PowerQualityMapper.java b/pqs-influx/src/main/java/com/njcn/influx/imapper/PowerQualityMapper.java new file mode 100644 index 000000000..02942ac40 --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/imapper/PowerQualityMapper.java @@ -0,0 +1,22 @@ +package com.njcn.influx.imapper; + +import com.njcn.influx.base.InfluxDbBaseMapper; +import com.njcn.influx.pojo.po.PowerQualityData; +import com.njcn.influx.query.InfluxQueryWrapper; + +import java.util.List; + +/** + * 类的介绍: + * + * @author xuyang + * @version 1.0.0 + * @createTime 2023/5/5 14:39 + */ + +public interface PowerQualityMapper extends InfluxDbBaseMapper { + + List getFirstPowerQuality(InfluxQueryWrapper influxQueryWrapper); + + List getPowerQuality(InfluxQueryWrapper influxQueryWrapper); +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/pojo/po/HarmonicRatioData.java b/pqs-influx/src/main/java/com/njcn/influx/pojo/po/HarmonicRatioData.java new file mode 100644 index 000000000..682f476b2 --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/pojo/po/HarmonicRatioData.java @@ -0,0 +1,529 @@ +package com.njcn.influx.pojo.po; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.njcn.common.utils.serializer.InstantDateSerializer; +import lombok.Data; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; + +import java.time.Instant; + +/** + * 类的介绍: + * + * @author xuyang + * @version 1.0.0 + */ +@Data +@Measurement(name = "harmonic_ratio_data") +public class HarmonicRatioData { + + @Column(name = "time") + @JsonSerialize(using = InstantDateSerializer.class) + private Instant time; + + @Column(name = "LineId") + private String lineId; + + @Column(name = "Phase") + private String phase; + + @Column(name = "Stat_Method") + private String statMethod; + /** + * 2次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H2VLmt") + private Double H2VLmt; + /** + * 3次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H3VLmt") + private Double H3VLmt; + /** + * 4次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H4VLmt") + private Double H4VLmt; + /** + * 5次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H5VLmt") + private Double H5VLmt; + /** + * 6次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H6VLmt") + private Double H6VLmt; + /** + * 7次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H7VLmt") + private Double H7VLmt; + /** + * 8次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H8VLmt") + private Double H8VLmt; + /** + * 9次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H9VLmt") + private Double H9VLmt; + /** + * 10次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H10VLmt") + private Double H10VLmt; + /** + * 11次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H11VLmt") + private Double H11VLmt; + /** + * 12次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H12VLmt") + private Double H12VLmt; + /** + * 13次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H13VLmt") + private Double H13VLmt; + /** + * 14次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H14VLmt") + private Double H14VLmt; + /** + * 15次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H15VLmt") + private Double H15VLmt; + /** + * 16次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H16VLmt") + private Double H16VLmt; + /** + * 17次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H17VLmt") + private Double H17VLmt; + /** + * 18次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H18VLmt") + private Double H18VLmt; + /** + * 19次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H19VLmt") + private Double H19VLmt; + /** + * 20次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H20VLmt") + private Double H20VLmt; + /** + * 21次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H21VLmt") + private Double H21VLmt; + /** + * 22次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H22VLmt") + private Double H22VLmt; + /** + * 23次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H23VLmt") + private Double H23VLmt; + /** + * 24次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H24VLmt") + private Double H24VLmt; + /** + * 25次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H25VLmt") + private Double H25VLmt; + /** + * 26次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H26VLmt") + private Double H26VLmt; + /** + * 27次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H27VLmt") + private Double H27VLmt; + /** + * 28次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H28VLmt") + private Double H28VLmt; + /** + * 29次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H29VLmt") + private Double H29VLmt; + /** + * 30次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H30VLmt") + private Double H30VLmt; + /** + * 31次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H31VLmt") + private Double H31VLmt; + /** + * 32次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H32VLmt") + private Double H32VLmt; + /** + * 33次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H33VLmt") + private Double H33VLmt; + /** + * 34次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H34VLmt") + private Double H34VLmt; + /** + * 35次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H35VLmt") + private Double H35VLmt; + /** + * 36次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H36VLmt") + private Double H36VLmt; + /** + * 37次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H37VLmt") + private Double H37VLmt; + /** + * 38次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H38VLmt") + private Double H38VLmt; + /** + * 39次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H39VLmt") + private Double H39VLmt; + /** + * 40次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H40VLmt") + private Double H40VLmt; + /** + * 41次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H41VLmt") + private Double H41VLmt; + /** + * 42次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H42VLmt") + private Double H42VLmt; + /** + * 43次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H43VLmt") + private Double H43VLmt; + /** + * 44次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H44VLmt") + private Double H44VLmt; + /** + * 45次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H45VLmt") + private Double H45VLmt; + /** + * 46次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H46VLmt") + private Double H46VLmt; + /** + * 47次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H47VLmt") + private Double H47VLmt; + /** + * 48次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H48VLmt") + private Double H48VLmt; + /** + * 49次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H49VLmt") + private Double H49VLmt; + /** + * 50次谐波电压含有率越限定值,单位:% + */ + @Column(name = "H50VLmt") + private Double H50VLmt; + /** + * 2次谐波电流越限定值,单位:A + */ + @Column(name = "H2ALmt") + private Double H2ALmt; + /** + * 3次谐波电流越限定值,单位:A + */ + @Column(name = "H3ALmt") + private Double H3ALmt; + /** + * 4次谐波电流越限定值,单位:A + */ + @Column(name = "H4ALmt") + private Double H4ALmt; + /** + * 5次谐波电流越限定值,单位:A + */ + @Column(name = "H5ALmt") + private Double H5ALmt; + /** + * 6次谐波电流越限定值,单位:A + */ + @Column(name = "H6ALmt") + private Double H6ALmt; + /** + * 7次谐波电流越限定值,单位:A + */ + @Column(name = "H7ALmt") + private Double H7ALmt; + /** + * 8次谐波电流越限定值,单位:A + */ + @Column(name = "H8ALmt") + private Double H8ALmt; + /** + * 9次谐波电流越限定值,单位:A + */ + @Column(name = "H9ALmt") + private Double H9ALmt; + /** + * 10次谐波电流越限定值,单位:A + */ + @Column(name = "H10ALmt") + private Double H10ALmt; + /** + * 11次谐波电流越限定值,单位:A + */ + @Column(name = "H11ALmt") + private Double H11ALmt; + /** + * 12次谐波电流越限定值,单位:A + */ + @Column(name = "H12ALmt") + private Double H12ALmt; + /** + * 13次谐波电流越限定值,单位:A + */ + @Column(name = "H13ALmt") + private Double H13ALmt; + /** + * 14次谐波电流越限定值,单位:A + */ + @Column(name = "H14ALmt") + private Double H14ALmt; + /** + * 15次谐波电流越限定值,单位:A + */ + @Column(name = "H15ALmt") + private Double H15ALmt; + /** + * 16次谐波电流越限定值,单位:A + */ + @Column(name = "H16ALmt") + private Double H16ALmt; + /** + * 17次谐波电流越限定值,单位:A + */ + @Column(name = "H17ALmt") + private Double H17ALmt; + /** + * 18次谐波电流越限定值,单位:A + */ + @Column(name = "H18ALmt") + private Double H18ALmt; + /** + * 19次谐波电流越限定值,单位:A + */ + @Column(name = "H19ALmt") + private Double H19ALmt; + /** + * 20次谐波电流越限定值,单位:A + */ + @Column(name = "H20ALmt") + private Double H20ALmt; + /** + * 21次谐波电流越限定值,单位:A + */ + @Column(name = "H21ALmt") + private Double H21ALmt; + /** + * 22次谐波电流越限定值,单位:A + */ + @Column(name = "H22ALmt") + private Double H22ALmt; + /** + * 23次谐波电流越限定值,单位:A + */ + @Column(name = "H23ALmt") + private Double H23ALmt; + /** + * 24次谐波电流越限定值,单位:A + */ + @Column(name = "H24ALmt") + private Double H24ALmt; + /** + * 25次谐波电流越限定值,单位:A + */ + @Column(name = "H25ALmt") + private Double H25ALmt; + /** + * 26次谐波电流越限定值,单位:A + */ + @Column(name = "H26ALmt") + private Double H26ALmt; + /** + * 27次谐波电流越限定值,单位:A + */ + @Column(name = "H27ALmt") + private Double H27ALmt; + /** + * 28次谐波电流越限定值,单位:A + */ + @Column(name = "H28ALmt") + private Double H28ALmt; + /** + * 29次谐波电流越限定值,单位:A + */ + @Column(name = "H29ALmt") + private Double H29ALmt; + /** + * 30次谐波电流越限定值,单位:A + */ + @Column(name = "H30ALmt") + private Double H30ALmt; + /** + * 31次谐波电流越限定值,单位:A + */ + @Column(name = "H31ALmt") + private Double H31ALmt; + /** + * 32次谐波电流越限定值,单位:A + */ + @Column(name = "H32ALmt") + private Double H32ALmt; + /** + * 33次谐波电流越限定值,单位:A + */ + @Column(name = "H33ALmt") + private Double H33ALmt; + /** + * 34次谐波电流越限定值,单位:A + */ + @Column(name = "H34ALmt") + private Double H34ALmt; + /** + * 35次谐波电流越限定值,单位:A + */ + @Column(name = "H35ALmt") + private Double H35ALmt; + /** + * 36次谐波电流越限定值,单位:A + */ + @Column(name = "H36ALmt") + private Double H36ALmt; + /** + * 37次谐波电流越限定值,单位:A + */ + @Column(name = "H37ALmt") + private Double H37ALmt; + /** + * 38次谐波电流越限定值,单位:A + */ + @Column(name = "H38ALmt") + private Double H38ALmt; + /** + * 39次谐波电流越限定值,单位:A + */ + @Column(name = "H39ALmt") + private Double H39ALmt; + /** + * 40次谐波电流越限定值,单位:A + */ + @Column(name = "H40ALmt") + private Double H40ALmt; + /** + * 41次谐波电流越限定值,单位:A + */ + @Column(name = "H41ALmt") + private Double H41ALmt; + /** + * 42次谐波电流越限定值,单位:A + */ + @Column(name = "H42ALmt") + private Double H42ALmt; + /** + * 43次谐波电流越限定值,单位:A + */ + @Column(name = "H43ALmt") + private Double H43ALmt; + /** + * 44次谐波电流越限定值,单位:A + */ + @Column(name = "H44ALmt") + private Double H44ALmt; + /** + * 45次谐波电流越限定值,单位:A + */ + @Column(name = "H45ALmt") + private Double H45ALmt; + /** + * 46次谐波电流越限定值,单位:A + */ + @Column(name = "H46ALmt") + private Double H46ALmt; + /** + * 47次谐波电流越限定值,单位:A + */ + @Column(name = "H47ALmt") + private Double H47ALmt; + /** + * 48次谐波电流越限定值,单位:A + */ + @Column(name = "H48ALmt") + private Double H48ALmt; + /** + * 49次谐波电流越限定值,单位:A + */ + @Column(name = "H49ALmt") + private Double H49ALmt; + /** + * 50次谐波电流越限定值,单位:A + */ + @Column(name = "H50ALmt") + private Double H50ALmt; + + + + + + +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/pojo/po/PowerQualityData.java b/pqs-influx/src/main/java/com/njcn/influx/pojo/po/PowerQualityData.java new file mode 100644 index 000000000..3678a106d --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/pojo/po/PowerQualityData.java @@ -0,0 +1,347 @@ +package com.njcn.influx.pojo.po; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.njcn.common.utils.serializer.InstantDateSerializer; +import lombok.Data; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; + +import java.time.Instant; + +/** + * 类的介绍: + * + * @author xuyang + * @version 1.0.0 + */ +@Data +@Measurement(name = "power_quality_data") +public class PowerQualityData { + + @Column(name = "time") + @JsonSerialize(using = InstantDateSerializer.class) + private Instant time; + + @Column(name = "LineId") + private String lineId; + + @Column(name = "Phase") + private String phase; + + @Column(name = "Stat_Method") + private String statMethod; + + /** + * 频率 + */ + @Column(name = "Hz") + private Double Hz; + /** + * 相电压总有效值 + */ + @Column(name = "PhV") + private Double PhV; + /** + * 线电压总有效值 + */ + @Column(name = "PPV") + private Double PPV; + /** + * 电流总有效值 + */ + @Column(name = "A") + private Double A; + /** + * 频率偏差 + */ + @Column(name = "HzDev") + private Double HzDev; + /** + * 相电压偏差 + */ + @Column(name = "PhVDev") + private Double PhVDev; + /** + * 线电压偏差 + */ + @Column(name = "PPVDev") + private Double PPVDev; + /** + * 正序、负序、零序电压 + */ + @Column(name = "SeqV") + private Double SeqV; + /** + * 电压负序不平衡度 + */ + @Column(name = "ImbNgV") + private Double ImbNgV; + /** + * 电压零序不平衡度 + */ + @Column(name = "ImbZroV") + private Double ImbZroV; + /** + * 正序、负序、零序电流 + */ + @Column(name = "SeqA") + private Double SeqA; + /** + * 电流负序不平衡度 + */ + @Column(name = "ImbNgA") + private Double ImbNgA; + /** + * 电流零序不平衡度 + */ + @Column(name = "ImbZroA") + private Double ImbZroA; + /** + * 相电压基波有效值 + */ + @Column(name = "HFundPhV") + private Double HFundPhV; + /** + * 线电压基波有效值 + */ + @Column(name = "HFundPPV") + private Double HFundPPV; + /** + * 相电压基波有效值相角 + */ + @Column(name = "FundPhVAng") + private Double FundPhVAng ; + /** + * 线电压基波有效值相角 + */ + @Column(name = "FundPPVAng") + private Double FundPPVAng; + /** + * 电流基波有效值 + */ + @Column(name = "FundA") + private Double FundA ; + /** + * 电流基波相角 + */ + @Column(name = "FundAAng") + private Double FundAAng; + /** + * 相电压谐波总畸变率 + */ + @Column(name = "ThdPhV") + private Double ThdPhV; + /** + * 线电压谐波总畸变率 + */ + @Column(name = "ThdPPV") + private Double ThdPPV; + /** + * 相电压总偶次谐波畸变率 + */ + @Column(name = "ThdEvnPhV") + private Double ThdEvnPhV; + /** + * 线电压总偶次谐波畸变率 + */ + @Column(name = "ThdEvnPPV") + private Double ThdEvnPPV; + /** + * 相电压总奇次谐波畸变率 + */ + @Column(name = "ThdOddPhV") + private Double ThdOddPhV; + /** + * 线电压总奇次谐波畸变率 + */ + @Column(name = "ThdOddPPV") + private Double ThdOddPPV; + /** + * 相电压谐波(间谐波)含有率序列 + */ + @Column(name = "HRPhV") + private Double HRPhV; + /** + * 相电压谐波(间谐波)相角序列 + */ + @Column(name = "HRPhVAng") + private Double HRPhVAng; + /** + * 线电压谐波(间谐波)含有率序列 + */ + @Column(name = "HRPPV") + private Double HRPPV; + /** + * 线电压谐波(间谐波)相角序列 + */ + @Column(name = "HRPPVAng") + private Double HRPPVAng; + /** + * 电流总谐波畸变率 + */ + @Column(name = "ThdA") + private Double ThdA; + /** + * 电流总偶次谐波畸变率 + */ + @Column(name = "ThdEvnA") + private Double ThdEvnA; + /** + * 电流总奇次谐波畸变率 + */ + @Column(name = "ThdOddA") + private Double ThdOddA; + /** + * 谐波(间谐波)电流有效值 + */ + @Column(name = "HA") + private Double HA; + /** + * 谐波(间谐波)电流相角序列 + */ + @Column(name = "HAAng") + private Double HAAng; + /** + * 相电压电压变动幅度 + */ + @Column(name = "PhFluc") + private Double PhFluc; + /** + * 线电压电压变动幅度 + */ + @Column(name = "PPFluc") + private Double PPFluc; + /** + * 相电压电压变动频度 + */ + @Column(name = "PhFlucf") + private Double PhFlucf; + /** + * 线电压电压变动频度 + */ + @Column(name = "PPFlucf") + private Double PPFlucf; + /** + * 有功功率 + */ + @Column(name = "W") + private Double W; + /** + * 无功功率 + */ + @Column(name = "VAr") + private Double VAr; + /** + * 视在功率 + */ + @Column(name = "VA") + private Double VA; + /** + * 基波有功功率 + */ + @Column(name = "FundW") + private Double FundW; + /** + * 基波无功功率 + */ + @Column(name = "FundVAr") + private Double FundVAr; + /** + * 基波视在功率 + */ + @Column(name = "FundVA") + private Double FundVA; + /** + * 功率因数 + */ + @Column(name = "PF") + private Double PF; + /** + * 位移功率因数 + */ + @Column(name = "DF") + private Double DF; + /** + * 三相总有功功率 + */ + @Column(name = "TotW") + private Double TotW; + /** + * 三相总无功功率 + */ + @Column(name = "TotVAr") + private Double TotVAr; + /** + * 三相总视在功率 + */ + @Column(name = "TotVA") + private Double TotVA; + /** + * 三相功率因数 + */ + @Column(name = "TotPF") + private Double TotPF; + /** + * 三相位移功率因数 + */ + @Column(name = "TotDF") + private Double TotDF; + /** + * 谐波有功功率序列 + */ + @Column(name = "HW") + private Double HW; + /** + * 谐波无功功率序列 + */ + @Column(name = "HVAr") + private Double HVAr; + /** + * 谐波视在功率序列 + */ + @Column(name = "HVA") + private Double HVA; + /** + * 三相总谐波有功功率 + */ + @Column(name = "TotHW") + private Double TotHW; + /** + * 三相总谐波无功功率 + */ + @Column(name = "TotHVAr") + private Double TotHVAr; + /** + * 三相总谐波视在功率 + */ + @Column(name = "TotHVA") + private Double TotHVA; + /** + * 相电压短时闪变 + */ + @Column(name = "PhPst") + private Double PhPst; + /** + * 线电压短时闪变 + */ + @Column(name = "PPPst") + private Double PPPst; + /** + * 相电压长时闪变 + */ + @Column(name = "PhPlt") + private Double PhPlt; + /** + * 线电压长时闪变 + */ + @Column(name = "PPPlt") + private Double PPPlt; + /** + * 最大需量 + */ + @Column(name = "MaxDemand") + private Double MaxDemand; + + + +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/service/HaronicRatioService.java b/pqs-influx/src/main/java/com/njcn/influx/service/HaronicRatioService.java new file mode 100644 index 000000000..0c9880b78 --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/service/HaronicRatioService.java @@ -0,0 +1,26 @@ +package com.njcn.influx.service; + +import com.njcn.influx.pojo.po.HarmonicRatioData; +import com.njcn.influx.pojo.po.PowerQualityData; + +import java.util.List; + +public interface HaronicRatioService { + /** + * @Description: 获取指标最新数据 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2023/5/23 + */ + List getFirstHaronicRatio(List lineIds,String columnName); + /** + * @Description: 获取指标时间断内数据 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2023/5/23 + */ + List getHaronicRatio(List lineIds, String columnName, String startTime, String endTime); + +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/service/PowerQualityService.java b/pqs-influx/src/main/java/com/njcn/influx/service/PowerQualityService.java new file mode 100644 index 000000000..3022c1d4a --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/service/PowerQualityService.java @@ -0,0 +1,25 @@ +package com.njcn.influx.service; + +import com.njcn.influx.pojo.po.PowerQualityData; + +import java.util.List; + +public interface PowerQualityService { + /** + * @Description: 获取指标最新数据 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2023/5/23 + */ + List getFirstPowerQuality(List lineIds,String columnName); + /** + * @Description: 获取指标时间断内数据 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2023/5/23 + */ + List getPowerQuality(List lineIds,String columnName, String startTime, String endTime); + +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/service/impl/HaronicRatioServiceImpl.java b/pqs-influx/src/main/java/com/njcn/influx/service/impl/HaronicRatioServiceImpl.java new file mode 100644 index 000000000..7c031cba9 --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/service/impl/HaronicRatioServiceImpl.java @@ -0,0 +1,49 @@ +package com.njcn.influx.service.impl; + +import com.njcn.influx.imapper.HaronicRatioMapper; +import com.njcn.influx.pojo.po.HarmonicRatioData; +import com.njcn.influx.pojo.po.PowerQualityData; +import com.njcn.influx.query.InfluxQueryWrapper; +import com.njcn.influx.service.HaronicRatioService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Description: + * Date: 2023/5/24 9:22【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +public class HaronicRatioServiceImpl implements HaronicRatioService { + + private final HaronicRatioMapper haronicRatioMapper; + @Override + public List getFirstHaronicRatio(List lineIds, String columnName) { + List result1 ; + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(HarmonicRatioData.class); + influxQueryWrapper.or(HarmonicRatioData::getLineId, lineIds) + .last(columnName,columnName).groupBy(HarmonicRatioData::getLineId, HarmonicRatioData::getStatMethod, HarmonicRatioData::getPhase); + + result1 = haronicRatioMapper.getHaronicRatio(influxQueryWrapper); + return result1; + } + + @Override + public List getHaronicRatio(List lineIds, String columnName, String startTime, String endTime) { + List result1; + + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(HarmonicRatioData.class); + influxQueryWrapper.or(HarmonicRatioData::getLineId, lineIds) + .percentile(columnName, 95) + .between(HarmonicRatioData::getTime, startTime, endTime) + .groupBy(HarmonicRatioData::getLineId,HarmonicRatioData::getStatMethod,HarmonicRatioData::getPhase); + result1 = haronicRatioMapper.getHaronicRatio(influxQueryWrapper); + + return result1; + } +} diff --git a/pqs-influx/src/main/java/com/njcn/influx/service/impl/PowerQualityServiceImpl.java b/pqs-influx/src/main/java/com/njcn/influx/service/impl/PowerQualityServiceImpl.java new file mode 100644 index 000000000..658a61545 --- /dev/null +++ b/pqs-influx/src/main/java/com/njcn/influx/service/impl/PowerQualityServiceImpl.java @@ -0,0 +1,49 @@ +package com.njcn.influx.service.impl; + +import com.njcn.influx.imapper.PowerQualityMapper; +import com.njcn.influx.pojo.po.PowerQualityData; +import com.njcn.influx.query.InfluxQueryWrapper; +import com.njcn.influx.service.PowerQualityService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Description: + * Date: 2023/5/18 16:12【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +@RequiredArgsConstructor +public class PowerQualityServiceImpl implements PowerQualityService { + + private final PowerQualityMapper powerQualityMapper; + @Override + public List getFirstPowerQuality(List lineIds,String columnName) { + List result1 ; + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(PowerQualityData.class); + influxQueryWrapper.or(PowerQualityData::getLineId, lineIds) + .last(columnName,columnName).groupBy(PowerQualityData::getLineId, PowerQualityData::getStatMethod, PowerQualityData::getPhase); + + result1 = powerQualityMapper.getFirstPowerQuality(influxQueryWrapper); + + return result1; + } + + @Override + public List getPowerQuality(List lineIds,String columnName, String startTime, String endTime) { + List result1; + + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(PowerQualityData.class); + influxQueryWrapper.or(PowerQualityData::getLineId, lineIds) + .percentile(columnName, 95) + .between(PowerQualityData::getTime, startTime, endTime) + .groupBy(PowerQualityData::getLineId,PowerQualityData::getStatMethod,PowerQualityData::getPhase); + result1 = powerQualityMapper.getPowerQuality(influxQueryWrapper); + + return result1; + } +} diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataEnum.java b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataEnum.java index 6223fb3a3..c2ca77aee 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataEnum.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataEnum.java @@ -341,6 +341,20 @@ public enum DicDataEnum { GROUND_AC("AC两相接地", "Ground_AC"), GROUND_ABC("三相接地", "Ground_ABC"), TYPE_REST("其他", "Type_Rest"), + + /** + * 监测点位置 + */ + LOAD_SIDE("负载侧", "Load_Side"), + GRID_SIDE("电网侧", "Grid_Side"), + OUTPUT_SIDE("输出侧", "Output_Side"), + + /** + * 警告级别 + */ + + ALARM("告警", "Alarm"), + FAULT("故障", "Fault"), ; private final String name; diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java index 57aff0d27..0ee6c1ccd 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java @@ -70,6 +70,10 @@ public enum DicDataTypeEnum { PRIMARY_TYPE("一级业务类型","Primary_Type"), DEV_CLASS("终端类型(治理)","Dev_Class"), CS_STATISTICAL_TYPE("治理统计类型","Cs_Statistical_Type"), + LINE_POSITION("监测点位置","Line_Position"), + ALARM_LEVEL("警告级别","Alarm_Level"), + + ;