1.数据单位管理
2.谐波模块-excel和word报告数据单位调整 3.监测点权重管理
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.njcn.device.pq.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
||||
import com.njcn.device.pq.pojo.po.PqsDeviceUnit;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 监测点数据完整性
|
||||
* @author cdf
|
||||
* @date 2023/6/7
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.DEVICE,
|
||||
path = "/pq/pqsDeviceUnit",
|
||||
fallbackFactory = LineIntegrityClientFallbackFactory.class,
|
||||
contextId = "pqsDeviceUnit")
|
||||
public interface DeviceUnitClient {
|
||||
|
||||
/**
|
||||
* @Description: 根据监测点id获取数据单位
|
||||
* @param lineID
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<com.njcn.device.pq.pojo.po.PqsDeviceUnit>
|
||||
* @Author: wr
|
||||
* @Date: 2023/8/22 16:21
|
||||
*/
|
||||
@PostMapping("/lineUnitDetail")
|
||||
HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineID") String lineID) ;
|
||||
}
|
||||
@@ -1,18 +1,13 @@
|
||||
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.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.fallback.GeneralDeviceInfoClientFallbackFactory;
|
||||
import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.po.OnlineRate;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.device.pq.api.fallback;
|
||||
|
||||
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.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.device.pq.api.DeviceUnitClient;
|
||||
import com.njcn.device.pq.pojo.po.PqsDeviceUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/28
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DeviceUnitFallbackFactory implements feign.hystrix.FallbackFactory<DeviceUnitClient> {
|
||||
@Override
|
||||
public DeviceUnitClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new DeviceUnitClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<PqsDeviceUnit> lineUnitDetail(String lineID) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据监测点id获取数据单位", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 数据单位管理表
|
||||
* @Author: wr
|
||||
* @Date: 2023/8/21 9:56
|
||||
*/
|
||||
@Data
|
||||
@TableName("pqs_device_unit")
|
||||
public class PqsDeviceUnit {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "DEV_INDEX")
|
||||
@ApiModelProperty(value = "终端编号")
|
||||
private String devIndex;
|
||||
|
||||
@TableField("UNIT_FREQUENCY")
|
||||
@ApiModelProperty(value = "频率")
|
||||
private String unitFrequency = "Hz";
|
||||
|
||||
@TableField("UNIT_FREQUENCY_DEV")
|
||||
@ApiModelProperty(value = "频率偏差")
|
||||
private String unitFrequencyDev = "Hz";
|
||||
|
||||
@TableField("PHASE_VOLTAGE")
|
||||
@ApiModelProperty(value = "相电压有效值")
|
||||
private String phaseVoltage = "kV";
|
||||
|
||||
@TableField("LINE_VOLTAGE")
|
||||
@ApiModelProperty(value = "线电压有效值")
|
||||
private String lineVoltage = "kV";
|
||||
|
||||
@TableField("VOLTAGE_DEV")
|
||||
@ApiModelProperty(value = "电压上偏差")
|
||||
private String voltageDev = "%";
|
||||
|
||||
@TableField("UVOLTAGE_DEV")
|
||||
@ApiModelProperty(value = "电压下偏差")
|
||||
private String uvoltageDev = "%";
|
||||
|
||||
@TableField("I_EFFECTIVE")
|
||||
@ApiModelProperty(value = "电流有效值")
|
||||
private String ieffective = "A";
|
||||
|
||||
@TableField("SINGLE_P")
|
||||
@ApiModelProperty(value = "单相有功功率")
|
||||
private String singleP = "kW";
|
||||
|
||||
@TableField("SINGLE_VIEW_P")
|
||||
@ApiModelProperty(value = "单相视在功率")
|
||||
private String singleViewP = "kVA";
|
||||
|
||||
@TableField("SINGLE_NO_P")
|
||||
@ApiModelProperty(value = "单相无功功率")
|
||||
private String singleNoP = "kVar";
|
||||
|
||||
@TableField("TOTAL_ACTIVE_P")
|
||||
@ApiModelProperty(value = "总有功功率")
|
||||
private String totalActiveP = "kW";
|
||||
|
||||
@TableField("TOTAL_VIEW_P")
|
||||
@ApiModelProperty(value = "总视在功率")
|
||||
private String totalViewP = "kVA";
|
||||
|
||||
@TableField("TOTAL_NO_P")
|
||||
@ApiModelProperty(value = "总无功功率")
|
||||
private String totalNoP = "kVar";
|
||||
|
||||
@TableField("V_FUND_EFFECTIVE")
|
||||
@ApiModelProperty(value = "相(线)电压基波有效值")
|
||||
private String vfundEffective = "kV";
|
||||
|
||||
@TableField("I_FUND")
|
||||
@ApiModelProperty(value = "基波电流")
|
||||
private String ifund = "A";
|
||||
|
||||
@TableField("FUND_ACTIVE_P")
|
||||
@ApiModelProperty(value = "基波有功功率")
|
||||
private String fundActiveP = "kW";
|
||||
|
||||
@TableField("FUND_NO_P")
|
||||
@ApiModelProperty(value = "基波无功功率")
|
||||
private String fundNoP = "kVar";
|
||||
|
||||
@TableField("V_DISTORTION")
|
||||
@ApiModelProperty(value = "电压总谐波畸变率")
|
||||
private String vdistortion = "%";
|
||||
|
||||
@TableField("V_HARMONIC_RATE")
|
||||
@ApiModelProperty(value = "2~50次谐波电压含有率")
|
||||
private String vharmonicRate = "%";
|
||||
|
||||
@TableField("I_HARMONIC")
|
||||
@ApiModelProperty(value = "2~50次谐波电流有效值")
|
||||
private String iharmonic = "A";
|
||||
|
||||
@TableField("P_HARMONIC")
|
||||
@ApiModelProperty(value = "2~50次谐波有功功率")
|
||||
private String pharmonic = "kW";
|
||||
|
||||
@TableField("I_IHARMONIC")
|
||||
@ApiModelProperty(value = "0.5~49.5次间谐波电流有效值")
|
||||
private String iiharmonic = "A";
|
||||
|
||||
@TableField("POSITIVE_V")
|
||||
@ApiModelProperty(value = "正序电压")
|
||||
private String positiveV = "kV";
|
||||
|
||||
@TableField("NO_POSITIVE_V")
|
||||
@ApiModelProperty(value = "零序负序电压")
|
||||
private String noPositiveV = "V";
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监测点评分权重
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-08-24
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("pqs_line_weight")
|
||||
public class PqsLineWeight {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
@TableId("LINE_INDEX")
|
||||
@ApiModelProperty("监测点id")
|
||||
private String lineIndex;
|
||||
|
||||
/**
|
||||
* 通讯费用评分
|
||||
*/
|
||||
@TableField("COMMUN_FEE_MARK")
|
||||
@ApiModelProperty("通讯费用评分")
|
||||
private Integer communFeeMark;
|
||||
|
||||
/**
|
||||
* 服务条款评分
|
||||
*/
|
||||
@TableField("SERVICE_MARK")
|
||||
@ApiModelProperty("服务条款评分")
|
||||
private Integer serviceMark;
|
||||
|
||||
/**
|
||||
* 中间户数据需求
|
||||
*/
|
||||
@TableField("AGENT_MARK")
|
||||
@ApiModelProperty("中间户数据需求")
|
||||
private Integer agentMark;
|
||||
|
||||
/**
|
||||
* 公司数据需求
|
||||
*/
|
||||
@TableField("COMPANY_MARK")
|
||||
@ApiModelProperty("公司数据需求")
|
||||
private Integer companyMark;
|
||||
|
||||
/**
|
||||
* 用户需求
|
||||
*/
|
||||
@TableField("USER_MARK")
|
||||
@ApiModelProperty("用户需求")
|
||||
private Integer userMark;
|
||||
|
||||
/**
|
||||
* 监测点类型
|
||||
*/
|
||||
@TableField("LINE_TYPE_MARK")
|
||||
@ApiModelProperty("监测点类型")
|
||||
private Integer lineTypeMark;
|
||||
|
||||
/**
|
||||
* 行业重要度
|
||||
*/
|
||||
@TableField("BUSINESS_MARK")
|
||||
@ApiModelProperty("行业重要度")
|
||||
private Integer businessMark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.njcn.device.pq.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.njcn.device.pq.pojo.po.PqsDeviceUnit;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/8/21 10:16
|
||||
*/
|
||||
@Data
|
||||
public class PqsDeviceUnitVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "频率")
|
||||
private String unitFrequency;
|
||||
|
||||
@ApiModelProperty(value = "频率偏差")
|
||||
private String unitFrequencyDev;
|
||||
|
||||
@ApiModelProperty(value = "相电压有效值")
|
||||
private String phaseVoltage;
|
||||
|
||||
@ApiModelProperty(value = "线电压有效值")
|
||||
private String lineVoltage;
|
||||
|
||||
@ApiModelProperty(value = "电压上偏差")
|
||||
private String voltageDev;
|
||||
|
||||
@ApiModelProperty(value = "电压下偏差")
|
||||
private String uvoltageDev;
|
||||
|
||||
@ApiModelProperty(value = "电流有效值")
|
||||
private String ieffective;
|
||||
|
||||
@ApiModelProperty(value = "单相有功功率")
|
||||
private String singleP;
|
||||
|
||||
@ApiModelProperty(value = "单相视在功率")
|
||||
private String singleViewP;
|
||||
|
||||
@ApiModelProperty(value = "单相无功功率")
|
||||
private String singleNoP;
|
||||
|
||||
@ApiModelProperty(value = "总有功功率")
|
||||
private String totalActiveP;
|
||||
|
||||
@ApiModelProperty(value = "总视在功率")
|
||||
private String totalViewP;
|
||||
|
||||
@ApiModelProperty(value = "总无功功率")
|
||||
private String totalNoP;
|
||||
|
||||
@ApiModelProperty(value = "相(线)电压基波有效值")
|
||||
private String vfundEffective;
|
||||
|
||||
@ApiModelProperty(value = "基波电流")
|
||||
private String ifund;
|
||||
|
||||
@ApiModelProperty(value = "基波有功功率")
|
||||
private String fundActiveP;
|
||||
|
||||
@ApiModelProperty(value = "基波无功功率")
|
||||
private String fundNoP;
|
||||
|
||||
@ApiModelProperty(value = "电压总谐波畸变率")
|
||||
private String vdistortion;
|
||||
|
||||
@ApiModelProperty(value = "2~50次谐波电压含有率")
|
||||
private String vharmonicRate;
|
||||
|
||||
@ApiModelProperty(value = "2~50次谐波电流有效值")
|
||||
private String iharmonic;
|
||||
|
||||
@ApiModelProperty(value = "2~50次谐波有功功率")
|
||||
private String pharmonic;
|
||||
|
||||
@ApiModelProperty(value = "0.5~49.5次间谐波电流有效值")
|
||||
private String iiharmonic;
|
||||
|
||||
@ApiModelProperty(value = "正序电压")
|
||||
private String positiveV;
|
||||
|
||||
@ApiModelProperty(value = "运行状态")
|
||||
private String devFlag;
|
||||
|
||||
@ApiModelProperty(value = "零序负序电压")
|
||||
private String noPositiveV;
|
||||
@ApiModelProperty(value = "子集数据")
|
||||
List<?> children;
|
||||
|
||||
@Data
|
||||
public static class DeviceUnit extends PqsDeviceUnit {
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "运行状态")
|
||||
private String devFlag;
|
||||
|
||||
@ApiModelProperty(value = "子集数据")
|
||||
List<?> children;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.njcn.device.pq.pojo.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.njcn.device.pq.pojo.po.PqsLineWeight;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/8/24 10:31
|
||||
*/
|
||||
@Data
|
||||
public class PqsLineWeightVo extends PqsLineWeight {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "区域")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "供电公司")
|
||||
private String gbName;
|
||||
|
||||
@ApiModelProperty(value = "变电站名称")
|
||||
private String subName;
|
||||
|
||||
@ApiModelProperty(value = "装置名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty(value = "监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty(value = "终端运行状态")
|
||||
private String runFlag;
|
||||
|
||||
@ApiModelProperty(value = "监测点评级")
|
||||
private String lineGrade;
|
||||
|
||||
@Data
|
||||
public static class WeightExcel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "省份",width = 15,height = 20)
|
||||
|
||||
@NotBlank(message = "省份名称不为空")
|
||||
private String areaName;
|
||||
|
||||
@Excel(name = "供电公司",width = 15)
|
||||
@NotBlank(message = "供电公司名称不为空")
|
||||
private String gbName;
|
||||
|
||||
@Excel(name = "变电站",width = 15)
|
||||
@NotBlank(message = "变电站名称不为空")
|
||||
private String subName;
|
||||
|
||||
@Excel(name = "装置名称",width = 15)
|
||||
@NotBlank(message = "装置名称不为空")
|
||||
private String devName;
|
||||
|
||||
@Excel(name = "监测点名称",width = 15)
|
||||
@NotBlank(message = "监测点名称不为空")
|
||||
private String lineName;
|
||||
|
||||
@Excel(name ="通讯费用评分",width = 15)
|
||||
@NotNull(message = "通讯费用评分不为空")
|
||||
private Integer communFeeMark;
|
||||
|
||||
@Excel(name ="服务条款评分",width = 15)
|
||||
@NotNull(message = "服务条款评分不为空")
|
||||
private Integer serviceMark;
|
||||
|
||||
@Excel(name ="中间户数据需求",width = 15)
|
||||
@NotNull(message = "中间户数据需求不为空")
|
||||
private Integer agentMark;
|
||||
|
||||
@Excel(name ="公司数据需求",width = 15)
|
||||
@NotNull(message = "公司数据需求不为空")
|
||||
private Integer companyMark;
|
||||
|
||||
@Excel(name ="用户需求",width = 15)
|
||||
@NotNull(message = "用户需求不为空")
|
||||
private Integer userMark;
|
||||
|
||||
@Excel(name ="监测点类型",width = 15)
|
||||
@NotNull(message = "监测点类型不为空")
|
||||
private Integer lineTypeMark;
|
||||
|
||||
@Excel(name ="行业重要度",width = 15)
|
||||
@NotNull(message = "行业重要度不为空")
|
||||
private Integer businessMark;
|
||||
}
|
||||
@Data
|
||||
public static class Msg extends WeightExcel{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "错误信息",width = 60)
|
||||
private String msg;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user