Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eeb27c519b | |||
|
|
670eaf7d38 | ||
| 2b79cefad6 | |||
| 212db18835 | |||
|
|
e9a1c34160 | ||
|
|
fb7a2b7084 | ||
|
|
4b3ec39a11 | ||
|
|
2d255a5dd3 | ||
|
|
614647d36d | ||
|
|
a899614c89 | ||
|
|
2543f87dd2 | ||
|
|
c5074df93d | ||
| 24e4c4de37 | |||
|
|
4f70566c65 | ||
|
|
dc11d34add | ||
| 9f3bb52d9a | |||
|
|
567ba2f56e | ||
|
|
371d4efb29 | ||
|
|
47b08d4797 | ||
| 65805e4f50 | |||
| 41d555121c | |||
|
|
4d48b42c98 | ||
|
|
f5e1fac55d | ||
|
|
cebda9323e | ||
| d09f1472a9 | |||
| b9696e957d | |||
| 12cfecac7e | |||
| 3a97f01383 | |||
|
|
10273dd2b0 | ||
|
|
5e8e03cbb1 | ||
|
|
b103141a54 | ||
|
|
a6d2d6ed47 | ||
| 601a78246e | |||
| 5e7b973d5f | |||
|
|
e89c6a2888 | ||
| 2166529b4d | |||
| 2117e16b61 | |||
|
|
054d5534a8 | ||
|
|
c03a516931 | ||
|
|
0fdc3edb89 | ||
| a730ad61b1 | |||
| 9b758dc7c9 | |||
| a74dd460d1 | |||
| 2708aa8b81 | |||
|
|
6d833678a6 | ||
| be264acd79 | |||
|
|
186d46752c | ||
|
|
e03478eeec | ||
|
|
0c1bb606d6 | ||
|
|
42b619fa56 | ||
|
|
f0894ca0ed | ||
|
|
8a958fa34c | ||
|
|
770fb09223 | ||
|
|
b4e5d0c638 | ||
|
|
eb334cc7c7 | ||
|
|
404d11526a | ||
| 7bac805988 | |||
|
|
e4e04fc5db | ||
| f588a0ffc8 | |||
| f8ffe767dc | |||
|
|
68cbad2fdb | ||
|
|
9b9d75e463 | ||
|
|
62c3c09a6b | ||
|
|
b523a24e5b | ||
|
|
075dfc19d6 | ||
|
|
279c5c7642 | ||
|
|
ff1351b107 | ||
|
|
2dd67f9e3a | ||
|
|
b0ef851479 | ||
|
|
be899a262b | ||
| 4339a37268 | |||
|
|
9659aa257a | ||
| 9d32ca05df | |||
|
|
d48cf09119 | ||
|
|
c38b07ec07 | ||
|
|
87f05c6278 | ||
| e9ac024f73 | |||
| b7e3bb9796 | |||
| 4bebf28b76 | |||
|
|
20ec9bc0b4 | ||
| 5e93eb3691 | |||
| b63fab9085 | |||
|
|
aba66aaf4a | ||
|
|
1c7c514691 | ||
| 04fe9bdbbd | |||
|
|
b41347c596 | ||
|
|
4f75deac43 | ||
| 2c68646fc9 | |||
| 02599eeb81 | |||
| 0cec471ce2 |
6
pom.xml
6
pom.xml
@@ -41,9 +41,9 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!--中间件目标地址-->
|
<!--中间件目标地址-->
|
||||||
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
||||||
<middle.server.url>192.168.1.22</middle.server.url>
|
<middle.server.url>192.168.1.103</middle.server.url>
|
||||||
<!--微服务模块发布地址-->
|
<!--微服务模块发布地址-->
|
||||||
<service.server.url>192.168.1.127</service.server.url>
|
<service.server.url>127.0.0.1</service.server.url>
|
||||||
<!--docker仓库地址-->
|
<!--docker仓库地址-->
|
||||||
<docker.server.url>192.168.1.22</docker.server.url>
|
<docker.server.url>192.168.1.22</docker.server.url>
|
||||||
<!--nacos的ip:port-->
|
<!--nacos的ip:port-->
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<!--服务器发布内容为空-->
|
<!--服务器发布内容为空-->
|
||||||
<!-- <nacos.namespace></nacos.namespace>-->
|
<!-- <nacos.namespace></nacos.namespace>-->
|
||||||
<!-- <nacos.namespace>30c701c4-2a94-49d9-82e1-76aa9456573f</nacos.namespace>-->
|
<!-- <nacos.namespace>30c701c4-2a94-49d9-82e1-76aa9456573f</nacos.namespace>-->
|
||||||
<nacos.namespace>78588706-e06f-4580-b612-b26d72493fcb</nacos.namespace>
|
<nacos.namespace>6fd2d036-f390-46ee-9c9d-d5a5c00e3314</nacos.namespace>
|
||||||
<!-- <nacos.namespace>910d0d69-2254-481b-b9f7-7ecf9cb881b0</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>
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ public interface QvvrCauseDLL extends Library {
|
|||||||
|
|
||||||
// 创建临时文件
|
// 创建临时文件
|
||||||
String tempDir = System.getProperty("java.io.tmpdir");
|
String tempDir = System.getProperty("java.io.tmpdir");
|
||||||
File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
File tempLibFile = new File(tempDir, libFileName);
|
||||||
|
|
||||||
|
//File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
||||||
|
|
||||||
// 提取库文件到临时目录
|
// 提取库文件到临时目录
|
||||||
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
package com.njcn.advance.event.service.impl;
|
package com.njcn.advance.event.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.advance.event.cause.core.VoltageSagAnalyzer;
|
|
||||||
import com.njcn.advance.event.cause.jna.QvvrCauseDLL;
|
import com.njcn.advance.event.cause.jna.QvvrCauseDLL;
|
||||||
import com.njcn.advance.event.cause.model.AnalysisResult;
|
|
||||||
import com.njcn.advance.event.cause.model.DataFeature;
|
import com.njcn.advance.event.cause.model.DataFeature;
|
||||||
import com.njcn.advance.event.cause.model.QvvrDataStruct;
|
import com.njcn.advance.event.type.jna.*;
|
||||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||||
import com.njcn.advance.event.service.IEventAdvanceService;
|
import com.njcn.advance.event.service.IEventAdvanceService;
|
||||||
import com.njcn.advance.event.type.jna.QvvrDLL;
|
|
||||||
import com.njcn.common.config.GeneralInfo;
|
import com.njcn.common.config.GeneralInfo;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.event.file.component.WaveFileComponent;
|
import com.njcn.event.file.component.WaveFileComponent;
|
||||||
@@ -89,8 +86,55 @@ public class EventAdvanceServiceImpl implements IEventAdvanceService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<List<Float>> listWaveData = waveDataDTO.getListWaveData();
|
List<List<Float>> listWaveData = waveDataDTO.getListWaveData();
|
||||||
|
// 暂降类型
|
||||||
|
// 创建数据结构
|
||||||
|
QvvrDLL.QvvrDataStruct typeDataStruct = new QvvrDLL.QvvrDataStruct();
|
||||||
|
System.out.println("初始化qvvrdll成功-----------");
|
||||||
|
typeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
||||||
|
System.out.println("采样率-----------" + typeDataStruct.smp_rate);
|
||||||
|
typeDataStruct.smp_len = listWaveData.size();
|
||||||
|
System.out.println("波形长度-----------" + listWaveData.size());
|
||||||
|
|
||||||
|
// 获取ABC三相的瞬时数据
|
||||||
|
for (int i = 0; i < listWaveData.size(); i++) {
|
||||||
|
typeDataStruct.smp_va[i] = listWaveData.get(i).get(1);
|
||||||
|
typeDataStruct.smp_vb[i] = listWaveData.get(i).get(2);
|
||||||
|
typeDataStruct.smp_vc[i] = listWaveData.get(i).get(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 执行算法分析 - 直接调用C DLL
|
||||||
|
try {
|
||||||
|
QvvrDLL.INSTANCE.qvvr_fun(typeDataStruct);
|
||||||
|
System.out.println("调用qvvrdll成功-----------");
|
||||||
|
|
||||||
|
if (typeDataStruct.evt_num > 0) {
|
||||||
|
// 全局比较找出最小三相电压特征值
|
||||||
|
float globalMinVoltage = Float.MAX_VALUE;
|
||||||
|
int globalFaultType = 10;
|
||||||
|
for (int i = 0; i < typeDataStruct.evt_num; i++) {
|
||||||
|
QvvrDLL.EventBuffer evt = typeDataStruct.evt_buf[i];
|
||||||
|
for (int j = 0; j < evt.u_min_num; j++) {
|
||||||
|
float u3min = evt.u3_min[j];
|
||||||
|
if (u3min < globalMinVoltage) {
|
||||||
|
globalMinVoltage = u3min;
|
||||||
|
globalFaultType = evt.qvvr_cata_type[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
eventAnalysis.setType(globalFaultType);
|
||||||
|
} else {
|
||||||
|
eventAnalysis.setType(DataFeature.TYPE10);
|
||||||
|
}
|
||||||
|
System.out.println("结束qvvrdll方法调用-----------");
|
||||||
|
} catch (Exception e) {
|
||||||
|
eventAnalysis.setType(DataFeature.TYPE10);
|
||||||
|
eventAnalysis.setTypeFlag(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 暂降原因JNA的方式
|
// 暂降原因JNA的方式
|
||||||
com.njcn.advance.event.cause.jna.QvvrCauseDLL.QvvrDataStruct causeDataStruct = new com.njcn.advance.event.cause.jna.QvvrCauseDLL.QvvrDataStruct();
|
QvvrCauseDLL.QvvrDataStruct causeDataStruct = new QvvrCauseDLL.QvvrDataStruct();
|
||||||
causeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
causeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
||||||
causeDataStruct.smp_len = listWaveData.size();
|
causeDataStruct.smp_len = listWaveData.size();
|
||||||
// 获取ABC三相的瞬时数据
|
// 获取ABC三相的瞬时数据
|
||||||
@@ -112,45 +156,6 @@ public class EventAdvanceServiceImpl implements IEventAdvanceService {
|
|||||||
}
|
}
|
||||||
System.out.println("暂降原因分析完毕===============");
|
System.out.println("暂降原因分析完毕===============");
|
||||||
System.out.println("cause:" + eventAnalysis);
|
System.out.println("cause:" + eventAnalysis);
|
||||||
|
|
||||||
// 暂降类型
|
|
||||||
// 创建数据结构
|
|
||||||
// com.njcn.advance.event.type.jna.QvvrDLL.QvvrDataStruct typeDataStruct = new com.njcn.advance.event.type.jna.QvvrDLL.QvvrDataStruct();
|
|
||||||
// typeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
|
||||||
// typeDataStruct.smp_len = listWaveData.size();
|
|
||||||
// // 获取ABC三相的瞬时数据
|
|
||||||
// for (int i = 0; i < listWaveData.size(); i++) {
|
|
||||||
// typeDataStruct.smp_va[i] = listWaveData.get(i).get(1);
|
|
||||||
// typeDataStruct.smp_vb[i] = listWaveData.get(i).get(2);
|
|
||||||
// typeDataStruct.smp_vc[i] = listWaveData.get(i).get(3);
|
|
||||||
// }
|
|
||||||
// // 执行算法分析 - 直接调用C DLL
|
|
||||||
// try {
|
|
||||||
// QvvrDLL.INSTANCE.qvvr_fun(typeDataStruct);
|
|
||||||
// if (typeDataStruct.evt_num > 0) {
|
|
||||||
// // 全局比较找出最小三相电压特征值
|
|
||||||
// float globalMinVoltage = Float.MAX_VALUE;
|
|
||||||
// int globalFaultType = 10;
|
|
||||||
// for (int i = 0; i < typeDataStruct.evt_num; i++) {
|
|
||||||
// QvvrDLL.EventBuffer evt = typeDataStruct.evt_buf[i];
|
|
||||||
// for (int j = 0; j < evt.u_min_num; j++) {
|
|
||||||
// float u3min = evt.u3_min[j];
|
|
||||||
// if (u3min < globalMinVoltage) {
|
|
||||||
// globalMinVoltage = u3min;
|
|
||||||
// globalFaultType = evt.qvvr_cata_type[j];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// eventAnalysis.setType(globalFaultType);
|
|
||||||
// } else {
|
|
||||||
// eventAnalysis.setType(DataFeature.TYPE10);
|
|
||||||
// }
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// eventAnalysis.setType(DataFeature.TYPE10);
|
|
||||||
// eventAnalysis.setTypeFlag(0);
|
|
||||||
// }
|
|
||||||
return eventAnalysis;
|
return eventAnalysis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public interface QvvrDLL extends Library {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从jar中提取库文件到临时目录
|
* 从jar中提取库文件到临时目录
|
||||||
*/
|
*/
|
||||||
@@ -62,11 +62,13 @@ public interface QvvrDLL extends Library {
|
|||||||
if (libStream == null) {
|
if (libStream == null) {
|
||||||
throw new FileNotFoundException("在jar中找不到库文件: " + resourcePath);
|
throw new FileNotFoundException("在jar中找不到库文件: " + resourcePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建临时文件
|
// 创建临时文件
|
||||||
String tempDir = System.getProperty("java.io.tmpdir");
|
String tempDir = System.getProperty("java.io.tmpdir");
|
||||||
File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
File tempLibFile = new File(tempDir, libFileName);
|
||||||
|
|
||||||
|
// File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
||||||
|
|
||||||
// 提取库文件到临时目录
|
// 提取库文件到临时目录
|
||||||
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
||||||
byte[] buffer = new byte[8192];
|
byte[] buffer = new byte[8192];
|
||||||
@@ -77,45 +79,47 @@ public interface QvvrDLL extends Library {
|
|||||||
} finally {
|
} finally {
|
||||||
libStream.close();
|
libStream.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置为可执行
|
// 设置为可执行
|
||||||
tempLibFile.setExecutable(true);
|
tempLibFile.setExecutable(true);
|
||||||
tempLibFile.setReadable(true);
|
tempLibFile.setReadable(true);
|
||||||
|
|
||||||
// JVM退出时删除临时文件
|
// JVM退出时删除临时文件
|
||||||
tempLibFile.deleteOnExit();
|
tempLibFile.deleteOnExit();
|
||||||
|
|
||||||
System.out.println("已提取库文件到: " + tempLibFile.getAbsolutePath());
|
System.out.println("已提取库文件到: " + tempLibFile.getAbsolutePath());
|
||||||
return tempLibFile;
|
return tempLibFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直接调用C DLL的qvvr_fun函数
|
* 直接调用C DLL的qvvr_fun函数
|
||||||
* void __stdcall qvvr_fun(void *data)
|
* void __stdcall qvvr_fun(void *data)
|
||||||
*/
|
*/
|
||||||
void qvvr_fun(QvvrDataStruct data);
|
void qvvr_fun(QvvrDataStruct data);
|
||||||
|
|
||||||
|
void ping();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对应C语言的qvvr_data_struct结构体
|
* 对应C语言的qvvr_data_struct结构体
|
||||||
*/
|
*/
|
||||||
public static class QvvrDataStruct extends Structure {
|
public static class QvvrDataStruct extends Structure {
|
||||||
|
|
||||||
// 输入数据
|
// 输入数据
|
||||||
public float[] smp_va = new float[128 * 50 * 120]; // A相电压
|
public float[] smp_va = new float[128 * 50 * 120]; // A相电压
|
||||||
public float[] smp_vb = new float[128 * 50 * 120]; // B相电压
|
public float[] smp_vb = new float[128 * 50 * 120]; // B相电压
|
||||||
public float[] smp_vc = new float[128 * 50 * 120]; // C相电压
|
public float[] smp_vc = new float[128 * 50 * 120]; // C相电压
|
||||||
public int smp_rate; // 采样频率
|
public int smp_rate; // 采样频率
|
||||||
public int smp_len; // 数据长度
|
public int smp_len; // 数据长度
|
||||||
|
|
||||||
// 输出结果
|
// 输出结果
|
||||||
public int evt_num; // 事件数量
|
public int evt_num; // 事件数量
|
||||||
public EventBuffer[] evt_buf = new EventBuffer[32]; // 事件缓冲区
|
public EventBuffer[] evt_buf = new EventBuffer[32]; // 事件缓冲区
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<String> getFieldOrder() {
|
protected List<String> getFieldOrder() {
|
||||||
return Arrays.asList("smp_va", "smp_vb", "smp_vc", "smp_rate", "smp_len", "evt_num", "evt_buf");
|
return Arrays.asList("smp_va", "smp_vb", "smp_vc", "smp_rate", "smp_len", "evt_num", "evt_buf");
|
||||||
}
|
}
|
||||||
|
|
||||||
public QvvrDataStruct() {
|
public QvvrDataStruct() {
|
||||||
super();
|
super();
|
||||||
// 初始化事件缓冲区
|
// 初始化事件缓冲区
|
||||||
@@ -124,49 +128,49 @@ public interface QvvrDLL extends Library {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事件缓冲区结构
|
* 事件缓冲区结构
|
||||||
*/
|
*/
|
||||||
public static class EventBuffer extends Structure {
|
public static class EventBuffer extends Structure {
|
||||||
public int[] qvvr_cata_cause = new int[256];
|
public int[] qvvr_cata_cause = new int[256];
|
||||||
public int[] qvvr_phasetype = new int[256];
|
public int[] qvvr_phasetype = new int[256];
|
||||||
public int[] qvvr_cata_type = new int[256];
|
public int[] qvvr_cata_type = new int[256];
|
||||||
|
|
||||||
public float hold_time_rms;
|
public float hold_time_rms;
|
||||||
public float hold_time_dq;
|
public float hold_time_dq;
|
||||||
|
|
||||||
public float POW_a;
|
public float POW_a;
|
||||||
public float POW_b;
|
public float POW_b;
|
||||||
public float POW_c;
|
public float POW_c;
|
||||||
|
|
||||||
public float Voltagechange_Va;
|
public float Voltagechange_Va;
|
||||||
public float Voltagechange_Vb;
|
public float Voltagechange_Vb;
|
||||||
public float Voltagechange_Vc;
|
public float Voltagechange_Vc;
|
||||||
|
|
||||||
public int SEG_T_num;
|
public int SEG_T_num;
|
||||||
public int[] SEG_T0_idx = new int[256];
|
public int[] SEG_T0_idx = new int[256];
|
||||||
public int[] SEG_T_idx = new int[256];
|
public int[] SEG_T_idx = new int[256];
|
||||||
|
|
||||||
public int SEG_RMS_T_num;
|
public int SEG_RMS_T_num;
|
||||||
public int[] SEG_RMS_T_idx = new int[256];
|
public int[] SEG_RMS_T_idx = new int[256];
|
||||||
|
|
||||||
public int u_min_num;
|
public int u_min_num;
|
||||||
public float[] ua_min = new float[256];
|
public float[] ua_min = new float[256];
|
||||||
public float[] ub_min = new float[256];
|
public float[] ub_min = new float[256];
|
||||||
public float[] uc_min = new float[256];
|
public float[] uc_min = new float[256];
|
||||||
public float[] u3_min = new float[256];
|
public float[] u3_min = new float[256];
|
||||||
public int[] order_min_idx = new int[256];
|
public int[] order_min_idx = new int[256];
|
||||||
|
|
||||||
public float[] angle_diff_ap = new float[256];
|
public float[] angle_diff_ap = new float[256];
|
||||||
public float[] angle_diff_bp = new float[256];
|
public float[] angle_diff_bp = new float[256];
|
||||||
public float[] angle_diff_cp = new float[256];
|
public float[] angle_diff_cp = new float[256];
|
||||||
public float[] angle_diff_an = new float[256];
|
public float[] angle_diff_an = new float[256];
|
||||||
public float[] angle_diff_bn = new float[256];
|
public float[] angle_diff_bn = new float[256];
|
||||||
public float[] angle_diff_cn = new float[256];
|
public float[] angle_diff_cn = new float[256];
|
||||||
|
|
||||||
public float[] bph_max_value = new float[256];
|
public float[] bph_max_value = new float[256];
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<String> getFieldOrder() {
|
protected List<String> getFieldOrder() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ public class SecondaryEvaluationServiceImpl implements SecondaryEvaluationServic
|
|||||||
unblance.add(evaluationResult);
|
unblance.add(evaluationResult);
|
||||||
|
|
||||||
evaluationResult = new AssessResultVO.EvaluationResult();
|
evaluationResult = new AssessResultVO.EvaluationResult();
|
||||||
evaluationResult.setData(result.getApproUnblance().multiply(BigDecimal.valueOf(200)));
|
evaluationResult.setData(result.getApproUnblance());
|
||||||
evaluationResult.setLimitData(overLimit.getUnblance());
|
evaluationResult.setLimitData(overLimit.getUnblance());
|
||||||
evaluationResult.setIsQualified(NumberUtil.isLess(evaluationResult.getData(), evaluationResult.getLimitData()));
|
evaluationResult.setIsQualified(NumberUtil.isLess(evaluationResult.getData(), evaluationResult.getLimitData()));
|
||||||
unblance.add(evaluationResult);
|
unblance.add(evaluationResult);
|
||||||
|
|||||||
@@ -854,6 +854,21 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
|
|||||||
/*************************************************************************************
|
/*************************************************************************************
|
||||||
* 获取变压器信息并生成矩阵
|
* 获取变压器信息并生成矩阵
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
|
public Map<String, Map<String, Integer>> getNodeBefore(){
|
||||||
|
Map<String, EntityMtrans> entityMtranMap = new HashMap<>(32);
|
||||||
|
|
||||||
|
HandleEvent handleEvent = new HandleEvent();
|
||||||
|
List<EntityLogic> list = relevantLogMapper.getLogic();
|
||||||
|
Map<String, Map<String, Integer>> setNodeSort = new HashMap<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
Map<String, List<String>> map = getLogicInfo(list);
|
||||||
|
setNodeSort = nodeSort(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
return setNodeSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public Map<String, EntityMtrans> getNodeInfo( ) {
|
public Map<String, EntityMtrans> getNodeInfo( ) {
|
||||||
Map<String, EntityMtrans> entityMtranMap = new HashMap<>(32);
|
Map<String, EntityMtrans> entityMtranMap = new HashMap<>(32);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,6 @@ import org.springframework.context.annotation.DependsOn;
|
|||||||
* @date 2022/11/10
|
* @date 2022/11/10
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@DependsOn("proxyMapperRegister")
|
|
||||||
@MapperScan("com.njcn.**.mapper")
|
@MapperScan("com.njcn.**.mapper")
|
||||||
@EnableFeignClients(basePackages = "com.njcn")
|
@EnableFeignClients(basePackages = "com.njcn")
|
||||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--vastbase驱动用postgresql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>
|
||||||
<!--达梦驱动-->
|
<!--达梦驱动-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.dameng</groupId>
|
<groupId>com.dameng</groupId>
|
||||||
|
|||||||
@@ -47,6 +47,36 @@ public interface BusinessTopic {
|
|||||||
*/
|
*/
|
||||||
String DEVICE_RUN_FLAG_TOPIC = "Device_Run_Flag_Topic";
|
String DEVICE_RUN_FLAG_TOPIC = "Device_Run_Flag_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 云前置日志主题
|
||||||
|
*/
|
||||||
|
String LOG_TOPIC = "log_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台账更新下发
|
||||||
|
*/
|
||||||
|
String CONTROL_TOPIC = "control_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台账更新前置端响应
|
||||||
|
*/
|
||||||
|
String REPLY_TOPIC = "Reply_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置进程控制
|
||||||
|
*/
|
||||||
|
String PROCESS_TOPIC = "process_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补召下发命令
|
||||||
|
*/
|
||||||
|
String ASK_RECALL_TOPIC = "ask_recall_Topic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补召应答命令
|
||||||
|
*/
|
||||||
|
String REPLY_RECALL_TOPIC = "reply_recall_Topic";
|
||||||
|
|
||||||
/********************************数据中心*********************************/
|
/********************************数据中心*********************************/
|
||||||
|
|
||||||
String RMP_EVENT_DETAIL_TOPIC = "rmpEventDetailTopic";
|
String RMP_EVENT_DETAIL_TOPIC = "rmpEventDetailTopic";
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ public class AppFileMessage extends BaseMessage {
|
|||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
private AppFileMessage.Msg msg;
|
private Msg msg;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Msg{
|
public static class Msg{
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
private AppFileMessage.FileInfo fileInfo;
|
private FileInfo fileInfo;
|
||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class BZEventMessage extends BaseMessage {
|
||||||
|
|
||||||
|
//补召事件
|
||||||
|
@Data
|
||||||
|
public static class Event{
|
||||||
|
|
||||||
|
@ApiModelProperty("请求的guid")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端id")
|
||||||
|
private String terminalId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private List<String> monitorIdList;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型 0 稳态 1 暂态事件 2 暂态波形")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("时间范围")
|
||||||
|
private List<String> timeInterval;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//补召波形
|
||||||
|
@Data
|
||||||
|
public static class File{
|
||||||
|
|
||||||
|
@ApiModelProperty("请求的guid")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端id")
|
||||||
|
private String terminalId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String monitorId;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型 0 稳态 1 暂态事件 2 暂态波形")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺失波形时标集合")
|
||||||
|
private List<String> timeList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2025/9/29 15:06
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class BzMessage extends BaseMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("唯一标识")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("补召类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("响应码")
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
@ApiModelProperty("结果")
|
||||||
|
private String result;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String terminalId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String monitorId;
|
||||||
|
|
||||||
|
@ApiModelProperty("补召起始时间")
|
||||||
|
private String recallStartDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("补召结束时间")
|
||||||
|
private String recallEndDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("前置服务器id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("前置进程")
|
||||||
|
private String processNo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:日志信息
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2025/9/18 15:06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CldControlMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("请求的guid")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("功能代号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty("前置服务器id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("指定处理的进程号")
|
||||||
|
private Integer processNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("delete用于杀死进程")
|
||||||
|
private String fun;
|
||||||
|
|
||||||
|
@ApiModelProperty("进程数")
|
||||||
|
private Integer processNum;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:日志信息
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2025/9/18 15:06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CldLogMessage extends BaseMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("前置id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("进程id")
|
||||||
|
private String processNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id、装置id")
|
||||||
|
private String businessId;
|
||||||
|
|
||||||
|
@ApiModelProperty("级别(process进程、terminal装置、measurepoint监测点)")
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
@ApiModelProperty("日志等级")
|
||||||
|
private String grade;
|
||||||
|
|
||||||
|
@ApiModelProperty("告警码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty("告警时间")
|
||||||
|
private String time;
|
||||||
|
|
||||||
|
@ApiModelProperty("日志信息")
|
||||||
|
private String log;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cld设备更新台账实体
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CldUpdateLedgerMessage implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息唯一标识")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("add_terminal/delete_terminal/ledger_modify")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty("进程号")
|
||||||
|
private Integer processNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据")
|
||||||
|
private List<CldDeviceDto> data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CldDeviceDto implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("最大进程数")
|
||||||
|
private Integer maxProcessNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("进程号")
|
||||||
|
private Integer node;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备MAC")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备型号")
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点信息集合")
|
||||||
|
private List<CldMonitorDto> monitorData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CldMonitorDto implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点线路号")
|
||||||
|
private String lineNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("电压等级")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("接线方式")
|
||||||
|
private String ptType;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("pt一次变比")
|
||||||
|
private Double pt1;
|
||||||
|
|
||||||
|
@ApiModelProperty("pt二次变比")
|
||||||
|
private Double pt2;
|
||||||
|
|
||||||
|
@ApiModelProperty("ct一次变比")
|
||||||
|
private Double ct1;
|
||||||
|
|
||||||
|
@ApiModelProperty("ct二次变比")
|
||||||
|
private Double ct2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
package com.njcn.mq.message;
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
import com.njcn.middle.rocket.domain.BaseMessage;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类的介绍:
|
* 类的介绍:
|
||||||
*
|
*
|
||||||
@@ -39,4 +35,7 @@ public class RealDataMessage {
|
|||||||
@ApiModelProperty("限制")
|
@ApiModelProperty("限制")
|
||||||
private Integer count;
|
private Integer count;
|
||||||
|
|
||||||
|
@ApiModelProperty("idx")
|
||||||
|
private Integer idx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.njcn.mq.message;
|
||||||
|
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2025/9/29 15:06
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UpdateLedgerMessage extends BaseMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("唯一标识")
|
||||||
|
private String guid;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据")
|
||||||
|
private List<HandleData> data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class HandleData implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("响应码")
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
@ApiModelProperty("结果描述")
|
||||||
|
private String result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.njcn.mq.template;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
|
||||||
|
import com.njcn.mq.constant.BusinessResource;
|
||||||
|
import com.njcn.mq.constant.BusinessTopic;
|
||||||
|
import org.apache.rocketmq.client.producer.SendResult;
|
||||||
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:补召事件
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BZEventMessageTemplate extends RocketMQEnhanceTemplate {
|
||||||
|
|
||||||
|
public BZEventMessageTemplate(RocketMQTemplate template) {
|
||||||
|
super(template);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendResult sendMember(Object message, String tag) {
|
||||||
|
BaseMessage baseMessage = new BaseMessage();
|
||||||
|
baseMessage.setSource(BusinessResource.WEB_RESOURCE);
|
||||||
|
baseMessage.setMessageBody(new Gson().toJson(message));
|
||||||
|
return send(BusinessTopic.ASK_RECALL_TOPIC,tag,baseMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.njcn.mq.template;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
|
||||||
|
import com.njcn.mq.constant.BusinessResource;
|
||||||
|
import com.njcn.mq.constant.BusinessTopic;
|
||||||
|
import com.njcn.mq.message.CldControlMessage;
|
||||||
|
import org.apache.rocketmq.client.producer.SendResult;
|
||||||
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:实时数据模板
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/8/11 15:28
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class CldControlMessageTemplate extends RocketMQEnhanceTemplate {
|
||||||
|
|
||||||
|
public CldControlMessageTemplate(RocketMQTemplate template) {
|
||||||
|
super(template);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendResult sendMember(CldControlMessage message, String tag) {
|
||||||
|
BaseMessage baseMessage = new BaseMessage();
|
||||||
|
baseMessage.setSource(BusinessResource.WEB_RESOURCE);
|
||||||
|
baseMessage.setMessageBody(new Gson().toJson(message));
|
||||||
|
return send(BusinessTopic.PROCESS_TOPIC,tag,baseMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.njcn.mq.template;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||||
|
import com.njcn.middle.rocket.domain.BaseMessage;
|
||||||
|
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
|
||||||
|
import com.njcn.mq.constant.BusinessResource;
|
||||||
|
import com.njcn.mq.constant.BusinessTopic;
|
||||||
|
import com.njcn.mq.message.CldUpdateLedgerMessage;
|
||||||
|
import org.apache.rocketmq.client.producer.SendResult;
|
||||||
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:实时数据模板
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/8/11 15:28
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class CldUpdateLedgerMessageTemplate extends RocketMQEnhanceTemplate {
|
||||||
|
|
||||||
|
public CldUpdateLedgerMessageTemplate(RocketMQTemplate template) {
|
||||||
|
super(template);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendResult sendMember(CldUpdateLedgerMessage cldUpdateLedgerMessage, String tag) {
|
||||||
|
BaseMessage baseMessage = new BaseMessage();
|
||||||
|
baseMessage.setSource(BusinessResource.WEB_RESOURCE);
|
||||||
|
baseMessage.setMessageBody(new Gson().toJson(cldUpdateLedgerMessage));
|
||||||
|
return send(BusinessTopic.CONTROL_TOPIC,tag,baseMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.njcn.oss.utils;
|
|||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.lang.UUID;
|
import cn.hutool.core.lang.UUID;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.njcn.common.config.GeneralInfo;
|
import com.njcn.common.config.GeneralInfo;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.huawei.obs.util.OBSUtil;
|
import com.njcn.huawei.obs.util.OBSUtil;
|
||||||
@@ -88,16 +89,23 @@ public class FileStorageUtil {
|
|||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
try {
|
try {
|
||||||
// 确保目录存在
|
// 构建完整目录:基准目录 + dir子目录
|
||||||
Path uploadPath = Paths.get(generalInfo.getLocalStorePath());
|
Path basePath = Paths.get(generalInfo.getLocalStorePath());
|
||||||
|
Path uploadPath = basePath.resolve(dir); // 将dir作为子目录添加
|
||||||
|
|
||||||
|
// 确保完整目录存在(包括dir子目录)
|
||||||
if (!Files.exists(uploadPath)) {
|
if (!Files.exists(uploadPath)) {
|
||||||
Files.createDirectories(uploadPath);
|
Files.createDirectories(uploadPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成本地文件名(可以添加时间戳或UUID防止重名)
|
// 生成本地文件名(处理扩展名,防止异常)
|
||||||
String originalFilename = multipartFile.getOriginalFilename();
|
String originalFilename = multipartFile.getOriginalFilename();
|
||||||
String fileExtension = originalFilename.substring(originalFilename.lastIndexOf("."));
|
String fileExtension = "";
|
||||||
String newFilename = UUID.randomUUID().toString() + fileExtension;
|
int extIndex = originalFilename.lastIndexOf(".");
|
||||||
|
if (extIndex > 0 && extIndex < originalFilename.length() - 1) {
|
||||||
|
fileExtension = originalFilename.substring(extIndex);
|
||||||
|
}
|
||||||
|
String newFilename = IdUtil.simpleUUID().toUpperCase() + fileExtension;
|
||||||
|
|
||||||
// 构建完整路径
|
// 构建完整路径
|
||||||
Path filePathPath = uploadPath.resolve(newFilename);
|
Path filePathPath = uploadPath.resolve(newFilename);
|
||||||
@@ -105,7 +113,7 @@ public class FileStorageUtil {
|
|||||||
// 保存文件
|
// 保存文件
|
||||||
multipartFile.transferTo(filePathPath.toFile());
|
multipartFile.transferTo(filePathPath.toFile());
|
||||||
|
|
||||||
// 返回相对路径或完整路径,根据需求调整
|
// 返回相对路径或完整路径
|
||||||
filePath = dir + File.separator + newFilename;
|
filePath = dir + File.separator + newFilename;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new BusinessException("本地文件上传失败: " + e.getMessage());
|
throw new BusinessException("本地文件上传失败: " + e.getMessage());
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public enum RedisKeyEnum {
|
|||||||
/**
|
/**
|
||||||
* 云前置心跳
|
* 云前置心跳
|
||||||
*/
|
*/
|
||||||
CLD_HEART_BEAT_KEY("CLD_HEART_BEAT:", 120L);
|
CLD_HEART_BEAT_KEY("CLD_HEART_BEAT:", 180L);
|
||||||
|
|
||||||
|
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ public class Knife4jSwaggerConfig {
|
|||||||
@Value("${microservice.gateway.url}")
|
@Value("${microservice.gateway.url}")
|
||||||
private String gatewayUrl;
|
private String gatewayUrl;
|
||||||
|
|
||||||
|
@Value("${swagger.enable:true}")
|
||||||
|
private Boolean swaggerEnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger通用配置
|
* swagger通用配置
|
||||||
*/
|
*/
|
||||||
@@ -81,7 +84,9 @@ public class Knife4jSwaggerConfig {
|
|||||||
"com.njcn.supervision.controller",
|
"com.njcn.supervision.controller",
|
||||||
"com.njcn.algorithm",
|
"com.njcn.algorithm",
|
||||||
"com.njcn.dataProcess",
|
"com.njcn.dataProcess",
|
||||||
"com.njcn.migration"
|
"com.njcn.migration",
|
||||||
|
"com.njcn.harmonic.rstatlimitrate.controller",
|
||||||
|
"com.njcn.device.device.controller"
|
||||||
)
|
)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<GrantType> grantTypes = new ArrayList<>();
|
List<GrantType> grantTypes = new ArrayList<>();
|
||||||
@@ -94,7 +99,7 @@ public class Knife4jSwaggerConfig {
|
|||||||
//securyContext
|
//securyContext
|
||||||
return new Docket(DocumentationType.SWAGGER_2)
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
.apiInfo(apiInfo())
|
.apiInfo(apiInfo())
|
||||||
.enable(true)
|
.enable(swaggerEnable)
|
||||||
.select()
|
.select()
|
||||||
// 指定添加swagger注解的方法
|
// 指定添加swagger注解的方法
|
||||||
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ public interface CommTerminalGeneralClient {
|
|||||||
@PostMapping("deptGetLine")
|
@PostMapping("deptGetLine")
|
||||||
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
@PostMapping("deptGetAllLine")
|
||||||
|
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(DeptGetLineParam deptGetLineParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取all监测点信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<DeptGetSubStationDTO>> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
public HttpResult<List<DeptGetSubStationDTO>> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public enum DeviceResponseEnum {
|
|||||||
|
|
||||||
DEVICE_SAME_NAME("A0290","设备名称已存在"),
|
DEVICE_SAME_NAME("A0290","设备名称已存在"),
|
||||||
DEVICE_REPETITION("A0291","设备名称重复"),
|
DEVICE_REPETITION("A0291","设备名称重复"),
|
||||||
|
MODEL_NAME_REPEAT("A00350","名称不可重复"),
|
||||||
DEVICE_IP_REPETITION("A0292","设备ip端口号重复"),
|
DEVICE_IP_REPETITION("A0292","设备ip端口号重复"),
|
||||||
DEVICE_SAME_IP("A0293","当前设备ip端口号已存在"),
|
DEVICE_SAME_IP("A0293","当前设备ip端口号已存在"),
|
||||||
DEVICE_EMPTY("A0294","设备为空"),
|
DEVICE_EMPTY("A0294","设备为空"),
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ public class LineDevGetDTO {
|
|||||||
|
|
||||||
private String pointName;
|
private String pointName;
|
||||||
|
|
||||||
|
private Integer lineRunFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置监测点索引集合
|
* 装置监测点索引集合
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ public class PollutionLineInfoDTO {
|
|||||||
/**
|
/**
|
||||||
* 所属变电站
|
* 所属变电站
|
||||||
*/
|
*/
|
||||||
|
private String subStationId;
|
||||||
|
|
||||||
private String subStationName;
|
private String subStationName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +76,10 @@ public class PollutionLineInfoDTO {
|
|||||||
* 电压等级
|
* 电压等级
|
||||||
*/
|
*/
|
||||||
private String lineVoltage;
|
private String lineVoltage;
|
||||||
|
/**
|
||||||
|
* 变电站电压等级
|
||||||
|
*/
|
||||||
|
private String subVoltage;
|
||||||
/**
|
/**
|
||||||
* 装置id
|
* 装置id
|
||||||
*/
|
*/
|
||||||
@@ -94,4 +99,9 @@ public class PollutionLineInfoDTO {
|
|||||||
* 监测点名称
|
* 监测点名称
|
||||||
*/
|
*/
|
||||||
private String lineName;
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际安装位置
|
||||||
|
*/
|
||||||
|
private String actualArea;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class DeptGetLineParam {
|
|||||||
private Boolean monitorStateRunning=true;
|
private Boolean monitorStateRunning=true;
|
||||||
|
|
||||||
@ApiModelProperty(name = "isUpToGrid",value = "0.非送国网 1.需要送国网的")
|
@ApiModelProperty(name = "isUpToGrid",value = "0.非送国网 1.需要送国网的")
|
||||||
|
|
||||||
private Integer isUpToGrid;
|
private Integer isUpToGrid;
|
||||||
/**
|
/**
|
||||||
* 0-电网侧
|
* 0-电网侧
|
||||||
@@ -48,4 +47,7 @@ public class DeptGetLineParam {
|
|||||||
@ApiModelProperty("监测点运行状态")
|
@ApiModelProperty("监测点运行状态")
|
||||||
@Range(min = 0, max = 2, message = "监测点运行状态" + ValidMessage.PARAM_FORMAT_ERROR)
|
@Range(min = 0, max = 2, message = "监测点运行状态" + ValidMessage.PARAM_FORMAT_ERROR)
|
||||||
private Integer lineRunFlag;
|
private Integer lineRunFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("搜索值")
|
||||||
|
private String searchValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
monitor.Org_Id AS orgId,
|
monitor.Org_Id AS orgId,
|
||||||
monitor.Org_Name AS orgName,
|
monitor.Org_Name AS orgName,
|
||||||
monitor.`Powerr_Id` AS powerId,
|
monitor.Powerr_Id AS powerId,
|
||||||
monitor.`Powerr_Name` AS powerName,
|
monitor.Powerr_Name AS powerName,
|
||||||
monitor.id AS monitorId,
|
monitor.id AS monitorId,
|
||||||
monitor.`Name` AS monitorName,
|
monitor.Name AS monitorName,
|
||||||
monitor.Line_Id,
|
monitor.Line_Id,
|
||||||
monitor.Line_Name,
|
monitor.Line_Name,
|
||||||
pdm.Monitor_Sort AS monitorSort,
|
pdm.Monitor_Sort AS monitorSort,
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
pm.id,
|
pm.id,
|
||||||
pm.`Name`,
|
pm.Name,
|
||||||
pm.`Status`,
|
pm.Status,
|
||||||
pm.Org_Id,
|
pm.Org_Id,
|
||||||
pm.Org_Name,
|
pm.Org_Name,
|
||||||
pm.Powerr_Id,
|
pm.Powerr_Id,
|
||||||
@@ -51,8 +51,8 @@
|
|||||||
) AS monitor
|
) AS monitor
|
||||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||||
WHERE
|
WHERE
|
||||||
monitor.`Status` = 1
|
monitor.Status = 1
|
||||||
AND pdm.`Status` = 1
|
AND pdm.Status = 1
|
||||||
AND monitor.Org_Id IN
|
AND monitor.Org_Id IN
|
||||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||||
#{orgId}
|
#{orgId}
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||||
</if>
|
</if>
|
||||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>pq-device-api</module>
|
<module>pq-device-api</module>
|
||||||
<module>pq-device-boot</module>
|
<module>pq-device-boot</module>
|
||||||
|
<module>pq-device-com</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
|||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -70,6 +70,16 @@ public interface GeneralDeviceInfoClient {
|
|||||||
HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfoAsSubstation(@RequestBody DeviceInfoParam deviceInfoParam);
|
HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfoAsSubstation(@RequestBody DeviceInfoParam deviceInfoParam);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取变电站分类的所有终端综合信息
|
||||||
|
*
|
||||||
|
* @param deviceInfoParam 查询终端条件
|
||||||
|
* @return 获取变电站分类的所有终端综合信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/getPracticalAllDeviceInfoAsSubstation")
|
||||||
|
HttpResult<List<GeneralDeviceDTO>> getPracticalAllDeviceInfoAsSubstation(@RequestBody DeviceInfoParam deviceInfoParam);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取实际运行终端综合信息
|
* 获取实际运行终端综合信息
|
||||||
*
|
*
|
||||||
@@ -111,7 +121,7 @@ public interface GeneralDeviceInfoClient {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getOnlineRateByDevIds")
|
@PostMapping("/getOnlineRateByDevIds")
|
||||||
HttpResult<List<RStatOnlinerateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param);
|
HttpResult<List<RStatOnlineRateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*根据单位获取投运监测点(双系统)
|
*根据单位获取投运监测点(双系统)
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package com.njcn.device.pq.api;
|
|||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
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.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.DeviceTreeClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
|
||||||
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
||||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
||||||
@@ -11,6 +13,8 @@ import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
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;
|
||||||
@@ -51,4 +55,7 @@ public interface LineIntegrityClient {
|
|||||||
|
|
||||||
@PostMapping("/lineDataQuality")
|
@PostMapping("/lineDataQuality")
|
||||||
HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);
|
HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);
|
||||||
|
|
||||||
|
@PostMapping("/noData")
|
||||||
|
HttpResult<List<OnlineMonitorVo>> getNoData(@RequestBody LineBaseQueryParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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.dataVerifyCountFallbackFactory;
|
||||||
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.DEVICE, path = "/dataVerifyCount", fallbackFactory = dataVerifyCountFallbackFactory.class, contextId = "dataVerifyCount")
|
||||||
|
public interface PqDataVerifyCountClient {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取有异常数据的监测点相关信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/getAnomalousData")
|
||||||
|
HttpResult<List<OnlineMonitorVo>> getAnomalousData(@RequestBody LineBaseQueryParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,9 +3,9 @@ package com.njcn.device.pq.api.fallback;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import com.njcn.device.pq.api.AlarmClient;
|
import com.njcn.device.pq.api.AlarmClient;
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -14,11 +14,12 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警管理熔断降级
|
* 告警管理熔断降级
|
||||||
|
*
|
||||||
* @author yzh
|
* @author yzh
|
||||||
* @date 2022/9/19
|
* @date 2022/9/19
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component("deviceAlarmClientFallbackFactory")
|
||||||
public class AlarmClientFallbackFactory implements FallbackFactory<AlarmClient> {
|
public class AlarmClientFallbackFactory implements FallbackFactory<AlarmClient> {
|
||||||
@Override
|
@Override
|
||||||
public AlarmClient create(Throwable throwable) {
|
public AlarmClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
|||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -59,6 +59,12 @@ public class GeneralDeviceInfoClientFallbackFactory implements FallbackFactory<G
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<GeneralDeviceDTO>> getPracticalAllDeviceInfoAsSubstation(DeviceInfoParam deviceInfoParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取变电站分类的所有终端综合信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfo(DeviceInfoParam deviceInfoParam) {
|
public HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfo(DeviceInfoParam deviceInfoParam) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "获取实际运行终端综合信息", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "获取实际运行终端综合信息", throwable.toString());
|
||||||
@@ -84,7 +90,7 @@ public class GeneralDeviceInfoClientFallbackFactory implements FallbackFactory<G
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<RStatOnlinerateVO>> getOnlineRateByDevIds(OnlineRateParam param) {
|
public HttpResult<List<RStatOnlineRateVO>> getOnlineRateByDevIds(OnlineRateParam param) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "获取终端在线率(谐波专用)", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "获取终端在线率(谐波专用)", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -54,6 +55,12 @@ public class LineIntegrityClientFallbackFactory implements FallbackFactory<LineI
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getNoData(LineBaseQueryParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取监测点数据完成性为0的数据", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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.PqDataVerifyCountClient;
|
||||||
|
import com.njcn.device.pq.api.PqDevTypeClient;
|
||||||
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.PqDevType;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class dataVerifyCountFallbackFactory implements FallbackFactory<PqDataVerifyCountClient> {
|
||||||
|
@Override
|
||||||
|
public PqDataVerifyCountClient 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 PqDataVerifyCountClient()
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getAnomalousData(LineBaseQueryParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取有异常数据的监测点相关信息异常", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,7 +55,11 @@ public interface Param {
|
|||||||
//长时间闪变值
|
//长时间闪变值
|
||||||
String pst = "DataFlicker-pst";
|
String pst = "DataFlicker-pst";
|
||||||
|
|
||||||
|
//电压暂降
|
||||||
|
String Voltage_Dip = "r_mp_event_detail-Voltage_Dip";
|
||||||
|
//电压暂升
|
||||||
String Voltage_Rise = "r_mp_event_detail-Voltage_Rise";
|
String Voltage_Rise = "r_mp_event_detail-Voltage_Rise";
|
||||||
|
|
||||||
String pf = "DataHarmPowerP-pf";
|
String pf = "DataHarmPowerP-pf";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.njcn.device.pq.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/1/4
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum JbPowerFlagEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统拓扑各层级描述
|
||||||
|
*/
|
||||||
|
GRID_SIDE(0, "电网侧"),
|
||||||
|
NO_GRID_SIDE(1, "非电网侧"),
|
||||||
|
SEND_NETWORK(2, "上送国网"),
|
||||||
|
NOT_NETWORK(3, "非上送国网"),
|
||||||
|
unknown(4, "未知"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String message;
|
||||||
|
|
||||||
|
JbPowerFlagEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JbPowerFlagEnum getPowerFlagEnumByCode(Integer code) {
|
||||||
|
return Arrays.stream(JbPowerFlagEnum.values())
|
||||||
|
.filter(x -> x.getCode().equals(code))
|
||||||
|
.findAny()
|
||||||
|
.orElse(unknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -105,6 +105,14 @@ public class DeviceInfoParam implements Serializable {
|
|||||||
@Range(min = 0, max = 2, message = "监测点运行状态" + ValidMessage.PARAM_FORMAT_ERROR)
|
@Range(min = 0, max = 2, message = "监测点运行状态" + ValidMessage.PARAM_FORMAT_ERROR)
|
||||||
private Integer lineRunFlag;
|
private Integer lineRunFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("0:按照监测点搜索 1:按照装置搜索")
|
||||||
|
private Integer lineOrDevice;
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("搜索值")
|
||||||
|
private String searchValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认全部监测点
|
* 默认全部监测点
|
||||||
*
|
*
|
||||||
@@ -207,6 +215,12 @@ public class DeviceInfoParam implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("是否是冀北电网一张图树 0:否 1:是")
|
@ApiModelProperty("是否是冀北电网一张图树 0:否 1:是")
|
||||||
private Integer type = 0;
|
private Integer type = 0;
|
||||||
|
|
||||||
|
@ApiModelProperty("指标")
|
||||||
|
private List<String> dicData;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否展示污染值 0:否 1:是")
|
||||||
|
private Integer isPollution;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isUserLedger() {
|
public Boolean isUserLedger() {
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ public class LineParam {
|
|||||||
private String objId;
|
private String objId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "bigObjType",value = "对象大类")
|
@ApiModelProperty(name = "bigObjType",value = "对象大类")
|
||||||
@NotBlank(message = "对象大类不可为空")
|
// @NotBlank(message = "对象大类不可为空")
|
||||||
private String bigObjType;
|
private String bigObjType;
|
||||||
|
|
||||||
@ApiModelProperty(name = "smallObjType",value = "对象小类")
|
@ApiModelProperty(name = "smallObjType",value = "对象小类")
|
||||||
@NotBlank(message = "对象小类不可为空")
|
// @NotBlank(message = "对象小类不可为空")
|
||||||
private String smallObjType;
|
private String smallObjType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import java.util.List;
|
|||||||
* @createTime: 2023-04-03
|
* @createTime: 2023-04-03
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel
|
|
||||||
public class OnlineRateParam {
|
public class OnlineRateParam {
|
||||||
|
|
||||||
@ApiModelProperty(name = "ids", value = "设备id")
|
@ApiModelProperty(name = "ids", value = "设备id")
|
||||||
@@ -27,4 +26,10 @@ public class OnlineRateParam {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "type", value = "区分类型0:topid搜索 1:devid搜索")
|
@ApiModelProperty(name = "type", value = "区分类型0:topid搜索 1:devid搜索")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Info extends OnlineRateParam {
|
||||||
|
@ApiModelProperty(name = "dicData", value = "字典id")
|
||||||
|
private List<String> dicData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,4 +77,7 @@ public class RunManageParam extends BaseParam implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "evaluate", value = "评价")
|
@ApiModelProperty(name = "evaluate", value = "评价")
|
||||||
private String evaluate;
|
private String evaluate;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ids", value = "监测点id集合")
|
||||||
|
private List<String> ids;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,4 +38,9 @@ public class MonitorBaseParam extends BaseParam {
|
|||||||
@ApiModelProperty(value = "终端厂家")
|
@ApiModelProperty(value = "终端厂家")
|
||||||
private String manufacturer;
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点运行状态")
|
||||||
|
private Integer lineRunFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "异常天数时间")
|
||||||
|
private List<String> time;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,16 @@ public class PqDataVerifyBak {
|
|||||||
*/
|
*/
|
||||||
private Integer pst;
|
private Integer pst;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压暂降(0:正常 1:异常)
|
||||||
|
*/
|
||||||
|
private Integer dip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压暂升(0:正常 1:异常)
|
||||||
|
*/
|
||||||
|
private Integer rise;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断所有指标 0:无异常 1:有异常
|
* 判断所有指标 0:无异常 1:有异常
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pq_data_verify_count")
|
||||||
|
public class PqDataVerifyCount implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据时间
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常指标数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "total")
|
||||||
|
private Integer total ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总指标数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "total_all")
|
||||||
|
private Integer totalAll ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po.jb;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("fbs_distribution_area")
|
||||||
|
public class DistributionArea extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台区编号
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台区名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构名称
|
||||||
|
*/
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构ID(外键)
|
||||||
|
*/
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String operationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位ID(外键)
|
||||||
|
*/
|
||||||
|
private String operationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站名称
|
||||||
|
*/
|
||||||
|
private String powerrName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站ID(外键)
|
||||||
|
*/
|
||||||
|
private String powerStationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测线路名称
|
||||||
|
*/
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属线路ID(外键)
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配变容量
|
||||||
|
*/
|
||||||
|
private Float pCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区特征(字典)
|
||||||
|
*/
|
||||||
|
private String regionalism;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备地区特征(字典)
|
||||||
|
*/
|
||||||
|
private String devRegionalism;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否农网:0-否;1:是;
|
||||||
|
*/
|
||||||
|
private Integer ifRuralPowerGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用性质
|
||||||
|
*/
|
||||||
|
private String natureOfUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电半径
|
||||||
|
*/
|
||||||
|
private Float powerSupplyRadius;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电线路总长度
|
||||||
|
*/
|
||||||
|
private Float lineLength;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态(字典)
|
||||||
|
*/
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分布式光伏用户数
|
||||||
|
*/
|
||||||
|
private Integer distributedPhotovoltaicNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分布式光伏总装机容量
|
||||||
|
*/
|
||||||
|
private Float photovoltaicCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有电动汽车接入:0-否;1:是;
|
||||||
|
*/
|
||||||
|
private Integer ifBevAp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接入负荷类型(字典)
|
||||||
|
*/
|
||||||
|
private String apLoadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是上送国网监测点,0-否 1-是
|
||||||
|
*/
|
||||||
|
private Integer isUpToGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
private Double latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态:0-删除;1-正常;
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态:0-手动录入;1-gw台账录入
|
||||||
|
*/
|
||||||
|
private Integer inputStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po.jb;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 发电用户
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("fbs_power_generation_user")
|
||||||
|
public class GenerationUser extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户编号
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构名称
|
||||||
|
*/
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构ID(外键)
|
||||||
|
*/
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String operationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位ID(外键)
|
||||||
|
*/
|
||||||
|
private String operationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电源类别(字典)
|
||||||
|
*/
|
||||||
|
private String powerCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站类型(字典)
|
||||||
|
*/
|
||||||
|
private String powerStationType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发电方式(字典)
|
||||||
|
*/
|
||||||
|
private String powerGenerationMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 并网电压等级(字典)
|
||||||
|
*/
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总装机容量
|
||||||
|
*/
|
||||||
|
private Float sourceCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 并网日期
|
||||||
|
*/
|
||||||
|
private LocalDate connectionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 能源消纳方式(字典)
|
||||||
|
*/
|
||||||
|
private String connectionMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户状态(字典)
|
||||||
|
*/
|
||||||
|
private String gcStat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电变电站(外键)
|
||||||
|
*/
|
||||||
|
private String powerStationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电线路(外键)
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电台区(外键)
|
||||||
|
*/
|
||||||
|
private String platformId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户标签
|
||||||
|
*/
|
||||||
|
private String userTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是上送国网监测点,0-否 1-是
|
||||||
|
*/
|
||||||
|
private Integer isUpToGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态:0-删除;1-正常;
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监测点详细信息
|
* 监测点详细信息
|
||||||
@@ -129,6 +130,24 @@ public class AreaLineInfoVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "smallObjType",value = "检测对象小类")
|
@ApiModelProperty(name = "smallObjType",value = "检测对象小类")
|
||||||
private String smallObjType;
|
private String smallObjType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "powerFlag",value = "电网标志(0-电网侧;1-非电网侧)")
|
||||||
|
private Integer powerFlag;
|
||||||
|
|
||||||
@ApiModelProperty(name = "objId",value = "对象id")
|
@ApiModelProperty(name = "objId",value = "对象id")
|
||||||
private String objId;
|
private String objId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "vHarmonicValue",value = "污染值")
|
||||||
|
private Double vHarmonicValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "userList",value = "敏感用户信息")
|
||||||
|
private List<User> userList;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class User{
|
||||||
|
private String id;
|
||||||
|
private String projectName;
|
||||||
|
private String stationId;
|
||||||
|
private String lineId;
|
||||||
|
private String city;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ public class DevDetail {
|
|||||||
@ApiModelProperty("供电公司")
|
@ApiModelProperty("供电公司")
|
||||||
private String gdName;
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属部门")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
@ApiModelProperty("变电站名称")
|
@ApiModelProperty("变电站名称")
|
||||||
private String bdzName;
|
private String bdzName;
|
||||||
|
|
||||||
@@ -37,9 +40,15 @@ public class DevDetail {
|
|||||||
@ApiModelProperty("终端等级")
|
@ApiModelProperty("终端等级")
|
||||||
private String lineGrade;
|
private String lineGrade;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端厂商")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
@ApiModelProperty("通讯状态(0:中断;1:正常)")
|
@ApiModelProperty("通讯状态(0:中断;1:正常)")
|
||||||
private Integer comFlag;
|
private Integer comFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||||
|
private Integer runFlag;
|
||||||
|
|
||||||
@ApiModelProperty("定检时间")
|
@ApiModelProperty("定检时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate nextTimeCheck;
|
private LocalDate nextTimeCheck;
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class DevDetailVO {
|
public class DevDetailVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String cit;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
@ApiModelProperty(name = "lineId",value = "监测点索引")
|
@ApiModelProperty(name = "lineId",value = "监测点索引")
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
@@ -32,4 +41,6 @@ public class DevDetailVO {
|
|||||||
@ApiModelProperty(name = "subName",value = "对象id(新能源用户)")
|
@ApiModelProperty(name = "subName",value = "对象id(新能源用户)")
|
||||||
private String ObjId;
|
private String ObjId;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||||
|
private Integer runFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class DeviceRunEvaluateVO {
|
public class DeviceRunEvaluateVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("终端id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
@ApiModelProperty("名称")
|
@ApiModelProperty("名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@@ -26,6 +29,18 @@ public class DeviceRunEvaluateVO {
|
|||||||
@ApiModelProperty("评价")
|
@ApiModelProperty("评价")
|
||||||
private BigDecimal evaluate;
|
private BigDecimal evaluate;
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String cit;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||||
|
private String runFlag;
|
||||||
|
|
||||||
@ApiModelProperty("完整率")
|
@ApiModelProperty("完整率")
|
||||||
private BigDecimal integrityRate;
|
private BigDecimal integrityRate;
|
||||||
|
|
||||||
@@ -40,4 +55,29 @@ public class DeviceRunEvaluateVO {
|
|||||||
@ApiModelProperty("终端id集合")
|
@ApiModelProperty("终端id集合")
|
||||||
private List<String> devIds;
|
private List<String> devIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Detail {
|
||||||
|
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("评价")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端数量")
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
@ApiModelProperty("在线率")
|
||||||
|
private BigDecimal online;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据完整性")
|
||||||
|
private BigDecimal integrity;
|
||||||
|
|
||||||
|
@ApiModelProperty("异常率")
|
||||||
|
private BigDecimal qualified;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端信息")
|
||||||
|
List<DeviceRunEvaluateVO> list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ public class GridDiagramProVO {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "integrityRate", value = "数据完整率")
|
@ApiModelProperty(name = "integrityRate", value = "数据完整率")
|
||||||
private Float integrityRate;
|
private Float integrityRate;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "onLineRate", value = "数据在线率")
|
||||||
|
private Float onLineRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class LineDetailVO implements Serializable {
|
public class LineDetailVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
@ApiModelProperty("供电公司名称")
|
@ApiModelProperty("供电公司名称")
|
||||||
private String gdName;
|
private String gdName;
|
||||||
|
|
||||||
@@ -92,6 +95,16 @@ public class LineDetailVO implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("已用流量占比")
|
@ApiModelProperty("已用流量占比")
|
||||||
private Float flowProportion;
|
private Float flowProportion;
|
||||||
|
|
||||||
|
@ApiModelProperty("电网标志 0-电网侧;1-非电网侧")
|
||||||
|
private Integer powerFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "监测点运行状态")
|
||||||
|
private String lineRunType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "终端厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OnlineMonitorVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("负责单位")
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty("变电站名称")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象类型")
|
||||||
|
private String monitorObjType;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象名称")
|
||||||
|
private String monitorObj;
|
||||||
|
|
||||||
|
@ApiModelProperty("指标类型 ")
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
@ApiModelProperty("累计天数")
|
||||||
|
private Integer lastDay;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.njcn.device.pq.pojo.vo;
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,6 +26,6 @@ public class RStatIntegrityVO {
|
|||||||
|
|
||||||
private Integer realTime;
|
private Integer realTime;
|
||||||
|
|
||||||
private Double integrityRate;
|
private BigDecimal integrityRate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.njcn.device.pq.pojo.vo;
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
|||||||
* @createTime: 2023-04-03
|
* @createTime: 2023-04-03
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RStatOnlinerateVO {
|
public class RStatOnlineRateVO {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private LocalDateTime timeId;
|
private LocalDateTime timeId;
|
||||||
@@ -23,5 +23,5 @@ public class RStatOnlinerateVO {
|
|||||||
|
|
||||||
private Integer offlineMin;
|
private Integer offlineMin;
|
||||||
|
|
||||||
private Float onlineRate;
|
private BigDecimal onlineRate;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo.common;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wr
|
||||||
|
* @description
|
||||||
|
* @date 2025/11/26 11:00
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeviceOnlineRate {
|
||||||
|
|
||||||
|
@ApiModelProperty("总终端数量")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("低于90终端数据")
|
||||||
|
private Integer belowNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("总终端在线率")
|
||||||
|
private BigDecimal totalOnlineRate;
|
||||||
|
|
||||||
|
@ApiModelProperty("统计信息")
|
||||||
|
List<CitDetail> citDetailList;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CitDetail {
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String citName;
|
||||||
|
|
||||||
|
@ApiModelProperty("总终端数量")
|
||||||
|
private Integer citTotalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("低于90终端数据")
|
||||||
|
private Integer citBelowNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("总终端在线率")
|
||||||
|
private BigDecimal citTotalOnlineRate;
|
||||||
|
|
||||||
|
@ApiModelProperty("统计信息")
|
||||||
|
List<?> detailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Detail {
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String cit;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@ApiModelProperty("变电站")
|
||||||
|
private String subStation;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端ID")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端IP")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||||
|
private String runFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端通讯状态(0:中断;1:正常)")
|
||||||
|
private String comFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
private LocalDateTime timeID;
|
||||||
|
|
||||||
|
@ApiModelProperty("在线率")
|
||||||
|
private BigDecimal onlineRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class LineDetail {
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String cit;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@ApiModelProperty("变电站")
|
||||||
|
private String subStation;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端ID")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端IP")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点运行状态")
|
||||||
|
private String runFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime latestTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据完整性")
|
||||||
|
private BigDecimal integrity;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.njcn.device.pq.pojo.vo.dataClean;
|
package com.njcn.device.pq.pojo.vo.dataClean;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: cdf
|
* @Author: cdf
|
||||||
* @CreateTime: 2025-03-31
|
* @CreateTime: 2025-03-31
|
||||||
@@ -14,6 +17,8 @@ public class DetailAbnormalVO {
|
|||||||
|
|
||||||
private String date;
|
private String date;
|
||||||
|
|
||||||
|
private List<String> dateList;
|
||||||
|
|
||||||
private String monitorName;
|
private String monitorName;
|
||||||
|
|
||||||
private String bdName;
|
private String bdName;
|
||||||
@@ -50,9 +55,20 @@ public class DetailAbnormalVO {
|
|||||||
private String avg;
|
private String avg;
|
||||||
//CP95
|
//CP95
|
||||||
private String cp95;
|
private String cp95;
|
||||||
|
//幅值
|
||||||
|
private String featureAmplitude;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class DetailAbnormalCountVO {
|
||||||
|
|
||||||
|
private Integer timeSum;
|
||||||
|
private Integer errCount;
|
||||||
|
private List<DetailAbnormalInnerVO> time;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class DetailLimitInnerVO{
|
public static class DetailLimitInnerVO{
|
||||||
|
|
||||||
@@ -73,6 +89,99 @@ public class DetailAbnormalVO {
|
|||||||
//最大
|
//最大
|
||||||
private String val;
|
private String val;
|
||||||
|
|
||||||
|
//限值
|
||||||
|
private float overLimitValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Assess {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 频率偏差
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("频率偏差")
|
||||||
|
private Double freqData = 3.14159;
|
||||||
|
@ApiModelProperty("频率偏差限值")
|
||||||
|
private Float freqLimit = 3.14159F;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压闪变
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("电压闪变")
|
||||||
|
private Double flickerData = 3.14159;
|
||||||
|
@ApiModelProperty("电压闪变限值")
|
||||||
|
private Float flickerLimit = 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差上
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("电压上偏差")
|
||||||
|
private Double vDevData = 3.14159;
|
||||||
|
@ApiModelProperty("电压上偏差限值")
|
||||||
|
private Float vDevLimit = 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差下
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("电压下偏差")
|
||||||
|
private Double uDevData = 3.14159;
|
||||||
|
@ApiModelProperty("电压下偏差限值")
|
||||||
|
private Float uDevLimit = 3.14159F;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三相电压不平衡度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("三相电压不平衡度")
|
||||||
|
private Double unbalanceData = 3.14159;
|
||||||
|
@ApiModelProperty("三相电压不平衡度限值")
|
||||||
|
private Float unbalanceLimit = 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总谐波畸变率
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("总谐波畸变率")
|
||||||
|
private Double uaberranceData = 3.14159;
|
||||||
|
@ApiModelProperty("总谐波畸变率限值")
|
||||||
|
private Float uaberranceLimit = 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负序电流限值天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("负序电流")
|
||||||
|
private Double iNegData= 3.14159;
|
||||||
|
@ApiModelProperty("负序电流限值")
|
||||||
|
private Float iNegLimit= 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压越限天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("谐波电压")
|
||||||
|
private Double uharmData = 3.14159;
|
||||||
|
@ApiModelProperty("谐波电压限值")
|
||||||
|
private Float uharmLimit= 3.14159F;
|
||||||
|
/**
|
||||||
|
* 谐波电流越限天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("谐波电流")
|
||||||
|
private Double iharmData = 3.14159;
|
||||||
|
@ApiModelProperty("谐波电流限值")
|
||||||
|
private Float iharmLimit= 3.14159F;
|
||||||
|
/**
|
||||||
|
* 间谐波限值天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("间谐波电压")
|
||||||
|
private Double inuharmData = 3.14159;
|
||||||
|
@ApiModelProperty("间谐波电压限值")
|
||||||
|
private Float inuharmLimit= 3.14159F;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,29 @@ import lombok.Data;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class JsonBaseVO {
|
public class JsonBaseVO {
|
||||||
|
/**
|
||||||
|
* 超标时间
|
||||||
|
*/
|
||||||
private String time;
|
private String time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常值
|
||||||
|
*/
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相别
|
||||||
|
*/
|
||||||
private String phasic;
|
private String phasic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型(最大值:max、最小值:min、平均值:avg、95值:cp95)
|
||||||
|
*/
|
||||||
private String valueType;
|
private String valueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限值
|
||||||
|
*/
|
||||||
|
private float overLimitValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ public class PowerQualityIndicatorsVO {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "monitorId",value = "监测点id")
|
@ApiModelProperty(name = "monitorId",value = "监测点id")
|
||||||
private String monitorId;
|
private String monitorId;
|
||||||
//监测点名称
|
|
||||||
@ApiModelProperty(name = "monitorName",value = "监测点名称")
|
@ApiModelProperty(name = "monitorName",value = "监测点名称")
|
||||||
private String monitorName;
|
private String monitorName;
|
||||||
//所属终端名称
|
|
||||||
@ApiModelProperty(name = "devName",value = "所属终端名称")
|
@ApiModelProperty(name = "devName",value = "所属终端名称")
|
||||||
private String devName;
|
private String devName;
|
||||||
|
|
||||||
@@ -25,23 +25,25 @@ public class PowerQualityIndicatorsVO {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "manufacturer",value = "所属厂商")
|
@ApiModelProperty(name = "manufacturer",value = "所属厂商")
|
||||||
private String manufacturer;
|
private String manufacturer;
|
||||||
//所属电站
|
|
||||||
@ApiModelProperty(name = "stationName",value = "所属电站")
|
@ApiModelProperty(name = "stationName",value = "所属电站")
|
||||||
private String stationName;
|
private String stationName;
|
||||||
//监测对象类型
|
|
||||||
@ApiModelProperty(name = "objType",value = "监测对象类型")
|
@ApiModelProperty(name = "objType",value = "监测对象类型")
|
||||||
private String objType;
|
private String objType;
|
||||||
//监测对象名称
|
|
||||||
@ApiModelProperty(name = "objName",value = "监测对象名称")
|
@ApiModelProperty(name = "objName",value = "监测对象名称")
|
||||||
private String objName;
|
private String objName;
|
||||||
//电压等级
|
|
||||||
@ApiModelProperty(name = "voltageLevel",value = "电压等级")
|
@ApiModelProperty(name = "voltageLevel",value = "电压等级")
|
||||||
private String voltageLevel;
|
private String voltageLevel;
|
||||||
//异常天数
|
|
||||||
@ApiModelProperty(name = "abnormalDay",value = "异常天数")
|
@ApiModelProperty(name = "abnormalDay",value = "异常天数")
|
||||||
private Integer abnormalDay;
|
private Integer abnormalDay;
|
||||||
//严重度
|
|
||||||
@ApiModelProperty(name = "severity",value = "严重度")
|
@ApiModelProperty(name = "severity",value = "严重度")
|
||||||
private Integer severity;
|
private Integer severity;
|
||||||
|
|
||||||
|
@ApiModelProperty("地市")
|
||||||
|
private String city;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,9 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pq-device-api</artifactId>
|
<artifactId>pq-device-com</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>system-api</artifactId>
|
<artifactId>system-api</artifactId>
|
||||||
@@ -39,26 +38,10 @@
|
|||||||
<artifactId>common-web</artifactId>
|
<artifactId>common-web</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>common-oss</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn.platform</groupId>
|
|
||||||
<artifactId>message-api</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>supervision-api</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn.platform</groupId>
|
<groupId>com.njcn.platform</groupId>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
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.PollutionLineInfoDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.pq.service.LineService;
|
import com.njcn.device.line.service.LineService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -11,14 +11,12 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.biz.pojo.dto.*;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
|
||||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
import com.njcn.device.pq.mapper.LineDetailMapper;
|
import com.njcn.device.line.mapper.LineMapper;
|
||||||
import com.njcn.device.pq.mapper.LineMapper;
|
import com.njcn.device.line.service.LineService;
|
||||||
|
import com.njcn.device.line.mapper.LineDetailMapper;
|
||||||
import com.njcn.device.pq.service.CommTerminalService;
|
import com.njcn.device.pq.service.CommTerminalService;
|
||||||
import com.njcn.device.pq.service.IOverLimitService;
|
|
||||||
import com.njcn.device.pq.service.IPqsDeviceUnitService;
|
import com.njcn.device.pq.service.IPqsDeviceUnitService;
|
||||||
import com.njcn.device.pq.service.LineService;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -57,9 +55,6 @@ public class CommTerminalController extends BaseController {
|
|||||||
|
|
||||||
private final IPqsDeviceUnitService iPqsDeviceUnitService;
|
private final IPqsDeviceUnitService iPqsDeviceUnitService;
|
||||||
|
|
||||||
private final IOverLimitService iOverLimitService;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过部门获取所有子集部门所拥有的监测点基本信息
|
* 通过部门获取所有子集部门所拥有的监测点基本信息
|
||||||
@@ -113,8 +108,17 @@ public class CommTerminalController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("deptGetAllLine")
|
||||||
|
@ApiOperation("根据单位获取监测点信息(all line)")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiImplicitParam(name = "deptGetLineParam", value = "请求体", required = true)
|
||||||
|
public HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
||||||
|
TimeInterval timer = new TimeInterval();
|
||||||
|
String methodDescribe = getMethodDescribe("deptGetLine");
|
||||||
|
List<DeptGetChildrenMoreDTO> result = commTerminalService.deptGetAllLine(deptGetLineParam);
|
||||||
|
log.info("运行时长" + timer.intervalSecond());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
@@ -241,34 +245,6 @@ public class CommTerminalController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
@PostMapping("/getOverLimitData")
|
|
||||||
@ApiOperation("根据监测点id获取越限数值")
|
|
||||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
|
||||||
public HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id) {
|
|
||||||
String methodDescribe = getMethodDescribe("getOverLimitData");
|
|
||||||
Overlimit result = lineService.getOverLimitData(id);
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
@PostMapping("/getAllLineOverLimit")
|
|
||||||
@ApiOperation("获取投运在线的监测点的限值")
|
|
||||||
public HttpResult<List<Overlimit>> getAllLineOverLimit() {
|
|
||||||
String methodDescribe = getMethodDescribe("getAllLineOverLimit");
|
|
||||||
List<Overlimit> result = lineService.getAllLineOverLimit("harmonic-boot", null);
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
@PostMapping("/getOverLimitDataByIds")
|
|
||||||
@ApiOperation("根据监测点id集合获取越限数值")
|
|
||||||
@ApiImplicitParam(name = "ids", value = "监测点id集合", required = true)
|
|
||||||
public HttpResult<List<Overlimit>> getOverLimitDataByIds(@RequestBody List<String> ids) {
|
|
||||||
String methodDescribe = getMethodDescribe("getOverLimitDataByIds");
|
|
||||||
List<Overlimit> result = iOverLimitService.listByIds(ids);
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/getLineBySubstationRelation")
|
@PostMapping("/getLineBySubstationRelation")
|
||||||
@ApiOperation("获取变电站和监测点的关系")
|
@ApiOperation("获取变电站和监测点的关系")
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ public class DataVerifyController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/monitorAbnormalTableDetail")
|
@PostMapping("/monitorAbnormalTableDetail")
|
||||||
@ApiOperation("弹框-获取异常监测点列表详情")
|
@ApiOperation("弹框-获取异常监测点列表详情")
|
||||||
public HttpResult<List<DetailAbnormalVO.DetailAbnormalInnerVO>> monitorAbnormalTableDetail(@RequestBody MonitorBaseParam monitorBaseParam){
|
public HttpResult<DetailAbnormalVO.DetailAbnormalCountVO> monitorAbnormalTableDetail(@RequestBody MonitorBaseParam monitorBaseParam) {
|
||||||
String methodDescribe = getMethodDescribe("monitorAbnormalTableDetail");
|
String methodDescribe = getMethodDescribe("monitorAbnormalTableDetail");
|
||||||
List<DetailAbnormalVO.DetailAbnormalInnerVO> list = iPqDataVerifyBakService.monitorAbnormalTableDetail(monitorBaseParam);
|
DetailAbnormalVO.DetailAbnormalCountVO list = iPqDataVerifyBakService.monitorAbnormalTableDetail(monitorBaseParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,5 +141,14 @@ public class DataVerifyController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/limitTableDetail")
|
||||||
|
@ApiOperation("监测点评价")
|
||||||
|
public HttpResult<DetailAbnormalVO.Assess> limitTableDetail(@RequestBody MonitorBaseParam monitorBaseParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("limitTableDetail");
|
||||||
|
DetailAbnormalVO.Assess list = iDataVerifyService.limitTableDetail(monitorBaseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ 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.line.mapper.DeptLineMapper;
|
||||||
|
import com.njcn.device.line.service.DeptLineService;
|
||||||
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.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.DeptLineParam;
|
import com.njcn.web.pojo.param.DeptLineParam;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|||||||
@@ -76,4 +76,15 @@ public class DeviceRunEvaluateController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/getRunEvaluateInfo")
|
||||||
|
@ApiOperation("终端评价列表(冀北)")
|
||||||
|
public HttpResult<List<DeviceRunEvaluateVO.Detail>> getRunEvaluateInfo(@RequestBody DeviceInfoParam.BusinessParam businessParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getRunEvaluateInfo");
|
||||||
|
businessParam.setLineOrDevice(1);
|
||||||
|
List<DeviceRunEvaluateVO.Detail> runEvaluate = deviceRunEvaluateService.getRunEvaluate(businessParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, runEvaluate, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
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.device.common.service.GeneralDeviceService;
|
||||||
|
import com.njcn.device.common.service.TerminalBaseService;
|
||||||
import com.njcn.device.pq.mapper.RStatOnlinerateDMapper;
|
import com.njcn.device.pq.mapper.RStatOnlinerateDMapper;
|
||||||
import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
@@ -13,8 +15,6 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
|||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.service.TerminalBaseService;
|
|
||||||
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -136,6 +136,22 @@ public class GeneralDeviceInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getPracticalAllDeviceInfoAsSubstation")
|
||||||
|
@ApiOperation("获取按变电站分类的所有终端综合信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<List<GeneralDeviceDTO>> getPracticalAllDeviceInfoAsSubstation(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getPracticalAllDeviceInfoAsSubstation");
|
||||||
|
List<GeneralDeviceDTO> substationDeviceInfos = generalDeviceService.getDeviceInfoAsSubstation(deviceInfoParam, null, Stream.of(1).collect(Collectors.toList()));
|
||||||
|
if (CollectionUtil.isEmpty(substationDeviceInfos)) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new ArrayList<>(), methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, substationDeviceInfos, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取实际运行终端综合信息
|
* 获取实际运行终端综合信息
|
||||||
*/
|
*/
|
||||||
@@ -269,9 +285,9 @@ public class GeneralDeviceInfoController extends BaseController {
|
|||||||
@PostMapping("/getOnlineRateByDevIds")
|
@PostMapping("/getOnlineRateByDevIds")
|
||||||
@ApiOperation("终端在线率(谐波专用)")
|
@ApiOperation("终端在线率(谐波专用)")
|
||||||
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
||||||
public HttpResult<List<RStatOnlinerateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param) {
|
public HttpResult<List<RStatOnlineRateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getOnlineRateByDevIds");
|
String methodDescribe = getMethodDescribe("getOnlineRateByDevIds");
|
||||||
List<RStatOnlinerateVO> onlineRateByDevIds = onlineRateMapper.getOnlineRateByDevIds(param);
|
List<RStatOnlineRateVO> onlineRateByDevIds = onlineRateMapper.getOnlineRateByDevIds(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,onlineRateByDevIds,methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,onlineRateByDevIds,methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ public class GridDiagramController extends BaseController {
|
|||||||
@ApiOperation("变电站趋势分析")
|
@ApiOperation("变电站趋势分析")
|
||||||
public HttpResult<Map<String, Long>> getGridDiagramSubTendency(@RequestBody GridDiagramParam param){
|
public HttpResult<Map<String, Long>> getGridDiagramSubTendency(@RequestBody GridDiagramParam param){
|
||||||
String methodDescribe = getMethodDescribe("getGridDiagramSubTendency");
|
String methodDescribe = getMethodDescribe("getGridDiagramSubTendency");
|
||||||
param.getDeviceInfoParam().setPowerFlag(0);
|
|
||||||
Map<String, Long> gridDiagramDevTendency = gridDiagramService.getGridDiagramDevTendency(param,3);
|
Map<String, Long> gridDiagramDevTendency = gridDiagramService.getGridDiagramDevTendency(param,3);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gridDiagramDevTendency, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gridDiagramDevTendency, methodDescribe);
|
||||||
}
|
}
|
||||||
@@ -91,6 +90,7 @@ public class GridDiagramController extends BaseController {
|
|||||||
@ApiOperation("监测点趋势分析")
|
@ApiOperation("监测点趋势分析")
|
||||||
public HttpResult<Map<String, Long>> getGridDiagramLineTendency(@RequestBody GridDiagramParam param){
|
public HttpResult<Map<String, Long>> getGridDiagramLineTendency(@RequestBody GridDiagramParam param){
|
||||||
String methodDescribe = getMethodDescribe("getGridDiagramLineTendency");
|
String methodDescribe = getMethodDescribe("getGridDiagramLineTendency");
|
||||||
|
param.getDeviceInfoParam().setLineRunFlag(0);
|
||||||
Map<String, Long> gridDiagramDevTendency = gridDiagramService.getGridDiagramDevTendency(param,6);
|
Map<String, Long> gridDiagramDevTendency = gridDiagramService.getGridDiagramDevTendency(param,6);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gridDiagramDevTendency, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gridDiagramDevTendency, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.njcn.device.pq.controller;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
@@ -17,6 +16,8 @@ import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.LineIntegrityDataVO;
|
import com.njcn.device.pq.pojo.vo.LineIntegrityDataVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
||||||
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
||||||
import com.njcn.device.pq.service.LineIntegrityDataService;
|
import com.njcn.device.pq.service.LineIntegrityDataService;
|
||||||
import com.njcn.harmonic.pojo.vo.IntegrityIconVO;
|
import com.njcn.harmonic.pojo.vo.IntegrityIconVO;
|
||||||
@@ -148,4 +149,25 @@ public class LineIntegrityDataController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,flag,methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,flag,methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/data")
|
||||||
|
@ApiOperation("监测点数据完整性(冀北)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
||||||
|
public HttpResult<DeviceOnlineRate> getData(@RequestBody DeviceInfoParam.BusinessParam param) {
|
||||||
|
param.setLineOrDevice(0);
|
||||||
|
String methodDescribe = getMethodDescribe("getData");
|
||||||
|
DeviceOnlineRate rate = irStatIntegrityDService.getData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/noData")
|
||||||
|
@ApiOperation("监测点数据完整性为0的数据(冀北)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getNoData(@RequestBody LineBaseQueryParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getNoData");
|
||||||
|
List<OnlineMonitorVo> rate = irStatIntegrityDService.getNoData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,18 @@ 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.line.service.LineService;
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.device.pq.pojo.param.PqsParam;
|
import com.njcn.device.pq.pojo.param.PqsParam;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.service.LineService;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
package com.njcn.device.pq.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
|
||||||
import com.njcn.device.pq.pojo.param.AlarmStrategyParam;
|
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
|
||||||
import com.njcn.device.pq.service.AlarmStrategyService;
|
|
||||||
import com.njcn.device.pq.service.IOverLimitService;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 监测点限值
|
|
||||||
* @author cdf
|
|
||||||
* @date 2023/6/7
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/overLimit")
|
|
||||||
@Api(tags = "监测点限值")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class OverLimitController extends BaseController {
|
|
||||||
|
|
||||||
private final IOverLimitService iOverLimitService;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
@PostMapping("/getOverLimitByLineIds")
|
|
||||||
@ApiOperation("监测点集合获取限值")
|
|
||||||
@ApiImplicitParam(name = "lineIds", value = "监测点ids", required = true)
|
|
||||||
@ApiIgnore
|
|
||||||
public HttpResult<List<Overlimit>> getOverLimitByLineIds(@RequestBody List<String> lineIds){
|
|
||||||
String methodDescribe = getMethodDescribe("getOverLimitByLineIds");
|
|
||||||
List<Overlimit> overLimitList= iOverLimitService.list(new LambdaQueryWrapper<Overlimit>().in(Overlimit::getId,lineIds));
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, overLimitList, methodDescribe);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
@PostMapping("/getLimitMapsByLineIds")
|
|
||||||
@ApiOperation("监测点集合获取限值")
|
|
||||||
@ApiImplicitParam(name = "lineIds", value = "监测点ids", required = true)
|
|
||||||
@ApiIgnore
|
|
||||||
public HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(@RequestBody List<String> lineIds){
|
|
||||||
String methodDescribe = getMethodDescribe("getLimitMapsByLineIds");
|
|
||||||
List<Map<String, Object>> overLimitList= iOverLimitService.listMaps(new LambdaQueryWrapper<Overlimit>().in(Overlimit::getId,lineIds));
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, overLimitList, methodDescribe);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.njcn.device.pq.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import com.njcn.device.pq.service.IPqDataVerifyCountService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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 java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 异常数据功能
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-12-10
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dataVerifyCount")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "异常数据数量统计")
|
||||||
|
public class PqDataVerifyCountController extends BaseController {
|
||||||
|
|
||||||
|
private final IPqDataVerifyCountService pqDataVerifyCountService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取有异常数据的监测点相关信息
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getAnomalousData")
|
||||||
|
@ApiOperation("异常-获取异常数据主页面")
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getAnomalousData(@RequestBody LineBaseQueryParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("getMonitorVerifyData");
|
||||||
|
List<OnlineMonitorVo> list = pqDataVerifyCountService.getAnomalousData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -12,6 +12,9 @@ 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.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
|
import com.njcn.device.common.service.GeneralDeviceService;
|
||||||
|
import com.njcn.device.common.service.TerminalBaseService;
|
||||||
|
import com.njcn.device.line.service.LineService;
|
||||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
@@ -20,10 +23,6 @@ import com.njcn.device.pq.pojo.dto.PushResultDTO;
|
|||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
import com.njcn.device.pq.pojo.po.Line;
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.service.LineService;
|
|
||||||
import com.njcn.device.pq.service.TerminalBaseService;
|
|
||||||
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
|
||||||
import com.njcn.message.constant.DeviceRebootType;
|
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|||||||
@@ -6,13 +6,11 @@ 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.device.pq.mapper.RStatOnlinerateDMapper;
|
import com.njcn.device.pq.mapper.RStatOnlinerateDMapper;
|
||||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
|
||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.param.TerminalOnlineRateDataParam;
|
import com.njcn.device.pq.pojo.param.TerminalOnlineRateDataParam;
|
||||||
import com.njcn.device.pq.pojo.vo.OnlineRateCensusVO;
|
import com.njcn.device.pq.pojo.vo.OnlineRateCensusVO;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalOnlineRateDataVO;
|
import com.njcn.device.pq.pojo.vo.TerminalOnlineRateDataVO;
|
||||||
import com.njcn.device.pq.service.TerminalOnlineRateDataService;
|
import com.njcn.device.pq.service.TerminalOnlineRateDataService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
@@ -80,9 +78,9 @@ public class TerminalOnlineRateDataController extends BaseController {
|
|||||||
@PostMapping("/getOnlineRateByDevIds")
|
@PostMapping("/getOnlineRateByDevIds")
|
||||||
@ApiOperation("终端在线率(谐波专用)")
|
@ApiOperation("终端在线率(谐波专用)")
|
||||||
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
||||||
public HttpResult<List<RStatOnlinerateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param) {
|
public HttpResult<List<RStatOnlineRateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getOnlineRateByDevIds");
|
String methodDescribe = getMethodDescribe("getOnlineRateByDevIds");
|
||||||
List<RStatOnlinerateVO> onlineRateByDevIds = onlineRateMapper.getOnlineRateByDevIds(param);
|
List<RStatOnlineRateVO> onlineRateByDevIds = onlineRateMapper.getOnlineRateByDevIds(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,onlineRateByDevIds,methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,onlineRateByDevIds,methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class TerminalTreeController extends BaseController {
|
|||||||
String methodDescribe = getMethodDescribe("getTerminalTree");
|
String methodDescribe = getMethodDescribe("getTerminalTree");
|
||||||
List<TerminalTree> tree;
|
List<TerminalTree> tree;
|
||||||
if(isJb){
|
if(isJb){
|
||||||
tree= terminalTreeService.getJbTerminalTree();
|
tree= terminalTreeService.getJbNewTerminalTree();
|
||||||
}else{
|
}else{
|
||||||
tree= terminalTreeService.getTerminalTree();
|
tree= terminalTreeService.getTerminalTree();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.njcn.device.pq.controller.jb;
|
||||||
|
|
||||||
|
|
||||||
|
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.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.common.utils.LogUtil;
|
||||||
|
import com.njcn.device.pms.annotation.TerminalOperationLogDesc;
|
||||||
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.DistributionArea;
|
||||||
|
import com.njcn.device.pq.service.IPowerDistributionAreaService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 台区信息增删改查
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/distributionArea")
|
||||||
|
@Api(tags = "台账-台区信息")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Validated
|
||||||
|
public class PmsPowerDistributionAreaController extends BaseController {
|
||||||
|
|
||||||
|
private final IPowerDistributionAreaService powerDistributionAreaService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("getPowerDistributionAreaList")
|
||||||
|
@ApiOperation("分页查询台区所有信息")
|
||||||
|
@ApiImplicitParam(name = "baseParam",value = "查询台区信息",required = true)
|
||||||
|
public HttpResult<Page<DistributionArea>> getList(@RequestBody TaiZhangParam baseParam){
|
||||||
|
String methodDescribe = getMethodDescribe("getList");
|
||||||
|
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, baseParam);
|
||||||
|
Page<DistributionArea> res = powerDistributionAreaService.getList(baseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,res,methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增台区信息
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/26
|
||||||
|
*/
|
||||||
|
@PostMapping("/addPowerDistributionArea")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType=OperateType.ADD)
|
||||||
|
@ApiOperation("新增台区信息")
|
||||||
|
@ApiImplicitParam(name = "newParam", value = "模板实体", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "新增台区信息",module = 3)
|
||||||
|
public HttpResult<Object> add(@RequestBody @Validated PowerDistributionareaParam newParam){
|
||||||
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
boolean result = powerDistributionAreaService.add(newParam);
|
||||||
|
if (result) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改台区信息
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/26
|
||||||
|
*/
|
||||||
|
@PostMapping("/updatePowerDistributionArea")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
@ApiOperation("修改台区信息")
|
||||||
|
@ApiImplicitParam(name = "UpdateParam", value = "更新实体", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "修改台区信息",module = 3)
|
||||||
|
public HttpResult<Object> update(@RequestBody @Validated PowerDistributionareaParam UpdateParam){
|
||||||
|
String methodDescribe = getMethodDescribe("update");
|
||||||
|
boolean result = powerDistributionAreaService.update(UpdateParam);
|
||||||
|
if (result) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除台区信息
|
||||||
|
* @param ids id
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/26
|
||||||
|
*/
|
||||||
|
@PostMapping("/deletePowerDistributionArea")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@ApiOperation("删除台区信息")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "ID索引", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "删除台区信息",module = 3)
|
||||||
|
public HttpResult<Object> delete(@RequestBody List<String> ids){
|
||||||
|
String methodDescribe = getMethodDescribe("delete");
|
||||||
|
boolean result = powerDistributionAreaService.delete(ids);
|
||||||
|
if(result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package com.njcn.device.pq.controller.jb;
|
||||||
|
|
||||||
|
|
||||||
|
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.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pms.annotation.TerminalOperationLogDesc;
|
||||||
|
import com.njcn.device.pms.pojo.param.PowerGenerationUserParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.GenerationUser;
|
||||||
|
import com.njcn.device.pq.service.IPowerGenerationUserService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/generationUser")
|
||||||
|
@Api(tags = "台账-发电用户")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsPowerGenerationUserController extends BaseController {
|
||||||
|
|
||||||
|
private final IPowerGenerationUserService iPowerGenerationUserService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/addPowerGenerationUser")
|
||||||
|
@ApiOperation("新增发电用户")
|
||||||
|
@ApiImplicitParam(name = "powerGenerationUserParam", value = "发电用户实体", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "新增发电用户",module = 4)
|
||||||
|
public HttpResult<Boolean> addPowerGenerationUser(@RequestBody @Validated PowerGenerationUserParam powerGenerationUserParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("addPowerGenerationUser");
|
||||||
|
boolean result = iPowerGenerationUserService.addPowerGenerationUser(powerGenerationUserParam);
|
||||||
|
if(result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
@PostMapping("/updatePowerGenerationUser")
|
||||||
|
@ApiOperation("修改发电用户")
|
||||||
|
@ApiImplicitParam(name = "powerGenerationUserParam", value = "发电用户实体", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "修改发电用户",module = 4)
|
||||||
|
public HttpResult<Boolean> updatePowerGenerationUser(@RequestBody @Validated PowerGenerationUserParam powerGenerationUserParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("updatePowerGenerationUser");
|
||||||
|
boolean result = iPowerGenerationUserService.updatePowerGenerationUser(powerGenerationUserParam);
|
||||||
|
if(result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@DeleteMapping("/delPowerGenerationUser")
|
||||||
|
@ApiOperation("删除发电用户")
|
||||||
|
@ApiImplicitParam(name = "powerGenerationUserIds", value = "发电用户ids", required = true)
|
||||||
|
@TerminalOperationLogDesc(value = "删除发电用户",module = 4)
|
||||||
|
public HttpResult<Boolean> delPowerGenerationUser(@RequestBody @NotEmpty(message = "发电用户id不可为空") List<String> powerGenerationUserIds) {
|
||||||
|
String methodDescribe = getMethodDescribe("delPowerGenerationUser");
|
||||||
|
boolean result = iPowerGenerationUserService.delPowerGenerationUser(powerGenerationUserIds);
|
||||||
|
if(result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getPowerGenerationUserPageList")
|
||||||
|
@ApiOperation("分页获取发电用户列表")
|
||||||
|
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||||
|
public HttpResult<Page<GenerationUser>> getPowerGenerationUserPageList(@RequestBody BaseParam baseParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getPowerGenerationUserPageList");
|
||||||
|
Page<GenerationUser> result = iPowerGenerationUserService.getPowerGenerationUserPageList(baseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4,21 +4,13 @@ import cn.hutool.core.date.DatePattern;
|
|||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import com.njcn.dataProcess.api.PqsCommunicateFeignClient;
|
import com.njcn.dataProcess.api.PqsCommunicateFeignClient;
|
||||||
import com.njcn.dataProcess.pojo.dto.PqsCommunicateDto;
|
import com.njcn.dataProcess.pojo.dto.PqsCommunicateDto;
|
||||||
import com.njcn.device.pq.constant.Param;
|
import com.njcn.device.device.service.DeviceProcessService;
|
||||||
import com.njcn.device.pq.mapper.LineMapper;
|
import com.njcn.device.device.service.IDeviceService;
|
||||||
import com.njcn.device.pq.mapper.NodeMapper;
|
import com.njcn.device.node.mapper.NodeMapper;
|
||||||
import com.njcn.device.pq.mapper.PqsTerminalLogsMapper;
|
|
||||||
import com.njcn.device.pq.pojo.dto.DeviceInfo;
|
|
||||||
import com.njcn.device.pq.pojo.dto.NodeProcessDeviceTree;
|
|
||||||
import com.njcn.device.pq.pojo.po.Device;
|
import com.njcn.device.pq.pojo.po.Device;
|
||||||
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
||||||
import com.njcn.device.pq.pojo.po.Node;
|
import com.njcn.device.pq.pojo.po.Node;
|
||||||
import com.njcn.device.pq.pojo.po.PqsTerminalLogs;
|
|
||||||
import com.njcn.device.pq.service.DeviceProcessService;
|
|
||||||
import com.njcn.device.pq.service.IDeviceService;
|
|
||||||
import com.njcn.message.constant.DeviceRebootType;
|
|
||||||
import com.njcn.redis.utils.RedisUtil;
|
import com.njcn.redis.utils.RedisUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
@@ -26,12 +18,9 @@ import org.springframework.scheduling.annotation.Scheduled;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
package com.njcn.device.pq.mapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.njcn.device.pq.pojo.po.Device;
|
|
||||||
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
|
||||||
import com.njcn.device.pq.pojo.vo.LineInfluxDbOnlineVO;
|
|
||||||
import com.njcn.device.pq.pojo.vo.RunManageVO;
|
|
||||||
import com.njcn.device.pq.pojo.vo.RunTimeVO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author cdf
|
|
||||||
* @since 2022-01-04
|
|
||||||
*/
|
|
||||||
public interface DeviceProcessMapper extends BaseMapper<DeviceProcess> {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.njcn.device.pq.mapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author cdf
|
|
||||||
* @since 2022-01-04
|
|
||||||
*/
|
|
||||||
public interface OverlimitMapper extends BaseMapper<Overlimit> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.DistributionArea;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 台区
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
public interface PowerDistributionAreaMapper extends BaseMapper<DistributionArea> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.GenerationUser;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 台区
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
public interface PowerGenerationUserMapper extends BaseMapper<GenerationUser> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.PqDataVerifyCount;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2025-06-10
|
||||||
|
*/
|
||||||
|
public interface PqDataVerifyCountMapper extends BaseMapper<PqDataVerifyCount> {
|
||||||
|
|
||||||
|
|
||||||
|
List<PqDataVerifyCount> selectSumVerify(@Param("param") OnlineRateParam param);
|
||||||
|
|
||||||
|
List<OnlineMonitorVo> getAnomalousData(@Param("lineIds")List<String> lineIds, @Param("startTime")String startTime, @Param("endTime")String endTime);
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ package com.njcn.device.pq.mapper;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,7 +26,7 @@ public interface RStatOnlinerateDMapper extends BaseMapper<RStatOnlinerateD> {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return List<OnlineRate>
|
* @return List<OnlineRate>
|
||||||
*/
|
*/
|
||||||
List<RStatOnlinerateVO> getOnlineRateByDevIds(@Param("param") OnlineRateParam param);
|
List<RStatOnlineRateVO> getOnlineRateByDevIds(@Param("param") OnlineRateParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 根据终端id集合获取总终端在线lv
|
* @Description: 根据终端id集合获取总终端在线lv
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
<?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.pq.mapper.DevMealMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?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.pq.mapper.OverlimitMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?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.pq.mapper.PqDataVerifyCountMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectSumVerify" resultType="com.njcn.device.pq.pojo.po.PqDataVerifyCount">
|
||||||
|
SELECT
|
||||||
|
line_id AS lineId,
|
||||||
|
SUM(total) AS total,
|
||||||
|
SUM(total_all) AS totalAll
|
||||||
|
FROM
|
||||||
|
pq_data_verify_count
|
||||||
|
<where>
|
||||||
|
<if test="param!=null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND line_id IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test=" param.startTime != null and param.startTime !=''">
|
||||||
|
AND time_id >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
AND time_id <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by line_id ;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAnomalousData" resultType="OnlineMonitorVo">
|
||||||
|
SELECT DISTINCT
|
||||||
|
t6.Name gdName,
|
||||||
|
t5.Name subName,
|
||||||
|
t4.Name deviceName,
|
||||||
|
t1.Line_Id lineId,
|
||||||
|
t2.Name lineName,
|
||||||
|
t8.Name monitorObjType,
|
||||||
|
t7.Obj_Name monitorObj,
|
||||||
|
"异常数据" as target,
|
||||||
|
count(t1.time_id) lastDay
|
||||||
|
FROM
|
||||||
|
pq_data_verify_count t1
|
||||||
|
left join pq_line t2 on t1.Line_Id = t2.Id
|
||||||
|
left join pq_line t3 on t2.Pid = t3.Id
|
||||||
|
left join pq_line t4 on t3.Pid = t4.Id
|
||||||
|
left join pq_line t5 on t4.Pid = t5.Id
|
||||||
|
left join pq_line t6 on t5.Pid = t6.Id
|
||||||
|
left join pq_line_detail t7 on t1.Line_Id = t7.Id
|
||||||
|
left join sys_dict_data t8 on t7.Load_Type = t8.Id
|
||||||
|
WHERE
|
||||||
|
t1.total > 0
|
||||||
|
<if test="lineIds!=null and lineIds.size > 0">
|
||||||
|
and Line_Id in
|
||||||
|
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test=" startTime != null and startTime !=''">
|
||||||
|
and time_id >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
and time_id <= #{endTime}
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
Line_Id
|
||||||
|
order by lastDay desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.njcn.device.pq.mapper.RStatOnlinerateDMapper">
|
<mapper namespace="com.njcn.device.pq.mapper.RStatOnlinerateDMapper">
|
||||||
<select id="getOnlineRateByDevIds" resultType="com.njcn.device.pq.pojo.vo.RStatOnlinerateVO">
|
<select id="getOnlineRateByDevIds" resultType="com.njcn.device.pq.pojo.vo.RStatOnlineRateVO">
|
||||||
select
|
select
|
||||||
dev_index,
|
dev_index,
|
||||||
sum(online_min) as onlineMin,
|
sum(online_min) as onlineMin,
|
||||||
|
|||||||
@@ -381,7 +381,7 @@
|
|||||||
line.LEVEL,
|
line.LEVEL,
|
||||||
line.sort,
|
line.sort,
|
||||||
line.pids,
|
line.pids,
|
||||||
CONCAT(voltage.name, '_', line.name, '(',device.`Name`,')') name,
|
CONCAT(voltage.name, '_', line.name, '(',device.Name,')') name,
|
||||||
comFlag.Com_Flag,
|
comFlag.Com_Flag,
|
||||||
detail.pt_type,
|
detail.pt_type,
|
||||||
detail.obj_id
|
detail.obj_id
|
||||||
|
|||||||
@@ -40,11 +40,10 @@ public interface CommTerminalService {
|
|||||||
*/
|
*/
|
||||||
List<DeptGetChildrenMoreDTO> deptGetLine(DeptGetLineParam deptGetLineParam);
|
List<DeptGetChildrenMoreDTO> deptGetLine(DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
List<DeptGetChildrenMoreDTO> deptGetAllLine(DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds);
|
List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -34,4 +34,13 @@ public interface DeviceRunEvaluateService {
|
|||||||
|
|
||||||
|
|
||||||
TerminalEvaluateAreaVO.lastWeekTrendVO lastWeekTrend(DeviceInfoParam.BusinessParam businessParam);
|
TerminalEvaluateAreaVO.lastWeekTrendVO lastWeekTrend(DeviceInfoParam.BusinessParam businessParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 获取终端列表
|
||||||
|
* @param param
|
||||||
|
* @return: java.util.List<com.njcn.device.pq.pojo.vo.DeviceRunEvaluateVO.Detail>
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2025/11/27 10:24
|
||||||
|
*/
|
||||||
|
List<DeviceRunEvaluateVO.Detail> getRunEvaluate(DeviceInfoParam.BusinessParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,5 @@ public interface IDataVerifyService extends IService<DataVerify> {
|
|||||||
List<DetailAbnormalVO.DetailLimitInnerVO> monitorLimitTableDetail(MonitorBaseParam monitorBaseParam);
|
List<DetailAbnormalVO.DetailLimitInnerVO> monitorLimitTableDetail(MonitorBaseParam monitorBaseParam);
|
||||||
|
|
||||||
|
|
||||||
|
DetailAbnormalVO.Assess limitTableDetail(MonitorBaseParam monitorBaseParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.njcn.device.pq.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 越限表实体
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author hongawen
|
|
||||||
* @since 2023-03-28
|
|
||||||
*/
|
|
||||||
public interface IOverLimitService extends IService<Overlimit> {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.njcn.device.pq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.DistributionArea;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
public interface IPowerDistributionAreaService extends IService<DistributionArea> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<DistributionArea> getList(TaiZhangParam baseParam);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
boolean add(PowerDistributionareaParam newParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
boolean update(PowerDistributionareaParam updateParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param ids ids
|
||||||
|
*/
|
||||||
|
boolean delete(List<String> ids);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.njcn.device.pq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.PowerGenerationUserParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PowerGenerationUser;
|
||||||
|
import com.njcn.device.pms.pojo.vo.PowerGenerationUserVO;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.DistributionArea;
|
||||||
|
import com.njcn.device.pq.pojo.po.jb.GenerationUser;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2022-10-14
|
||||||
|
*/
|
||||||
|
public interface IPowerGenerationUserService extends IService<GenerationUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发电用户
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/10/25
|
||||||
|
* @param powerGenerationUserParam 发电用户
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
boolean addPowerGenerationUser(PowerGenerationUserParam powerGenerationUserParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发电用户
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/10/25
|
||||||
|
* @param powerGenerationUserParam 发电用户
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
boolean updatePowerGenerationUser(PowerGenerationUserParam powerGenerationUserParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发电用户
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/10/25
|
||||||
|
* @param powerGenerationUserIds 发电用户
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
boolean delPowerGenerationUser(List<String> powerGenerationUserIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询发电用户列表
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/10/25
|
||||||
|
* @param baseParam 基础参数
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
Page<GenerationUser> getPowerGenerationUserPageList(BaseParam baseParam);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,8 +27,7 @@ public interface IPqDataVerifyBakService extends IService<PqDataVerifyBak> {
|
|||||||
List<DetailAbnormalVO> monitorAbnormalTable(MonitorBaseParam monitorBaseParam);
|
List<DetailAbnormalVO> monitorAbnormalTable(MonitorBaseParam monitorBaseParam);
|
||||||
|
|
||||||
|
|
||||||
|
DetailAbnormalVO.DetailAbnormalCountVO monitorAbnormalTableDetail(MonitorBaseParam monitorBaseParam);
|
||||||
List<DetailAbnormalVO.DetailAbnormalInnerVO> monitorAbnormalTableDetail(MonitorBaseParam monitorBaseParam);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user