Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ca027513f | |||
|
|
87c60206f0 | ||
| dbee4ca31d | |||
|
|
f26ec7003e | ||
| 467906b686 | |||
|
|
b146da4867 | ||
|
|
80dceeb0be | ||
| 8d6ba4afe3 | |||
| ae2207bd97 | |||
| 16e90de9eb | |||
| 5c36e2e4f4 | |||
| df72e7c338 | |||
|
|
234f0be465 | ||
| 0677320a06 | |||
|
|
0e548887a4 | ||
| e1c5a07f14 | |||
| 7a745fea9e | |||
|
|
8db6ddaeb5 | ||
|
|
e140ba4fe3 | ||
| ec9f32d0ad | |||
|
|
0e1a10a860 | ||
|
|
4ad60cbe96 | ||
|
|
731f6f2d12 | ||
|
|
7abce7651d | ||
|
|
d3af5bd9e4 | ||
|
|
dd6c3db9b2 | ||
| 6316389a68 | |||
| c994ada5e7 | |||
|
|
197d3df0fb | ||
| b501b91bc4 |
4
pom.xml
4
pom.xml
@@ -20,7 +20,6 @@
|
|||||||
<module>pqs-advance</module>
|
<module>pqs-advance</module>
|
||||||
<module>pqs-prepare</module>
|
<module>pqs-prepare</module>
|
||||||
<module>pqs-process</module>
|
<module>pqs-process</module>
|
||||||
<module>pqs-influx</module>
|
|
||||||
<module>pqs-bpm</module>
|
<module>pqs-bpm</module>
|
||||||
<module>pqs-supervision</module>
|
<module>pqs-supervision</module>
|
||||||
|
|
||||||
@@ -52,7 +51,8 @@
|
|||||||
<!--服务器发布内容为空-->
|
<!--服务器发布内容为空-->
|
||||||
<!-- <nacos.namespace></nacos.namespace>-->
|
<!-- <nacos.namespace></nacos.namespace>-->
|
||||||
<!-- <nacos.namespace>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
<!-- <nacos.namespace>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
||||||
<nacos.namespace>6d75b5c3-cff9-4c4a-8e8b-ca2363753ecb</nacos.namespace>
|
<!-- <nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>-->
|
||||||
|
<nacos.namespace>910d0d69-2254-481b-b9f7-7ecf9cb881b0</nacos.namespace>
|
||||||
<!-- sentinel:port-->
|
<!-- sentinel:port-->
|
||||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||||
<!--网关地址,主要用于配置swagger中认证token-->
|
<!--网关地址,主要用于配置swagger中认证token-->
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class BpmModelController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新建模型")
|
@ApiOperation("新建模型")
|
||||||
@ApiImplicitParam(name = "createRetVO", value = "模型数据", required = true)
|
@ApiImplicitParam(name = "bpmModelParam", value = "模型数据", required = true)
|
||||||
public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) {
|
public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) {
|
||||||
String methodDescribe = getMethodDescribe("createModel");
|
String methodDescribe = getMethodDescribe("createModel");
|
||||||
String modelId = modelService.createModel(bpmModelParam, null);
|
String modelId = modelService.createModel(bpmModelParam, null);
|
||||||
|
|||||||
@@ -323,6 +323,24 @@ public class PubUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//监测点运行状态(0:投运;1:检修;2:停运;3:调试;4:退运)
|
||||||
|
public static String lineRunFlag(Integer runFlag) {
|
||||||
|
switch (runFlag) {
|
||||||
|
case 0:
|
||||||
|
return "投运";
|
||||||
|
case 1:
|
||||||
|
return "检修";
|
||||||
|
case 2:
|
||||||
|
return "停运";
|
||||||
|
case 3:
|
||||||
|
return "调试";
|
||||||
|
case 4:
|
||||||
|
return "退运";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Integer getRunFlag(String runFlag) {
|
public static Integer getRunFlag(String runFlag) {
|
||||||
switch (runFlag) {
|
switch (runFlag) {
|
||||||
case "投运":
|
case "投运":
|
||||||
|
|||||||
@@ -131,4 +131,9 @@ public interface OssPath {
|
|||||||
*/
|
*/
|
||||||
String THEME="theme/";
|
String THEME="theme/";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线监测预告警单
|
||||||
|
*/
|
||||||
|
String ONLINE_REPORT="onlineReport/";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public enum GWSendEnum {
|
|||||||
|
|
||||||
//调用总部下发工单的反馈单接口
|
//调用总部下发工单的反馈单接口
|
||||||
WORK_ORDER_FEEDBACK("workOrderFeedBack", "/pms-ghq-powerquality-start/powerQuality/workOrder/receiveFeedbackInfo"),
|
WORK_ORDER_FEEDBACK("workOrderFeedBack", "/pms-ghq-powerquality-start/powerQuality/workOrder/receiveFeedbackInfo"),
|
||||||
|
|
||||||
|
PARK_AND_STATION("parkAndStation", "/pms-ghq-powerquality-start/powerQuality/park/create"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.math.RoundingMode;
|
|||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@Deprecated
|
||||||
public class COverlimit {
|
public class COverlimit {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ public class COverlimitUtil {
|
|||||||
* 获取额定线电压
|
* 获取额定线电压
|
||||||
*/
|
*/
|
||||||
private static float getUl(Float voltageLevel){
|
private static float getUl(Float voltageLevel){
|
||||||
float value = 3.14159f;
|
float value;
|
||||||
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
||||||
value = 0.4f;
|
value = 0.4f;
|
||||||
}else if(voltageLevel<DicDataEnum.KV10.getValue()){
|
}else if(voltageLevel<DicDataEnum.KV10.getValue()){
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<artifactId>pq-device-boot</artifactId>
|
<artifactId>pq-device-boot</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>com.njcn</groupId>
|
<!-- <groupId>com.njcn</groupId>-->
|
||||||
<artifactId>pms-device-boot</artifactId>
|
<!-- <artifactId>pms-device-boot</artifactId>-->
|
||||||
<version>${project.version}</version>
|
<!-- <version>${project.version}</version>-->
|
||||||
</dependency>-->
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.device.pms.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/21
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum PmsEnum {
|
||||||
|
|
||||||
|
|
||||||
|
NO_UPLOAD("未上送","0"),
|
||||||
|
HAS_UPLOAD("以上送","1"),
|
||||||
|
WAIT_RETURN_UPLOAD("待重新上送","2"),
|
||||||
|
DELETE_UPLOAD("已删除","3"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
PmsEnum(String name, String code) {
|
||||||
|
this.name = name;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.njcn.device.pms.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MajorMonitorDTO {
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
private String provinceOrg;
|
||||||
|
private String provinceOrgName;
|
||||||
|
private String cityOrg;
|
||||||
|
private String cityOrgName;
|
||||||
|
private String maintOrg;
|
||||||
|
private String maintOrgName;
|
||||||
|
private String monitorName;
|
||||||
|
private String monitorVoltageLevel;
|
||||||
|
private String monitorId;
|
||||||
|
private String monitorStatus;
|
||||||
|
private Date monitorOperateDate;
|
||||||
|
private Date monitorStopDate;
|
||||||
|
private String substationId;
|
||||||
|
private String substationName;
|
||||||
|
private String busId;
|
||||||
|
private String busName;
|
||||||
|
private String outLineIntervalId;
|
||||||
|
private String outLineIntervalName;
|
||||||
|
private String monitorObjTypeBig;
|
||||||
|
private String monitorObjTypeSmall;
|
||||||
|
private String monitorTag;
|
||||||
|
private String monitorObjName;
|
||||||
|
private String monitorObjId;
|
||||||
|
private String isLine;
|
||||||
|
private BigDecimal minShortCapacity;
|
||||||
|
private BigDecimal supplyEquipCapacity;
|
||||||
|
private BigDecimal userProtocolCapacity;
|
||||||
|
private String terminalCode;
|
||||||
|
private String terminalManufacturer;
|
||||||
|
private String terminalModel;
|
||||||
|
private String terminalManufactureNum;
|
||||||
|
private String terminalConnect;
|
||||||
|
private String neutralGround;
|
||||||
|
private String evtType;
|
||||||
|
private String statisticalType;
|
||||||
|
private String statisticalDate;
|
||||||
|
private String isMonitorOnline;
|
||||||
|
private String isTerminalOnline;
|
||||||
|
private Integer onlineMonitorNum;
|
||||||
|
private Integer runMonitorNum;
|
||||||
|
private BigDecimal onlineMonitorRate;
|
||||||
|
private Long expectCollectNum;
|
||||||
|
private Long actualCollectNum;
|
||||||
|
private BigDecimal dataFullRate;
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.njcn.device.pms.pojo.dto;
|
||||||
|
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ParkDto {
|
||||||
|
|
||||||
|
private List<PmsParkPO> parkVoListt;
|
||||||
|
|
||||||
|
|
||||||
|
private List<ParkSubstationRelVo> parkSubstationRelVoList;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class ParkSubstationRelVo{
|
||||||
|
private String objId;
|
||||||
|
private String parkId;
|
||||||
|
private String substationId;
|
||||||
|
private String substationProvinceOrg;
|
||||||
|
private String substationProvinceOrgName;
|
||||||
|
private String substationCityOrg;
|
||||||
|
private String substationCityOrgName;
|
||||||
|
private String substationMaintOrg;
|
||||||
|
private String substationMaintOrgName;
|
||||||
|
private String substationName;
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
private String substationRunStatus;
|
||||||
|
private String substationOperateDate;
|
||||||
|
private String createTime;
|
||||||
|
private String updateTime;
|
||||||
|
private String isDelete;
|
||||||
|
private String deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.njcn.device.pms.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class PmsParkParam {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位
|
||||||
|
*/
|
||||||
|
private String provinceOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位
|
||||||
|
*/
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位名称
|
||||||
|
*/
|
||||||
|
private String cityOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位
|
||||||
|
*/
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String maintOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区名称
|
||||||
|
*/
|
||||||
|
private String parkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区性质
|
||||||
|
*/
|
||||||
|
private String parkNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区级别
|
||||||
|
*/
|
||||||
|
private String parkLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区状态
|
||||||
|
*/
|
||||||
|
private String parkStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.删除 1.正常
|
||||||
|
*/
|
||||||
|
private LocalDateTime deleteTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class UpdatePmsParkParam extends PmsParkParam{
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class PmsParkQuery extends BaseParam {
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.device.pms.pojo.po;
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
@@ -28,6 +29,7 @@ public class PmsMidLedger extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* Id
|
* Id
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class PmsNewEnergy extends BaseEntity {
|
|||||||
private String voltageLevel;
|
private String voltageLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级
|
* 电站名称
|
||||||
*/
|
*/
|
||||||
@TableField("Powerr_Name")
|
@TableField("Powerr_Name")
|
||||||
private String powerrName;
|
private String powerrName;
|
||||||
@@ -66,11 +66,16 @@ public class PmsNewEnergy extends BaseEntity {
|
|||||||
private String objType;
|
private String objType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级
|
* 场站状态 01.在运站 02.新(改,扩)站
|
||||||
*/
|
*/
|
||||||
@TableField("station_status")
|
@TableField("station_status")
|
||||||
private String stationStatus;
|
private String stationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场站状态
|
||||||
|
*/
|
||||||
|
private Double ratedCapacity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-删除 1-正常
|
* 状态:0-删除 1-正常
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
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 java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pms_park")
|
||||||
|
public class PmsParkPO extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uuid
|
||||||
|
*/
|
||||||
|
@TableId(value = "obj_id",type = IdType.ASSIGN_UUID)
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位
|
||||||
|
*/
|
||||||
|
private String provinceOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位
|
||||||
|
*/
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位名称
|
||||||
|
*/
|
||||||
|
private String cityOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位
|
||||||
|
*/
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String maintOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区名称
|
||||||
|
*/
|
||||||
|
private String parkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区性质
|
||||||
|
*/
|
||||||
|
private String parkNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区级别
|
||||||
|
*/
|
||||||
|
private String parkLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区状态
|
||||||
|
*/
|
||||||
|
private String parkStatus;
|
||||||
|
|
||||||
|
|
||||||
|
private String isDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.删除 1.正常
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime deleteTime;
|
||||||
|
|
||||||
|
private String uploadStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pms_park_station_ass")
|
||||||
|
public class PmsParkStationAss {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
@NotBlank(message = "园区id不可为空")
|
||||||
|
private String parkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区所有电站id关联pms_mid_ledger
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "电站不可为空")
|
||||||
|
private String midStationId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package com.njcn.device.pms.controller.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkService;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pmsPark")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsParkController extends BaseController {
|
||||||
|
|
||||||
|
private final IPmsParkService iPmsParkService;
|
||||||
|
|
||||||
|
private final IPmsParkStationAssService iPmsParkStationAssService;
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/addPark")
|
||||||
|
@ApiOperation("新增园区")
|
||||||
|
public HttpResult<Object> addPark(@RequestBody PmsParkParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("addPark");
|
||||||
|
Boolean result = iPmsParkService.addPark(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
@PostMapping("/updatePark")
|
||||||
|
@ApiOperation("修改园区台账")
|
||||||
|
public HttpResult<Object> updatePark(@RequestBody PmsParkParam.UpdatePmsParkParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("updatePark");
|
||||||
|
Boolean result = iPmsParkService.updatePark(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/delPark")
|
||||||
|
@ApiOperation("修改园区台账")
|
||||||
|
public HttpResult<Object> delPark(@RequestBody List<String> ids) {
|
||||||
|
String methodDescribe = getMethodDescribe("delPark");
|
||||||
|
Boolean result = iPmsParkService.removeByIds(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pageList")
|
||||||
|
@ApiOperation("分页查询园区台账")
|
||||||
|
public HttpResult<Page<PmsParkPO>> pageList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("pageList");
|
||||||
|
Page<PmsParkPO> result = iPmsParkService.pageList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/uploadParkGw")
|
||||||
|
@ApiOperation("上送园区到国网")
|
||||||
|
public HttpResult<Boolean> uploadParkGw(@RequestBody List<String> objIds) {
|
||||||
|
String methodDescribe = getMethodDescribe("uploadParkGw");
|
||||||
|
Boolean result = iPmsParkService.uploadParkGw(objIds);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pageStationList")
|
||||||
|
@ApiOperation("分页查询园区下面的电站")
|
||||||
|
public HttpResult<Page<PmsMidLedger>> pageStationList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("pageStationList");
|
||||||
|
Page<PmsMidLedger> result = iPmsParkService.pageStationList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/stationList")
|
||||||
|
@ApiOperation("根据运行单位获取下面的电站")
|
||||||
|
public HttpResult<List<PmsMidLedger>> stationList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("stationList");
|
||||||
|
List<PmsMidLedger> result = iPmsParkService.stationList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/addParkStationAss")
|
||||||
|
@ApiOperation("新增园区电站")
|
||||||
|
public HttpResult<Object> addParkStationAss(@RequestBody PmsParkStationAss param) {
|
||||||
|
String methodDescribe = getMethodDescribe("addParkStationAss");
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PmsParkStationAss> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsParkStationAss::getParkId,param.getParkId()).eq(PmsParkStationAss::getMidStationId,param.getMidStationId());
|
||||||
|
long count = iPmsParkStationAssService.count(lambdaQueryWrapper);
|
||||||
|
if(count>0){
|
||||||
|
throw new BusinessException(CommonResponseEnum.FAIL,"园区已经存在该电站");
|
||||||
|
}
|
||||||
|
PmsParkStationAss pmsParkStationAss = new PmsParkStationAss();
|
||||||
|
BeanUtil.copyProperties(param,pmsParkStationAss);
|
||||||
|
Boolean result = iPmsParkStationAssService.save(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/delParkStationAss")
|
||||||
|
@ApiOperation("删除园区电站")
|
||||||
|
public HttpResult<Object> delParkStationAss(@RequestBody @Validated PmsParkStationAss param) {
|
||||||
|
String methodDescribe = getMethodDescribe("delParkStationAss");
|
||||||
|
LambdaQueryWrapper<PmsParkStationAss> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsParkStationAss::getParkId,param.getParkId()).eq(PmsParkStationAss::getMidStationId,param.getMidStationId());
|
||||||
|
Boolean result = iPmsParkStationAssService.remove(lambdaQueryWrapper);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.dto.ParkDto;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface PmsParkMapper extends BaseMapper<PmsParkPO> {
|
||||||
|
|
||||||
|
|
||||||
|
List<ParkDto.ParkSubstationRelVo> getParkStationAss(@Param("parkIds")List<String> parkIds);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface PmsParkStationAssMapper extends BaseMapper<PmsParkStationAss> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.PmsParkMapper">
|
||||||
|
|
||||||
|
<select id="getParkStationAss" resultType="com.njcn.device.pms.pojo.dto.ParkDto$ParkSubstationRelVo">
|
||||||
|
select
|
||||||
|
ass.obj_Id,
|
||||||
|
park.obj_id parkId,
|
||||||
|
mid.id substationId,
|
||||||
|
park.province_Org substationProvinceOrg,
|
||||||
|
park.province_Name substationProvinceOrgName,
|
||||||
|
mid.cityOrg substationCityOrg,
|
||||||
|
mid.cityOrgName substationCityOrgName,
|
||||||
|
mid.Operation_Id substationMaintOrg,
|
||||||
|
mid.Operation_Name substationMaintOrgName,
|
||||||
|
mid.name substationName,
|
||||||
|
LPAD(dic.Algo_Describe,2,0) substationVoltageLevel,
|
||||||
|
dicRun.value substationRunStatus,
|
||||||
|
mid.Operation_Date substationOperateDate
|
||||||
|
|
||||||
|
from pms_park park
|
||||||
|
inner join pms_park_station_ass ass on park.obj_id = ass.park_id
|
||||||
|
inner join pms_mid_ledger mid on ass.mid_station_id = mid.id
|
||||||
|
left join sys_dict_data dic on mid.voltage_Level = dic.id
|
||||||
|
left join sys_dict_data dicRun on mid.Run_Status = dicRun.id
|
||||||
|
where park.obj_id in
|
||||||
|
<foreach collection="parkIds" open="(" separator="," close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface IPmsParkService extends IService<PmsParkPO> {
|
||||||
|
|
||||||
|
|
||||||
|
Boolean addPark(PmsParkParam param);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Boolean updatePark(PmsParkParam.UpdatePmsParkParam updatePmsParkParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Page<PmsParkPO> pageList(PmsParkParam.PmsParkQuery parkQuery);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Boolean uploadParkGw(@RequestBody List<String> objIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Page<PmsMidLedger> pageStationList(PmsParkParam.PmsParkQuery param);
|
||||||
|
|
||||||
|
List<PmsMidLedger> stationList(PmsParkParam.PmsParkQuery param);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface IPmsParkStationAssService extends IService<PmsParkStationAss> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pms.enums.PmsEnum;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsMidLedgerMapper;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsParkMapper;
|
||||||
|
import com.njcn.device.pms.pojo.dto.ParkDto;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkService;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||||
|
import com.njcn.web.enums.GWSendEnum;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import com.njcn.web.pojo.param.SendParam;
|
||||||
|
import com.njcn.web.utils.GwSendUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsParkServiceImpl extends ServiceImpl<PmsParkMapper, PmsParkPO> implements IPmsParkService {
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final IPmsParkStationAssService iPmsParkStationAssService;
|
||||||
|
|
||||||
|
private final PmsMidLedgerMapper pmsMidLedgerMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addPark(PmsParkParam param) {
|
||||||
|
PmsParkPO pmsParkPO = new PmsParkPO();
|
||||||
|
BeanUtil.copyProperties(param, pmsParkPO);
|
||||||
|
pmsParkPO.setIsDelete(DataStateEnum.ENABLE.getCode().toString());
|
||||||
|
pmsParkPO.setUploadStatus(PmsEnum.NO_UPLOAD.getCode());
|
||||||
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
|
getOrgCode(dept,pmsParkPO);
|
||||||
|
return this.save(pmsParkPO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean updatePark(PmsParkParam.UpdatePmsParkParam updatePmsParkParam) {
|
||||||
|
PmsParkPO result = this.getById(updatePmsParkParam.getObjId());
|
||||||
|
PmsParkPO pmsParkPO = new PmsParkPO();
|
||||||
|
BeanUtil.copyProperties(updatePmsParkParam, pmsParkPO);
|
||||||
|
if(result.getUploadStatus().equals(PmsEnum.HAS_UPLOAD.getCode())){
|
||||||
|
pmsParkPO.setUploadStatus(PmsEnum.WAIT_RETURN_UPLOAD.getCode());
|
||||||
|
}
|
||||||
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
|
getOrgCode(dept,pmsParkPO);
|
||||||
|
return this.updateById(pmsParkPO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<PmsParkPO> pageList(PmsParkParam.PmsParkQuery parkQuery) {
|
||||||
|
List<String> deptCodes = deptFeignClient.getDepSonSelfCodetByDeptId(parkQuery.getMaintOrg()).getData();
|
||||||
|
LambdaQueryWrapper<PmsParkPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsParkPO::getMaintOrg, deptCodes);
|
||||||
|
return this.page(new Page<>(PageFactory.getPageNum(parkQuery), PageFactory.getPageSize(parkQuery)), lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean uploadParkGw(List<String> objIds) {
|
||||||
|
List<PmsParkPO> pmsParkPOList;
|
||||||
|
if(CollUtil.isEmpty(objIds)){
|
||||||
|
LambdaQueryWrapper<PmsParkPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsParkPO::getUploadStatus, Stream.of(PmsEnum.NO_UPLOAD.getCode(),PmsEnum.WAIT_RETURN_UPLOAD.getCode()).collect(Collectors.toList()));
|
||||||
|
pmsParkPOList = this.list(lambdaQueryWrapper);
|
||||||
|
}else {
|
||||||
|
pmsParkPOList = this.listByIds(objIds);
|
||||||
|
}
|
||||||
|
List<String> ids = pmsParkPOList.stream().map(PmsParkPO::getObjId).collect(Collectors.toList());
|
||||||
|
List<ParkDto.ParkSubstationRelVo> stationList = this.baseMapper.getParkStationAss(ids);
|
||||||
|
|
||||||
|
List<ParkDto> dtoList = new ArrayList<>();
|
||||||
|
ParkDto parkDto = new ParkDto();
|
||||||
|
parkDto.setParkVoListt(pmsParkPOList);
|
||||||
|
if(CollUtil.isNotEmpty(stationList)){
|
||||||
|
parkDto.setParkSubstationRelVoList(stationList);
|
||||||
|
}
|
||||||
|
dtoList.add(parkDto);
|
||||||
|
|
||||||
|
SendParam sendParam = new SendParam();
|
||||||
|
sendParam.setStats(dtoList);
|
||||||
|
Map<String,String> map = GwSendUtil.send(sendParam, GWSendEnum.PARK_AND_STATION);
|
||||||
|
GwSendUtil.returnInfoMsg(objIds,map);
|
||||||
|
|
||||||
|
LambdaUpdateWrapper<PmsParkPO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.set(PmsParkPO::getUploadStatus,PmsEnum.HAS_UPLOAD).eq(PmsParkPO::getObjId,objIds);
|
||||||
|
this.update(updateWrapper);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<PmsMidLedger> pageStationList(PmsParkParam.PmsParkQuery param) {
|
||||||
|
Page<PmsMidLedger> result = new Page<>(param.getPageNum(),param.getPageSize());
|
||||||
|
List<PmsParkStationAss> pmsParkStationAssList = iPmsParkStationAssService.list(new LambdaQueryWrapper<PmsParkStationAss>().eq(PmsParkStationAss::getParkId,param.getObjId()));
|
||||||
|
List<String> ids = pmsParkStationAssList.stream().map(PmsParkStationAss::getMidStationId).collect(Collectors.toList());
|
||||||
|
if(CollUtil.isEmpty(ids)){
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<PmsMidLedger> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsMidLedger::getId,ids);
|
||||||
|
result = pmsMidLedgerMapper.selectPage(new Page<>(PageFactory.getPageNum(param),PageFactory.getPageSize(param)),lambdaQueryWrapper);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PmsMidLedger> stationList(PmsParkParam.PmsParkQuery param) {
|
||||||
|
List<String> ids = deptFeignClient.getDepSonSelfCodetByCode(param.getCityOrg()).getData();
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PmsMidLedger> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.select(PmsMidLedger::getName,PmsMidLedger::getOperationName,PmsMidLedger::getId).in(PmsMidLedger::getOperationId,ids).eq(PmsMidLedger::getLevel,0);
|
||||||
|
List<PmsMidLedger> pmsMidLedgerList = pmsMidLedgerMapper.selectList(lambdaQueryWrapper);
|
||||||
|
return pmsMidLedgerList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void getOrgCode(List<PvTerminalTreeVO> dept,PmsParkPO pmsParkPO){
|
||||||
|
PvTerminalTreeVO pvTerminalTreeVO = dept.stream().filter(it->it.getCode().equals(pmsParkPO.getMaintOrg())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(pvTerminalTreeVO)){
|
||||||
|
if(pvTerminalTreeVO.getLevel() == 1 || pvTerminalTreeVO.getLevel() == 2){
|
||||||
|
throw new BusinessException("请选择省级以下单位");
|
||||||
|
}else if(pvTerminalTreeVO.getLevel() == 3){
|
||||||
|
PvTerminalTreeVO province = dept.stream().filter(it->it.getId().equals(pvTerminalTreeVO.getPid())).findFirst().orElse(null);
|
||||||
|
pmsParkPO.setCityOrg(pvTerminalTreeVO.getCode());
|
||||||
|
pmsParkPO.setCityOrgName(pvTerminalTreeVO.getName());
|
||||||
|
|
||||||
|
if(Objects.nonNull(province)){
|
||||||
|
pmsParkPO.setProvinceOrg(province.getCode());
|
||||||
|
pmsParkPO.setProvinceName(province.getName());
|
||||||
|
}
|
||||||
|
} else if(pvTerminalTreeVO.getLevel() == 4){
|
||||||
|
PvTerminalTreeVO city = dept.stream().filter(it->it.getId().equals(pvTerminalTreeVO.getPid())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(city)){
|
||||||
|
pmsParkPO.setCityOrg(city.getCode());
|
||||||
|
pmsParkPO.setCityOrgName(city.getName());
|
||||||
|
|
||||||
|
PvTerminalTreeVO province = dept.stream().filter(it->it.getId().equals(city.getPid())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(province)){
|
||||||
|
pmsParkPO.setProvinceOrg(province.getCode());
|
||||||
|
pmsParkPO.setProvinceName(province.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsParkStationAssMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PmsParkStationAssServiceImpl extends ServiceImpl<PmsParkStationAssMapper, PmsParkStationAss> implements IPmsParkStationAssService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,6 +22,11 @@
|
|||||||
<artifactId>common-device-biz</artifactId>
|
<artifactId>common-device-biz</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>pqs-influx</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -47,4 +47,7 @@ public interface DeptLineFeignClient {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/getLineNodeByDeptId")
|
@PostMapping("/getLineNodeByDeptId")
|
||||||
HttpResult<List<String>> getLineNodeByDeptId(@RequestParam("id") String id);
|
HttpResult<List<String>> getLineNodeByDeptId(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
@PostMapping("/getAllData")
|
||||||
|
HttpResult<List<DeptLine>> getAllData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.njcn.device.pq.api;
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
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.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||||
import com.njcn.device.pq.pojo.dto.*;
|
import com.njcn.device.pq.pojo.dto.*;
|
||||||
import com.njcn.device.pq.pojo.param.DataParam;
|
import com.njcn.device.pq.pojo.param.DataParam;
|
||||||
@@ -343,4 +347,10 @@ public interface LineFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/getDeptDeviceDetailData")
|
@PostMapping("/getDeptDeviceDetailData")
|
||||||
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param);
|
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param);
|
||||||
|
|
||||||
|
@PostMapping("/getNoDataLine")
|
||||||
|
HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine();
|
||||||
|
|
||||||
|
@PostMapping("/getReportLineInfo")
|
||||||
|
HttpResult<List<ReportLineInfoVo>> getReportLineInfo(@RequestBody List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ public class DeptLineFeignClientFallbackFactory implements FallbackFactory<DeptL
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "根据部门信息id查询监测点id集合", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "根据部门信息id查询监测点id集合", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DeptLine>> getAllData() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取部门监测点表所有数据", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,6 +269,18 @@ public class LineFeignClientFallbackFactory implements FallbackFactory<LineFeign
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "更新监测点运行状态: ", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "更新监测点运行状态: ", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取当日无数据的监测点: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<ReportLineInfoVo>> getReportLineInfo(List<String> ids) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据监测点id获取预告警单基础信息: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,4 +93,17 @@ public class LineDetailVO implements Serializable {
|
|||||||
@ApiModelProperty("已用流量占比")
|
@ApiModelProperty("已用流量占比")
|
||||||
private Float flowProportion;
|
private Float flowProportion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class noDataLineInfo extends LineDetailVO implements Serializable{
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点Id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端id")
|
||||||
|
private String devId;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ReportLineInfoVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司名称")
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点电压等级")
|
||||||
|
private String lineVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属电站")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象名称")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
@ApiModelProperty("电网侧变电站")
|
||||||
|
private String subVName;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测装置网络参数")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小短路容量")
|
||||||
|
private Double shortCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电设备容量")
|
||||||
|
private Double devCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("协议容量")
|
||||||
|
private Double dealCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("超标天数")
|
||||||
|
private Integer overDays;
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
|
import com.njcn.device.pq.mapper.DeptLineMapper;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
@@ -37,6 +38,7 @@ import java.util.Map;
|
|||||||
public class DeptLineController extends BaseController {
|
public class DeptLineController extends BaseController {
|
||||||
|
|
||||||
private final DeptLineService deptLineService;
|
private final DeptLineService deptLineService;
|
||||||
|
private final DeptLineMapper deptLineMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门绑定监测点
|
* 部门绑定监测点
|
||||||
@@ -146,4 +148,13 @@ public class DeptLineController extends BaseController {
|
|||||||
List<String> list = deptLineService.getLineNodeByDeptId(id);
|
List<String> list = deptLineService.getLineNodeByDeptId(id);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/getAllData")
|
||||||
|
@ApiOperation("获取部门监测点表所有数据")
|
||||||
|
public HttpResult<List<DeptLine>> getAllData() {
|
||||||
|
String methodDescribe = getMethodDescribe("getAllData");
|
||||||
|
List<DeptLine> list = deptLineMapper.selectList(null);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -516,4 +516,22 @@ public class LineController extends BaseController {
|
|||||||
List<LineDetailVO.Detail> deptDeviceDetailData = lineService.getDeptDeviceDetailData(param);
|
List<LineDetailVO.Detail> deptDeviceDetailData = lineService.getDeptDeviceDetailData(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceDetailData, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceDetailData, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("获取当日无数据的监测点")
|
||||||
|
@PostMapping("/getNoDataLine")
|
||||||
|
HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine(){
|
||||||
|
String methodDescribe = getMethodDescribe("getNoDataLine");
|
||||||
|
List<LineDetailVO.noDataLineInfo> result = lineService.getNoDataLine();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("根据监测点id获取预告警单基础信息")
|
||||||
|
@PostMapping("/getReportLineInfo")
|
||||||
|
HttpResult<List<ReportLineInfoVo>> getReportLineInfo(@RequestBody List<String> ids){
|
||||||
|
String methodDescribe = getMethodDescribe("getReportLineInfo");
|
||||||
|
List<ReportLineInfoVo> result = lineService.getReportLineInfo(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -551,4 +551,8 @@ public interface LineMapper extends BaseMapper<Line> {
|
|||||||
@Param("type")Integer type);
|
@Param("type")Integer type);
|
||||||
|
|
||||||
LineDetailVO getLineInfoVO(@Param("id")String id);
|
LineDetailVO getLineInfoVO(@Param("id")String id);
|
||||||
|
|
||||||
|
List<LineDetailVO.noDataLineInfo> getNoDataLine(@Param("time")String time);
|
||||||
|
|
||||||
|
List<ReportLineInfoVo> getReportLineInfo(@Param("ids")List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1646,7 +1646,6 @@
|
|||||||
AND device.id = deviceDetail.id
|
AND device.id = deviceDetail.id
|
||||||
AND line.id = lineDetail.id
|
AND line.id = lineDetail.id
|
||||||
AND vg.Id = voltage.id
|
AND vg.Id = voltage.id
|
||||||
|
|
||||||
<if test="ids!=null and ids.size() > 0">
|
<if test="ids!=null and ids.size() > 0">
|
||||||
AND line.id IN
|
AND line.id IN
|
||||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
@@ -1655,17 +1654,71 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="searchValue!=null and searchValue!='' and type==2">
|
<if test="searchValue!=null and searchValue!='' and type==2">
|
||||||
and (
|
and (
|
||||||
lineName like CONCAT('%', #{searchValue}, '%')
|
line.NAME like CONCAT('%',SUBSTRING_INDEX(#{searchValue}, '_', -1), '%')
|
||||||
or subName like CONCAT('%', #{searchValue}, '%')
|
or voltage.NAME like CONCAT('%', SUBSTRING_INDEX(#{searchValue}, '_', 1), '%')
|
||||||
|
or substation.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="searchValue!=null and searchValue!='' and type==1">
|
<if test="searchValue!=null and searchValue!='' and type==1">
|
||||||
and (
|
and (
|
||||||
devName like CONCAT('%', #{searchValue}, '%')
|
device.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
or subName like CONCAT('%', #{searchValue}, '%')
|
or substation.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getNoDataLine" resultType="com.njcn.device.pq.pojo.vo.LineDetailVO$noDataLineInfo">
|
||||||
|
select
|
||||||
|
pl3.Id lineId,
|
||||||
|
pl3.Name lineName,
|
||||||
|
pd.Id devId,
|
||||||
|
pl1.name devName,
|
||||||
|
pd.Update_Time
|
||||||
|
from
|
||||||
|
pq_device pd
|
||||||
|
left join pq_line pl1 on pd.Id = pl1.Id
|
||||||
|
left join pq_line pl2 on pl1.Id = pl2.pId
|
||||||
|
left join pq_line pl3 on pl2.Id = pl3.pId
|
||||||
|
where
|
||||||
|
pd.Dev_Model = 1
|
||||||
|
and pd.Run_Flag = 0
|
||||||
|
and pl1.state = 1
|
||||||
|
and pl3.Id is not null
|
||||||
|
and pd.Update_Time < #{time}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getReportLineInfo" resultType="com.njcn.device.pq.pojo.vo.ReportLineInfoVo">
|
||||||
|
select
|
||||||
|
pl5.Name gdName,
|
||||||
|
sdd.Name lineVoltage,
|
||||||
|
pl.id lineId,
|
||||||
|
pl.name lineName,
|
||||||
|
pl4.Name subName,
|
||||||
|
pld.Obj_Name objName,
|
||||||
|
pl4.name subVName,
|
||||||
|
pd.Update_Time updateTime,
|
||||||
|
pd.IP ip,
|
||||||
|
pld.Short_Capacity shortCapacity,
|
||||||
|
pld.Dev_Capacity devCapacity,
|
||||||
|
pld.Deal_Capacity dealCapacity
|
||||||
|
from
|
||||||
|
pq_line pl
|
||||||
|
left join pq_line_detail pld on pl.Id = pld.Id
|
||||||
|
left join pq_line pl2 on pl.pId = pl2.Id
|
||||||
|
left join pq_line pl3 on pl2.pId = pl3.Id
|
||||||
|
left join pq_line pl4 on pl3.pId = pl4.Id
|
||||||
|
left join pq_line pl5 on pl4.pId = pl5.Id
|
||||||
|
left join pq_line pl6 on pl5.pId = pl6.Id
|
||||||
|
left join pq_voltage pv on pv.Id = pl2.Id
|
||||||
|
left join pq_device pd on pl3.Id = pd.Id
|
||||||
|
left join sys_dict_data sdd on pv.`Scale` = sdd.Id
|
||||||
|
where
|
||||||
|
<if test="ids!=null and ids.size() > 0">
|
||||||
|
pl.Id IN
|
||||||
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -220,4 +220,8 @@ public interface LineService extends IService<Line> {
|
|||||||
List<LineALLInfoDTO> getLineAllDetailList(List<String> ids);
|
List<LineALLInfoDTO> getLineAllDetailList(List<String> ids);
|
||||||
|
|
||||||
List<LineDetailVO.Detail> getDeptDeviceDetailData(DataParam param);
|
List<LineDetailVO.Detail> getDeptDeviceDetailData(DataParam param);
|
||||||
|
|
||||||
|
List<LineDetailVO.noDataLineInfo> getNoDataLine();
|
||||||
|
|
||||||
|
List<ReportLineInfoVo> getReportLineInfo(List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,11 +386,14 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
.filter(x -> finalI == x.getRunFlag())
|
.filter(x -> finalI == x.getRunFlag())
|
||||||
.map(Device::getId).distinct().collect(Collectors.toList());
|
.map(Device::getId).distinct().collect(Collectors.toList());
|
||||||
list.add(String.valueOf(devices.size()));
|
list.add(String.valueOf(devices.size()));
|
||||||
|
//当终端信息是0标识需要进行在线率查询,并进行赋值
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
if(CollUtil.isNotEmpty(devices)) {
|
||||||
onlineRateParam.setIds(devices);
|
onlineRateParam.setIds(devices);
|
||||||
list.add(String.valueOf(onLineRateDMapper.getTotalOnlineRates(onlineRateParam)));
|
list.add(String.valueOf(onLineRateDMapper.getTotalOnlineRates(onlineRateParam)));
|
||||||
} else {
|
}else {
|
||||||
list.add(String.valueOf(3.14159));
|
list.add("0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = new GridDiagramVO.DevData();
|
data = new GridDiagramVO.DevData();
|
||||||
@@ -398,7 +401,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
data.setOrgName(dto.getName());
|
data.setOrgName(dto.getName());
|
||||||
data.setRunNum(Long.valueOf(list.get(0)));
|
data.setRunNum(Long.valueOf(list.get(0)));
|
||||||
data.setOverhaulNum(Long.valueOf(list.get(2)));
|
data.setOverhaulNum(Long.valueOf(list.get(2)));
|
||||||
data.setRefundNum(Long.valueOf(list.get(4)));
|
data.setRefundNum(Long.valueOf(list.get(3)));
|
||||||
data.setOnLineRate(Float.valueOf(list.get(1)));
|
data.setOnLineRate(Float.valueOf(list.get(1)));
|
||||||
info.add(data);
|
info.add(data);
|
||||||
}
|
}
|
||||||
@@ -456,7 +459,11 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
details.setOnLineNum(onIds.size());
|
details.setOnLineNum(onIds.size());
|
||||||
details.setOnLineNumList(onIds);
|
details.setOnLineNumList(onIds);
|
||||||
baseQueryParam.setLineIds(ids);
|
baseQueryParam.setLineIds(ids);
|
||||||
|
if(CollUtil.isNotEmpty(ids)){
|
||||||
details.setIntegrityRate(integrityDMapper.selectTotalIntegrityByLineIds(baseQueryParam));
|
details.setIntegrityRate(integrityDMapper.selectTotalIntegrityByLineIds(baseQueryParam));
|
||||||
|
}else{
|
||||||
|
details.setIntegrityRate(0.0f);
|
||||||
|
}
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -16,10 +17,11 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.common.utils.EnumUtils;
|
import com.njcn.common.utils.EnumUtils;
|
||||||
import com.njcn.common.utils.PubUtils;
|
import com.njcn.common.utils.PubUtils;
|
||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||||
|
import com.njcn.device.pq.mapper.*;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
@@ -30,7 +32,6 @@ import com.njcn.device.pq.pojo.param.PqsParam;
|
|||||||
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
||||||
import com.njcn.device.pq.pojo.po.*;
|
import com.njcn.device.pq.pojo.po.*;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.mapper.*;
|
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
import com.njcn.device.pq.service.LineService;
|
import com.njcn.device.pq.service.LineService;
|
||||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||||
@@ -44,7 +45,6 @@ import com.njcn.system.pojo.po.Area;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import com.njcn.web.pojo.vo.LineDataVO;
|
import com.njcn.web.pojo.vo.LineDataVO;
|
||||||
import com.njcn.web.utils.GeneralUtil;
|
import com.njcn.web.utils.GeneralUtil;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
@@ -52,11 +52,13 @@ import com.njcn.web.utils.WebUtil;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -100,6 +102,9 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
private final DeptLineService deptLineService;
|
private final DeptLineService deptLineService;
|
||||||
@Override
|
@Override
|
||||||
public LineDetailDataVO getLineDetailData(String id) {
|
public LineDetailDataVO getLineDetailData(String id) {
|
||||||
|
if(StringUtils.isEmpty(id)){
|
||||||
|
return new LineDetailDataVO();
|
||||||
|
}else {
|
||||||
//根据id查询当前信息的pids
|
//根据id查询当前信息的pids
|
||||||
List<String> pids = Arrays.asList(this.baseMapper.selectById(id).getPids().split(","));
|
List<String> pids = Arrays.asList(this.baseMapper.selectById(id).getPids().split(","));
|
||||||
List<String> list = new ArrayList(pids);
|
List<String> list = new ArrayList(pids);
|
||||||
@@ -138,7 +143,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
Device device = deviceMapper.selectById(devId);
|
Device device = deviceMapper.selectById(devId);
|
||||||
lineDetailDataVO.setManufacturer(dicDataFeignClient.getDicDataById(device.getManufacturer()).getData().getName());
|
lineDetailDataVO.setManufacturer(dicDataFeignClient.getDicDataById(device.getManufacturer()).getData().getName());
|
||||||
lineDetailDataVO.setComFlag(PubUtils.comFlag(device.getComFlag()));
|
lineDetailDataVO.setComFlag(PubUtils.comFlag(device.getComFlag()));
|
||||||
lineDetailDataVO.setRunFlag(PubUtils.runFlag(device.getRunFlag()));
|
lineDetailDataVO.setRunFlag(PubUtils.lineRunFlag(lineDetail.getRunFlag()));
|
||||||
lineDetailDataVO.setIp(device.getIp());
|
lineDetailDataVO.setIp(device.getIp());
|
||||||
lineDetailDataVO.setLoginTime(device.getLoginTime());
|
lineDetailDataVO.setLoginTime(device.getLoginTime());
|
||||||
lineDetailDataVO.setDevId(device.getId());
|
lineDetailDataVO.setDevId(device.getId());
|
||||||
@@ -163,6 +168,8 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
return lineDetailDataVO;
|
return lineDetailDataVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LineOverLimitVO getLineOverLimitData(String id) {
|
public LineOverLimitVO getLineOverLimitData(String id) {
|
||||||
//根据监测点id查询所在监测点的限值表数据
|
//根据监测点id查询所在监测点的限值表数据
|
||||||
@@ -676,6 +683,17 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LineDetailVO.noDataLineInfo> getNoDataLine() {
|
||||||
|
String time = DateUtil.format(LocalDateTime.now(), DatePattern.NORM_DATE_PATTERN);
|
||||||
|
return this.baseMapper.getNoDataLine(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ReportLineInfoVo> getReportLineInfo(List<String> ids) {
|
||||||
|
return this.baseMapper.getReportLineInfo(ids);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1,2).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1,2).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||||
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
|
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
||||||
@@ -116,6 +117,7 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
public Page<RunTimeVO> getDeviceLedger(RunManageParam runManageParam) {
|
public Page<RunTimeVO> getDeviceLedger(RunManageParam runManageParam) {
|
||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
||||||
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
||||||
throw new BusinessException("当前部门没有装置台账");
|
throw new BusinessException("当前部门没有装置台账");
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
|||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
deviceInfoParam.setDeptIndex(RequestUtil.getDeptIndex());
|
deviceInfoParam.setDeptIndex(RequestUtil.getDeptIndex());
|
||||||
deviceInfoParam.setServerName(ServerEnum.HARMONIC.getName());
|
deviceInfoParam.setServerName(ServerEnum.HARMONIC.getName());
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||||
|
|
||||||
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
||||||
if (CollectionUtil.isEmpty(generalDeviceDTO.getLineIndexes())) {
|
if (CollectionUtil.isEmpty(generalDeviceDTO.getLineIndexes())) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
|||||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
|
||||||
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -31,4 +32,7 @@ public interface RStatLimitRateDClient {
|
|||||||
@PostMapping("/monitorIdsGetLimitTargetInfo")
|
@PostMapping("/monitorIdsGetLimitTargetInfo")
|
||||||
HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);
|
HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);
|
||||||
|
|
||||||
|
@PostMapping("/monitorOverLimitDays")
|
||||||
|
HttpResult<List<RStatLimitTargetVO>> monitorOverLimitDays(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
|||||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
|
||||||
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -49,6 +50,12 @@ public class RStatLimitRateDFeignClientFallbackFactory implements FallbackFactor
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "获取指定日期超标监测点详细信息", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "获取指定日期超标监测点详细信息", throwable.toString());
|
||||||
return new HttpResult<>(CommonResponseEnum.FAIL.getCode(),CommonResponseEnum.FAIL.getMessage());
|
return new HttpResult<>(CommonResponseEnum.FAIL.getCode(),CommonResponseEnum.FAIL.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RStatLimitTargetVO>> monitorOverLimitDays(RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "按日期查询监测点各指标越限天数", throwable.toString());
|
||||||
|
return new HttpResult<>(CommonResponseEnum.FAIL.getCode(),CommonResponseEnum.FAIL.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,6 @@ public class RStatLimitQueryParam {
|
|||||||
private List<String> ids;
|
private List<String> ids;
|
||||||
|
|
||||||
private String date;
|
private String date;
|
||||||
|
|
||||||
|
private String endDate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.harmonic.pojo.param.upload;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@@ -174,8 +175,16 @@ public class RUploadWorkOrderParam {
|
|||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public static class RUploadWorkOrderQuery extends BaseParam {
|
public static class RUploadWorkOrderQuery extends BaseParam {
|
||||||
|
|
||||||
|
private String orderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位ID
|
||||||
|
*/
|
||||||
|
private String maintainerId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -97,26 +99,31 @@ public class RUploadWorkOrderPO {
|
|||||||
/**
|
/**
|
||||||
* 事件时间
|
* 事件时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate eventTime;
|
private LocalDate eventTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下发时间
|
* 下发时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime distributeTime;
|
private LocalDateTime distributeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闭环时间
|
* 闭环时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate closedLoopTime;
|
private LocalDate closedLoopTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime ctime;
|
private LocalDateTime ctime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime mtime;
|
private LocalDateTime mtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.删除 1.正常
|
* 0.删除 1.正常
|
||||||
*/
|
*/
|
||||||
private Boolean isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3-省,4-市
|
* 3-省,4-市
|
||||||
@@ -136,6 +143,7 @@ public class RUploadWorkOrderPO {
|
|||||||
/**
|
/**
|
||||||
* 反馈时间
|
* 反馈时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate feedbackTime;
|
private LocalDate feedbackTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -146,6 +154,7 @@ public class RUploadWorkOrderPO {
|
|||||||
/**
|
/**
|
||||||
* 接收时间
|
* 接收时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime receiveTime;
|
private LocalDateTime receiveTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,6 +170,7 @@ public class RUploadWorkOrderPO {
|
|||||||
/**
|
/**
|
||||||
* 上报时间
|
* 上报时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate uploadTime;
|
private LocalDate uploadTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,6 +181,7 @@ public class RUploadWorkOrderPO {
|
|||||||
/**
|
/**
|
||||||
* 要求整改时间
|
* 要求整改时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate planRectificationTime;
|
private LocalDate planRectificationTime;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,4 +67,10 @@ public class RStatLimitTargetVO {
|
|||||||
@ApiModelProperty("间谐波电压限值天数")
|
@ApiModelProperty("间谐波电压限值天数")
|
||||||
private Integer inuharmOvertime = 0;
|
private Integer inuharmOvertime = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有指标越限天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("所有指标越限天数")
|
||||||
|
private Integer allOvertime = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.njcn.harmonic.utils;
|
package com.njcn.harmonic.utils;
|
||||||
|
|
||||||
|
import ch.qos.logback.core.rolling.helper.FileStoreUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import org.apache.poi.xwpf.usermodel.*;
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import javax.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -30,7 +33,7 @@ public class WordUtil2 {
|
|||||||
this.replaceInTable(doc, params); // 替换表格里面的变量
|
this.replaceInTable(doc, params); // 替换表格里面的变量
|
||||||
this.replaceInPara(doc, params); // 替换文本里面的变量
|
this.replaceInPara(doc, params); // 替换文本里面的变量
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("获取报告模板异常,原因为:" + e.toString());
|
logger.error("获取报告模板异常,原因为:" + e);
|
||||||
} finally {
|
} finally {
|
||||||
if (null != inStream) {
|
if (null != inStream) {
|
||||||
inStream.close();
|
inStream.close();
|
||||||
@@ -43,7 +46,7 @@ public class WordUtil2 {
|
|||||||
doc.write(outputStream);
|
doc.write(outputStream);
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("输出稳态报告异常,原因为:" + e.toString());
|
logger.error("输出稳态报告异常,原因为:" + e);
|
||||||
} finally {
|
} finally {
|
||||||
if (doc != null) {
|
if (doc != null) {
|
||||||
doc.close();
|
doc.close();
|
||||||
@@ -51,6 +54,42 @@ public class WordUtil2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InputStream getReportFile(String path, Map<String, Object> params, List<List<String[]>> tableList)
|
||||||
|
throws Exception {
|
||||||
|
path = ClearPathUtil.cleanString(path);
|
||||||
|
InputStream inStream = null,in = null;
|
||||||
|
CustomXWPFDocument doc = null;
|
||||||
|
//读取报告模板
|
||||||
|
try {
|
||||||
|
inStream = new ClassPathResource(path).getInputStream();;
|
||||||
|
doc = new CustomXWPFDocument(inStream);
|
||||||
|
this.replaceInTable(doc,params,tableList);
|
||||||
|
this.replaceInPara(doc, params);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error("获取报告模板异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (null != inStream) {
|
||||||
|
inStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//临时缓冲区
|
||||||
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
doc.write(out);
|
||||||
|
byte[] docByteAry = out.toByteArray();
|
||||||
|
in = new ByteArrayInputStream(docByteAry);
|
||||||
|
out.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("输出稳态报告异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (doc != null) {
|
||||||
|
doc.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 替换段落里面的变量
|
* 替换段落里面的变量
|
||||||
*
|
*
|
||||||
@@ -210,36 +249,36 @@ public class WordUtil2 {
|
|||||||
* @param tableList 插入数据集合
|
* @param tableList 插入数据集合
|
||||||
*/
|
*/
|
||||||
private static void insertTable(XWPFTable table, List<String[]> tableList) {
|
private static void insertTable(XWPFTable table, List<String[]> tableList) {
|
||||||
|
//删除占位符行数
|
||||||
|
table.removeRow(1);
|
||||||
|
if (CollUtil.isNotEmpty(tableList)) {
|
||||||
// 创建行,根据需要插入的数据添加新行,不处理表头
|
// 创建行,根据需要插入的数据添加新行,不处理表头
|
||||||
for (int i = 0; i < tableList.size(); i++) {
|
for (int i = 0; i < tableList.size(); i++) {
|
||||||
XWPFTableRow row = table.createRow();
|
XWPFTableRow row = table.createRow();
|
||||||
}
|
List<XWPFTableCell> cells = row.getTableCells();
|
||||||
// 遍历表格插入数据
|
|
||||||
List<XWPFTableRow> rows = table.getRows();
|
|
||||||
int length = table.getRows().size();
|
|
||||||
for (int i = 1; i < length - 1; i++) {
|
|
||||||
XWPFTableRow newRow = table.getRow(i);
|
|
||||||
List<XWPFTableCell> cells = newRow.getTableCells();
|
|
||||||
for (int j = 0; j < cells.size(); j++) {
|
for (int j = 0; j < cells.size(); j++) {
|
||||||
XWPFTableCell cell = cells.get(j);
|
XWPFTableCell cell = cells.get(j);
|
||||||
String s = tableList.get(i - 1)[j];
|
String s = tableList.get(i)[j];
|
||||||
cell.setText(s);
|
cell.setText(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 替换表格里面的变量
|
* 替换表格里面的变量
|
||||||
*
|
*
|
||||||
* @param doc 要替换的文档
|
* @param doc 要替换的文档
|
||||||
|
* @param tableList 存放数据顺序要与表格一致
|
||||||
* @param params 参数
|
* @param params 参数
|
||||||
*/
|
*/
|
||||||
private void replaceInTable(CustomXWPFDocument doc, Map<String, Object> params, List<String[]> tableList) {
|
private void replaceInTable(CustomXWPFDocument doc, Map<String, Object> params, List<List<String[]>> tableList) {
|
||||||
Iterator<XWPFTable> iterator = doc.getTablesIterator();
|
Iterator<XWPFTable> iterator = doc.getTablesIterator();
|
||||||
XWPFTable table;
|
XWPFTable table;
|
||||||
List<XWPFTableRow> rows;
|
List<XWPFTableRow> rows;
|
||||||
List<XWPFTableCell> cells;
|
List<XWPFTableCell> cells;
|
||||||
List<XWPFParagraph> paras;
|
List<XWPFParagraph> paras;
|
||||||
|
Integer num=0;
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
table = iterator.next();
|
table = iterator.next();
|
||||||
if (table.getRows().size() > 1) {
|
if (table.getRows().size() > 1) {
|
||||||
@@ -249,14 +288,13 @@ public class WordUtil2 {
|
|||||||
for (XWPFTableRow row : rows) {
|
for (XWPFTableRow row : rows) {
|
||||||
cells = row.getTableCells();
|
cells = row.getTableCells();
|
||||||
for (XWPFTableCell cell : cells) {
|
for (XWPFTableCell cell : cells) {
|
||||||
paras = cell.getParagraphs();
|
List<XWPFParagraph> paragraphListTable = cell.getParagraphs();
|
||||||
for (XWPFParagraph para : paras) {
|
processParagraphs(paragraphListTable, params, doc);
|
||||||
this.replaceInPara(para, params, doc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
insertTable(table, tableList); // 插入数据
|
insertTable(table, tableList.get(num)); // 插入数据
|
||||||
|
num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
|
||||||
import com.njcn.harmonic.service.majornetwork.RStatLimitService;
|
import com.njcn.harmonic.service.majornetwork.RStatLimitService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -54,4 +55,13 @@ public class RStatLimitController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/monitorOverLimitDays")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("按日期查询监测点各指标越限天数")
|
||||||
|
public HttpResult<List<RStatLimitTargetVO>> monitorOverLimitDays(@RequestBody RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("monitorOverLimitDays");
|
||||||
|
List<RStatLimitTargetVO> result = rStatLimitService.monitorOverLimitDays(rStatLimitQueryParam.getDate(),rStatLimitQueryParam.getEndDate(),rStatLimitQueryParam.getIds());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -360,7 +360,8 @@
|
|||||||
SUM( ubalance_overtime ) AS ubalanceOvertime,
|
SUM( ubalance_overtime ) AS ubalanceOvertime,
|
||||||
SUM( uaberrance_overtime ) AS uaberranceOvertime,
|
SUM( uaberrance_overtime ) AS uaberranceOvertime,
|
||||||
SUM( i_neg_overtime ) AS iNegOvertime,
|
SUM( i_neg_overtime ) AS iNegOvertime,
|
||||||
sum(if((uharm_2_overtime+
|
sum(if((uaberrance_overtime+
|
||||||
|
uharm_2_overtime+
|
||||||
uharm_3_overtime+
|
uharm_3_overtime+
|
||||||
uharm_4_overtime+
|
uharm_4_overtime+
|
||||||
uharm_5_overtime+
|
uharm_5_overtime+
|
||||||
@@ -423,7 +424,77 @@
|
|||||||
inuharm_13_overtime+
|
inuharm_13_overtime+
|
||||||
inuharm_14_overtime+
|
inuharm_14_overtime+
|
||||||
inuharm_15_overtime+
|
inuharm_15_overtime+
|
||||||
inuharm_16_overtime)>0,1,0)) as inuharmOvertime
|
inuharm_16_overtime)>0,1,0)) as inuharmOvertime,
|
||||||
|
sum(if((freq_dev_overtime+
|
||||||
|
flicker_overtime+
|
||||||
|
voltage_dev_overtime+
|
||||||
|
ubalance_overtime+
|
||||||
|
uaberrance_overtime+
|
||||||
|
i_neg_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)>0,1,0)) as allOvertime
|
||||||
FROM
|
FROM
|
||||||
r_stat_limit_target_d
|
r_stat_limit_target_d
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
|||||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -25,6 +26,8 @@ public interface RStatLimitService {
|
|||||||
|
|
||||||
List<RStatLimitTargetDPO> monitorIdsGetLimitTargetInfo(String date, List<String> monitorIds);
|
List<RStatLimitTargetDPO> monitorIdsGetLimitTargetInfo(String date, List<String> monitorIds);
|
||||||
|
|
||||||
|
List<RStatLimitTargetVO> monitorOverLimitDays(String date, String endDate, List<String> monitorIds);
|
||||||
|
|
||||||
List<GridDiagramVO.LineData> getGridDiagramLineData(DeviceInfoParam.BusinessParam deviceInfoParam);
|
List<GridDiagramVO.LineData> getGridDiagramLineData(DeviceInfoParam.BusinessParam deviceInfoParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,16 +23,14 @@ import com.njcn.harmonic.mapper.RStatLimitTargetDMapper;
|
|||||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
|
||||||
import com.njcn.harmonic.service.IRStatLimitTargetDService;
|
import com.njcn.harmonic.service.IRStatLimitTargetDService;
|
||||||
import com.njcn.harmonic.service.majornetwork.RStatLimitService;
|
import com.njcn.harmonic.service.majornetwork.RStatLimitService;
|
||||||
import com.njcn.system.pojo.enums.StatisticsEnum;
|
import com.njcn.system.pojo.enums.StatisticsEnum;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -68,6 +66,11 @@ public class RStatLimitServiceImpl implements RStatLimitService {
|
|||||||
.eq(RStatLimitTargetDPO::getTime,date).gt(RStatLimitTargetDPO::getAllTime,0));
|
.eq(RStatLimitTargetDPO::getTime,date).gt(RStatLimitTargetDPO::getAllTime,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RStatLimitTargetVO> monitorOverLimitDays(String date, String endDate, List<String> monitorIds) {
|
||||||
|
return rStatLimitTargetDMapper.getSumTargetDetails(monitorIds,date,endDate);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<GridDiagramVO.LineData> getGridDiagramLineData(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
public List<GridDiagramVO.LineData> getGridDiagramLineData(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||||
List<GridDiagramVO.LineData> info=new ArrayList<>();
|
List<GridDiagramVO.LineData> info=new ArrayList<>();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.njcn.harmonic.service.upload.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -16,6 +17,7 @@ import com.njcn.harmonic.pojo.param.upload.RUploadWorkOrderParam;
|
|||||||
import com.njcn.harmonic.pojo.po.upload.RUploadWorkOrderPO;
|
import com.njcn.harmonic.pojo.po.upload.RUploadWorkOrderPO;
|
||||||
import com.njcn.harmonic.service.upload.IRUploadWorkOrderService;
|
import com.njcn.harmonic.service.upload.IRUploadWorkOrderService;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.web.enums.GWSendEnum;
|
import com.njcn.web.enums.GWSendEnum;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
import com.njcn.web.pojo.param.SendParam;
|
import com.njcn.web.pojo.param.SendParam;
|
||||||
@@ -44,6 +46,8 @@ import java.util.stream.Collectors;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class RUploadWorkOrderServiceImpl extends ServiceImpl<RUploadWorkOrderMapper, RUploadWorkOrderPO> implements IRUploadWorkOrderService {
|
public class RUploadWorkOrderServiceImpl extends ServiceImpl<RUploadWorkOrderMapper, RUploadWorkOrderPO> implements IRUploadWorkOrderService {
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertWorkorderDistributeSupervise(RUploadWorkOrderParam param) {
|
public Boolean insertWorkorderDistributeSupervise(RUploadWorkOrderParam param) {
|
||||||
RUploadWorkOrderPO rUploadWorkOrderPO = new RUploadWorkOrderPO();
|
RUploadWorkOrderPO rUploadWorkOrderPO = new RUploadWorkOrderPO();
|
||||||
@@ -80,6 +84,10 @@ public class RUploadWorkOrderServiceImpl extends ServiceImpl<RUploadWorkOrderMap
|
|||||||
RUploadWorkOrderPO newPo = new RUploadWorkOrderPO();
|
RUploadWorkOrderPO newPo = new RUploadWorkOrderPO();
|
||||||
newPo.setObjId(rUploadWorkOrderPO.getObjId());
|
newPo.setObjId(rUploadWorkOrderPO.getObjId());
|
||||||
newPo.setFeedbackTime(LocalDate.now());
|
newPo.setFeedbackTime(LocalDate.now());
|
||||||
|
newPo.setUploadStatus("1");
|
||||||
|
newPo.setOrderStatus(DicDataEnum.WORK_ORDER_STATUS_HAS.getCode());
|
||||||
|
newPo.setUploadTime(LocalDate.now());
|
||||||
|
newPo.setIsFeedback("1");
|
||||||
newPoList.add(newPo);
|
newPoList.add(newPo);
|
||||||
}
|
}
|
||||||
this.updateBatchById(newPoList);
|
this.updateBatchById(newPoList);
|
||||||
@@ -88,8 +96,16 @@ public class RUploadWorkOrderServiceImpl extends ServiceImpl<RUploadWorkOrderMap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<RUploadWorkOrderPO> pageList(RUploadWorkOrderParam.RUploadWorkOrderQuery query) {
|
public Page<RUploadWorkOrderPO> pageList(RUploadWorkOrderParam.RUploadWorkOrderQuery query) {
|
||||||
|
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByDeptId(query.getMaintainerId()).getData();
|
||||||
|
|
||||||
|
|
||||||
LambdaQueryWrapper<RUploadWorkOrderPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RUploadWorkOrderPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.between(RUploadWorkOrderPO::getDistributeTime, DateUtil.beginOfDay(DateUtil.parse(query.getSearchBeginTime(), DatePattern.NORM_DATE_PATTERN)),DateUtil.endOfDay(DateUtil.parse(query.getSearchEndTime(), DatePattern.NORM_DATE_PATTERN)));
|
lambdaQueryWrapper.between(RUploadWorkOrderPO::getDistributeTime, DateUtil.beginOfDay(DateUtil.parse(query.getSearchBeginTime(), DatePattern.NORM_DATE_PATTERN)),DateUtil.endOfDay(DateUtil.parse(query.getSearchEndTime(), DatePattern.NORM_DATE_PATTERN)))
|
||||||
|
.eq(StrUtil.isNotBlank(query.getOrderStatus()),RUploadWorkOrderPO::getOrderStatus,query.getOrderStatus())
|
||||||
|
.in(RUploadWorkOrderPO::getMaintainerId,deptIds)
|
||||||
|
|
||||||
|
;
|
||||||
return this.page(new Page<>(PageFactory.getPageNum(query),PageFactory.getPageSize(query)),lambdaQueryWrapper);
|
return this.page(new Page<>(PageFactory.getPageNum(query),PageFactory.getPageSize(query)),lambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>pqs</artifactId>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</parent>
|
|
||||||
<artifactId>pqs-influx</artifactId>
|
|
||||||
<name>influx公共模块</name>
|
|
||||||
<description>pqs-influx</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>influxdb-springboot-starter</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
package com.njcn.influx.deprecated;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:使用influxDB查询时的公共参数
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2022/6/24 15:02
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface InfluxDBPublicParam {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 暂态事件汇总表
|
|
||||||
*/
|
|
||||||
String PQS_EVENT_DETAIL = " pqs_eventdetail";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压波动闪变表
|
|
||||||
*/
|
|
||||||
String DATA_FLICKER = "data_flicker";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压波动表
|
|
||||||
*/
|
|
||||||
String DATA_FLUC = "data_fluc";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电流角度表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_PHASIC_I = "data_harmphasic_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电压角度表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_PHASIC_V = "data_harmphasic_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 有功功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_P = "data_harmpower_p";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 无功功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_Q = "data_harmpower_q";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视在功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_S = "data_harmpower_s";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电流含有率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_RATE_I = "data_harmrate_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电压含有率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_RATE_V = "data_harmrate_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电流表
|
|
||||||
*/
|
|
||||||
String DATA_I = "data_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电流间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DATA_IN_HARM_I = "data_inharm_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DATA_IN_HARM_V = "data_inharm_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 长时闪变表
|
|
||||||
*/
|
|
||||||
String DATA_PLT = "data_plt";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压表
|
|
||||||
*/
|
|
||||||
String DATA_V = "data_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电压波动闪变表
|
|
||||||
*/
|
|
||||||
String DAY_FLICKER = "day_flicker";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电压波动表
|
|
||||||
*/
|
|
||||||
String DAY_FLUC = "day_fluc";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-谐波电流角度表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_PHASIC_I = "day_harmphasic_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-谐波电压角度表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_PHASIC_V = "day_harmphasic_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-有功功率表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_POWER_P = "day_harmpower_p";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-无功功率表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_POWER_Q = "day_harmpower_q";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-视在功率表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_POWER_S = "day_harmpower_s";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-谐波电流含有率表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_RATE_I = "day_harmrate_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-谐波电压含有率表
|
|
||||||
*/
|
|
||||||
String DAY_HARM_RATE_V = "day_harmrate_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电流表
|
|
||||||
*/
|
|
||||||
String DAY_I = "day_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电流间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DAY_IN_HARM_I = "day_inharm_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电压间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DAY_IN_HARM_V = "day_inharm_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-长时闪变表
|
|
||||||
*/
|
|
||||||
String DAY_PLT = "day_plt";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日统计-电压表
|
|
||||||
*/
|
|
||||||
String DAY_V = "day_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 时区
|
|
||||||
*/
|
|
||||||
String TIME_ZONE = " tz('Asia/Shanghai')";
|
|
||||||
|
|
||||||
String TZ = "Asia/Shanghai";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日起始时间
|
|
||||||
*/
|
|
||||||
String START_TIME = " 00:00:00";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日结束时间
|
|
||||||
*/
|
|
||||||
String END_TIME = " 23:59:59";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 时间
|
|
||||||
*/
|
|
||||||
String TIME = "time";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据线路号
|
|
||||||
*/
|
|
||||||
String LINE_ID = "line_id";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装置ID
|
|
||||||
*/
|
|
||||||
String DEV_ID = "dev_id";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据类型
|
|
||||||
*/
|
|
||||||
String PHASIC_TYPE = "phasic_type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指标类型
|
|
||||||
*/
|
|
||||||
String VALUE_TYPE = "value_type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据质量标志
|
|
||||||
*/
|
|
||||||
String QUALITY_FLAG = "quality_flag";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* limit_rate
|
|
||||||
*/
|
|
||||||
String LIMIT_RATE = "limit_rate";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* limit_target
|
|
||||||
*/
|
|
||||||
String LIMIT_TARGET = "limit_target";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* pqs_comasses
|
|
||||||
*/
|
|
||||||
String PQS_COMASSES = "pqs_comasses";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 终端运维日志表
|
|
||||||
*/
|
|
||||||
String PQS_TERMINAL_LOGS = "pqs_terminal_logs";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 监测点状态信息表
|
|
||||||
*/
|
|
||||||
String PQS_COMMUNICATE = "pqs_communicate";
|
|
||||||
|
|
||||||
String PQS_ACTUAL_FLOW = "pqs_actual_flow";
|
|
||||||
|
|
||||||
String CLD_STATIS_FLOW = "cld_statis_flow";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 终端在线率表
|
|
||||||
*/
|
|
||||||
String PQS_ONLINERATE = "pqs_onlinerate";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据完整性表
|
|
||||||
*/
|
|
||||||
String PQS_INTEGRITY = "pqs_integrity";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 终端在线率表公共字段
|
|
||||||
*/
|
|
||||||
String ONLINE_MIN = "online_min";
|
|
||||||
|
|
||||||
String OFFLINE_MIN = "offline_min";
|
|
||||||
|
|
||||||
String ONLINE_RATE = "online_rate";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* data表中InfluxDBPublicParam
|
|
||||||
*/
|
|
||||||
String VALUETYPE = "value_type";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据完整性表公共字段
|
|
||||||
*/
|
|
||||||
String DUE = "due";
|
|
||||||
|
|
||||||
String REAL = "real";
|
|
||||||
|
|
||||||
String DEV_INDEX = "dev_id";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 稳态数据分析字段
|
|
||||||
*/
|
|
||||||
String PHASIC_TYPET = "T";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每天固定时间分钟
|
|
||||||
*/
|
|
||||||
Integer DAY_MINUTE = 1440;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
package com.njcn.influx.deprecated;
|
|
||||||
|
|
||||||
import cn.hutool.core.text.StrPool;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼接influx查询语句相关常量
|
|
||||||
*
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2022年10月14日 14:02
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface InfluxDBSqlConstant {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "SELECT "
|
|
||||||
*/
|
|
||||||
String SELECT = "SELECT" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "* "
|
|
||||||
*/
|
|
||||||
String ALL = "*" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "FROM "
|
|
||||||
*/
|
|
||||||
String FROM = "FROM" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " WHERE "
|
|
||||||
*/
|
|
||||||
String WHERE = StrPool.C_SPACE + "WHERE" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " AND "
|
|
||||||
*/
|
|
||||||
String AND = StrPool.C_SPACE + "AND" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " OR "
|
|
||||||
*/
|
|
||||||
String OR = StrPool.C_SPACE + "OR" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " GROUP BY "
|
|
||||||
*/
|
|
||||||
String GB = StrPool.C_SPACE + "GROUP BY" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " ORDER BY "
|
|
||||||
*/
|
|
||||||
String OB = StrPool.C_SPACE + "ORDER BY" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* “DESC ”
|
|
||||||
*/
|
|
||||||
String DESC = "DESC" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* " as value "
|
|
||||||
*/
|
|
||||||
String AS_VALUE = StrPool.C_SPACE + "as value" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
String EQ = "=";
|
|
||||||
String QM = "'";
|
|
||||||
String LBK = "(";
|
|
||||||
String RBK = ")";
|
|
||||||
String GT = ">";
|
|
||||||
String GE = ">=";
|
|
||||||
String LT = "<";
|
|
||||||
String LE = "<=";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* influxDB函数拼接
|
|
||||||
*/
|
|
||||||
String MAX = "MAX";
|
|
||||||
String MIN = "MIN";
|
|
||||||
String AVG = "MEAN";
|
|
||||||
String NUM_95 = ",95";
|
|
||||||
String CP95 = "PERCENTILE";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* “ tz('Asia/Shanghai')”
|
|
||||||
*/
|
|
||||||
String TZ = StrPool.C_SPACE + "tz('Asia/Shanghai')";
|
|
||||||
String TIME_AREA = "Asia/Shanghai";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日起始时间
|
|
||||||
*/
|
|
||||||
String START_TIME = " 00:00:00";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日结束时间
|
|
||||||
*/
|
|
||||||
String END_TIME = " 23:59:59";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 时间
|
|
||||||
*/
|
|
||||||
String TIME = "time" + StrPool.C_SPACE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每天固定时间分钟
|
|
||||||
*/
|
|
||||||
Integer DAY_MINUTE = 1440;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.DeviceDayFlowDTO;
|
|
||||||
import com.njcn.influx.pojo.po.CldStatisFlow;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月04日 20:50
|
|
||||||
*/
|
|
||||||
public interface CldStatisticsFlowMapper extends InfluxDbBaseMapper<CldStatisFlow>{
|
|
||||||
|
|
||||||
|
|
||||||
List<DeviceDayFlowDTO> selectDeviceDayFlowByQueryWrapper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.ano.Param;
|
|
||||||
import com.njcn.influx.ano.Select;
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.bo.HarmonicHistoryData;
|
|
||||||
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
|
|
||||||
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 CommonMapper extends InfluxDbBaseMapper<PowerQualityData> {
|
|
||||||
|
|
||||||
StatisticalDataDTO getLineRtData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<StatisticalDataDTO> getDeviceRtData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<StatisticalDataDTO> getDeviceRtDataByTime(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
StatisticalDataDTO getLineHistoryData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = StatisticalDataDTO.class)
|
|
||||||
StatisticalDataDTO selectBySql(@Param("sql") StringBuilder sql);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = StatisticalDataDTO.class)
|
|
||||||
List<?> selectLimitTargetBySql(@Param("sql")String sql);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = HarmonicHistoryData.class)
|
|
||||||
List<HarmonicHistoryData> getHistoryResult(@Param("sql")String sql);
|
|
||||||
|
|
||||||
List<StatisticalDataDTO> getTopTemperature(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.DataFlickerDTO;
|
|
||||||
import com.njcn.influx.pojo.po.DataFlicker;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:55
|
|
||||||
*/
|
|
||||||
public interface DataFlickerMapper extends InfluxDbBaseMapper<DataFlicker> {
|
|
||||||
|
|
||||||
List<DataFlickerDTO> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<DataFlicker> getStatisticsByWraper2(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataFluc;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DataFlucMapper extends InfluxDbBaseMapper<DataFluc> {
|
|
||||||
|
|
||||||
List<DataFluc> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPhasicI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DataHarmPhasicIMapper extends InfluxDbBaseMapper<DataHarmPhasicI> {
|
|
||||||
|
|
||||||
List<DataHarmPhasicI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPhasicV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DataHarmPhasicVMapper extends InfluxDbBaseMapper<DataHarmPhasicV> {
|
|
||||||
|
|
||||||
List<DataHarmPhasicV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.ano.Param;
|
|
||||||
import com.njcn.influx.ano.Select;
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerP;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DataHarmPowerPMapper extends InfluxDbBaseMapper<DataHarmPowerP> {
|
|
||||||
|
|
||||||
List<DataHarmPowerP> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = CarryCapcityData.class)
|
|
||||||
List<CarryCapcityData> getSqlResult(@Param("sql")String sql);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.ano.Param;
|
|
||||||
import com.njcn.influx.ano.Select;
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerQ;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DataHarmPowerQMapper extends InfluxDbBaseMapper<DataHarmPowerQ> {
|
|
||||||
|
|
||||||
List<DataHarmPowerQ> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
@Select(value = "#{sql}",resultType = CarryCapcityData.class)
|
|
||||||
List<CarryCapcityData> getSqlResult(@Param("sql")String sql);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerS;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DataHarmPowerSMapper extends InfluxDbBaseMapper<DataHarmPowerS> {
|
|
||||||
|
|
||||||
List<DataHarmPowerS> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmRateI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DataHarmRateIMapper extends InfluxDbBaseMapper<DataHarmRateI> {
|
|
||||||
|
|
||||||
List<DataHarmRateI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.HarmData;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmRateV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DataHarmRateVMapper extends InfluxDbBaseMapper<DataHarmRateV> {
|
|
||||||
|
|
||||||
DataHarmRateV getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<HarmData> getHarmRateVHistoryData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<DataHarmRateV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataInHarmI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DataInHarmIMapper extends InfluxDbBaseMapper<DataInHarmI> {
|
|
||||||
|
|
||||||
List<DataInHarmI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataInHarmRateI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DataInHarmRateIMapper extends InfluxDbBaseMapper<DataInHarmRateI> {
|
|
||||||
|
|
||||||
List<DataInHarmRateI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataInHarmRateV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DataInHarmRateVMapper extends InfluxDbBaseMapper<DataInHarmRateV> {
|
|
||||||
|
|
||||||
List<DataInHarmRateV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataInHarmV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DataInHarmVMapper extends InfluxDbBaseMapper<DataInHarmV> {
|
|
||||||
|
|
||||||
List<DataInHarmV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataPlt;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DataPltMapper extends InfluxDbBaseMapper<DataPlt> {
|
|
||||||
|
|
||||||
List<DataPlt> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.ano.Param;
|
|
||||||
import com.njcn.influx.ano.Select;
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
|
||||||
import com.njcn.influx.pojo.bo.MeasurementCount;
|
|
||||||
import com.njcn.influx.pojo.po.DataV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2023/5/5 14:39
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface DataVMapper extends InfluxDbBaseMapper<DataV> {
|
|
||||||
|
|
||||||
List<DataV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
List<MeasurementCount> getMeasurementCount(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
@Select(value = "#{sql}",resultType = CarryCapcityData.class)
|
|
||||||
List<CarryCapcityData> getSqlResult(@Param("sql")String sql);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.pojo.dto.EventDataSetDTO;
|
|
||||||
import com.njcn.influx.pojo.po.cs.EntData;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2023/5/5 14:39
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface EvtDataMapper extends InfluxDbBaseMapper<EntData> {
|
|
||||||
|
|
||||||
|
|
||||||
List<EntData> getEventData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
EventDataSetDTO getEventDataSet(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
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<PowerQualityData> {
|
|
||||||
|
|
||||||
List<HarmonicRatioData> getFirstHaronicRatio(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<HarmonicRatioData> getHaronicRatio(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.ano.Param;
|
|
||||||
import com.njcn.influx.ano.Select;
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.HarmData;
|
|
||||||
import com.njcn.influx.pojo.po.DataI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:05
|
|
||||||
*/
|
|
||||||
public interface IDataIMapper extends InfluxDbBaseMapper<DataI> {
|
|
||||||
|
|
||||||
DataI getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
// List<HarmData> getIHistoryData(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = HarmData.class)
|
|
||||||
List<HarmData> getIHistoryData(@Param("sql")String sql);
|
|
||||||
|
|
||||||
List<DataI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
@Select(value = "#{sql}",resultType = DataI.class)
|
|
||||||
List<DataI> getSqlResult(@Param("sql")String sql);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
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<PowerQualityData> {
|
|
||||||
|
|
||||||
List<PowerQualityData> getFirstPowerQuality(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
|
|
||||||
List<PowerQualityData> getPowerQuality(InfluxQueryWrapper influxQueryWrapper);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.PqsCommunicate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年08月09日 09:29
|
|
||||||
*/
|
|
||||||
public interface PqsCommunicateMapper extends InfluxDbBaseMapper<PqsCommunicate> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.DataFlickerDTO;
|
|
||||||
import com.njcn.influx.pojo.po.DataFlicker;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayFlicker;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:55
|
|
||||||
*/
|
|
||||||
public interface DayFlickerMapper extends InfluxDbBaseMapper<DayFlicker> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataFluc;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayFluc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DayFlucMapper extends InfluxDbBaseMapper<DayFluc> {
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPhasicI;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmPhasicI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DayHarmPhasicIMapper extends InfluxDbBaseMapper<DayHarmPhasicI> {
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPhasicV;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmPhasicV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DayHarmPhasicVMapper extends InfluxDbBaseMapper<DayHarmPhasicV> {
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerP;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmPowerP;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayHarmPowerPMapper extends InfluxDbBaseMapper<DayHarmPowerP> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerQ;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmPowerQ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayHarmPowerQMapper extends InfluxDbBaseMapper<DayHarmPowerQ> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmPowerS;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmPowerS;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayHarmPowerSMapper extends InfluxDbBaseMapper<DayHarmPowerS> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmRateI;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmRateV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DayHarmRateIMapper extends InfluxDbBaseMapper<DayHarmRateI> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.HarmData;
|
|
||||||
import com.njcn.influx.pojo.po.DataHarmRateV;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayHarmRateV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:03
|
|
||||||
*/
|
|
||||||
public interface DayHarmRateVMapper extends InfluxDbBaseMapper<DayHarmRateV> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.dto.HarmData;
|
|
||||||
import com.njcn.influx.pojo.po.DataI;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayI;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 11:05
|
|
||||||
*/
|
|
||||||
public interface DayIMapper extends InfluxDbBaseMapper<DayI> {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayInHarmI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayInHarmIMapper extends InfluxDbBaseMapper<DayInHarmI> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayInHarmI;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayInHarmV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayInHarmIRateMapper extends InfluxDbBaseMapper<DayInHarmI> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayInHarmV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayInHarmVMapper extends InfluxDbBaseMapper<DayInHarmV> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataInHarmV;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayInHarmV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 09:00
|
|
||||||
*/
|
|
||||||
public interface DayInHarmVRateMapper extends InfluxDbBaseMapper<DayInHarmV> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayFluc;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayPlt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 08:56
|
|
||||||
*/
|
|
||||||
public interface DayPltMapper extends InfluxDbBaseMapper<DayPlt> {
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.njcn.influx.imapper.day;
|
|
||||||
|
|
||||||
import com.njcn.influx.base.InfluxDbBaseMapper;
|
|
||||||
import com.njcn.influx.pojo.po.DataV;
|
|
||||||
import com.njcn.influx.pojo.po.day.DayV;
|
|
||||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2023/5/5 14:39
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface DayVMapper extends InfluxDbBaseMapper<DayV> {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.bo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.njcn.influx.utils.InstantDateSerializer;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.influxdb.annotation.Column;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2022/5/12 9:13
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class CarryCapcityData {
|
|
||||||
|
|
||||||
@Column(name = "time")
|
|
||||||
@JsonSerialize(using = InstantDateSerializer.class)
|
|
||||||
private Instant time;
|
|
||||||
|
|
||||||
@Column(name = "line_id")
|
|
||||||
private String lineId;
|
|
||||||
|
|
||||||
@Column(name = "phasic_type")
|
|
||||||
private String phaseType;
|
|
||||||
|
|
||||||
@Column(name = "quality_flag")
|
|
||||||
private String qualityFlag;
|
|
||||||
|
|
||||||
@Column(name = "value_type")
|
|
||||||
private String valueType;
|
|
||||||
|
|
||||||
private Double value;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.bo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Description:
|
|
||||||
* Date: 2024/1/24 9:05【需求编号】
|
|
||||||
*
|
|
||||||
* @author clam
|
|
||||||
* @version V1.0.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class CommonQueryParam {
|
|
||||||
private String lineId;
|
|
||||||
private String tableName;
|
|
||||||
private String columnName;
|
|
||||||
private String phasic;
|
|
||||||
private String startTime;
|
|
||||||
private String endTime;
|
|
||||||
private String dataType;
|
|
||||||
private String process;
|
|
||||||
private String clDid;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.bo;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjUtil;
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.njcn.influx.utils.InstantDateSerializer;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.influxdb.annotation.Column;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年07月17日 16:25
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class HarmonicHistoryData implements Serializable {
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerialize(using = InstantDateSerializer.class)
|
|
||||||
private Instant time;
|
|
||||||
|
|
||||||
@Column(name = "phasic_type")
|
|
||||||
private String phasicType;
|
|
||||||
|
|
||||||
private Float aValue;
|
|
||||||
|
|
||||||
private Float bValue;
|
|
||||||
|
|
||||||
private Float cValue;
|
|
||||||
|
|
||||||
private Instant timeId;
|
|
||||||
|
|
||||||
public void setTimeId(Instant timeId) {
|
|
||||||
if(ObjUtil.isNotNull(timeId)){
|
|
||||||
Instant instant = timeId.plusMillis(TimeUnit.HOURS.toMillis(8));
|
|
||||||
this.time = instant;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.bo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.njcn.influx.utils.InstantDateSerializer;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.influxdb.annotation.Column;
|
|
||||||
import org.influxdb.annotation.Measurement;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类的介绍:
|
|
||||||
*
|
|
||||||
* @author xuyang
|
|
||||||
* @version 1.0.0
|
|
||||||
* @createTime 2023/11/10 16:17
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Measurement(name = "data_v")
|
|
||||||
public class MeasurementCount implements Serializable {
|
|
||||||
|
|
||||||
@Column(name = "time")
|
|
||||||
@JsonSerialize(using = InstantDateSerializer.class)
|
|
||||||
private Instant time;
|
|
||||||
|
|
||||||
@Column(name = "line_id")
|
|
||||||
private String lineId;
|
|
||||||
|
|
||||||
@Column(name = "freq")
|
|
||||||
private String freq;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.bo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.njcn.influx.utils.InstantDateSerializer;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用来收集统计结果,比如max min mean cp95等函数
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class StatisticsResult implements Serializable {
|
|
||||||
|
|
||||||
@JsonSerialize(using = InstantDateSerializer.class)
|
|
||||||
private Instant time;
|
|
||||||
|
|
||||||
/***
|
|
||||||
* 统计值
|
|
||||||
*/
|
|
||||||
private Double value;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据表相关常量
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2022年10月14日 14:02
|
|
||||||
*/
|
|
||||||
public interface InfluxDBTableConstant {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压波动闪变表
|
|
||||||
*/
|
|
||||||
String DATA_FLICKER = "data_flicker";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压波动表
|
|
||||||
*/
|
|
||||||
String DATA_FLUC = "data_fluc";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电流角度表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_PHASIC_I = "data_harmphasic_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电压角度表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_PHASIC_V = "data_harmphasic_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 有功功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_P = "data_harmpower_p";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 无功功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_Q = "data_harmpower_q";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视在功率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_POWER_S = "data_harmpower_s";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电流含有率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_RATE_I = "data_harmrate_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 谐波电压含有率表
|
|
||||||
*/
|
|
||||||
String DATA_HARM_RATE_V = "data_harmrate_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电流表
|
|
||||||
*/
|
|
||||||
String DATA_I = "data_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电流间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DATA_IN_HARM_I = "data_inharm_i";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压间谐波幅值表
|
|
||||||
*/
|
|
||||||
String DATA_IN_HARM_V = "data_inharm_v";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 长时闪变表
|
|
||||||
*/
|
|
||||||
String DATA_PLT = "data_plt";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电压表
|
|
||||||
*/
|
|
||||||
String DATA_V = "data_v";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 时间
|
|
||||||
*/
|
|
||||||
String TIME = "time";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据线路号
|
|
||||||
*/
|
|
||||||
String LINE_ID = "line_id";
|
|
||||||
String PROCESS = "process";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装置ID
|
|
||||||
*/
|
|
||||||
String DEV_ID = "dev_id";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据类型
|
|
||||||
*/
|
|
||||||
String PHASIC_TYPE = "phasic_type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指标类型
|
|
||||||
*/
|
|
||||||
String VALUE_TYPE = "value_type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计结果
|
|
||||||
*/
|
|
||||||
String VALUE = "value";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计结果最大值
|
|
||||||
*/
|
|
||||||
String MAX_VALUE = "maxValue";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计结果最小值
|
|
||||||
*/
|
|
||||||
String MIN_VALUE = "minValue";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计结果平均值
|
|
||||||
*/
|
|
||||||
String AVG_VALUE = "avgValue";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据质量标志
|
|
||||||
*/
|
|
||||||
String QUALITY_FLAG = "quality_flag";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 相别
|
|
||||||
*/
|
|
||||||
String NO_PHASE = "M";
|
|
||||||
String PHASE_TYPE_A = "A";
|
|
||||||
String PHASE_TYPE_AB = "AB";
|
|
||||||
String PHASE_TYPE_B = "B";
|
|
||||||
String PHASE_TYPE_BC = "BC";
|
|
||||||
String PHASE_TYPE_C = "C";
|
|
||||||
String PHASE_TYPE_C0 = "C0";
|
|
||||||
String PHASE_TYPE_C1 = "C1";
|
|
||||||
String PHASE_TYPE_C2 = "C2";
|
|
||||||
String PHASE_TYPE_CA = "CA";
|
|
||||||
String PHASE_TYPE_T = "T";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日起始时间
|
|
||||||
*/
|
|
||||||
String START_TIME = " 00:00:00";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日结束时间
|
|
||||||
*/
|
|
||||||
String END_TIME = " 23:59:59";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据是否异常
|
|
||||||
*/
|
|
||||||
String IS_ABNORMAL = "is_abnormal";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 逻辑子设备id
|
|
||||||
*/
|
|
||||||
String CL_DID = "cl_did";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 逻辑子设备id/暂态事件号
|
|
||||||
*/
|
|
||||||
String UUID = "uuid";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程(1:设备登记,2:功能调试,3:出厂调试 4:设备投运)
|
|
||||||
*/
|
|
||||||
String process = "process";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 报表业务计算方式
|
|
||||||
*/
|
|
||||||
String MAX = "MAX";
|
|
||||||
String MIN = "MIN";
|
|
||||||
String AVG = "AVG";
|
|
||||||
String CP95 = "CP95";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每天固定时间分钟
|
|
||||||
*/
|
|
||||||
Integer DAY_MINUTE = 1440;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据是否正常 0:正常 1:异常
|
|
||||||
*/
|
|
||||||
String NORMAL = "0";
|
|
||||||
String UN_NORMAL = "1";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.njcn.influx.pojo.dto;
|
|
||||||
|
|
||||||
import com.njcn.influx.pojo.po.DataFlicker;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.influxdb.annotation.Measurement;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hongawen
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2023年05月05日 10:17
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Measurement(name = "data_flicker")
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class DataFlickerDTO extends DataFlicker implements Serializable {
|
|
||||||
|
|
||||||
private String valueType;
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user