Compare commits
408 Commits
2024-11
...
614647d36d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | |||
|
|
102bab7430 | ||
| 28378dcfa1 | |||
| 1692799f0b | |||
| 90471c368d | |||
| 08ec8591f1 | |||
| d038dfe655 | |||
| c1bf8d79ce | |||
| 74420e7107 | |||
|
|
6815e1df4b | ||
|
|
c1dca815e7 | ||
|
|
5c3baf4e57 | ||
|
|
28f7e038ce | ||
| fe1195b7b5 | |||
|
|
2d3222e03d | ||
|
|
9fdf7fe26c | ||
|
|
134b5b7257 | ||
|
|
a34876c9c5 | ||
|
|
24b18ff3f2 | ||
|
|
22950c6b35 | ||
|
|
92f49bbbe1 | ||
|
|
67fded7104 | ||
|
|
b9baa859de | ||
|
|
7e5aaa2df2 | ||
|
|
166f0c2380 | ||
|
|
f6995ca0f2 | ||
|
|
0836f5fa57 | ||
|
|
6be76acda7 | ||
|
|
173c7743b0 | ||
|
|
1362ee20dc | ||
| 17c4616da4 | |||
| 0043a21455 | |||
| 59aad2c89c | |||
|
|
43e7688d9a | ||
|
|
bbe142d52a | ||
|
|
39a149090a | ||
|
|
44b4501436 | ||
|
|
38ed0797e0 | ||
|
|
7d0e85f6fc | ||
|
|
d52ea52e4c | ||
|
|
45797ad60b | ||
|
|
72ffcbd5a3 | ||
|
|
fb0f23e70b | ||
|
|
9caf1724a6 | ||
| c71e346492 | |||
| 06ea1008ad | |||
| 811ed1ff89 | |||
| 2aa6f0ab5a | |||
| c7b84e0481 | |||
|
|
e2f3ea7764 | ||
|
|
f4e1632386 | ||
|
|
b6b5634918 | ||
|
|
e07f24a743 | ||
|
|
57a3c3b12c | ||
| 9cd15ff6bf | |||
|
|
ccf83c8c27 | ||
| f9d4e69ec2 | |||
|
|
55b20b9e1c | ||
|
|
0a6b4e9aca | ||
| 7731d92b1e | |||
| 7c1b07feba | |||
| a3c1a4304d | |||
|
|
354e6f1cf9 | ||
| b37fba545b | |||
| b9ffc04dcd | |||
| 7011c3cc06 | |||
| 2dcc673636 | |||
| e336bc14b7 | |||
|
|
0bfea394b8 | ||
|
|
5f75155116 | ||
| 9b6452f769 | |||
| c9ecdad7ed | |||
| 6c2ddfab67 | |||
| 7f9f56ef7a | |||
| 24d05203a2 | |||
|
|
03b4273262 | ||
| 5c44742418 | |||
|
|
4f66c4833f | ||
| 9f9baa9991 | |||
| 02f8008482 | |||
| d3294ccdbd | |||
| 986c439644 | |||
|
|
11623af356 | ||
|
|
de93533570 | ||
| 79558d10c6 | |||
| 3e42958fc7 | |||
| 67680628a1 | |||
| 076d5b99be | |||
| 2009009296 | |||
| fc43704b2c | |||
|
|
c2bc212e97 | ||
| 92ecb29b68 | |||
| a29f26c4f2 | |||
|
|
a191d28c97 | ||
| b93db7cd08 | |||
| bc5abdae14 | |||
| 8a353ac9a4 | |||
| 4072cc7517 | |||
| 6bb9d19765 | |||
|
|
ba03707443 | ||
|
|
e7d73497c9 | ||
| a1caa85b16 | |||
| 0e2a75da5e | |||
|
|
5f7414111e | ||
| 02b8f28de0 | |||
| 70f5cde320 | |||
|
|
95b9bef76e | ||
| 120b0422f1 | |||
|
|
934ac90daf | ||
| 3f24e6e311 | |||
| 1415f5e64c | |||
| 42db01446d | |||
| 2694564444 | |||
| 3b7991b5d7 | |||
|
|
e062edd913 | ||
|
|
6b47512ac3 | ||
|
|
314ece3ddd | ||
| 45e0f355cc | |||
| cc02a22ff3 | |||
| 952c9b38c9 | |||
| 3395b7471a | |||
| 5bbce0fc79 | |||
|
|
4aa4044d86 | ||
|
|
12cffe4ad7 | ||
|
|
29ffe8a2dc | ||
|
|
e7dca6ec53 | ||
|
|
e9e453d9d9 | ||
|
|
03a8461b1b | ||
|
|
e19da7ca12 | ||
|
|
0e3dba2afa | ||
| e130af4dcf | |||
| d0fb52da6d | |||
| f1221a2608 | |||
|
|
ca33bc5760 | ||
| 5a5344a659 | |||
| fedc457da0 | |||
|
|
89f075f395 | ||
|
|
ab268a4a20 | ||
|
|
b42cd61af6 | ||
| c532cdb595 | |||
| 2265bf11b9 | |||
|
|
6e7a55cb93 | ||
|
|
e886c6caa8 | ||
|
|
bcb2c08003 | ||
| d68c8bea2f | |||
|
|
b97257164a | ||
|
|
05e71b823d | ||
| 44d7a97c84 | |||
|
|
bac81db2c7 | ||
| 9eab6c28e4 | |||
| 0e3ece7007 | |||
| 757a68d57a | |||
|
|
e6d75386aa | ||
| 1e3af78bb5 | |||
|
|
b9c0114c67 | ||
|
|
aabb668734 | ||
|
|
5b0c5f34b2 | ||
| 4c7b6b19c9 | |||
|
|
ce283e739a | ||
|
|
f56b0f87d6 | ||
|
|
31dd5f1f1e | ||
|
|
1d594e0810 | ||
| a8d9272e7c | |||
|
|
1d1e82fea2 | ||
|
|
6b9026d427 | ||
|
|
df1f744a7d | ||
| 8e5cab30c9 | |||
|
|
a8b4a9615b | ||
|
|
fc75a7084d | ||
|
|
a2fcb97a8d | ||
|
|
447dcf2326 | ||
|
|
274707181b | ||
| 0794cdeaf1 | |||
| bca9e4bf4b | |||
|
|
00287aa30b | ||
|
|
ecb10977b8 | ||
|
|
257619a6a3 | ||
| cb94792a57 | |||
|
|
9d6a5875f6 | ||
| 87981442ef | |||
| f565d90421 | |||
|
|
b8ea00c47d | ||
| 2f909e100c | |||
| 412e4b1bdb | |||
|
|
21017090c4 | ||
|
|
3d3e1ccddc | ||
|
|
0c1cbd9a7e | ||
|
|
b2000dc51e | ||
| 73514eecf5 | |||
|
|
2a8ae489be | ||
| c31c36e90e | |||
| 8306361df0 | |||
| a4b1211038 | |||
|
|
5a6a8d829d | ||
| 829488a680 | |||
| e968e44440 | |||
|
|
f0ad4aa38b | ||
|
|
432a6705b1 | ||
| d0d857787d | |||
| 631e65efd2 | |||
| 95ffc9e46e | |||
| 6793da251c | |||
| f7fb8d036a | |||
|
|
b957ecba61 | ||
|
|
f54781eb70 | ||
| c3db9597fe | |||
| 929200c869 | |||
|
|
20d5dbc942 | ||
|
|
cd3f245cd9 | ||
|
|
3e7dc2f3ca | ||
| d3f7fec200 | |||
|
|
c5e4562cc9 | ||
| 6cb549102b | |||
|
|
25ad24deb9 | ||
| 47a4f73518 | |||
| 8f762f4120 | |||
|
|
ede8c5c7af | ||
| cd8c31ccd6 | |||
|
|
f3679cf868 | ||
| 82d616a99c | |||
| c2405b9596 | |||
|
|
d7283c5628 | ||
| 7d5672809f | |||
| d2ebf3fca8 | |||
| bfc8c6dca0 | |||
| 8a228b3730 | |||
| 3addb52b24 | |||
| de2a2e2fea | |||
| 72b2283165 | |||
| 6df4074c59 | |||
| 2c3f04fc82 | |||
| cc52561395 | |||
|
|
a797381a7d | ||
| 99eff7d3d2 | |||
|
|
37c6e52281 | ||
|
|
533cf97495 | ||
|
|
1f96e18d65 | ||
| 295fddb935 | |||
|
|
7f6aa6f683 | ||
|
|
21035dc71b | ||
|
|
e2bbfb5e08 | ||
|
|
dddce82829 | ||
|
|
fa90fd7aaa | ||
|
|
5f2bb475cb | ||
|
|
64cf03d01c | ||
|
|
9a8742b02c | ||
|
|
f2e50dd100 | ||
| 228a8558ac | |||
|
|
14707fe3e9 | ||
|
|
b5ee0a5182 | ||
|
|
a5a1f58d30 | ||
|
|
400b8cde31 | ||
|
|
7220c526ce | ||
| d14e83c935 | |||
|
|
0b930f1adf | ||
|
|
848bb5f6b0 | ||
|
|
601ae475e0 | ||
|
|
dd2f738c00 | ||
|
|
bc3702b1f1 | ||
|
|
014afd0a2a | ||
|
|
f7c0045cf4 | ||
| 9a65c1b133 | |||
|
|
9da41273e5 | ||
|
|
e2ecf7bb04 | ||
| 4d0490994a | |||
| e94beddcff | |||
|
|
6a1bd88ab8 | ||
|
|
169b701fa9 | ||
| 6a97015cd6 | |||
|
|
b2ab4ee825 | ||
|
|
cc85660043 | ||
|
|
4f7b444737 | ||
| e729485d25 | |||
| f701507fae | |||
| 149d017c49 | |||
| 11116929cc | |||
| e4049de260 | |||
| b4be12e30e | |||
| 1b169830f9 | |||
| 417b36c884 | |||
| d5c18198b9 | |||
| 4a38148d7a | |||
| ab68a98999 | |||
| d435398c64 | |||
| 1acba83ff2 | |||
| 43af977942 | |||
| f0ffb63cff | |||
| ac24724ee8 | |||
| 8f4949af80 | |||
| f1d0e7df42 | |||
| 265eeb7bdd | |||
|
|
78524de495 | ||
|
|
5125ef738a | ||
|
|
721aa81c36 | ||
|
|
eb54a13226 | ||
| 9bc072ec8b | |||
|
|
f380c51a89 | ||
|
|
386e4cb647 | ||
| 46f54685b1 | |||
|
|
55f04541bd | ||
|
|
840c48e136 | ||
| a122df4763 | |||
| f656c15dc5 | |||
| e47584a118 | |||
| 63617c92c0 | |||
| efc075b4a9 | |||
| 3e3165bed8 | |||
| ea70f0fc2c | |||
| 7e130e9eb0 | |||
| da3e897fc2 | |||
|
|
932ab2d6f5 | ||
|
|
f3223bd680 | ||
|
|
9bee2386bf | ||
|
|
3f56fa0de9 | ||
|
|
62db637bdd | ||
|
|
39c9d1f54e | ||
|
|
0c9a93f600 | ||
| fad2279980 | |||
| 99d8e89bec | |||
|
|
8a5fec58d1 | ||
| f603794110 | |||
| 7d727088c2 | |||
|
|
2a703a8c30 | ||
| 1ff860bda9 | |||
| fe756e0f87 | |||
| 373cd71b02 | |||
| 49a3afb505 |
16
pom.xml
16
pom.xml
@@ -22,7 +22,7 @@
|
||||
<module>pqs-process</module>
|
||||
<module>pqs-bpm</module>
|
||||
<module>pqs-supervision</module>
|
||||
<module>pqs-algorithm</module>
|
||||
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
<name>灿能微服务生态系统</name>
|
||||
@@ -40,8 +40,8 @@
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<!--中间件目标地址-->
|
||||
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
||||
<middle.server.url>192.168.1.22</middle.server.url>
|
||||
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
||||
<middle.server.url>192.168.1.103</middle.server.url>
|
||||
<!--微服务模块发布地址-->
|
||||
<service.server.url>127.0.0.1</service.server.url>
|
||||
<!--docker仓库地址-->
|
||||
@@ -53,11 +53,11 @@
|
||||
<!--nacos的ip:port-->
|
||||
<nacos.password>nacos</nacos.password>
|
||||
<!--服务器发布内容为空-->
|
||||
<!-- <nacos.namespace></nacos.namespace>-->
|
||||
<!-- <nacos.namespace>30c701c4-2a94-49d9-82e1-76aa9456573f</nacos.namespace>-->
|
||||
<nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>
|
||||
<!-- <nacos.namespace>910d0d69-2254-481b-b9f7-7ecf9cb881b0</nacos.namespace>-->
|
||||
<!-- sentinel:port-->
|
||||
<!-- <nacos.namespace></nacos.namespace>-->
|
||||
<!-- <nacos.namespace>30c701c4-2a94-49d9-82e1-76aa9456573f</nacos.namespace>-->
|
||||
<nacos.namespace>6fd2d036-f390-46ee-9c9d-d5a5c00e3314</nacos.namespace>
|
||||
<!-- <nacos.namespace>910d0d69-2254-481b-b9f7-7ecf9cb881b0</nacos.namespace>-->
|
||||
<!-- sentinel:port-->
|
||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||
<!--网关地址,主要用于配置swagger中认证token-->
|
||||
<gateway.url>${service.server.url}:10215</gateway.url>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.advance.api;
|
||||
|
||||
import com.njcn.advance.api.fallback.EventCauseFeignClientFallbackFactory;
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2025/08/01 上午 8:54【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.ADVANCE_BOOT,path = "/eventAdvance",
|
||||
fallbackFactory = EventCauseFeignClientFallbackFactory.class,
|
||||
contextId = "eventAdvance" )
|
||||
public interface EventCauseFeignClient {
|
||||
@PostMapping(value = "/analysisCauseAndType")
|
||||
HttpResult<EventAnalysisDTO> analysisCauseAndType(@RequestBody EventAnalysisDTO eventAnalysis);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.advance.api.fallback;
|
||||
|
||||
import com.njcn.advance.api.EventCauseFeignClient;
|
||||
import com.njcn.advance.api.EventWaveAnalysisFeignClient;
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
import com.njcn.advance.pojo.dto.waveAnalysis.EntityAdvancedData;
|
||||
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.event.utils.EventlEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class EventCauseFeignClientFallbackFactory implements FallbackFactory<EventCauseFeignClient> {
|
||||
@Override
|
||||
public EventCauseFeignClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = EventlEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
return new EventCauseFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<EventAnalysisDTO> analysisCauseAndType(EventAnalysisDTO eventAnalysis) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "暂降原因分析", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,16 @@ public enum AdvanceResponseEnum {
|
||||
EVENT_TIME_ERROR("A0102","暂降事件时间格式有误,请检查"),
|
||||
|
||||
INVALID_FILE_TYPE("A0102","请选择CSV文件"),
|
||||
HARMONICCHARACTER_NAME_REPETITION("A0103","谐波源特性名称重复"),
|
||||
CABLETYPE_NAME_REPETITION("A0103","线路线缆名称重复"),
|
||||
TRANSFORMER_NAME_REPETITION("A0103","变压器类型名称重复"),
|
||||
SHOCKLOAD_NAME_REPETITION("A0103","冲击负荷类型名称重复"),
|
||||
ASSESSUSER_NAME_REPETITION("A0103","评估用户名称重复"),
|
||||
CAPACITOR_NAME_REPETITION("A0103","电容器组名称重复"),
|
||||
LOAD_NAME_REPETITION("A0103","用户负荷名称重复"),
|
||||
INPACTLOADTYPE_NAME_REPETITION("A0103","冲击负荷类型重复"),
|
||||
TRANS_NAME_REPETITION("A0103","变压器名称重复"),
|
||||
WIND_NAME_REPETITION("A0103","风机名称重复"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.njcn.advance.pojo.dto.relevent.FinalData;
|
||||
import com.njcn.advance.pojo.dto.relevent.QtIdx;
|
||||
import com.sun.jna.Structure;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -16,9 +18,11 @@ public class QtIdxArray extends Structure {
|
||||
|
||||
public QtIdx[] qtIdxs = new QtIdx[FinalData.MAX_LINE_NUM];
|
||||
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return null;
|
||||
protected List<String> getFieldOrder() {
|
||||
// 返回结构体中所有字段的名称列表(此处只有一个字段 "qtIdxs")
|
||||
return Collections.singletonList("qtIdxs");
|
||||
}
|
||||
|
||||
public static class ByReference extends QtIdxArray implements Structure.ByReference {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class QvvrDataStruct extends Structure {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getFieldOrder() { // 返回值填入的顺序
|
||||
return Arrays.asList(new String[]{"sys_res"});
|
||||
protected List<String> getFieldOrder() {
|
||||
return Arrays.asList("sys_num", "line_idx", "line_num", "sys_res");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -19,7 +20,8 @@ import java.util.List;
|
||||
@Data
|
||||
public class CarryCapcityDataEexcel {
|
||||
|
||||
@ExcelProperty(index = 0,value = "时间",converter = LocalDateTimeStringConverter.class)
|
||||
@ExcelProperty(index = 0,value = "时间(格式为yyyy-MM-dd hh:mm:ss)",converter = LocalDateTimeStringConverter.class)
|
||||
@JSONField(format = "yyyy-MM-dd hh:mm:ss")
|
||||
private LocalDateTime time;
|
||||
|
||||
@ExcelProperty(index =1,value = {"电压","A"})
|
||||
|
||||
@@ -331,7 +331,7 @@ public class CarryCapcityDataIEexcel {
|
||||
DataI dataI = new DataI();
|
||||
BeanUtils.copyProperties(carryCapcityDataIEexcel,dataI);
|
||||
dataI.setPhaseType(phase);
|
||||
dataI.setTime(carryCapcityDataIEexcel.getTime().plusSeconds(8*60*60));
|
||||
dataI.setTime(carryCapcityDataIEexcel.getTime());
|
||||
|
||||
if (phase.equals("A")) {
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CarryCapcityDataPEexcel {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataPEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataPEexcel.getTime().plusSeconds(8*60*60));
|
||||
carryCapcityData.setTime(carryCapcityDataPEexcel.getTime());
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataPEexcel.getValue_a());
|
||||
|
||||
@@ -49,7 +49,7 @@ public class CarryCapcityDataQEexcel {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataQEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataQEexcel.getTime().plusSeconds(8*60*60));
|
||||
carryCapcityData.setTime(carryCapcityDataQEexcel.getTime());
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataQEexcel.getValue_a());
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CarryCapcityDataVEexcel {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataVEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataVEexcel.getTime().plusSeconds(8*60*60));
|
||||
carryCapcityData.setTime(carryCapcityDataVEexcel.getTime());
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataVEexcel.getValue_a());
|
||||
|
||||
@@ -23,7 +23,6 @@ public class CarryCapacityDeviceParam {
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
|
||||
private String devName;
|
||||
|
||||
private String devScale;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class CarryCapacityUserParam {
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.njcn.advance.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* 暂降事件的高级分析,包括暂降原因和暂降类型
|
||||
*
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2025/7/30 10:43
|
||||
*/
|
||||
@Data
|
||||
public class EventAnalysisDTO {
|
||||
|
||||
/**
|
||||
* lineId
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 监测点IP
|
||||
*/
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 事件ID
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String waveName;
|
||||
|
||||
/**
|
||||
* 暂降原因
|
||||
* (0) //未知
|
||||
* (1) //短路故障
|
||||
* (2) //电压调节器
|
||||
* (3) //感动电机
|
||||
* (4) //电压跌落
|
||||
*/
|
||||
private Integer cause;
|
||||
|
||||
|
||||
/**
|
||||
* 可能分析失败,虽然返回的原因为未知,可能程序执行异常导致的
|
||||
* 0 异常计算
|
||||
* 1 正常计算
|
||||
*/
|
||||
private Integer causeFlag = 1;
|
||||
|
||||
/**
|
||||
* 暂降类型
|
||||
* TYPE0 = 0; // BC相间故障
|
||||
* TYPE1 = 1; // C相接地故障
|
||||
* TYPE2 = 2; // AC相间故障
|
||||
* TYPE3 = 3; // A相接地故障
|
||||
* TYPE4 = 4; // AB相间故障
|
||||
* TYPE5 = 5; // B相接地故障
|
||||
* TYPE6 = 6; // BC相间接地
|
||||
* TYPE7 = 7; // AC相间接地
|
||||
* TYPE8 = 8; // AB相间接地
|
||||
* TYPE9 = 9; // 三相故障
|
||||
* TYPE10 = 10; // 未知
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 可能分析失败,虽然返回的原因为未知,可能程序执行异常导致的
|
||||
* 0 异常计算
|
||||
* 1 正常计算
|
||||
*/
|
||||
private Integer typeFlag = 1;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.advance.pojo.dto.assess;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: cdf
|
||||
* @CreateTime: 2025-06-13
|
||||
* @Description: 左侧树
|
||||
*/
|
||||
@Data
|
||||
public class AssessTreeDTO {
|
||||
|
||||
private String treeId;
|
||||
|
||||
private String treeName;
|
||||
|
||||
private List<AssessTreeDTO> children;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.advance.pojo.dto.assess;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.math3.complex.Complex;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/8/15 15:07【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class HarmonicsIAndZDTO {
|
||||
private Double[] i;
|
||||
private Complex[] z;
|
||||
}
|
||||
@@ -1,36 +1,17 @@
|
||||
package com.njcn.advance.pojo.dto.relevent;
|
||||
|
||||
import com.njcn.advance.pojo.dto.SagEvent;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
||||
public class EntityGroupEvtData implements Cloneable,Comparable<EntityGroupEvtData> {
|
||||
|
||||
//逻辑节点序号
|
||||
private int node;
|
||||
//事件开始时间时标
|
||||
private int start_time;
|
||||
//类别
|
||||
private int cata;
|
||||
//标注类别
|
||||
private int cata2;
|
||||
//物理节点
|
||||
private String nodePhysics;
|
||||
|
||||
private int node;//逻辑节点序号
|
||||
private int start_time;//事件开始时间时标
|
||||
private int cata;//类别
|
||||
private int cata2;//标注类别
|
||||
private String nodePhysics; //物理节点
|
||||
private SagEvent sagEvent;
|
||||
|
||||
private String sagReason;
|
||||
|
||||
|
||||
public Object objClone() {
|
||||
try {
|
||||
return clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
return new EntityGroupEvtData(null, -1, -1, -1,null,null);
|
||||
}
|
||||
}
|
||||
|
||||
public EntityGroupEvtData(String nodePhysics, int start_time, int cata, int cata2, SagEvent sagEvent, String sagReason) {
|
||||
public EntityGroupEvtData(String nodePhysics, int start_time, int cata, int cata2,SagEvent sagEvent,String sagReason) {
|
||||
this.nodePhysics = nodePhysics;
|
||||
this.start_time = start_time;
|
||||
this.cata = cata;
|
||||
@@ -39,6 +20,144 @@ public class EntityGroupEvtData implements Cloneable,Comparable<EntityGroupEvtDa
|
||||
this.sagReason = sagReason;
|
||||
}
|
||||
|
||||
public SagEvent getSagEvent() {
|
||||
return sagEvent;
|
||||
}
|
||||
|
||||
public void setSagEvent(SagEvent sagEvent) {
|
||||
this.sagEvent = sagEvent;
|
||||
}
|
||||
|
||||
public String getNodePhysics() {
|
||||
return nodePhysics;
|
||||
}
|
||||
|
||||
public void setNodePhysics(String nodePhysics) {
|
||||
this.nodePhysics = nodePhysics;
|
||||
}
|
||||
|
||||
public int getNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
public void setNode(int node) {
|
||||
this.node = node;
|
||||
}
|
||||
|
||||
public int getStart_time() {
|
||||
return start_time;
|
||||
}
|
||||
|
||||
public void setStart_time(int start_time) {
|
||||
this.start_time = start_time;
|
||||
}
|
||||
|
||||
public int getCata() {
|
||||
return cata;
|
||||
}
|
||||
|
||||
public void setCata(int cata) {
|
||||
this.cata = cata;
|
||||
}
|
||||
|
||||
public int getCata2() {
|
||||
return cata2;
|
||||
}
|
||||
|
||||
public void setCata2(int cata2) {
|
||||
this.cata2 = cata2;
|
||||
}
|
||||
|
||||
public String getSagReason() {
|
||||
return sagReason;
|
||||
}
|
||||
|
||||
public void setSagReason(String sagReason) {
|
||||
this.sagReason = sagReason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a copy of this object. The precise meaning
|
||||
* of "copy" may depend on the class of the object. The general
|
||||
* intent is that, for any object {@code x}, the expression:
|
||||
* <blockquote>
|
||||
* <pre>
|
||||
* x.clone() != x</pre></blockquote>
|
||||
* will be true, and that the expression:
|
||||
* <blockquote>
|
||||
* <pre>
|
||||
* x.clone().getClass() == x.getClass()</pre></blockquote>
|
||||
* will be {@code true}, but these are not absolute requirements.
|
||||
* While it is typically the case that:
|
||||
* <blockquote>
|
||||
* <pre>
|
||||
* x.clone().equals(x)</pre></blockquote>
|
||||
* will be {@code true}, this is not an absolute requirement.
|
||||
*
|
||||
* By convention, the returned object should be obtained by calling
|
||||
* {@code super.clone}. If a class and all of its superclasses (except
|
||||
* {@code Object}) obey this convention, it will be the case that
|
||||
* {@code x.clone().getClass() == x.getClass()}.
|
||||
*
|
||||
* By convention, the object returned by this method should be independent
|
||||
* of this object (which is being cloned). To achieve this independence,
|
||||
* it may be necessary to modify one or more fields of the object returned
|
||||
* by {@code super.clone} before returning it. Typically, this means
|
||||
* copying any mutable objects that comprise the internal "deep structure"
|
||||
* of the object being cloned and replacing the references to these
|
||||
* objects with references to the copies. If a class contains only
|
||||
* primitive fields or references to immutable objects, then it is usually
|
||||
* the case that no fields in the object returned by {@code super.clone}
|
||||
* need to be modified.
|
||||
*
|
||||
* The method {@code clone} for class {@code Object} performs a
|
||||
* specific cloning operation. First, if the class of this object does
|
||||
* not implement the interface {@code Cloneable}, then a
|
||||
* {@code CloneNotSupportedException} is thrown. Note that all arrays
|
||||
* are considered to implement the interface {@code Cloneable} and that
|
||||
* the return type of the {@code clone} method of an array type {@code T[]}
|
||||
* is {@code T[]} where T is any reference or primitive type.
|
||||
* Otherwise, this method creates a new instance of the class of this
|
||||
* object and initializes all its fields with exactly the contents of
|
||||
* the corresponding fields of this object, as if by assignment; the
|
||||
* contents of the fields are not themselves cloned. Thus, this method
|
||||
* performs a "shallow copy" of this object, not a "deep copy" operation.
|
||||
*
|
||||
* The class {@code Object} does not itself implement the interface
|
||||
* {@code Cloneable}, so calling the {@code clone} method on an object
|
||||
* whose class is {@code Object} will result in throwing an
|
||||
* exception at run time.
|
||||
*
|
||||
* @return a clone of this instance.
|
||||
* @throws CloneNotSupportedException if the object's class does not
|
||||
* support the {@code Cloneable} interface. Subclasses
|
||||
* that override the {@code clone} method can also
|
||||
* throw this exception to indicate that an instance cannot
|
||||
* be cloned.
|
||||
* @see Cloneable
|
||||
*/
|
||||
@Override
|
||||
protected Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
public Object objClone() {
|
||||
try {
|
||||
return clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
return new EntityGroupEvtData("-1", -1, -1, -1,null,null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EntityGroupEvtData{" +
|
||||
"node=" + node +
|
||||
", start_time=" + start_time +
|
||||
", cata=" + cata +
|
||||
", cata2=" + cata2 +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(EntityGroupEvtData obj) {
|
||||
@@ -50,4 +169,4 @@ public class EntityGroupEvtData implements Cloneable,Comparable<EntityGroupEvtDa
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,9 @@ public class EntityLogic {
|
||||
//物理隔绝变压器策略GUID
|
||||
private String tPIndex;
|
||||
//变压器逻辑上节点
|
||||
private String node_h;
|
||||
private Integer node_h;
|
||||
//变压器逻辑下节点
|
||||
private String node_l;
|
||||
private Integer node_l;
|
||||
// 变压器连接方式
|
||||
private Integer type;
|
||||
//变压器物理上节点
|
||||
|
||||
@@ -16,10 +16,10 @@ public class EntityMtrans implements Serializable {
|
||||
public EntityMtrans() {
|
||||
super();
|
||||
Mtrans = new int[FinalData.NODE_NUM][FinalData.NODE_NUM];
|
||||
Matrixcata0 = new int[FinalData.EVT_TYPE_NUM][FinalData.NODE_NUM];
|
||||
Matrixcata1 = new int[FinalData.EVT_TYPE_NUM][FinalData.NODE_NUM];
|
||||
possiable_path = new int[FinalData.MAX_PATH_NUM][FinalData.NODE_NUM + 1];
|
||||
path_num = 0;
|
||||
Matrixcata0 = new int[FinalData.EVT_TYPE_NUM][FinalData.NODE_NUM];
|
||||
Matrixcata1 = new int[FinalData.EVT_TYPE_NUM][FinalData.NODE_NUM];
|
||||
possiable_path = new int[FinalData.MAX_PATH_NUM][FinalData.NODE_NUM + 1];
|
||||
path_num = 0;
|
||||
}
|
||||
|
||||
public int[][] getMatrixcata0() {
|
||||
@@ -69,3 +69,4 @@ public class EntityMtrans implements Serializable {
|
||||
+ Arrays.toString(possiable_path) + ", path_num=" + path_num + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.njcn.advance.pojo.dto.relevent;
|
||||
|
||||
import com.njcn.advance.pojo.dto.SagEvent;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.njcn.advance.pojo.dto.relevent;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.sun.jna.Structure;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,6 +17,7 @@ import java.util.List;
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@JsonIgnoreProperties({"pointer", "autoAllocate", "autoRead", "autoWrite"}) // 忽略JNA内部字段
|
||||
public class QtIdx extends Structure{
|
||||
|
||||
/**
|
||||
@@ -41,6 +45,9 @@ public class QtIdx extends Structure{
|
||||
*/
|
||||
public float r_assi;
|
||||
|
||||
|
||||
|
||||
|
||||
public static class ByReference extends QtIdx implements Structure.ByReference {
|
||||
|
||||
}
|
||||
@@ -49,9 +56,16 @@ public class QtIdx extends Structure{
|
||||
|
||||
}
|
||||
|
||||
// 关键:定义字段顺序,必须与 C 结构体一致!
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return null;
|
||||
protected List<String> getFieldOrder() {
|
||||
return Arrays.asList(
|
||||
"r_esm",
|
||||
"sarfi_90",
|
||||
"sarifi_50",
|
||||
"r_asei",
|
||||
"r_assi"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.advance.pojo.dto;
|
||||
package com.njcn.advance.pojo.dto.relevent;
|
||||
|
||||
import com.njcn.advance.pojo.dto.relevent.PlantInfo;
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ public class AnalyWave {
|
||||
break;
|
||||
case 1:// 总点数 //这里的strTemp是一个偏移量
|
||||
OneRate.nSampleNum = (long) (Float.parseFloat(strTempArray[j]) - nOffset);
|
||||
nOffset = OneRate.nSampleNum;
|
||||
nOffset += OneRate.nSampleNum;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估电容器参数查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_capacitor_param")
|
||||
@ApiModel(value = "AssessCapacitorParamQuery", description = "评估电容器参数查询参数")
|
||||
public class AssessCapacitorParamQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d")
|
||||
private String assessId;
|
||||
|
||||
@ApiModelProperty(value = "电容器组名称,例:电容器组1")
|
||||
private String capacitorName;
|
||||
|
||||
@ApiModelProperty(value = "电容器组个数,例:1")
|
||||
private Integer capacitorNum;
|
||||
|
||||
@ApiModelProperty(value = "单组容量,单位kVar,例:100.00")
|
||||
private BigDecimal capacitorCapacity;
|
||||
|
||||
@ApiModelProperty(value = "电抗率,单位%,例:5.00")
|
||||
private BigDecimal capacitorReactance;
|
||||
|
||||
@ApiModelProperty(value = "电压等级,例:22。与PMS3.0内电压等级编码保持一致。")
|
||||
private String capacitorScale;
|
||||
|
||||
/**
|
||||
* 更新评估电容器参数的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessCapacitorParamQuery", description = "更新评估电容器参数的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessCapacitorParamQuery extends AssessCapacitorParamQuery {
|
||||
|
||||
@ApiModelProperty(value = "电容器组ID(更新时必填),例:b2a0ddf21992416f936b572459a3d8f4", required = true)
|
||||
private String capacitorId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 线缆类型字典查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_cable_type")
|
||||
@ApiModel(value = "AssessDicCableTypeQuery", description = "线缆类型字典查询参数")
|
||||
public class AssessDicCableTypeQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "线路线缆名称,例:LGJ-240-35kV", required = true)
|
||||
private String linetypeName;
|
||||
|
||||
@ApiModelProperty(value = "线路线缆类型,例:01-架空线,02-电缆", required = true)
|
||||
private String linetypeType;
|
||||
|
||||
@ApiModelProperty(value = "正序电阻,例:1.6")
|
||||
private BigDecimal posR1;
|
||||
|
||||
@ApiModelProperty(value = "正序电抗,例:1.6")
|
||||
private BigDecimal posX1;
|
||||
|
||||
@ApiModelProperty(value = "正序电纳,例:1.6")
|
||||
private BigDecimal posY1;
|
||||
|
||||
@ApiModelProperty(value = "零序电阻,例:1.6")
|
||||
private BigDecimal zeroR0;
|
||||
|
||||
@ApiModelProperty(value = "零序电抗,例:1.6")
|
||||
private BigDecimal zeroX0;
|
||||
|
||||
@ApiModelProperty(value = "零序电纳,例:1.6")
|
||||
private BigDecimal zeroY0;
|
||||
|
||||
/**
|
||||
* 更新线缆类型字典的查询参数
|
||||
*/
|
||||
@ApiModel(value = "UpdateAssessDicCableTypeQuery", description = "更新线缆类型字典的查询参数")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UpdateAssessDicCableTypeQuery extends AssessDicCableTypeQuery {
|
||||
|
||||
@ApiModelProperty(value = "线路线缆类型ID(更新时必填),例:3491b6cce56141f1a2a0a79a15b0e91e", required = true)
|
||||
private String linetypeId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 谐波源特性字典
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_harmonic_character")
|
||||
public class AssessDicHarmonicCharacterQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 谐波源特性名称,例:六脉整流
|
||||
*/
|
||||
private String harmName;
|
||||
|
||||
/**
|
||||
* 2次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 3次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 4次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 5次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 6次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 7次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 8次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 9次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 10次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 11次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 12次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 13次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 14次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 15次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 16次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 17次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 18次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 19次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 20次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 21次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 22次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 23次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 24次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 25次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 26次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 27次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 28次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 29次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 30次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 31次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 32次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 33次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 34次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 35次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 36次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 37次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 38次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 39次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 40次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 41次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 42次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 43次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 44次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 45次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 46次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 47次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 48次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 49次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 50次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public static class UpdateAssessDicHarmonicCharacterQuery extends AssessDicHarmonicCharacterQuery{
|
||||
/**
|
||||
* 谐波源特性字典ID,例:d53f0026d2f04c9e9fee6bba8386487a
|
||||
*/
|
||||
private String harmId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 冲击负荷字典查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModel(value = "AssessDicShockLoadQuery", description = "冲击负荷字典查询参数")
|
||||
public class AssessDicShockLoadQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷类型名称,例:电机", required = true)
|
||||
@NotBlank(message = "冲击负荷类型名称不可为空")
|
||||
private String inpactloadtypeName;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷启动方式,例:直接启动")
|
||||
@NotBlank(message = "冲击负荷启动方式不可为空")
|
||||
private String inpactloadStartup;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷启动容量倍数,例:4")
|
||||
@NotNull(message = "冲击负荷启动容量倍数不可为空")
|
||||
private BigDecimal inpactloadMultiple;
|
||||
|
||||
/**
|
||||
* 更新冲击负荷字典的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessDicShockLoadQuery", description = "更新冲击负荷字典的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessDicShockLoadQuery extends AssessDicShockLoadQuery {
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷类型ID(更新时必填),例:d19c10178eeb4da2bca1df18a050524d", required = true)
|
||||
@NotBlank(message = "冲击负荷类型ID不可为空")
|
||||
private String inpactloadtypeId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 变压器参数字典查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_transformer")
|
||||
@ApiModel(value = "AssessDicTransformerQuery", description = "变压器参数字典查询参数")
|
||||
public class AssessDicTransformerQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "变压器类型名称,例:110kV", required = true)
|
||||
private String transtypeName;
|
||||
|
||||
@ApiModelProperty(value = "额定容量,单位kVA,例:10")
|
||||
private BigDecimal transCapa;
|
||||
|
||||
@ApiModelProperty(value = "高压侧电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String transhighScale;
|
||||
|
||||
@ApiModelProperty(value = "低压侧电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String translowScale;
|
||||
|
||||
@ApiModelProperty(value = "联结组标号,例:0.33")
|
||||
private BigDecimal trnasNo;
|
||||
|
||||
@ApiModelProperty(value = "空载损耗,单位kW,例:2.42")
|
||||
private BigDecimal noloadLoss;
|
||||
|
||||
@ApiModelProperty(value = "负载损耗,单位kW,例:2.42")
|
||||
private BigDecimal loadLoss;
|
||||
|
||||
@ApiModelProperty(value = "空载电流,单位%,例:2.42")
|
||||
private BigDecimal noloadCur;
|
||||
|
||||
@ApiModelProperty(value = "短路阻抗,单位%,例:2.42")
|
||||
private BigDecimal shortCircuitImpedance;
|
||||
|
||||
/**
|
||||
* 更新变压器参数字典的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessDicTransformerQuery", description = "更新变压器参数字典的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessDicTransformerQuery extends AssessDicTransformerQuery {
|
||||
|
||||
@ApiModelProperty(value = "变压器类型ID(更新时必填),例:f401fa4abb71402bb5e9528209ea219e", required = true)
|
||||
@NotBlank(message ="变压器类型ID")
|
||||
private String transtypeId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户负荷参数查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_load_param")
|
||||
@ApiModel(value = "AssessLoadParamQuery", description = "评估用户负荷参数查询参数")
|
||||
public class AssessLoadParamQuery extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d")
|
||||
private String assessId;
|
||||
|
||||
@ApiModelProperty(value = "用户负荷名称,例:1号炼钢炉", required = true)
|
||||
@NotBlank(message = "用户负荷名称不可为空")
|
||||
private String loadName;
|
||||
|
||||
@ApiModelProperty(value = "电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String linevoltageScale;
|
||||
|
||||
@ApiModelProperty(value = "进线容量,单位kVA,例:200.00")
|
||||
private BigDecimal transhighCapacity;
|
||||
|
||||
@ApiModelProperty(value = "配电变压器阻抗,单位%,例:5.00")
|
||||
private BigDecimal transImpedance;
|
||||
|
||||
@ApiModelProperty(value = "谐波源特性字典ID,从字典表获取,例:d53f0026d2f04c9e9fee6bba8386487a")
|
||||
private String harmId;
|
||||
|
||||
@ApiModelProperty(value = "电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String translowScale;
|
||||
|
||||
@ApiModelProperty(value = "非线性负荷功率,单位kW,例:150")
|
||||
private BigDecimal nonlinearloadPower;
|
||||
|
||||
@ApiModelProperty(value = "功率因数,例:0.90")
|
||||
private BigDecimal powerFactor;
|
||||
|
||||
/**
|
||||
* 内部类:更新评估用户负荷参数的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "UpdateAssessLoadParamQuery", description = "更新评估用户负荷参数的查询参数")
|
||||
public static class UpdateAssessLoadParamQuery extends AssessLoadParamQuery {
|
||||
|
||||
@ApiModelProperty(value = "用户负荷ID(更新时必填),例:759b793da37548d8b865efdc7f461304", required = true)
|
||||
@NotBlank(message = "用户负荷ID不可为空")
|
||||
private String loadId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 允许值表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_overlimit")
|
||||
public class AssessOverlimitQuery extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 奇次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal vodd;
|
||||
|
||||
/**
|
||||
* 偶次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal vevent;
|
||||
|
||||
/**
|
||||
* 2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
/**
|
||||
* 电压波动,例:0.51
|
||||
*/
|
||||
private BigDecimal fluc;
|
||||
|
||||
/**
|
||||
* 电压偏差上限,例:1.15
|
||||
*/
|
||||
private BigDecimal dltavUp;
|
||||
|
||||
/**
|
||||
* 电压偏差下限,例:1.15
|
||||
*/
|
||||
private BigDecimal dltavDown;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡,例:1.7
|
||||
*/
|
||||
private BigDecimal unblance;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2025/8/26 17:05
|
||||
*/
|
||||
@Data
|
||||
public class AssessParam extends StatisticsBizBaseParam {
|
||||
|
||||
@ApiModelProperty(name="assessId",value="评估用户id")
|
||||
private String assessId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,532 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果附加表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_result_addition")
|
||||
public class AssessResultAdditionQuery extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 生成结果时间,例:2024-07-17 18:00:00
|
||||
*/
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
/**
|
||||
* 电容器投入2次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v2;
|
||||
|
||||
/**
|
||||
* 电容器投入3次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v3;
|
||||
|
||||
/**
|
||||
* 电容器投入4次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v4;
|
||||
|
||||
/**
|
||||
* 电容器投入5次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v5;
|
||||
|
||||
/**
|
||||
* 电容器投入6次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v6;
|
||||
|
||||
/**
|
||||
* 电容器投入7次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/**
|
||||
* 电容器投入8次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v8;
|
||||
|
||||
/**
|
||||
* 电容器投入9次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v9;
|
||||
|
||||
/**
|
||||
* 电容器投入10次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v10;
|
||||
|
||||
/**
|
||||
* 电容器投入11次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v11;
|
||||
|
||||
/**
|
||||
* 电容器投入12次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v12;
|
||||
|
||||
/**
|
||||
* 电容器投入13次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v13;
|
||||
|
||||
/**
|
||||
* 电容器投入14次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v14;
|
||||
|
||||
/**
|
||||
* 电容器投入15次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v15;
|
||||
|
||||
/**
|
||||
* 电容器投入16次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v16;
|
||||
|
||||
/**
|
||||
* 电容器投入17次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v17;
|
||||
|
||||
/**
|
||||
* 电容器投入18次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v18;
|
||||
|
||||
/**
|
||||
* 电容器投入19次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v19;
|
||||
|
||||
/**
|
||||
* 电容器投入20次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v20;
|
||||
|
||||
/**
|
||||
* 电容器投入21次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v21;
|
||||
|
||||
/**
|
||||
* 电容器投入22次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v22;
|
||||
|
||||
/**
|
||||
* 电容器投入23次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v23;
|
||||
|
||||
/**
|
||||
* 电容器投入24次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v24;
|
||||
|
||||
/**
|
||||
* 电容器投入25次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v25;
|
||||
|
||||
/**
|
||||
* 电容器投入26次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v26;
|
||||
|
||||
/**
|
||||
* 电容器投入27次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v27;
|
||||
|
||||
/**
|
||||
* 电容器投入28次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v28;
|
||||
|
||||
/**
|
||||
* 电容器投入29次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v29;
|
||||
|
||||
/**
|
||||
* 电容器投入30次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v30;
|
||||
|
||||
/**
|
||||
* 电容器投入31次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v31;
|
||||
|
||||
/**
|
||||
* 电容器投入32次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v32;
|
||||
|
||||
/**
|
||||
* 电容器投入33次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v33;
|
||||
|
||||
/**
|
||||
* 电容器投入34次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v34;
|
||||
|
||||
/**
|
||||
* 电容器投入35次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v35;
|
||||
|
||||
/**
|
||||
* 电容器投入36次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v36;
|
||||
|
||||
/**
|
||||
* 电容器投入37次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v37;
|
||||
|
||||
/**
|
||||
* 电容器投入38次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v38;
|
||||
|
||||
/**
|
||||
* 电容器投入39次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v39;
|
||||
|
||||
/**
|
||||
* 电容器投入40次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v40;
|
||||
|
||||
/**
|
||||
* 电容器投入41次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v41;
|
||||
|
||||
/**
|
||||
* 电容器投入42次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v42;
|
||||
|
||||
/**
|
||||
* 电容器投入43次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v43;
|
||||
|
||||
/**
|
||||
* 电容器投入44次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v44;
|
||||
|
||||
/**
|
||||
* 电容器投入45次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v45;
|
||||
|
||||
/**
|
||||
* 电容器投入46次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v46;
|
||||
|
||||
/**
|
||||
* 电容器投入47次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v47;
|
||||
|
||||
/**
|
||||
* 电容器投入48次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v48;
|
||||
|
||||
/**
|
||||
* 电容器投入49次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v49;
|
||||
|
||||
/**
|
||||
* 电容器投入50次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v50;
|
||||
|
||||
/**
|
||||
* 电容器投入2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 电容器投入3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 电容器投入4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 电容器投入5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 电容器投入6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 电容器投入7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 电容器投入8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 电容器投入9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 电容器投入10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 电容器投入11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 电容器投入12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 电容器投入13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 电容器投入14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 电容器投入15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 电容器投入16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 电容器投入17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 电容器投入18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 电容器投入19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 电容器投入20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 电容器投入21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 电容器投入22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 电容器投入23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 电容器投入24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 电容器投入25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 电容器投入26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 电容器投入27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 电容器投入28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 电容器投入29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 电容器投入30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 电容器投入31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 电容器投入32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 电容器投入33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 电容器投入34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 电容器投入35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 电容器投入36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 电容器投入37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 电容器投入38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 电容器投入39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 电容器投入40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 电容器投入41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 电容器投入42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 电容器投入43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 电容器投入44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 电容器投入45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 电容器投入46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 电容器投入47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 电容器投入48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 电容器投入49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 电容器投入50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,607 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_result")
|
||||
public class AssessResultQuery extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 生成结果时间,例:2024-07-17 18:00:00
|
||||
*/
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
/**
|
||||
* 电容器未投入2次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v2;
|
||||
|
||||
/**
|
||||
* 电容器未投入3次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v3;
|
||||
|
||||
/**
|
||||
* 电容器未投入4次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v4;
|
||||
|
||||
/**
|
||||
* 电容器未投入5次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v5;
|
||||
|
||||
/**
|
||||
* 电容器未投入6次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v6;
|
||||
|
||||
/**
|
||||
* 电容器未投入7次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/**
|
||||
* 电容器未投入8次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v8;
|
||||
|
||||
/**
|
||||
* 电容器未投入9次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v9;
|
||||
|
||||
/**
|
||||
* 电容器未投入10次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v10;
|
||||
|
||||
/**
|
||||
* 电容器未投入11次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v11;
|
||||
|
||||
/**
|
||||
* 电容器未投入12次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v12;
|
||||
|
||||
/**
|
||||
* 电容器未投入13次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v13;
|
||||
|
||||
/**
|
||||
* 电容器未投入14次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v14;
|
||||
|
||||
/**
|
||||
* 电容器未投入15次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v15;
|
||||
|
||||
/**
|
||||
* 电容器未投入16次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v16;
|
||||
|
||||
/**
|
||||
* 电容器未投入17次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v17;
|
||||
|
||||
/**
|
||||
* 电容器未投入18次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v18;
|
||||
|
||||
/**
|
||||
* 电容器未投入19次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v19;
|
||||
|
||||
/**
|
||||
* 电容器未投入20次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v20;
|
||||
|
||||
/**
|
||||
* 电容器未投入21次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v21;
|
||||
|
||||
/**
|
||||
* 电容器未投入22次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v22;
|
||||
|
||||
/**
|
||||
* 电容器未投入23次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v23;
|
||||
|
||||
/**
|
||||
* 电容器未投入24次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v24;
|
||||
|
||||
/**
|
||||
* 电容器未投入25次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v25;
|
||||
|
||||
/**
|
||||
* 电容器未投入26次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v26;
|
||||
|
||||
/**
|
||||
* 电容器未投入27次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v27;
|
||||
|
||||
/**
|
||||
* 电容器未投入28次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v28;
|
||||
|
||||
/**
|
||||
* 电容器未投入29次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v29;
|
||||
|
||||
/**
|
||||
* 电容器未投入30次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v30;
|
||||
|
||||
/**
|
||||
* 电容器未投入31次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v31;
|
||||
|
||||
/**
|
||||
* 电容器未投入32次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v32;
|
||||
|
||||
/**
|
||||
* 电容器未投入33次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v33;
|
||||
|
||||
/**
|
||||
* 电容器未投入34次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v34;
|
||||
|
||||
/**
|
||||
* 电容器未投入35次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v35;
|
||||
|
||||
/**
|
||||
* 电容器未投入36次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v36;
|
||||
|
||||
/**
|
||||
* 电容器未投入37次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v37;
|
||||
|
||||
/**
|
||||
* 电容器未投入38次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v38;
|
||||
|
||||
/**
|
||||
* 电容器未投入39次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v39;
|
||||
|
||||
/**
|
||||
* 电容器未投入40次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v40;
|
||||
|
||||
/**
|
||||
* 电容器未投入41次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v41;
|
||||
|
||||
/**
|
||||
* 电容器未投入42次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v42;
|
||||
|
||||
/**
|
||||
* 电容器未投入43次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v43;
|
||||
|
||||
/**
|
||||
* 电容器未投入44次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v44;
|
||||
|
||||
/**
|
||||
* 电容器未投入45次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v45;
|
||||
|
||||
/**
|
||||
* 电容器未投入46次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v46;
|
||||
|
||||
/**
|
||||
* 电容器未投入47次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v47;
|
||||
|
||||
/**
|
||||
* 电容器未投入48次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v48;
|
||||
|
||||
/**
|
||||
* 电容器未投入49次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v49;
|
||||
|
||||
/**
|
||||
* 电容器未投入50次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v50;
|
||||
|
||||
/**
|
||||
* 电容器未投入2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 电容器未投入3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 电容器未投入4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 电容器未投入5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 电容器未投入6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 电容器未投入7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 电容器未投入8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 电容器未投入9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 电容器未投入10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 电容器未投入11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 电容器未投入12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 电容器未投入13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 电容器未投入14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 电容器未投入15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 电容器未投入16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 电容器未投入17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 电容器未投入18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 电容器未投入19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 电容器未投入20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 电容器未投入21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 电容器未投入22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 电容器未投入23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 电容器未投入24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 电容器未投入25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 电容器未投入26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 电容器未投入27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 电容器未投入28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 电容器未投入29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 电容器未投入30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 电容器未投入31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 电容器未投入32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 电容器未投入33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 电容器未投入34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 电容器未投入35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 电容器未投入36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 电容器未投入37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 电容器未投入38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 电容器未投入39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 电容器未投入40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 电容器未投入41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 电容器未投入42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 电容器未投入43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 电容器未投入44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 电容器未投入45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 电容器未投入46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 电容器未投入47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 电容器未投入48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 电容器未投入49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 电容器未投入50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
/**
|
||||
* 电压波动近似计算结果,例:0.51
|
||||
*/
|
||||
private BigDecimal approFluc;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnH100Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnH60Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnH0Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffH100Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffH60Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffH0Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnL100Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnL60Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOnL0Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffL100Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffL60Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
private BigDecimal capOffL0Deltav;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡一般估算结果,例:1.7
|
||||
*/
|
||||
private BigDecimal approUnblance;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡严格估算结果,例:1.7
|
||||
*/
|
||||
private BigDecimal accurUnblance;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户冲击负荷参数查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_shock_load_param")
|
||||
@ApiModel(value = "AssessShockLoadParamQuery", description = "评估用户冲击负荷参数查询参数")
|
||||
public class AssessShockLoadParamQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d", required = true)
|
||||
private String assessId;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷类型ID,从字典表查出,例:d19c10178eeb4da2bca1df18a050524d", required = true)
|
||||
private String inpactloadtypeId;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷容量,单位:MVA,例:100.00")
|
||||
private BigDecimal inpactloadPower;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷个数,例:1")
|
||||
private BigDecimal inpactloadNum;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷高压侧电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String inpactloadhighScale;
|
||||
|
||||
@ApiModelProperty(value = "是否隔离变(00-否,01-是)", required = true)
|
||||
private String isIsolationtrans;
|
||||
|
||||
@ApiModelProperty(value = "隔离变阻抗,单位:%,例:5.00")
|
||||
private BigDecimal isolationtransImpedance;
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷低压侧电压等级,例:22(与PMS3.0编码一致)")
|
||||
private String inpactloadlowScale;
|
||||
|
||||
@ApiModelProperty(value = "负荷频度(01-N≤4次/d,02-N>4次/d且N≤2次/h,03-2次/h<N≤10次/h)")
|
||||
private String inpactloadFreq;
|
||||
|
||||
@ApiModelProperty(value = "闪变叠加系数,例:5.00")
|
||||
private BigDecimal flickerCoeff;
|
||||
|
||||
/**
|
||||
* 更新评估用户冲击负荷参数的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessShockLoadParamQuery", description = "更新评估用户冲击负荷参数的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessShockLoadParamQuery extends AssessShockLoadParamQuery {
|
||||
|
||||
@ApiModelProperty(value = "冲击负荷ID(更新时必填),例:ffd5b663906648ad90811a4fcf108fec", required = true)
|
||||
private String inpactloadId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估变压器参数查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_transformer_param")
|
||||
@ApiModel(value = "AssessTransformerParamQuery", description = "评估变压器参数查询参数")
|
||||
public class AssessTransformerParamQuery extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d", required = true)
|
||||
private String assessId;
|
||||
|
||||
@ApiModelProperty(value = "变压器名称,例:10kV配网变压器", required = true)
|
||||
private String transName;
|
||||
|
||||
@ApiModelProperty(value = "变压器类型ID,从字典表中获得,例:f401fa4abb71402bb5e9528209ea219e", required = true)
|
||||
private String transtypeId;
|
||||
|
||||
@ApiModelProperty(value = "变压器个数,例:1")
|
||||
private Integer transNum;
|
||||
|
||||
/**
|
||||
* 更新评估变压器参数的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessTransformerParamQuery", description = "更新评估变压器参数的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessTransformerParamQuery extends AssessTransformerParamQuery {
|
||||
|
||||
@ApiModelProperty(value = "变压器ID(更新时必填),例:8ead7dfa8fc0495a890fef2c847e4fea", required = true)
|
||||
private String transId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "AssessUserQuery", description = "评估用户查询参数")
|
||||
public class AssessUserQuery extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评估用户名称", required = true)
|
||||
@NotBlank(message = "评估用户名称不可为空")
|
||||
private String assessName;
|
||||
|
||||
@ApiModelProperty(value = "所属部门id,例:南京市供电公司", required = true)
|
||||
@NotBlank(message = "所属部门id不可为空")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "所属部门名称,例:南京市供电公司", required = true)
|
||||
@NotBlank(message = "所属部门名称不可为空")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "用户协议容量,单位MVA,例:10.00", required = true)
|
||||
@NotNull(message = "用户协议容量不可为空")
|
||||
private BigDecimal agreedCapacity;
|
||||
|
||||
@ApiModelProperty(value = "用户电压等级,例:32。与PMS3.0内电压等级编码保持一致。", required = true)
|
||||
@NotBlank(message = "用户电压等级不可为空")
|
||||
private String userScale;
|
||||
|
||||
@ApiModelProperty(value = "是否包含电容器,例:00-不包含电容器 01-包含电容器", required = true)
|
||||
@NotBlank(message = "是否包含电容器")
|
||||
private String withCapacitor;
|
||||
|
||||
@ApiModelProperty(value = "用户负荷类型,例:01-风电场,02-光伏 03-其他", required = true)
|
||||
@NotBlank(message = "用户负荷类型不可为空")
|
||||
private String isWindfarm;
|
||||
|
||||
@ApiModelProperty(value = "变电站ID,例:0012030456", required = true)
|
||||
@NotBlank(message = "变电站ID不可为空")
|
||||
private String powerstationId;
|
||||
|
||||
@ApiModelProperty(value = "变电站名称,例:110kV南站变", required = true)
|
||||
@NotBlank(message = "变电站名称不可为空")
|
||||
private String powerstationName;
|
||||
|
||||
@ApiModelProperty(value = "变电站电压等级,例:32。与PMS3.0内电压等级编码保持一致。", required = true)
|
||||
@NotBlank(message = "变电站电压等级不可为空")
|
||||
private String powerstationScale;
|
||||
|
||||
private List<String> powerstationScaleList;
|
||||
|
||||
@ApiModelProperty(value = "母线ID,例:0012030456")
|
||||
private String busId;
|
||||
|
||||
@ApiModelProperty(value = "母线名称,例:35kV I段母线")
|
||||
private String busName;
|
||||
|
||||
@ApiModelProperty(value = "母线电压等级,例:32。与PMS3.0内电压等级编码保持一致。")
|
||||
private String busScale;
|
||||
|
||||
private List<String> busScaleList;
|
||||
|
||||
@ApiModelProperty(value = "线路ID,例:0012030456")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(value = "线路名称,例:35kV 南站一线")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty(value = "线路名称,例:35kV 南站一线")
|
||||
private String lineScale;
|
||||
|
||||
@ApiModelProperty(value = "供电设备容量,单位MVA,例:100.00")
|
||||
private BigDecimal powersupplyCapacity;
|
||||
|
||||
@ApiModelProperty(value = "最小短路容量,单位MVA,例:150.00")
|
||||
private BigDecimal minshortcircuitCapacity;
|
||||
|
||||
@ApiModelProperty(value = "线路线缆类型ID,从字典表获取,例:3491b6cce56141f1a2a0a79a15b0e91e")
|
||||
private String linetypeId;
|
||||
|
||||
@ApiModelProperty(value = "PCC电电网电阻,例:200.00")
|
||||
private BigDecimal lineGridresistance;
|
||||
|
||||
@ApiModelProperty(value = "PCC电电网电抗,例:200.00")
|
||||
private BigDecimal lineGridreactance;
|
||||
|
||||
@ApiModelProperty(value = "线路长度,单位公里,例:200.00")
|
||||
private BigDecimal lineLen;
|
||||
|
||||
@ApiModelProperty(value = "线路回路数,例:1")
|
||||
private BigDecimal lineNum;
|
||||
|
||||
@ApiModelProperty(value = "有功容量,风电场装机容量/光伏电站装机容量/企业负荷计算功率,单位MW,例:200.00")
|
||||
private BigDecimal windfarmCapacity;
|
||||
|
||||
@ApiModelProperty(value = "是否为单相负荷,例:00-否 01-是", required = true)
|
||||
@NotBlank(message = "是否为单相负荷")
|
||||
private String singleLoad;
|
||||
|
||||
/**
|
||||
* 更新评估用户的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "UpdateAssessUserQuery", description = "更新评估用户的查询参数")
|
||||
public static class UpdateAssessUserQuery extends AssessUserQuery {
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d", required = true)
|
||||
@NotBlank(message = "评估用户ID不可为空")
|
||||
private String assessId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.njcn.advance.pojo.param.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 风电场类负荷参数查询参数
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_wind_load_param")
|
||||
@ApiModel(value = "AssessWindLoadParamQuery", description = "风电场类负荷参数查询参数")
|
||||
public class AssessWindLoadParamQuery extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "评估用户ID,例:8afaa9a15707483a0157262f8e78077d", required = true)
|
||||
private String assessId;
|
||||
|
||||
@ApiModelProperty(value = "风力发电机名称,例:1号风机", required = true)
|
||||
private String windgeneratorName;
|
||||
|
||||
@ApiModelProperty(value = "闪变系数,例:2.5")
|
||||
private BigDecimal flickerCoeff;
|
||||
|
||||
@ApiModelProperty(value = "短路容量比(S),例:150.00")
|
||||
private BigDecimal s;
|
||||
|
||||
/**
|
||||
* 更新风电场类负荷参数的查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "UpdateAssessWindLoadParamQuery", description = "更新风电场类负荷参数的查询参数")
|
||||
@Data
|
||||
public static class UpdateAssessWindLoadParamQuery extends AssessWindLoadParamQuery {
|
||||
|
||||
@ApiModelProperty(value = "风力发电机ID(更新时必填),例:wg-001", required = true)
|
||||
private String windgeneratorId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_capacitor_param")
|
||||
public class AssessCapacitorParam extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 电容器组ID,例:b2a0ddf21992416f936b572459a3d8f4
|
||||
*/
|
||||
@TableId(value = "capacitor_id",type = IdType.ASSIGN_UUID)
|
||||
private String capacitorId;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 电容器组名称,例:电容器组1
|
||||
*/
|
||||
private String capacitorName;
|
||||
|
||||
/**
|
||||
* 电容器组个数,例:1
|
||||
*/
|
||||
private Integer capacitorNum;
|
||||
|
||||
/**
|
||||
* 单组容量,单位kVar,例:100.00
|
||||
*/
|
||||
private BigDecimal capacitorCapacity;
|
||||
|
||||
/**
|
||||
* 电抗率,单位%:例:5.00
|
||||
*/
|
||||
private BigDecimal capacitorReactance;
|
||||
|
||||
/**
|
||||
* 电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String capacitorScale;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 线缆类型字典
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_cable_type")
|
||||
public class AssessDicCableType extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 线路线缆类型ID 例:3491b6cce56141f1a2a0a79a15b0e91e
|
||||
*/
|
||||
@TableId(value = "linetype_id",type = IdType.ASSIGN_UUID)
|
||||
private String linetypeId;
|
||||
|
||||
/**
|
||||
* 线路线缆名称,例:LGJ-240-35kV
|
||||
*/
|
||||
private String linetypeName;
|
||||
|
||||
/**
|
||||
* 线路线缆类型,例:01-架空线,02-电缆
|
||||
*/
|
||||
private String linetypeType;
|
||||
|
||||
/**
|
||||
* 正序电阻,例:1.6
|
||||
*/
|
||||
private BigDecimal posR1;
|
||||
|
||||
/**
|
||||
* 正序电抗,例:1.6
|
||||
*/
|
||||
private BigDecimal posX1;
|
||||
|
||||
/**
|
||||
* 正序电纳,例:1.6
|
||||
*/
|
||||
private BigDecimal posY1;
|
||||
|
||||
/**
|
||||
* 零序电阻,例:1.6
|
||||
*/
|
||||
private BigDecimal zeroR0;
|
||||
|
||||
/**
|
||||
* 零序电抗,例:1.6
|
||||
*/
|
||||
private BigDecimal zeroX0;
|
||||
|
||||
/**
|
||||
* 零序电纳,例:1.6
|
||||
*/
|
||||
private BigDecimal zeroY0;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 谐波源特性字典
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_harmonic_character")
|
||||
public class AssessDicHarmonicCharacter implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 谐波源特性字典ID,例:d53f0026d2f04c9e9fee6bba8386487a
|
||||
*/
|
||||
@TableId(value = "harm_id",type = IdType.ASSIGN_UUID)
|
||||
private String harmId;
|
||||
|
||||
/**
|
||||
* 谐波源特性名称,例:六脉整流
|
||||
*/
|
||||
private String harmName;
|
||||
|
||||
/**
|
||||
* 2次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 3次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 4次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 5次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 6次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 7次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 8次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 9次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 10次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 11次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 12次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 13次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 14次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 15次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 16次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 17次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 18次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 19次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 20次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 21次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 22次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 23次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 24次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 25次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 26次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 27次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 28次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 29次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 30次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 31次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 32次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 33次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 34次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 35次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 36次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 37次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 38次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 39次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 40次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 41次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 42次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 43次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 44次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 45次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 46次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 47次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 48次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 49次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 50次谐波电流含有率,单位:%,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 冲击负荷字典
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_shock_load")
|
||||
public class AssessDicShockLoad extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 冲击负荷类型ID, 例:d19c10178eeb4da2bca1df18a050524d
|
||||
*/
|
||||
@TableId(value = "INPACTLOADTYPE_ID",type = IdType.ASSIGN_UUID)
|
||||
private String inpactloadtypeId;
|
||||
|
||||
/**
|
||||
* 冲击负荷类型名称,例:电机
|
||||
*/
|
||||
private String inpactloadtypeName;
|
||||
|
||||
/**
|
||||
* 冲击负荷启动方式 例:直接启动
|
||||
*/
|
||||
private String inpactloadStartup;
|
||||
|
||||
/**
|
||||
* 冲击负荷启动容量倍数, 例:4
|
||||
*/
|
||||
private BigDecimal inpactloadMultiple;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 变压器参数字典
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_dic_transformer")
|
||||
public class AssessDicTransformer extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 变压器类型ID,例:f401fa4abb71402bb5e9528209ea219e
|
||||
*/
|
||||
@TableId(value = "transtype_id",type = IdType.ASSIGN_UUID)
|
||||
private String transtypeId;
|
||||
|
||||
/**
|
||||
* 变压器类型名称,例:110kV
|
||||
*/
|
||||
private String transtypeName;
|
||||
|
||||
/**
|
||||
* 额定容量,单位kVA 例:10
|
||||
*/
|
||||
private BigDecimal transCapa;
|
||||
|
||||
/**
|
||||
* 高压侧电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String transhighScale;
|
||||
|
||||
/**
|
||||
* 低压侧电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String translowScale;
|
||||
|
||||
/**
|
||||
* 联结组标号,例:0.33
|
||||
*/
|
||||
private BigDecimal trnasNo;
|
||||
|
||||
/**
|
||||
* 空载损耗,单位:kW例:2.42
|
||||
*/
|
||||
private BigDecimal noloadLoss;
|
||||
|
||||
/**
|
||||
* 负载损耗,单位:kW例:2.42
|
||||
*/
|
||||
private BigDecimal loadLoss;
|
||||
|
||||
/**
|
||||
* 空载电流,单位:% 例:2.42
|
||||
*/
|
||||
private BigDecimal noloadCur;
|
||||
|
||||
/**
|
||||
* 短路阻抗,单位:% 例:2.42
|
||||
*/
|
||||
private BigDecimal shortCircuitImpedance;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户负荷参数表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_load_param")
|
||||
public class AssessLoadParam extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户负荷ID,例:759b793da37548d8b865efdc7f461304
|
||||
*/
|
||||
@TableId(value = "load_id",type = IdType.ASSIGN_UUID)
|
||||
private String loadId;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 用户负荷名称,例:1号炼钢炉
|
||||
*/
|
||||
private String loadName;
|
||||
|
||||
/**
|
||||
* 电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String linevoltageScale;
|
||||
|
||||
/**
|
||||
* 进线容量,单位kVA,例:200.00
|
||||
*/
|
||||
private BigDecimal transhighCapacity;
|
||||
|
||||
/**
|
||||
* 配电变压器阻抗,单位%:例:5.00
|
||||
*/
|
||||
private BigDecimal transImpedance;
|
||||
|
||||
/**
|
||||
* 谐波源特性字典ID,从字典表中获取。例:d53f0026d2f04c9e9fee6bba8386487a
|
||||
*/
|
||||
private String harmId;
|
||||
|
||||
/**
|
||||
* 电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String translowScale;
|
||||
|
||||
/**
|
||||
* 非线性负荷功率,单位kW:例:150
|
||||
*/
|
||||
private BigDecimal nonlinearloadPower;
|
||||
|
||||
/**
|
||||
* 功率因数 例:0.90
|
||||
*/
|
||||
private BigDecimal powerFactor;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 允许值表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_overlimit")
|
||||
public class AssessOverlimit extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
@TableId(value = "assess_id",type = IdType.ASSIGN_UUID)
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 奇次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal vodd;
|
||||
|
||||
/**
|
||||
* 偶次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal vevent;
|
||||
|
||||
/**
|
||||
* 2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
/**
|
||||
* 电压波动,例:0.51
|
||||
*/
|
||||
private BigDecimal fluc;
|
||||
|
||||
/**
|
||||
* 电压偏差上限,例:1.15
|
||||
*/
|
||||
private BigDecimal dltavUp;
|
||||
|
||||
/**
|
||||
* 电压偏差下限,例:1.15
|
||||
*/
|
||||
private BigDecimal dltavDown;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡,例:1.7
|
||||
*/
|
||||
private BigDecimal unblance;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,623 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_result")
|
||||
public class AssessResult extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
@TableId(value = "assess_id",type = IdType.ASSIGN_UUID)
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 生成结果时间,例:2024-07-17 18:00:00
|
||||
*/
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
/**
|
||||
* 电容器未投入2次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v2;
|
||||
|
||||
/**
|
||||
* 电容器未投入3次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v3;
|
||||
|
||||
/**
|
||||
* 电容器未投入4次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v4;
|
||||
|
||||
/**
|
||||
* 电容器未投入5次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v5;
|
||||
|
||||
/**
|
||||
* 电容器未投入6次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v6;
|
||||
|
||||
/**
|
||||
* 电容器未投入7次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/**
|
||||
* 电容器未投入8次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v8;
|
||||
|
||||
/**
|
||||
* 电容器未投入9次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v9;
|
||||
|
||||
/**
|
||||
* 电容器未投入10次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v10;
|
||||
|
||||
/**
|
||||
* 电容器未投入11次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v11;
|
||||
|
||||
/**
|
||||
* 电容器未投入12次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v12;
|
||||
|
||||
/**
|
||||
* 电容器未投入13次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v13;
|
||||
|
||||
/**
|
||||
* 电容器未投入14次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v14;
|
||||
|
||||
/**
|
||||
* 电容器未投入15次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v15;
|
||||
|
||||
/**
|
||||
* 电容器未投入16次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v16;
|
||||
|
||||
/**
|
||||
* 电容器未投入17次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v17;
|
||||
|
||||
/**
|
||||
* 电容器未投入18次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v18;
|
||||
|
||||
/**
|
||||
* 电容器未投入19次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v19;
|
||||
|
||||
/**
|
||||
* 电容器未投入20次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v20;
|
||||
|
||||
/**
|
||||
* 电容器未投入21次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v21;
|
||||
|
||||
/**
|
||||
* 电容器未投入22次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v22;
|
||||
|
||||
/**
|
||||
* 电容器未投入23次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v23;
|
||||
|
||||
/**
|
||||
* 电容器未投入24次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v24;
|
||||
|
||||
/**
|
||||
* 电容器未投入25次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v25;
|
||||
|
||||
/**
|
||||
* 电容器未投入26次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v26;
|
||||
|
||||
/**
|
||||
* 电容器未投入27次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v27;
|
||||
|
||||
/**
|
||||
* 电容器未投入28次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v28;
|
||||
|
||||
/**
|
||||
* 电容器未投入29次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v29;
|
||||
|
||||
/**
|
||||
* 电容器未投入30次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v30;
|
||||
|
||||
/**
|
||||
* 电容器未投入31次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v31;
|
||||
|
||||
/**
|
||||
* 电容器未投入32次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v32;
|
||||
|
||||
/**
|
||||
* 电容器未投入33次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v33;
|
||||
|
||||
/**
|
||||
* 电容器未投入34次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v34;
|
||||
|
||||
/**
|
||||
* 电容器未投入35次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v35;
|
||||
|
||||
/**
|
||||
* 电容器未投入36次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v36;
|
||||
|
||||
/**
|
||||
* 电容器未投入37次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v37;
|
||||
|
||||
/**
|
||||
* 电容器未投入38次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v38;
|
||||
|
||||
/**
|
||||
* 电容器未投入39次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v39;
|
||||
|
||||
/**
|
||||
* 电容器未投入40次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v40;
|
||||
|
||||
/**
|
||||
* 电容器未投入41次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v41;
|
||||
|
||||
/**
|
||||
* 电容器未投入42次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v42;
|
||||
|
||||
/**
|
||||
* 电容器未投入43次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v43;
|
||||
|
||||
/**
|
||||
* 电容器未投入44次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v44;
|
||||
|
||||
/**
|
||||
* 电容器未投入45次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v45;
|
||||
|
||||
/**
|
||||
* 电容器未投入46次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v46;
|
||||
|
||||
/**
|
||||
* 电容器未投入47次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v47;
|
||||
|
||||
/**
|
||||
* 电容器未投入48次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v48;
|
||||
|
||||
/**
|
||||
* 电容器未投入49次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v49;
|
||||
|
||||
/**
|
||||
* 电容器未投入50次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v50;
|
||||
|
||||
/**
|
||||
* 电容器未投入2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 电容器未投入3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 电容器未投入4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 电容器未投入5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 电容器未投入6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 电容器未投入7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 电容器未投入8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 电容器未投入9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 电容器未投入10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 电容器未投入11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 电容器未投入12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 电容器未投入13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 电容器未投入14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 电容器未投入15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 电容器未投入16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 电容器未投入17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 电容器未投入18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 电容器未投入19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 电容器未投入20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 电容器未投入21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 电容器未投入22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 电容器未投入23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 电容器未投入24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 电容器未投入25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 电容器未投入26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 电容器未投入27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 电容器未投入28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 电容器未投入29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 电容器未投入30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 电容器未投入31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 电容器未投入32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 电容器未投入33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 电容器未投入34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 电容器未投入35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 电容器未投入36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 电容器未投入37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 电容器未投入38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 电容器未投入39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 电容器未投入40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 电容器未投入41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 电容器未投入42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 电容器未投入43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 电容器未投入44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 电容器未投入45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 电容器未投入46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 电容器未投入47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 电容器未投入48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 电容器未投入49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 电容器未投入50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
/**
|
||||
* 电压波动近似计算结果,例:0.51
|
||||
*/
|
||||
private BigDecimal approFluc;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_h_100_DELTAV")
|
||||
private BigDecimal capOnH100Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_h_60_DELTAV")
|
||||
private BigDecimal capOnH60Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_h_0_DELTAV")
|
||||
private BigDecimal capOnH0Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_h_100_DELTAV")
|
||||
private BigDecimal capOffH100Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_h_60_DELTAV")
|
||||
private BigDecimal capOffH60Deltav;
|
||||
|
||||
/**
|
||||
* 电网高峰电容器未投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_h_0_DELTAV")
|
||||
private BigDecimal capOffH0Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_l_100_DELTAV")
|
||||
private BigDecimal capOnL100Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_l_60_DELTAV")
|
||||
private BigDecimal capOnL60Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_ON_l_0_DELTAV")
|
||||
private BigDecimal capOnL0Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入100%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_l_100_DELTAV")
|
||||
private BigDecimal capOffL100Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入60%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_l_60_DELTAV")
|
||||
private BigDecimal capOffL60Deltav;
|
||||
|
||||
/**
|
||||
* 电网低谷电容器未投入0%出力电压偏差,例:1.15
|
||||
*/
|
||||
@TableField(value = "CAP_OFF_l_0_DELTAV")
|
||||
private BigDecimal capOffL0Deltav;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡一般估算结果,例:1.7
|
||||
*/
|
||||
private BigDecimal approUnblance;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡严格估算结果,例:1.7
|
||||
*/
|
||||
private BigDecimal accurUnblance;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,535 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果附加表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_result_addition")
|
||||
public class AssessResultAddition extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
@TableId(value = "assess_id",type = IdType.ASSIGN_UUID)
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 生成结果时间,例:2024-07-17 18:00:00
|
||||
*/
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
/**
|
||||
* 电容器投入2次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v2;
|
||||
|
||||
/**
|
||||
* 电容器投入3次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v3;
|
||||
|
||||
/**
|
||||
* 电容器投入4次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v4;
|
||||
|
||||
/**
|
||||
* 电容器投入5次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v5;
|
||||
|
||||
/**
|
||||
* 电容器投入6次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v6;
|
||||
|
||||
/**
|
||||
* 电容器投入7次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/**
|
||||
* 电容器投入8次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v8;
|
||||
|
||||
/**
|
||||
* 电容器投入9次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v9;
|
||||
|
||||
/**
|
||||
* 电容器投入10次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v10;
|
||||
|
||||
/**
|
||||
* 电容器投入11次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v11;
|
||||
|
||||
/**
|
||||
* 电容器投入12次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v12;
|
||||
|
||||
/**
|
||||
* 电容器投入13次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v13;
|
||||
|
||||
/**
|
||||
* 电容器投入14次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v14;
|
||||
|
||||
/**
|
||||
* 电容器投入15次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v15;
|
||||
|
||||
/**
|
||||
* 电容器投入16次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v16;
|
||||
|
||||
/**
|
||||
* 电容器投入17次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v17;
|
||||
|
||||
/**
|
||||
* 电容器投入18次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v18;
|
||||
|
||||
/**
|
||||
* 电容器投入19次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v19;
|
||||
|
||||
/**
|
||||
* 电容器投入20次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v20;
|
||||
|
||||
/**
|
||||
* 电容器投入21次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v21;
|
||||
|
||||
/**
|
||||
* 电容器投入22次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v22;
|
||||
|
||||
/**
|
||||
* 电容器投入23次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v23;
|
||||
|
||||
/**
|
||||
* 电容器投入24次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v24;
|
||||
|
||||
/**
|
||||
* 电容器投入25次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v25;
|
||||
|
||||
/**
|
||||
* 电容器投入26次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v26;
|
||||
|
||||
/**
|
||||
* 电容器投入27次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v27;
|
||||
|
||||
/**
|
||||
* 电容器投入28次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v28;
|
||||
|
||||
/**
|
||||
* 电容器投入29次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v29;
|
||||
|
||||
/**
|
||||
* 电容器投入30次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v30;
|
||||
|
||||
/**
|
||||
* 电容器投入31次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v31;
|
||||
|
||||
/**
|
||||
* 电容器投入32次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v32;
|
||||
|
||||
/**
|
||||
* 电容器投入33次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v33;
|
||||
|
||||
/**
|
||||
* 电容器投入34次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v34;
|
||||
|
||||
/**
|
||||
* 电容器投入35次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v35;
|
||||
|
||||
/**
|
||||
* 电容器投入36次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v36;
|
||||
|
||||
/**
|
||||
* 电容器投入37次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v37;
|
||||
|
||||
/**
|
||||
* 电容器投入38次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v38;
|
||||
|
||||
/**
|
||||
* 电容器投入39次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v39;
|
||||
|
||||
/**
|
||||
* 电容器投入40次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v40;
|
||||
|
||||
/**
|
||||
* 电容器投入41次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v41;
|
||||
|
||||
/**
|
||||
* 电容器投入42次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v42;
|
||||
|
||||
/**
|
||||
* 电容器投入43次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v43;
|
||||
|
||||
/**
|
||||
* 电容器投入44次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v44;
|
||||
|
||||
/**
|
||||
* 电容器投入45次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v45;
|
||||
|
||||
/**
|
||||
* 电容器投入46次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v46;
|
||||
|
||||
/**
|
||||
* 电容器投入47次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v47;
|
||||
|
||||
/**
|
||||
* 电容器投入48次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v48;
|
||||
|
||||
/**
|
||||
* 电容器投入49次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v49;
|
||||
|
||||
/**
|
||||
* 电容器投入50次谐波电压,例:1.6
|
||||
*/
|
||||
private BigDecimal v50;
|
||||
|
||||
/**
|
||||
* 电容器投入2次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i2;
|
||||
|
||||
/**
|
||||
* 电容器投入3次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i3;
|
||||
|
||||
/**
|
||||
* 电容器投入4次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i4;
|
||||
|
||||
/**
|
||||
* 电容器投入5次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i5;
|
||||
|
||||
/**
|
||||
* 电容器投入6次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i6;
|
||||
|
||||
/**
|
||||
* 电容器投入7次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i7;
|
||||
|
||||
/**
|
||||
* 电容器投入8次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i8;
|
||||
|
||||
/**
|
||||
* 电容器投入9次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i9;
|
||||
|
||||
/**
|
||||
* 电容器投入10次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i10;
|
||||
|
||||
/**
|
||||
* 电容器投入11次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i11;
|
||||
|
||||
/**
|
||||
* 电容器投入12次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i12;
|
||||
|
||||
/**
|
||||
* 电容器投入13次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i13;
|
||||
|
||||
/**
|
||||
* 电容器投入14次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i14;
|
||||
|
||||
/**
|
||||
* 电容器投入15次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i15;
|
||||
|
||||
/**
|
||||
* 电容器投入16次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i16;
|
||||
|
||||
/**
|
||||
* 电容器投入17次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i17;
|
||||
|
||||
/**
|
||||
* 电容器投入18次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i18;
|
||||
|
||||
/**
|
||||
* 电容器投入19次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i19;
|
||||
|
||||
/**
|
||||
* 电容器投入20次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i20;
|
||||
|
||||
/**
|
||||
* 电容器投入21次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i21;
|
||||
|
||||
/**
|
||||
* 电容器投入22次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i22;
|
||||
|
||||
/**
|
||||
* 电容器投入23次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i23;
|
||||
|
||||
/**
|
||||
* 电容器投入24次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i24;
|
||||
|
||||
/**
|
||||
* 电容器投入25次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i25;
|
||||
|
||||
/**
|
||||
* 电容器投入26次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i26;
|
||||
|
||||
/**
|
||||
* 电容器投入27次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i27;
|
||||
|
||||
/**
|
||||
* 电容器投入28次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i28;
|
||||
|
||||
/**
|
||||
* 电容器投入29次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i29;
|
||||
|
||||
/**
|
||||
* 电容器投入30次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i30;
|
||||
|
||||
/**
|
||||
* 电容器投入31次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i31;
|
||||
|
||||
/**
|
||||
* 电容器投入32次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i32;
|
||||
|
||||
/**
|
||||
* 电容器投入33次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i33;
|
||||
|
||||
/**
|
||||
* 电容器投入34次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i34;
|
||||
|
||||
/**
|
||||
* 电容器投入35次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i35;
|
||||
|
||||
/**
|
||||
* 电容器投入36次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i36;
|
||||
|
||||
/**
|
||||
* 电容器投入37次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i37;
|
||||
|
||||
/**
|
||||
* 电容器投入38次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i38;
|
||||
|
||||
/**
|
||||
* 电容器投入39次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i39;
|
||||
|
||||
/**
|
||||
* 电容器投入40次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i40;
|
||||
|
||||
/**
|
||||
* 电容器投入41次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i41;
|
||||
|
||||
/**
|
||||
* 电容器投入42次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i42;
|
||||
|
||||
/**
|
||||
* 电容器投入43次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i43;
|
||||
|
||||
/**
|
||||
* 电容器投入44次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i44;
|
||||
|
||||
/**
|
||||
* 电容器投入45次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i45;
|
||||
|
||||
/**
|
||||
* 电容器投入46次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i46;
|
||||
|
||||
/**
|
||||
* 电容器投入47次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i47;
|
||||
|
||||
/**
|
||||
* 电容器投入48次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i48;
|
||||
|
||||
/**
|
||||
* 电容器投入49次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i49;
|
||||
|
||||
/**
|
||||
* 电容器投入50次谐波电流,例:1.6
|
||||
*/
|
||||
private BigDecimal i50;
|
||||
|
||||
/**
|
||||
* 长时电压闪变,例:0.8
|
||||
*/
|
||||
private BigDecimal plt;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户冲击负荷参数表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_shock_load_param")
|
||||
public class AssessShockLoadParam extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 冲击负荷ID,例:ffd5b663906648ad90811a4fcf108fec
|
||||
*/
|
||||
@TableId(value = "inpactload_id",type = IdType.ASSIGN_UUID)
|
||||
private String inpactloadId;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 冲击负荷类型ID,从字典表查出 例:d19c10178eeb4da2bca1df18a050524d
|
||||
*/
|
||||
private String inpactloadtypeId;
|
||||
|
||||
/**
|
||||
* 冲击负荷容量,单位:MVA例:100.00
|
||||
*/
|
||||
private BigDecimal inpactloadPower;
|
||||
|
||||
/**
|
||||
* 冲击负荷个数 例:1
|
||||
*/
|
||||
private BigDecimal inpactloadNum;
|
||||
|
||||
/**
|
||||
* 冲击负荷高压侧电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String inpactloadhighScale;
|
||||
|
||||
/**
|
||||
* 是否隔离变,例:00-否 01-是
|
||||
*/
|
||||
private String isIsolationtrans;
|
||||
|
||||
/**
|
||||
* 隔离变阻抗,单位:% 例:5.00
|
||||
*/
|
||||
private BigDecimal isolationtransImpedance;
|
||||
|
||||
/**
|
||||
* 冲击负荷低压侧电压等级,例:22。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String inpactloadlowScale;
|
||||
|
||||
/**
|
||||
* 负荷频度,例:01。01-N≤4次/d 02-N>4次/d且N≤2次/h,03-2次/h<N≤10次/h。
|
||||
*/
|
||||
private String inpactloadFreq;
|
||||
|
||||
/**
|
||||
* 闪变叠加系数 例:5.00
|
||||
*/
|
||||
private BigDecimal flickerCoeff;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal inpactloadMultiple;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_transformer_param")
|
||||
public class AssessTransformerParam extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 变压器ID,例:8ead7dfa8fc0495a890fef2c847e4fea
|
||||
*/
|
||||
@TableId(value = "trans_id",type = IdType.ASSIGN_UUID)
|
||||
private String transId;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
private String assessId;
|
||||
|
||||
/**
|
||||
* 变压器名称,例:10kV配网变压器
|
||||
*/
|
||||
private String transName;
|
||||
|
||||
/**
|
||||
* 变压器类型ID,从字典表中获得,例:f401fa4abb71402bb5e9528209ea219e
|
||||
*/
|
||||
private String transtypeId;
|
||||
|
||||
/**
|
||||
* 变压器个数,例:1
|
||||
*/
|
||||
private Integer transNum;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_user")
|
||||
public class AssessUser extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 评估用户ID,例:8afaa9a15707483a0157262f8e78077d
|
||||
*/
|
||||
@TableId(value = "assess_id",type = IdType.ASSIGN_UUID)
|
||||
private String assessId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 评估用户名称
|
||||
*/
|
||||
private String assessName;
|
||||
|
||||
/**
|
||||
* 所属部门名称,例:南京市供电公司
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 用户协议容量,单位MVA,例:10.00
|
||||
*/
|
||||
private BigDecimal agreedCapacity;
|
||||
|
||||
/**
|
||||
* 用户电压等级,例:32。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String userScale;
|
||||
|
||||
/**
|
||||
* 是否包含电容器,例:00-不包含电容器 01-包含电容器
|
||||
*/
|
||||
private String withCapacitor;
|
||||
|
||||
/**
|
||||
* 用户负荷类型,例: 01-风电场,02-光伏 03-其他
|
||||
*/
|
||||
private String isWindfarm;
|
||||
|
||||
/**
|
||||
* 变电站ID:例:0012030456
|
||||
*/
|
||||
private String powerstationId;
|
||||
|
||||
/**
|
||||
* 变电站名称:例:110kV南站变
|
||||
*/
|
||||
private String powerstationName;
|
||||
|
||||
/**
|
||||
* 电压等级,例:32。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String powerstationScale;
|
||||
|
||||
/**
|
||||
* 母线ID:例:0012030456
|
||||
*/
|
||||
private String busId;
|
||||
|
||||
/**
|
||||
* 母线名称:例:35kV I段母线
|
||||
*/
|
||||
private String busName;
|
||||
|
||||
/**
|
||||
* 母线电压等级,例:32。与PMS3.0内电压等级编码保持一致。
|
||||
*/
|
||||
private String busScale;
|
||||
|
||||
/**
|
||||
* 线路ID:例:0012030456
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 线路名称:例:35kV 南站一线
|
||||
*/
|
||||
private String lineName;
|
||||
|
||||
/**
|
||||
* 线路名称:例:35kV 南站一线
|
||||
*/
|
||||
private String lineScale;
|
||||
|
||||
/**
|
||||
* 供电设备容量,单位MVA,例:100.00
|
||||
*/
|
||||
private BigDecimal powersupplyCapacity;
|
||||
|
||||
/**
|
||||
* 最小短路容量,单位MVA,例:150.00
|
||||
*/
|
||||
private BigDecimal minshortcircuitCapacity;
|
||||
|
||||
/**
|
||||
* 线路线缆类型ID:字典表获取 例:3491b6cce56141f1a2a0a79a15b0e91e
|
||||
*/
|
||||
private String linetypeId;
|
||||
|
||||
/**
|
||||
* PCC电电网电阻,例:200.00
|
||||
*/
|
||||
private BigDecimal lineGridresistance;
|
||||
|
||||
/**
|
||||
* PCC电电网电抗,例:200.00
|
||||
*/
|
||||
private BigDecimal lineGridreactance;
|
||||
|
||||
/**
|
||||
* 线路长度,单位公里,例:200.00
|
||||
*/
|
||||
private BigDecimal lineLen;
|
||||
|
||||
/**
|
||||
* 线路回路数,例:1
|
||||
*/
|
||||
private BigDecimal lineNum;
|
||||
|
||||
/**
|
||||
* 有功容量 风电场装机容量 光伏电站装机容量 企业负荷计算功率 单位MW,例:200.00
|
||||
*/
|
||||
private BigDecimal windfarmCapacity;
|
||||
|
||||
/**
|
||||
* 是否为单相负荷, 例:00-否 01-是
|
||||
*/
|
||||
private String singleLoad;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.advance.pojo.po.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 风电场类负荷参数表
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("assess_wind_load_param")
|
||||
public class AssessWindLoadParam extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(value = "windgenerator_id",type = IdType.ASSIGN_UUID)
|
||||
private String windgeneratorId;
|
||||
|
||||
private String assessId;
|
||||
|
||||
private String windgeneratorName;
|
||||
|
||||
private BigDecimal flickerCoeff;
|
||||
|
||||
private BigDecimal s;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.njcn.advance.pojo.vo.assess;
|
||||
|
||||
import com.njcn.advance.pojo.po.assess.AssessUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2025/8/20 17:22
|
||||
*/
|
||||
@Data
|
||||
public class AssessResultVO {
|
||||
|
||||
private AssessUser user;
|
||||
|
||||
/**
|
||||
* 电压波动结果
|
||||
*/
|
||||
private EvaluationResult fluc;
|
||||
|
||||
/**
|
||||
* 闪变评估结果
|
||||
*/
|
||||
private EvaluationResult plt;
|
||||
|
||||
/**
|
||||
* 无功设备不运行
|
||||
*/
|
||||
private List<Useless> capOff;
|
||||
|
||||
/**
|
||||
* 无功设备全运行
|
||||
*/
|
||||
private List<Useless> capOn;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡
|
||||
*/
|
||||
private List<EvaluationResult> unblance;
|
||||
|
||||
|
||||
/**
|
||||
* 谐波电压评估结果
|
||||
*/
|
||||
private List<Harm> harmV;
|
||||
|
||||
/**
|
||||
* 谐波电流评估结果
|
||||
*/
|
||||
private List<Harm> harmI;
|
||||
|
||||
@Data
|
||||
public static class EvaluationResult {
|
||||
|
||||
@ApiModelProperty("冲击负荷个数")
|
||||
private Integer inPactLoadNum;
|
||||
|
||||
@ApiModelProperty("值")
|
||||
private BigDecimal data;
|
||||
|
||||
@ApiModelProperty("国标限值")
|
||||
private BigDecimal limitData;
|
||||
|
||||
@ApiModelProperty("判断")
|
||||
private Boolean isQualified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户无功设备不运行
|
||||
*/
|
||||
@Data
|
||||
public static class Useless {
|
||||
|
||||
@ApiModelProperty("百分比")
|
||||
private BigDecimal percent;
|
||||
|
||||
@ApiModelProperty("有名值")
|
||||
private BigDecimal voltagePercent;
|
||||
|
||||
@ApiModelProperty("电压上偏差限值")
|
||||
private BigDecimal capUP;
|
||||
|
||||
@ApiModelProperty("电压下偏差限值")
|
||||
private BigDecimal capDown;
|
||||
|
||||
@ApiModelProperty("判断")
|
||||
private Boolean isQualified;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Harm {
|
||||
|
||||
@ApiModelProperty("未投入")
|
||||
private BigDecimal notInvested;
|
||||
|
||||
@ApiModelProperty("已投入")
|
||||
private BigDecimal hasInvested;
|
||||
|
||||
@ApiModelProperty("限值")
|
||||
private BigDecimal limitData;
|
||||
|
||||
@ApiModelProperty("未投入判断")
|
||||
private Boolean isNotQualified;
|
||||
|
||||
@ApiModelProperty("已投入判断")
|
||||
private Boolean isHasQualified;
|
||||
|
||||
@ApiModelProperty("判断")
|
||||
private Boolean isQualified;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.advance.utils;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/12/10 14:51【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public class CheckStringUtil {
|
||||
public static void checkName(String name) {
|
||||
Pattern pattern = Pattern.compile(PatternRegex.SPECIALCHARACTER);
|
||||
if(pattern.matcher(name).find()){
|
||||
throw new BusinessException(ValidMessage.NAME_SPECIAL_REGEX);
|
||||
}
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// checkName("100迈岭站2djvjva13ad");
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -378,7 +379,50 @@ public class EasyExcelUtil {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<Map<Integer, String>> maps = EasyExcelUtil.syncRead("C:\\Users\\无名\\Desktop\\11.xlsx");
|
||||
List<Map<Integer, String>> maps = EasyExcelUtil.syncRead("C:\\Users\\无名\\Desktop\\excel\\工作表.xlsx");
|
||||
|
||||
System.out.println(maps);
|
||||
List<Map<Integer, String>> maps1 = maps.subList(2, 51);
|
||||
List<Map<Integer, String>> maps2 = maps.subList(51, 52);
|
||||
List<Map<Integer, String>> maps3 = maps.subList(55, 104);
|
||||
List<Map<Integer, String>> maps4 = maps.subList(104, 105);
|
||||
List<Double> iMax = maps1.stream().map(temp -> {
|
||||
double a = Double.valueOf(temp.get(5));
|
||||
double b = Double.valueOf(temp.get(10));
|
||||
double c = Double.valueOf(temp.get(15));
|
||||
double v = a > b ? a : b;
|
||||
double max = v > c ? v : c;
|
||||
return max;
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
Double iNeg = maps2.stream().map(temp -> {
|
||||
double a = Double.valueOf(temp.get(5));
|
||||
double b = Double.valueOf(temp.get(10));
|
||||
double c = Double.valueOf(temp.get(15));
|
||||
double v = a > b ? a : b;
|
||||
double max = v > c ? v : c;
|
||||
return max;
|
||||
|
||||
}).findFirst().get();
|
||||
|
||||
List<Double> uMax = maps3.stream().map(temp -> {
|
||||
double a = Double.valueOf(temp.get(5));
|
||||
double b = Double.valueOf(temp.get(10));
|
||||
double c = Double.valueOf(temp.get(15));
|
||||
double v = a > b ? a : b;
|
||||
double max = v > c ? v : c;
|
||||
return max;
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
Double unbalance = maps2.stream().map(temp -> {
|
||||
double a = Double.valueOf(temp.get(5));
|
||||
double b = Double.valueOf(temp.get(10));
|
||||
double c = Double.valueOf(temp.get(15));
|
||||
double v = a > b ? a : b;
|
||||
double max = v > c ? v : c;
|
||||
return max;
|
||||
|
||||
}).findFirst().get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
package com.njcn.advance.utils;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
||||
import org.apache.poi.xssf.usermodel.XSSFColor;
|
||||
import org.apache.poi.xssf.usermodel.XSSFFont;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ExcelTemplateReplacer {
|
||||
|
||||
// 用于包装替换值和样式启用状态的类
|
||||
public static class ReplacementData {
|
||||
private Object value;
|
||||
private boolean enableStyle;
|
||||
|
||||
public ReplacementData(Object value, boolean enableStyle) {
|
||||
this.value = value;
|
||||
this.enableStyle = enableStyle;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public boolean isEnableStyle() {
|
||||
return enableStyle;
|
||||
}
|
||||
|
||||
// 便捷的创建方法
|
||||
public static ReplacementData create(Object value, boolean enableStyle) {
|
||||
return new ReplacementData(value, enableStyle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换Excel模板中的占位符,支持设置是否启用样式
|
||||
*
|
||||
* @param templatePath 模板文件路径
|
||||
* @param outputPath 输出文件路径
|
||||
* @param data 替换数据,包含值和样式启用状态
|
||||
* @param fixedStyle 固定样式配置
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public static void replaceTemplate(String templatePath, String outputPath,
|
||||
Map<String, ReplacementData> data, CellStyleConfig fixedStyle)
|
||||
throws IOException {
|
||||
try (InputStream is = new FileInputStream(templatePath);
|
||||
Workbook workbook = new XSSFWorkbook(is)) {
|
||||
// 创建固定样式
|
||||
CellStyle style = createFixedStyle(workbook, fixedStyle);
|
||||
for (Sheet sheet : workbook) {
|
||||
for (Row row : sheet) {
|
||||
if (row == null) continue;
|
||||
for (Cell cell : row) {
|
||||
if (cell == null) continue;
|
||||
|
||||
String cellValue = getCellValue(cell);
|
||||
if (cellValue != null && !cellValue.isEmpty()) {
|
||||
for (Map.Entry<String, ReplacementData> entry : data.entrySet()) {
|
||||
String placeholder = entry.getKey();
|
||||
ReplacementData replacement = entry.getValue();
|
||||
|
||||
if (cellValue.contains(placeholder)) {
|
||||
// 替换占位符内容
|
||||
setCellValue(cell, replacement.getValue());
|
||||
|
||||
// 根据标志决定是否应用样式
|
||||
if (replacement.isEnableStyle() && style != null) {
|
||||
cell.setCellStyle(style);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 写入输出文件
|
||||
try (OutputStream os = new FileOutputStream(outputPath)) {
|
||||
workbook.write(os);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void replaceDownTemplate(String templatePath,
|
||||
String fileName,
|
||||
Map<String, ReplacementData> data,
|
||||
CellStyleConfig fixedStyle,
|
||||
HttpServletResponse response)
|
||||
throws IOException {
|
||||
try (InputStream is = new ClassPathResource(templatePath).getInputStream();
|
||||
Workbook workbook = new XSSFWorkbook(is)) {
|
||||
// 创建固定样式
|
||||
CellStyle style = createFixedStyle(workbook, fixedStyle);
|
||||
for (Sheet sheet : workbook) {
|
||||
for (Row row : sheet) {
|
||||
if (row == null) continue;
|
||||
for (Cell cell : row) {
|
||||
if (cell == null) continue;
|
||||
|
||||
String cellValue = getCellValue(cell);
|
||||
if (cellValue != null && !cellValue.isEmpty()) {
|
||||
for (Map.Entry<String, ReplacementData> entry : data.entrySet()) {
|
||||
String placeholder = entry.getKey();
|
||||
ReplacementData replacement = entry.getValue();
|
||||
|
||||
if (cellValue.contains(placeholder)) {
|
||||
// 替换占位符内容
|
||||
setCellValue(cell, replacement.getValue());
|
||||
|
||||
// 根据标志决定是否应用样式
|
||||
if (replacement.isEnableStyle() && style != null) {
|
||||
cell.setCellStyle(style);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 写入输出文件
|
||||
try {
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("评估结果异常" + e);
|
||||
} finally {
|
||||
if (workbook != null) {
|
||||
workbook.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建固定样式
|
||||
*/
|
||||
private static CellStyle createFixedStyle(Workbook workbook, CellStyleConfig config) {
|
||||
if (config == null) return null;
|
||||
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
|
||||
// 设置背景颜色
|
||||
if (config.getBackgroundColor() != null) {
|
||||
if (config.getBackgroundColor() instanceof XSSFColor) {
|
||||
((XSSFCellStyle) style).setFillForegroundColor((XSSFColor) config.getBackgroundColor());
|
||||
} else if (config.getBackgroundColor() instanceof Short) {
|
||||
style.setFillForegroundColor((Short) config.getBackgroundColor());
|
||||
}
|
||||
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
}
|
||||
// 可以添加更多固定样式设置,如边框、对齐方式等
|
||||
style.setBorderBottom(BorderStyle.THIN);
|
||||
style.setBorderTop(BorderStyle.THIN);
|
||||
style.setBorderLeft(BorderStyle.THIN);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
// 设置字体颜色
|
||||
if (config.getFontColor() != null) {
|
||||
Font font = workbook.getFontAt((short)0);
|
||||
if (config.getFontColor() instanceof XSSFColor) {
|
||||
((XSSFFont) font).setColor((XSSFColor) config.getFontColor());
|
||||
} else if (config.getFontColor() instanceof Short) {
|
||||
font.setColor((Short) config.getFontColor());
|
||||
}
|
||||
font.setFontHeightInPoints((short)10);
|
||||
font.setBold(true);
|
||||
font.setItalic(true);
|
||||
font.setUnderline(Font.U_SINGLE_ACCOUNTING);
|
||||
style.setFont(font);
|
||||
style.setAlignment(HorizontalAlignment.RIGHT);
|
||||
}else{
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单元格的值
|
||||
*/
|
||||
private static String getCellValue(Cell cell) {
|
||||
if (cell == null) return "";
|
||||
|
||||
switch (cell.getCellType()) {
|
||||
case STRING:
|
||||
return cell.getStringCellValue();
|
||||
case NUMERIC:
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
return cell.getDateCellValue().toString();
|
||||
}
|
||||
return String.valueOf(cell.getNumericCellValue());
|
||||
case BOOLEAN:
|
||||
return String.valueOf(cell.getBooleanCellValue());
|
||||
case FORMULA:
|
||||
return cell.getCellFormula();
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置单元格的值
|
||||
*/
|
||||
private static void setCellValue(Cell cell, Object value) {
|
||||
// 自动判断类型
|
||||
if (value instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(((BigDecimal) value).doubleValue());
|
||||
} else if (value instanceof Number) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(((Number) value).doubleValue());
|
||||
} else if (value instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue((Boolean) value);
|
||||
} else {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(value.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// 单元格样式配置类
|
||||
@Data
|
||||
public static class CellStyleConfig {
|
||||
private Object backgroundColor; // 支持Short(索引色)或XSSFColor(自定义色)
|
||||
private Object fontColor; // 支持Short(索引色)或XSSFColor(自定义色)
|
||||
private short fontSize; // 支持Short(索引色)或XSSFColor(自定义色)
|
||||
|
||||
public CellStyleConfig(Object backgroundColor, Object fontColor, short fontSize) {
|
||||
this.backgroundColor = backgroundColor;
|
||||
this.fontColor = fontColor;
|
||||
this.fontSize = fontSize;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
// 准备替换数据,第三个参数为样式启用标志:true启用,false不启用
|
||||
Map<String, ReplacementData> data = new HashMap<>();
|
||||
data.put("${name}", ReplacementData.create("2024-10-25", true)); // 不启用样式
|
||||
data.put("${noti2}", ReplacementData.create(30.35, true)); // 启用样式
|
||||
data.put("${age}", ReplacementData.create(30, true)); // 启用样式
|
||||
|
||||
// 执行替换
|
||||
replaceTemplate("C:\\Users\\web2023\\Desktop\\xf.xlsx", "C:\\Users\\web2023\\Desktop\\cc.xlsx", data, getCellStyleConfig());
|
||||
System.out.println("Excel模板替换完成!");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义固定样式:浅蓝色背景,黑色字体
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static CellStyleConfig getCellStyleConfig() {
|
||||
XSSFColor lightBlue = new XSSFColor(new java.awt.Color(166, 165, 165), null);
|
||||
CellStyleConfig fixedStyle = new CellStyleConfig(
|
||||
lightBlue,
|
||||
IndexedColors.BLACK.getIndex(),
|
||||
(short)10
|
||||
);
|
||||
return fixedStyle;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.njcn.advance.utils;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@Component
|
||||
public class InstantiateUtil<E> {
|
||||
private static final Logger logger= LoggerFactory.getLogger(InstantiateUtil.class);
|
||||
|
||||
|
||||
public byte[] instantiate(E e) {
|
||||
if (e == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
|
||||
objectOutputStream.writeObject(e);
|
||||
objectOutputStream.close();
|
||||
return byteArrayOutputStream.toByteArray();
|
||||
|
||||
} catch (IOException e1) {
|
||||
logger.error("发生异常,"+e1.getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public <E> E deInstantiate(byte[] bytes) {
|
||||
if (bytes == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
|
||||
try {
|
||||
ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
|
||||
try {
|
||||
return (E) objectInputStream.readObject();
|
||||
} catch (ClassNotFoundException e) {
|
||||
logger.error("发生异常,"+e.getMessage());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.error("发生异常,"+e.getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String stringInstantiate(E e) { //序列化对象的byte[]数组转为字符串(包装类可不调用)
|
||||
byte[] bytes = instantiate(e);
|
||||
|
||||
if (bytes != null && bytes.length>0 ) {
|
||||
return Base64.encode(bytes);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public byte[] stringDeInstantiate(String str) { //stringInstantiate方法还原为byte[]数组
|
||||
if (!StringUtils.isEmpty(str)) {
|
||||
return Base64.decode(str);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,11 @@
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>harmonic-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>advance-api</artifactId>
|
||||
@@ -79,6 +83,21 @@
|
||||
<version>5.5.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--暂降原因所需的依赖-->
|
||||
<!-- Apache Commons Math for FFT and mathematical functions -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-math3</artifactId>
|
||||
<version>3.6.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- EJML for matrix operations and SVD -->
|
||||
<dependency>
|
||||
<groupId>org.ejml</groupId>
|
||||
<artifactId>ejml-simple</artifactId>
|
||||
<version>0.41</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -97,6 +116,7 @@
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>*.dll</include>
|
||||
<include>*.xlsx</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.advance.controller;
|
||||
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
import com.njcn.advance.event.service.IEventAdvanceService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2025/7/30 10:38
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/eventAdvance")
|
||||
@Api(tags = "暂降高级分析")
|
||||
@RequiredArgsConstructor
|
||||
public class EventCauseController extends BaseController {
|
||||
|
||||
private final IEventAdvanceService eventAdvanceService;
|
||||
|
||||
@PostMapping(value = "/analysisCauseAndType")
|
||||
@ApiOperation("分析暂降事件的原因和类型")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
public HttpResult<EventAnalysisDTO> analysisCauseAndType(@RequestBody EventAnalysisDTO eventAnalysis) {
|
||||
String methodDescribe = getMethodDescribe("analysisCauseAndType");
|
||||
eventAnalysis = eventAdvanceService.analysisCauseAndType(eventAnalysis);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventAnalysis, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.njcn.advance.pojo.po.PqsRelevanceLog;
|
||||
import com.njcn.advance.service.EventRelevantAnalysisService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -14,17 +15,20 @@ import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailAssPO;
|
||||
import com.njcn.event.pojo.vo.AdvanceEventDetailVO;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.Api;
|
||||
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.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -33,11 +37,11 @@ import java.util.Map;
|
||||
* @author cdf
|
||||
* @date 2023/6/30
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("process")
|
||||
@Api(tags = "暂降事件关联分析")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class EventRelevantAnalysisController extends BaseController {
|
||||
|
||||
private final EventRelevantAnalysisService eventRelevantAnalysisService;
|
||||
@@ -78,6 +82,11 @@ public class EventRelevantAnalysisController extends BaseController {
|
||||
@ApiOperation("事件波形分析主列表")
|
||||
public HttpResult<Page<RmpEventDetailAssPO>> queryEventsAssPage(@RequestBody BaseParam baseParam){
|
||||
String methodDescribe = getMethodDescribe("queryEventsAssPage");
|
||||
String searchValue = baseParam.getSearchValue();
|
||||
Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
|
||||
if(pattern.matcher(searchValue).find()){
|
||||
throw new BusinessException(ValidMessage.SPECIAL_REGEX);
|
||||
}
|
||||
Page<RmpEventDetailAssPO> page = eventRelevantAnalysisService.queryEventsAssPage(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
@@ -188,4 +197,12 @@ public class EventRelevantAnalysisController extends BaseController {
|
||||
boolean flag = eventRelevantAnalysisService.delRelevantLog(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessCapacitorParamQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessCapacitorParam;
|
||||
import com.njcn.advance.service.assess.IAssessCapacitorParamService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估电容器参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessCapacitorParam")
|
||||
@Api(tags = "评估电容器参数管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessCapacitorParamController extends BaseController {
|
||||
|
||||
private final IAssessCapacitorParamService assessCapacitorParamService;
|
||||
|
||||
@ApiOperation("获取评估电容器参数列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessCapacitorParam>> list(@RequestBody AssessCapacitorParamQuery query) {
|
||||
LambdaQueryWrapper<AssessCapacitorParam> wrapper = Wrappers.<AssessCapacitorParam>lambdaQuery()
|
||||
.like(query.getAssessId() != null, AssessCapacitorParam::getAssessId, query.getAssessId())
|
||||
.like(query.getCapacitorName() != null, AssessCapacitorParam::getCapacitorName, query.getCapacitorName())
|
||||
.eq(query.getCapacitorScale() != null, AssessCapacitorParam::getCapacitorScale, query.getCapacitorScale());
|
||||
List<AssessCapacitorParam> list = assessCapacitorParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询评估电容器参数")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessCapacitorParam>> page(@RequestBody AssessCapacitorParamQuery query) {
|
||||
Page<AssessCapacitorParam> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessCapacitorParam> wrapper = Wrappers.<AssessCapacitorParam>lambdaQuery()
|
||||
.like(query.getAssessId() != null, AssessCapacitorParam::getAssessId, query.getAssessId())
|
||||
.like(query.getCapacitorName() != null, AssessCapacitorParam::getCapacitorName, query.getCapacitorName())
|
||||
.eq(query.getCapacitorScale() != null, AssessCapacitorParam::getCapacitorScale, query.getCapacitorScale());
|
||||
Page<AssessCapacitorParam> pageData = assessCapacitorParamService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取评估电容器参数详情")
|
||||
@ApiImplicitParam(name = "capacitorId", value = "电容器组ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessCapacitorParam> getInfo(@RequestParam("capacitorId") String capacitorId) {
|
||||
AssessCapacitorParam param = assessCapacitorParamService.getByCapacitorId(capacitorId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增评估电容器参数")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessCapacitorParamQuery param) {
|
||||
boolean result = assessCapacitorParamService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改评估电容器参数")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessCapacitorParamQuery.UpdateAssessCapacitorParamQuery updateQuery) {
|
||||
assessCapacitorParamService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除评估电容器参数")
|
||||
@ApiImplicitParam(name = "capacitorId", value = "电容器组ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> capacitorId) {
|
||||
boolean result = assessCapacitorParamService.removeByIds(capacitorId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据评估用户ID查询电容器参数")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/listByAssessId")
|
||||
public HttpResult<List<AssessCapacitorParam>> listByAssessId(@RequestParam("assessId") String assessId) {
|
||||
List<AssessCapacitorParam> list = assessCapacitorParamService.listByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据电压等级查询电容器参数")
|
||||
@ApiImplicitParam(name = "capacitorScale", value = "电压等级(与PMS3.0编码一致)", type = "String")
|
||||
@GetMapping("/listByScale")
|
||||
public HttpResult<List<AssessCapacitorParam>> listByScale(@RequestParam(required = false) String capacitorScale) {
|
||||
LambdaQueryWrapper<AssessCapacitorParam> wrapper = Wrappers.<AssessCapacitorParam>lambdaQuery()
|
||||
.eq(capacitorScale != null, AssessCapacitorParam::getCapacitorScale, capacitorScale);
|
||||
List<AssessCapacitorParam> list = assessCapacitorParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessDicCableTypeQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicCableType;
|
||||
import com.njcn.advance.service.assess.IAssessDicCableTypeService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 线缆类型字典 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessDicCableType")
|
||||
@Api(tags = "线缆类型字典管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessDicCableTypeController extends BaseController {
|
||||
|
||||
private final IAssessDicCableTypeService assessDicCableTypeService;
|
||||
|
||||
@ApiOperation("获取线缆类型字典列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessDicCableType>> list(@RequestBody AssessDicCableTypeQuery query) {
|
||||
LambdaQueryWrapper<AssessDicCableType> wrapper = Wrappers.<AssessDicCableType>lambdaQuery()
|
||||
.like(query.getLinetypeName() != null, AssessDicCableType::getLinetypeName, query.getLinetypeName())
|
||||
.eq(query.getLinetypeType() != null, AssessDicCableType::getLinetypeType, query.getLinetypeType());
|
||||
List<AssessDicCableType> list = assessDicCableTypeService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询线缆类型字典")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessDicCableType>> page(@RequestBody AssessDicCableTypeQuery query) {
|
||||
Page<AssessDicCableType> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessDicCableType> wrapper = Wrappers.<AssessDicCableType>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(query.getSearchValue()), AssessDicCableType::getLinetypeName, query.getSearchValue())
|
||||
.eq(StrUtil.isNotBlank(query.getLinetypeType()), AssessDicCableType::getLinetypeType, query.getLinetypeType());
|
||||
Page<AssessDicCableType> pageData = assessDicCableTypeService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据类型ID获取线缆类型字典详情")
|
||||
@ApiImplicitParam(name = "linetypeId", value = "线路线缆类型ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessDicCableType> getInfo(@RequestParam("linetypeId") String linetypeId) {
|
||||
AssessDicCableType param = assessDicCableTypeService.getByLinetypeId(linetypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增线缆类型字典")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessDicCableTypeQuery param) {
|
||||
boolean result = assessDicCableTypeService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改线缆类型字典")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessDicCableTypeQuery.UpdateAssessDicCableTypeQuery updateQuery) {
|
||||
assessDicCableTypeService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除线缆类型字典")
|
||||
@ApiImplicitParam(name = "linetypeId", value = "线路线缆类型ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> linetypeId) {
|
||||
boolean result = assessDicCableTypeService.removeByIds(linetypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据线缆类型查询字典")
|
||||
@ApiImplicitParam(name = "linetypeType", value = "线路线缆类型(01-架空线,02-电缆)", required = true, type = "String")
|
||||
@GetMapping("/listByType")
|
||||
public HttpResult<List<AssessDicCableType>> listByType(@RequestParam("linetypeType") String linetypeType) {
|
||||
List<AssessDicCableType> list = assessDicCableTypeService.listByType(linetypeType);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessDicHarmonicCharacterQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicHarmonicCharacter;
|
||||
import com.njcn.advance.service.assess.IAssessDicHarmonicCharacterService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 谐波源特性字典 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessDicHarmonicCharacter")
|
||||
@Api(tags = "谐波源特性字典管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessDicHarmonicCharacterController extends BaseController {
|
||||
|
||||
private final IAssessDicHarmonicCharacterService assessDicHarmonicCharacterService;
|
||||
|
||||
@ApiOperation("获取谐波源特性字典列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessDicHarmonicCharacter>> list(@RequestBody AssessDicHarmonicCharacterQuery query) {
|
||||
LambdaQueryWrapper<AssessDicHarmonicCharacter> wrapper = Wrappers.<AssessDicHarmonicCharacter>lambdaQuery()
|
||||
.like(query.getHarmName() != null, AssessDicHarmonicCharacter::getHarmName, query.getHarmName());
|
||||
List<AssessDicHarmonicCharacter> list = assessDicHarmonicCharacterService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询谐波源特性字典")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessDicHarmonicCharacter>> page(@RequestBody AssessDicHarmonicCharacterQuery query) {
|
||||
Page<AssessDicHarmonicCharacter> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessDicHarmonicCharacter> wrapper = Wrappers.<AssessDicHarmonicCharacter>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(query.getSearchValue()), AssessDicHarmonicCharacter::getHarmName, query.getSearchValue());
|
||||
Page<AssessDicHarmonicCharacter> pageData = assessDicHarmonicCharacterService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取谐波源特性字典详情")
|
||||
@ApiImplicitParam(name = "harmId", value = "谐波源特性字典ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessDicHarmonicCharacter> getInfo(@RequestParam("harmId") String harmId) {
|
||||
AssessDicHarmonicCharacter param = assessDicHarmonicCharacterService.getByHarmId(harmId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增谐波源特性字典")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessDicHarmonicCharacterQuery param) {
|
||||
boolean result = assessDicHarmonicCharacterService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改谐波源特性字典")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessDicHarmonicCharacterQuery.UpdateAssessDicHarmonicCharacterQuery param) {
|
||||
assessDicHarmonicCharacterService.update(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除谐波源特性字典")
|
||||
@ApiImplicitParam(name = "harmId", value = "谐波源特性字典ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> harmId) {
|
||||
boolean result = assessDicHarmonicCharacterService.removeByIds(harmId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据谐波源特性名称查询")
|
||||
@ApiImplicitParam(name = "harmName", value = "谐波源特性名称", type = "String")
|
||||
@GetMapping("/listByName")
|
||||
public HttpResult<List<AssessDicHarmonicCharacter>> listByName(@RequestParam(required = false) String harmName) {
|
||||
LambdaQueryWrapper<AssessDicHarmonicCharacter> wrapper = Wrappers.<AssessDicHarmonicCharacter>lambdaQuery()
|
||||
.like(harmName != null, AssessDicHarmonicCharacter::getHarmName, harmName);
|
||||
List<AssessDicHarmonicCharacter> list = assessDicHarmonicCharacterService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessDicShockLoadQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicShockLoad;
|
||||
import com.njcn.advance.service.assess.IAssessDicShockLoadService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 冲击负荷字典 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessDicShockLoad")
|
||||
@Api(tags = "冲击负荷字典管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessDicShockLoadController extends BaseController {
|
||||
|
||||
private final IAssessDicShockLoadService assessDicShockLoadService;
|
||||
|
||||
@ApiOperation("获取冲击负荷字典列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessDicShockLoad>> list(@RequestBody AssessDicShockLoadQuery query) {
|
||||
LambdaQueryWrapper<AssessDicShockLoad> wrapper = Wrappers.<AssessDicShockLoad>lambdaQuery()
|
||||
.like(query.getInpactloadtypeName() != null, AssessDicShockLoad::getInpactloadtypeName, query.getInpactloadtypeName())
|
||||
.eq(query.getInpactloadStartup() != null, AssessDicShockLoad::getInpactloadStartup, query.getInpactloadStartup());
|
||||
List<AssessDicShockLoad> list = assessDicShockLoadService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询冲击负荷字典")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessDicShockLoad>> page(@RequestBody AssessDicShockLoadQuery query) {
|
||||
Page<AssessDicShockLoad> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessDicShockLoad> wrapper = Wrappers.<AssessDicShockLoad>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(query.getSearchValue()), AssessDicShockLoad::getInpactloadtypeName, query.getSearchValue())
|
||||
.eq(StrUtil.isNotBlank(query.getInpactloadStartup()), AssessDicShockLoad::getInpactloadStartup, query.getInpactloadStartup());
|
||||
Page<AssessDicShockLoad> pageData = assessDicShockLoadService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据类型ID获取冲击负荷字典详情")
|
||||
@ApiImplicitParam(name = "inpactloadtypeId", value = "冲击负荷类型ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessDicShockLoad> getInfo(@RequestParam("inpactloadtypeId") String inpactloadtypeId) {
|
||||
AssessDicShockLoad param = assessDicShockLoadService.getByInpactloadtypeId(inpactloadtypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增冲击负荷字典")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessDicShockLoadQuery param) {
|
||||
boolean result = assessDicShockLoadService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改冲击负荷字典")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessDicShockLoadQuery.UpdateAssessDicShockLoadQuery updateQuery) {
|
||||
assessDicShockLoadService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除冲击负荷字典")
|
||||
@ApiImplicitParam(name = "inpactloadtypeId", value = "冲击负荷类型ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> inpactloadtypeId) {
|
||||
boolean result = assessDicShockLoadService.removeByIds(inpactloadtypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据启动方式查询冲击负荷字典")
|
||||
@ApiImplicitParam(name = "inpactloadStartup", value = "冲击负荷启动方式", type = "String")
|
||||
@GetMapping("/listByStartup")
|
||||
public HttpResult<List<AssessDicShockLoad>> listByStartup(@RequestParam(required = false) String inpactloadStartup) {
|
||||
LambdaQueryWrapper<AssessDicShockLoad> wrapper = Wrappers.<AssessDicShockLoad>lambdaQuery()
|
||||
.eq(inpactloadStartup != null, AssessDicShockLoad::getInpactloadStartup, inpactloadStartup);
|
||||
List<AssessDicShockLoad> list = assessDicShockLoadService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessDicTransformerQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicTransformer;
|
||||
import com.njcn.advance.service.assess.IAssessDicTransformerService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 变压器参数字典 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessDicTransformer")
|
||||
@Api(tags = "变压器参数字典管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessDicTransformerController extends BaseController {
|
||||
|
||||
private final IAssessDicTransformerService assessDicTransformerService;
|
||||
|
||||
@ApiOperation("获取变压器参数字典列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessDicTransformer>> list(@RequestBody AssessDicTransformerQuery query) {
|
||||
LambdaQueryWrapper<AssessDicTransformer> wrapper = Wrappers.<AssessDicTransformer>lambdaQuery()
|
||||
.like(query.getTranstypeName() != null, AssessDicTransformer::getTranstypeName, query.getTranstypeName())
|
||||
.eq(query.getTranshighScale() != null, AssessDicTransformer::getTranshighScale, query.getTranshighScale())
|
||||
.eq(query.getTranslowScale() != null, AssessDicTransformer::getTranslowScale, query.getTranslowScale());
|
||||
List<AssessDicTransformer> list = assessDicTransformerService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询变压器参数字典")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessDicTransformer>> page(@RequestBody AssessDicTransformerQuery query) {
|
||||
Page<AssessDicTransformer> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessDicTransformer> wrapper = Wrappers.<AssessDicTransformer>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(query.getSearchValue()), AssessDicTransformer::getTranstypeName, query.getSearchValue())
|
||||
.orderByDesc(AssessDicTransformer::getCreateTime);
|
||||
Page<AssessDicTransformer> pageData = assessDicTransformerService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据类型ID获取变压器参数详情")
|
||||
@ApiImplicitParam(name = "transtypeId", value = "变压器类型ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessDicTransformer> getInfo(@RequestParam("transtypeId") String transtypeId) {
|
||||
AssessDicTransformer param = assessDicTransformerService.getByTranstypeId(transtypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增变压器参数字典")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessDicTransformerQuery param) {
|
||||
boolean result = assessDicTransformerService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改变压器参数字典")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessDicTransformerQuery.UpdateAssessDicTransformerQuery updateQuery) {
|
||||
assessDicTransformerService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除变压器参数字典")
|
||||
@ApiImplicitParam(name = "transtypeId", value = "变压器类型ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> transtypeId) {
|
||||
boolean result = assessDicTransformerService.removeByIds(transtypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据电压等级查询变压器参数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "transhighScale", value = "高压侧电压等级", type = "String"),
|
||||
@ApiImplicitParam(name = "translowScale", value = "低压侧电压等级", type = "String")
|
||||
})
|
||||
@GetMapping("/listByVoltage")
|
||||
public HttpResult<List<AssessDicTransformer>> listByVoltage(
|
||||
@RequestParam(required = false) String transhighScale,
|
||||
@RequestParam(required = false) String translowScale) {
|
||||
LambdaQueryWrapper<AssessDicTransformer> wrapper = Wrappers.<AssessDicTransformer>lambdaQuery()
|
||||
.eq(transhighScale != null, AssessDicTransformer::getTranshighScale, transhighScale)
|
||||
.eq(translowScale != null, AssessDicTransformer::getTranslowScale, translowScale);
|
||||
List<AssessDicTransformer> list = assessDicTransformerService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessLoadParamQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessLoadParam;
|
||||
import com.njcn.advance.service.assess.IAssessLoadParamService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户负荷参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessLoadParam")
|
||||
@Api(tags = "评估用户负荷参数管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessLoadParamController extends BaseController {
|
||||
|
||||
private final IAssessLoadParamService assessLoadParamService;
|
||||
|
||||
@ApiOperation("获取评估用户负荷参数列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessLoadParam>> list(@RequestBody AssessLoadParamQuery assessLoadParamQuery) {
|
||||
LambdaQueryWrapper<AssessLoadParam> wrapper = Wrappers.<AssessLoadParam>lambdaQuery()
|
||||
.like(assessLoadParamQuery.getLoadName() != null, AssessLoadParam::getLoadName, assessLoadParamQuery.getLoadName())
|
||||
.eq(assessLoadParamQuery.getAssessId() != null, AssessLoadParam::getAssessId, assessLoadParamQuery.getAssessId());
|
||||
List<AssessLoadParam> list = assessLoadParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询评估用户负荷参数")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessLoadParam>> page(@RequestBody AssessLoadParamQuery assessLoadParamQuery) {
|
||||
Page<AssessLoadParam> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(assessLoadParamQuery),
|
||||
PageFactory.getPageSize(assessLoadParamQuery)
|
||||
);
|
||||
LambdaQueryWrapper<AssessLoadParam> wrapper = Wrappers.<AssessLoadParam>lambdaQuery()
|
||||
.like(assessLoadParamQuery.getLoadName() != null, AssessLoadParam::getLoadName, assessLoadParamQuery.getLoadName())
|
||||
.eq(assessLoadParamQuery.getAssessId() != null, AssessLoadParam::getAssessId, assessLoadParamQuery.getAssessId());
|
||||
Page<AssessLoadParam> pageData = assessLoadParamService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取评估用户负荷参数详情")
|
||||
@ApiImplicitParam(name = "loadId", value = "用户负荷ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessLoadParam> getInfo(@RequestParam("loadId") String loadId) {
|
||||
AssessLoadParam assessLoadParam = assessLoadParamService.getByLoadId(loadId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), assessLoadParam,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增评估用户负荷参数")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessLoadParamQuery assessLoadParam) {
|
||||
boolean result = assessLoadParamService.add(assessLoadParam);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改评估用户负荷参数")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessLoadParamQuery.UpdateAssessLoadParamQuery updateQuery) {
|
||||
assessLoadParamService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除评估用户负荷参数")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> loadId) {
|
||||
boolean result = assessLoadParamService.removeByIds(loadId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据评估用户ID查询负荷参数")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/listByAssessId")
|
||||
public HttpResult<List<AssessLoadParam>> listByAssessId(@RequestParam("assessId") String assessId) {
|
||||
List<AssessLoadParam> list = assessLoadParamService.listByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 允许值表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessOverlimit")
|
||||
public class AssessOverlimitController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果附加表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessResultAddition")
|
||||
public class AssessResultAdditionController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评测结果表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessResult")
|
||||
public class AssessResultController extends BaseController {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessShockLoadParamQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessShockLoadParam;
|
||||
import com.njcn.advance.service.assess.IAssessShockLoadParamService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估用户冲击负荷参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessShockLoadParam")
|
||||
@Api(tags = "评估用户冲击负荷参数管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessShockLoadParamController extends BaseController {
|
||||
|
||||
private final IAssessShockLoadParamService assessShockLoadParamService;
|
||||
|
||||
@ApiOperation("获取评估用户冲击负荷参数列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessShockLoadParam>> list(@RequestBody AssessShockLoadParamQuery query) {
|
||||
LambdaQueryWrapper<AssessShockLoadParam> wrapper = Wrappers.<AssessShockLoadParam>lambdaQuery()
|
||||
.like(query.getAssessId() != null, AssessShockLoadParam::getAssessId, query.getAssessId())
|
||||
.eq(query.getInpactloadtypeId() != null, AssessShockLoadParam::getInpactloadtypeId, query.getInpactloadtypeId())
|
||||
.like(query.getInpactloadhighScale() != null, AssessShockLoadParam::getInpactloadhighScale, query.getInpactloadhighScale());
|
||||
List<AssessShockLoadParam> list = assessShockLoadParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询评估用户冲击负荷参数")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessShockLoadParam>> page(@RequestBody AssessShockLoadParamQuery query) {
|
||||
Page<AssessShockLoadParam> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessShockLoadParam> wrapper = Wrappers.<AssessShockLoadParam>lambdaQuery()
|
||||
.like(query.getAssessId() != null, AssessShockLoadParam::getAssessId, query.getAssessId())
|
||||
.eq(query.getInpactloadtypeId() != null, AssessShockLoadParam::getInpactloadtypeId, query.getInpactloadtypeId())
|
||||
.like(query.getInpactloadhighScale() != null, AssessShockLoadParam::getInpactloadhighScale, query.getInpactloadhighScale());
|
||||
Page<AssessShockLoadParam> pageData = assessShockLoadParamService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取评估用户冲击负荷参数详情")
|
||||
@ApiImplicitParam(name = "inpactloadId", value = "冲击负荷ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessShockLoadParam> getInfo(@RequestParam("inpactloadId") String inpactloadId) {
|
||||
AssessShockLoadParam param = assessShockLoadParamService.getByInpactloadId(inpactloadId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增评估用户冲击负荷参数")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessShockLoadParamQuery param) {
|
||||
boolean result = assessShockLoadParamService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改评估用户冲击负荷参数")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessShockLoadParamQuery.UpdateAssessShockLoadParamQuery updateQuery) {
|
||||
assessShockLoadParamService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除评估用户冲击负荷参数")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> inpactloadId) {
|
||||
boolean result = assessShockLoadParamService.removeByIds(inpactloadId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据评估用户ID查询冲击负荷参数")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/listByAssessId")
|
||||
public HttpResult<List<AssessShockLoadParam>> listByAssessId(@RequestParam("assessId") String assessId) {
|
||||
List<AssessShockLoadParam> list = assessShockLoadParamService.listByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据冲击负荷类型ID查询参数")
|
||||
@ApiImplicitParam(name = "inpactloadtypeId", value = "冲击负荷类型ID", required = true, type = "String")
|
||||
@GetMapping("/listByTypeId")
|
||||
public HttpResult<List<AssessShockLoadParam>> listByTypeId(@RequestParam("inpactloadtypeId") String inpactloadtypeId) {
|
||||
List<AssessShockLoadParam> list = assessShockLoadParamService.listByTypeId(inpactloadtypeId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessTransformerParamQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessTransformerParam;
|
||||
import com.njcn.advance.service.assess.IAssessTransformerParamService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评估变压器参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessTransformerParam")
|
||||
@Api(tags = "评估变压器参数管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessTransformerParamController extends BaseController {
|
||||
|
||||
private final IAssessTransformerParamService assessTransformerParamService;
|
||||
|
||||
@ApiOperation("获取评估变压器参数列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessTransformerParam>> list(@RequestBody AssessTransformerParamQuery query) {
|
||||
LambdaQueryWrapper<AssessTransformerParam> wrapper = Wrappers.<AssessTransformerParam>lambdaQuery()
|
||||
.like(query.getTransName() != null, AssessTransformerParam::getTransName, query.getTransName())
|
||||
.eq(query.getAssessId() != null, AssessTransformerParam::getAssessId, query.getAssessId())
|
||||
.eq(query.getTranstypeId() != null, AssessTransformerParam::getTranstypeId, query.getTranstypeId());
|
||||
List<AssessTransformerParam> list = assessTransformerParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询评估变压器参数")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessTransformerParam>> page(@RequestBody AssessTransformerParamQuery query) {
|
||||
Page<AssessTransformerParam> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessTransformerParam> wrapper = Wrappers.<AssessTransformerParam>lambdaQuery()
|
||||
.like(query.getTransName() != null, AssessTransformerParam::getTransName, query.getTransName())
|
||||
.eq(query.getAssessId() != null, AssessTransformerParam::getAssessId, query.getAssessId())
|
||||
.eq(query.getTranstypeId() != null, AssessTransformerParam::getTranstypeId, query.getTranstypeId());
|
||||
Page<AssessTransformerParam> pageData = assessTransformerParamService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取评估变压器参数详情")
|
||||
@ApiImplicitParam(name = "transId", value = "变压器ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessTransformerParam> getInfo(@RequestParam("transId") String transId) {
|
||||
AssessTransformerParam param = assessTransformerParamService.getByTransId(transId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增评估变压器参数")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessTransformerParamQuery param) {
|
||||
boolean result = assessTransformerParamService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改评估变压器参数")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessTransformerParamQuery.UpdateAssessTransformerParamQuery updateQuery) {
|
||||
assessTransformerParamService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除评估变压器参数")
|
||||
@ApiImplicitParam(name = "transId", value = "变压器ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> transId) {
|
||||
boolean result = assessTransformerParamService.removeByIds(transId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据评估用户ID查询变压器参数")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/listByAssessId")
|
||||
public HttpResult<List<AssessTransformerParam>> listByAssessId(@RequestParam("assessId") String assessId) {
|
||||
List<AssessTransformerParam> list = assessTransformerParamService.listByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessUserQuery;
|
||||
import com.njcn.advance.pojo.po.assess.*;
|
||||
import com.njcn.advance.service.assess.*;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
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 com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessUser")
|
||||
@Api(tags = "评估用户管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessUserController extends BaseController {
|
||||
|
||||
private final IAssessUserService assessUserService;
|
||||
private final IAssessTransformerParamService transformerParamService;
|
||||
private final IAssessCapacitorParamService capacitorParamService;
|
||||
private final IAssessWindLoadParamService windLoadParamService;
|
||||
private final IAssessLoadParamService loadParamService;
|
||||
private final IAssessShockLoadParamService shockLoadParamService;
|
||||
|
||||
|
||||
@ApiOperation("获取评估用户列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessUser>> list(@RequestBody AssessUserQuery assessUserQuery) {
|
||||
LambdaQueryWrapper<AssessUser> wrapper = Wrappers.<AssessUser>lambdaQuery()
|
||||
.like(assessUserQuery.getDeptName() != null, AssessUser::getDeptName, assessUserQuery.getDeptName())
|
||||
.like(assessUserQuery.getUserScale() != null, AssessUser::getUserScale, assessUserQuery.getUserScale());
|
||||
List<AssessUser> list = assessUserService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list, CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询评估用户")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessUser>> page(@RequestBody AssessUserQuery assessUserQuery) {
|
||||
Page<AssessUser> pageData = assessUserService.page(assessUserQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData, CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取评估用户详情")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessUser> getInfo(@RequestParam("assessId") String assessId) {
|
||||
AssessUser assessUser = assessUserService.getByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), assessUser, CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增评估用户")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<String> add(@RequestBody @Validated AssessUserQuery assessUser) {
|
||||
String result = assessUserService.add(assessUser);
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result, CommonResponseEnum.SUCCESS.getMessage());
|
||||
} else {
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.FAIL.getCode(), null, CommonResponseEnum.FAIL.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改评估用户")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessUserQuery.UpdateAssessUserQuery updateAssessUserQuery) {
|
||||
assessUserService.update(updateAssessUserQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true, CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("批量删除评估用户")
|
||||
@ApiImplicitParam(name = "assessIds", value = "评估用户ID列表,用逗号分隔", required = true, type = "String")
|
||||
@PostMapping("/batchDel")
|
||||
public HttpResult<Boolean> batchDelete(@RequestBody List<String> assessIds) {
|
||||
boolean result = false;
|
||||
if (CollUtil.isNotEmpty(assessIds)) {
|
||||
transformerParamService.remove(new LambdaQueryWrapper<AssessTransformerParam>().in(AssessTransformerParam::getAssessId, assessIds));
|
||||
capacitorParamService.remove(new LambdaQueryWrapper<AssessCapacitorParam>().in(AssessCapacitorParam::getAssessId, assessIds));
|
||||
windLoadParamService.remove(new LambdaQueryWrapper<AssessWindLoadParam>().in(AssessWindLoadParam::getAssessId, assessIds));
|
||||
loadParamService.remove(new LambdaQueryWrapper<AssessLoadParam>().in(AssessLoadParam::getAssessId, assessIds));
|
||||
shockLoadParamService.remove(new LambdaQueryWrapper<AssessShockLoadParam>().in(AssessShockLoadParam::getAssessId, assessIds));
|
||||
result = assessUserService.removeByIds(assessIds);
|
||||
}
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result, CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.advance.pojo.param.assess.AssessWindLoadParamQuery;
|
||||
import com.njcn.advance.pojo.po.assess.AssessWindLoadParam;
|
||||
import com.njcn.advance.service.assess.IAssessWindLoadParamService;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 风电场类负荷参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/assessWindLoadParam")
|
||||
@Api(tags = "风电场类负荷参数管理")
|
||||
@RequiredArgsConstructor
|
||||
public class AssessWindLoadParamController extends BaseController {
|
||||
|
||||
private final IAssessWindLoadParamService assessWindLoadParamService;
|
||||
|
||||
@ApiOperation("获取风电场类负荷参数列表")
|
||||
@PostMapping("/list")
|
||||
public HttpResult<List<AssessWindLoadParam>> list(@RequestBody AssessWindLoadParamQuery query) {
|
||||
LambdaQueryWrapper<AssessWindLoadParam> wrapper = Wrappers.<AssessWindLoadParam>lambdaQuery()
|
||||
.like(query.getWindgeneratorName() != null, AssessWindLoadParam::getWindgeneratorName, query.getWindgeneratorName())
|
||||
.eq(query.getAssessId() != null, AssessWindLoadParam::getAssessId, query.getAssessId());
|
||||
List<AssessWindLoadParam> list = assessWindLoadParamService.list(wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询风电场类负荷参数")
|
||||
@PostMapping("/page")
|
||||
public HttpResult<Page<AssessWindLoadParam>> page(@RequestBody AssessWindLoadParamQuery query) {
|
||||
Page<AssessWindLoadParam> pageParam = new Page<>(
|
||||
PageFactory.getPageNum(query),
|
||||
PageFactory.getPageSize(query)
|
||||
);
|
||||
LambdaQueryWrapper<AssessWindLoadParam> wrapper = Wrappers.<AssessWindLoadParam>lambdaQuery()
|
||||
.like(query.getWindgeneratorName() != null, AssessWindLoadParam::getWindgeneratorName, query.getWindgeneratorName())
|
||||
.eq(query.getAssessId() != null, AssessWindLoadParam::getAssessId, query.getAssessId());
|
||||
Page<AssessWindLoadParam> pageData = assessWindLoadParamService.page(pageParam, wrapper);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), pageData,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID获取风电场类负荷参数详情")
|
||||
@ApiImplicitParam(name = "windgeneratorId", value = "风力发电机ID", required = true, type = "String")
|
||||
@GetMapping("/getInfo")
|
||||
public HttpResult<AssessWindLoadParam> getInfo(@RequestParam("windgeneratorId") String windgeneratorId) {
|
||||
AssessWindLoadParam param = assessWindLoadParamService.getByWindgeneratorId(windgeneratorId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), param,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("新增风电场类负荷参数")
|
||||
@PostMapping("/add")
|
||||
public HttpResult<Boolean> add(@RequestBody @Validated AssessWindLoadParamQuery param) {
|
||||
boolean result = assessWindLoadParamService.add(param);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("修改风电场类负荷参数")
|
||||
@PostMapping("/edit")
|
||||
public HttpResult<Boolean> edit(@RequestBody @Validated AssessWindLoadParamQuery.UpdateAssessWindLoadParamQuery updateQuery) {
|
||||
assessWindLoadParamService.update(updateQuery);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), true,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("删除风电场类负荷参数")
|
||||
@ApiImplicitParam(name = "windgeneratorId", value = "风力发电机ID", required = true, type = "String")
|
||||
@PostMapping("/delete")
|
||||
public HttpResult<Boolean> delete(@RequestBody List<String> windgeneratorId) {
|
||||
boolean result = assessWindLoadParamService.removeByIds(windgeneratorId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), result,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
|
||||
@ApiOperation("根据评估用户ID查询风电场负荷参数")
|
||||
@ApiImplicitParam(name = "assessId", value = "评估用户ID", required = true, type = "String")
|
||||
@GetMapping("/listByAssessId")
|
||||
public HttpResult<List<AssessWindLoadParam>> listByAssessId(@RequestParam("assessId") String assessId) {
|
||||
List<AssessWindLoadParam> list = assessWindLoadParamService.listByAssessId(assessId);
|
||||
return HttpResultUtil.assembleResult(CommonResponseEnum.SUCCESS.getCode(), list,
|
||||
CommonResponseEnum.SUCCESS.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.njcn.advance.controller.assess;
|
||||
|
||||
import com.njcn.advance.pojo.dto.assess.AssessTreeDTO;
|
||||
import com.njcn.advance.pojo.param.assess.AssessParam;
|
||||
import com.njcn.advance.pojo.vo.assess.AssessResultVO;
|
||||
import com.njcn.advance.service.assess.SecondaryEvaluationService;
|
||||
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.param.StatisticsBizBaseParam;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2025/06/06 下午 2:43【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("secondaryEvaluation")
|
||||
@Api(tags = "二级评估")
|
||||
@RequiredArgsConstructor
|
||||
public class SecondaryEvaluationController extends BaseController {
|
||||
|
||||
private final SecondaryEvaluationService secondaryEvaluationService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/evaluation")
|
||||
@ApiOperation("导入数据计算评估结果")
|
||||
public HttpResult<Boolean> evaluation(@RequestParam("assessId") String assessId,
|
||||
@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file) {
|
||||
String methodDescribe = getMethodDescribe("evaluation");
|
||||
AssessParam param=new AssessParam();
|
||||
param.setAssessId(assessId);
|
||||
secondaryEvaluationService.evaluation(param, file);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/lineEvaluation")
|
||||
@ApiOperation("监测点数据计算评估结果")
|
||||
public HttpResult<Boolean> lineEvaluation(@RequestBody AssessParam param) {
|
||||
String methodDescribe = getMethodDescribe("lineEvaluation");
|
||||
secondaryEvaluationService.evaluation(param, null);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/evaluationTree")
|
||||
@ApiOperation("评估树")
|
||||
public HttpResult<List<AssessTreeDTO>> evaluationTree(@RequestParam("deptId") String deptId) {
|
||||
String methodDescribe = getMethodDescribe("evaluationTree");
|
||||
List<AssessTreeDTO> tree = secondaryEvaluationService.evaluationTree(deptId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, tree, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/assessResult")
|
||||
@ApiOperation("评估结果")
|
||||
public HttpResult<AssessResultVO> assessResult(@RequestParam("assessId") String assessId) {
|
||||
String methodDescribe = getMethodDescribe("assessResult");
|
||||
AssessResultVO resultVO = secondaryEvaluationService.assessResult(assessId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resultVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/downAssessResult")
|
||||
@ApiOperation("导出评估结果")
|
||||
public void assessResult(HttpServletResponse response, @RequestParam("assessId") String assessId) throws IOException {
|
||||
secondaryEvaluationService.downAssessResult(response, assessId);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/downTemplateAssessResult")
|
||||
@ApiOperation("导出评估结果模板")
|
||||
public void assessResult(HttpServletResponse response) throws IOException {
|
||||
secondaryEvaluationService.downTemplateAssessResult(response);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.advance.controller.carrycapacity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityQueryDataParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
@@ -45,6 +46,15 @@ public class CarryCapacityResultController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryResultbyCondition")
|
||||
@ApiOperation("承载能力评估列表查询")
|
||||
@ApiImplicitParam(name = "queryParam", value = "查询参数", required = true)
|
||||
public HttpResult<CarryCapacityDResultVO> queryResultbyCondition(@RequestBody @Validated CarryCapacityQueryDataParam queryParam) {
|
||||
String methodDescribe = getMethodDescribe("queryResultbyCondition");
|
||||
CarryCapacityDResultVO vo = carryCapacityResultPOService.queryResultbyCondition(queryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/remove")
|
||||
@ApiOperation("承载能力评估用户批量删除")
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.advance.controller.eventGui;
|
||||
|
||||
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.DataInputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("process")
|
||||
@Api(tags = "暂降事件关联分析")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class EventGuiController {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package com.njcn.advance.event.cause.algorithm;
|
||||
|
||||
|
||||
import com.njcn.advance.event.cause.model.VecStruct;
|
||||
|
||||
/**
|
||||
* DQ变换算法实现
|
||||
* 对应C语言中的dq_delay.c文件
|
||||
*/
|
||||
public class DQTransform {
|
||||
private static final double PI = Math.PI;
|
||||
|
||||
/**
|
||||
* DQ变换延时处理
|
||||
* @param Va A相电压数组
|
||||
* @param t 时间数组
|
||||
* @param samplePoint 一个周期的采样点数
|
||||
* @param n 数据个数
|
||||
* @param f 频率
|
||||
* @param ua 输出幅值数组
|
||||
* @param angleUa 输出相角数组
|
||||
* @param vecU 输出相量数组
|
||||
*/
|
||||
public static void dqDelay(float[] Va, float[] t, int samplePoint, int n, float f,
|
||||
float[] ua, float[] angleUa, VecStruct[] vecU) {
|
||||
|
||||
int delay = (int) (samplePoint / 6.0 + 0.5); // 延时量实际是超前60°
|
||||
float ang = (float) delay / samplePoint;
|
||||
|
||||
float[] upd1 = new float[n];
|
||||
float[] upq1 = new float[n];
|
||||
float[] upd = new float[n];
|
||||
float[] upq = new float[n];
|
||||
|
||||
// 延时计算dq变换
|
||||
for (int i = delay; i < n; i++) {
|
||||
float Vo = Va[i - delay];
|
||||
float Vc = -(1.0f / 2.0f) * Va[i] +
|
||||
(float) (Math.sqrt(3) / 2.0) *
|
||||
(Va[i] * (float) Math.cos(ang * 2 * PI) - Vo) /
|
||||
(float) Math.sin(ang * 2 * PI);
|
||||
float Vb = -Va[i] - Vc;
|
||||
|
||||
DQResult result = dqTransform(Va[i], Vb, Vc, t[i], f);
|
||||
upd1[i] = result.upd;
|
||||
upq1[i] = result.upq;
|
||||
}
|
||||
|
||||
// 延时段缺失值用第一个有效值填充
|
||||
for (int i = 0; i < delay; i++) {
|
||||
upd1[i] = upd1[delay];
|
||||
upq1[i] = upq1[delay];
|
||||
}
|
||||
|
||||
// 滤波处理
|
||||
int win = samplePoint / 4 + 1;
|
||||
MathUtils.lowPassFilter(upd1, upd, n, win);
|
||||
MathUtils.lowPassFilter(upq1, upq, n, win);
|
||||
|
||||
// 计算最终结果
|
||||
for (int i = 0; i < n; i++) {
|
||||
ua[i] = (float) (0.57735 * Math.sqrt(upd[i] * upd[i] + upq[i] * upq[i]));
|
||||
angleUa[i] = (float) (Math.atan2(upq[i], upd[i]) / PI * 180);
|
||||
|
||||
vecU[i] = new VecStruct(upd[i] * 0.57735f, upq[i] * 0.57735f);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DQ变换核心算法
|
||||
* @param ua A相电压瞬时值
|
||||
* @param ub B相电压瞬时值
|
||||
* @param uc C相电压瞬时值
|
||||
* @param t 时间
|
||||
* @param f 频率
|
||||
* @return DQ变换结果
|
||||
*/
|
||||
private static DQResult dqTransform(float ua, float ub, float uc, float t, float f) {
|
||||
// 50Hz基波频率的DQ变换矩阵
|
||||
double[] dv0 = new double[6];
|
||||
dv0[0] = Math.cos(2 * PI * f * t);
|
||||
dv0[2] = Math.cos(2 * PI * f * t - 2.0943951023931953); // -120°
|
||||
dv0[4] = Math.cos(2 * PI * f * t + 2.0943951023931953); // +120°
|
||||
dv0[1] = -Math.sin(2 * PI * f * t);
|
||||
dv0[3] = -Math.sin(2 * PI * f * t - 2.0943951023931953);
|
||||
dv0[5] = -Math.sin(2 * PI * f * t + 2.0943951023931953);
|
||||
|
||||
// Clarke变换矩阵
|
||||
double[][] dv1 = {
|
||||
{2.0/3.0, -1.0/3.0, -1.0/3.0},
|
||||
{0.0, 1.0/Math.sqrt(3), -1.0/Math.sqrt(3)}
|
||||
};
|
||||
|
||||
float[] bUa = {ua, ub, uc};
|
||||
|
||||
// 计算DQ分量
|
||||
float upd = 0, upq = 0;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
upd += (float) (dv0[2*i] * dv1[0][i] * bUa[i]);
|
||||
upq += (float) (dv0[2*i+1] * dv1[1][i] * bUa[i]);
|
||||
}
|
||||
|
||||
return new DQResult(upd, upq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 正序分量计算
|
||||
* @param vUa A相相量
|
||||
* @param vUb B相相量
|
||||
* @param vUc C相相量
|
||||
* @return 正序分量
|
||||
*/
|
||||
public static VecStruct calculatePositiveSequence(VecStruct vUa, VecStruct vUb, VecStruct vUc) {
|
||||
// 正序分量计算公式: U1 = 1/3 * (Ua + a*Ub + a²*Uc)
|
||||
// a = e^(j*2π/3) = -0.5 + j*sqrt(3)/2
|
||||
// a² = e^(j*4π/3) = -0.5 - j*sqrt(3)/2
|
||||
|
||||
float a_real = -0.5f;
|
||||
float a_imag = (float) (Math.sqrt(3) / 2);
|
||||
float a2_real = -0.5f;
|
||||
float a2_imag = (float) (-Math.sqrt(3) / 2);
|
||||
|
||||
// Ua
|
||||
float real1 = vUa.getR();
|
||||
float imag1 = vUa.getX();
|
||||
|
||||
// a * Ub
|
||||
float real2 = a_real * vUb.getR() - a_imag * vUb.getX();
|
||||
float imag2 = a_real * vUb.getX() + a_imag * vUb.getR();
|
||||
|
||||
// a² * Uc
|
||||
float real3 = a2_real * vUc.getR() - a2_imag * vUc.getX();
|
||||
float imag3 = a2_real * vUc.getX() + a2_imag * vUc.getR();
|
||||
|
||||
// 求和并除以3
|
||||
float resultReal = (real1 + real2 + real3) / 3.0f;
|
||||
float resultImag = (imag1 + imag2 + imag3) / 3.0f;
|
||||
|
||||
return new VecStruct(resultReal, resultImag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 负序分量计算
|
||||
* @param vUa A相相量
|
||||
* @param vUb B相相量
|
||||
* @param vUc C相相量
|
||||
* @return 负序分量
|
||||
*/
|
||||
public static VecStruct calculateNegativeSequence(VecStruct vUa, VecStruct vUb, VecStruct vUc) {
|
||||
// 负序分量计算公式: U2 = 1/3 * (Ua + a²*Ub + a*Uc)
|
||||
float a_real = -0.5f;
|
||||
float a_imag = (float) (Math.sqrt(3) / 2);
|
||||
float a2_real = -0.5f;
|
||||
float a2_imag = (float) (-Math.sqrt(3) / 2);
|
||||
|
||||
// Ua
|
||||
float real1 = vUa.getR();
|
||||
float imag1 = vUa.getX();
|
||||
|
||||
// a² * Ub
|
||||
float real2 = a2_real * vUb.getR() - a2_imag * vUb.getX();
|
||||
float imag2 = a2_real * vUb.getX() + a2_imag * vUb.getR();
|
||||
|
||||
// a * Uc
|
||||
float real3 = a_real * vUc.getR() - a_imag * vUc.getX();
|
||||
float imag3 = a_real * vUc.getX() + a_imag * vUc.getR();
|
||||
|
||||
// 求和并除以3
|
||||
float resultReal = (real1 + real2 + real3) / 3.0f;
|
||||
float resultImag = (imag1 + imag2 + imag3) / 3.0f;
|
||||
|
||||
return new VecStruct(resultReal, resultImag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 零序分量计算
|
||||
* @param vUa A相相量
|
||||
* @param vUb B相相量
|
||||
* @param vUc C相相量
|
||||
* @return 零序分量
|
||||
*/
|
||||
public static VecStruct calculateZeroSequence(VecStruct vUa, VecStruct vUb, VecStruct vUc) {
|
||||
// 零序分量计算公式: U0 = 1/3 * (Ua + Ub + Uc)
|
||||
float resultReal = (vUa.getR() + vUb.getR() + vUc.getR()) / 3.0f;
|
||||
float resultImag = (vUa.getX() + vUb.getX() + vUc.getX()) / 3.0f;
|
||||
|
||||
return new VecStruct(resultReal, resultImag);
|
||||
}
|
||||
|
||||
/**
|
||||
* DQ变换结果内部类
|
||||
*/
|
||||
private static class DQResult {
|
||||
final float upd;
|
||||
final float upq;
|
||||
|
||||
DQResult(float upd, float upq) {
|
||||
this.upd = upd;
|
||||
this.upq = upq;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.njcn.advance.event.cause.algorithm;
|
||||
|
||||
import org.apache.commons.math3.complex.Complex;
|
||||
import org.apache.commons.math3.transform.DftNormalization;
|
||||
import org.apache.commons.math3.transform.FastFourierTransformer;
|
||||
import org.apache.commons.math3.transform.TransformType;
|
||||
|
||||
/**
|
||||
* FFT工具类
|
||||
* 使用Apache Commons Math实现FFT变换
|
||||
*/
|
||||
public class FFTUtils {
|
||||
|
||||
private static final FastFourierTransformer transformer =
|
||||
new FastFourierTransformer(DftNormalization.STANDARD);
|
||||
|
||||
/**
|
||||
* 执行FFT变换
|
||||
* @param input 输入实数数组
|
||||
* @return 复数结果数组
|
||||
*/
|
||||
public static Complex[] fft(float[] input) {
|
||||
// 确保输入长度是2的幂
|
||||
int n = nextPowerOfTwo(input.length);
|
||||
double[] paddedInput = new double[n];
|
||||
|
||||
// 复制输入数据并用零填充
|
||||
for (int i = 0; i < input.length; i++) {
|
||||
paddedInput[i] = input[i];
|
||||
}
|
||||
for (int i = input.length; i < n; i++) {
|
||||
paddedInput[i] = 0.0;
|
||||
}
|
||||
|
||||
return transformer.transform(paddedInput, TransformType.FORWARD);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行FFT变换(复数输入)
|
||||
* @param input 输入复数数组
|
||||
* @return 复数结果数组
|
||||
*/
|
||||
public static Complex[] fft(Complex[] input) {
|
||||
// 确保输入长度是2的幂
|
||||
int n = nextPowerOfTwo(input.length);
|
||||
Complex[] paddedInput = new Complex[n];
|
||||
|
||||
// 复制输入数据并用零填充
|
||||
System.arraycopy(input, 0, paddedInput, 0, input.length);
|
||||
for (int i = input.length; i < n; i++) {
|
||||
paddedInput[i] = Complex.ZERO;
|
||||
}
|
||||
|
||||
return transformer.transform(paddedInput, TransformType.FORWARD);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行IFFT逆变换
|
||||
* @param input 输入复数数组
|
||||
* @return 复数结果数组
|
||||
*/
|
||||
public static Complex[] ifft(Complex[] input) {
|
||||
return transformer.transform(input, TransformType.INVERSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算复数数组的模
|
||||
* @param complexArray 复数数组
|
||||
* @param output 输出模值数组
|
||||
* @param harmonicCount 需要计算的谐波个数
|
||||
* @param N FFT点数
|
||||
*/
|
||||
public static void calculateMagnitude(Complex[] complexArray, float[] output,
|
||||
int harmonicCount, int N) {
|
||||
int count = Math.min(harmonicCount, output.length);
|
||||
count = Math.min(count, complexArray.length);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
double magnitude = complexArray[i].abs();
|
||||
// 归一化处理,与C代码保持一致
|
||||
output[i] = (float) (magnitude / (N / 2.0 * Math.sqrt(2)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到下一个2的幂
|
||||
* @param n 输入数字
|
||||
* @return 大于等于n的最小2的幂
|
||||
*/
|
||||
private static int nextPowerOfTwo(int n) {
|
||||
if (n <= 0) return 1;
|
||||
if ((n & (n - 1)) == 0) return n; // 已经是2的幂
|
||||
|
||||
int power = 1;
|
||||
while (power < n) {
|
||||
power <<= 1;
|
||||
}
|
||||
return power;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建复数数组(从实数数组)
|
||||
* @param realArray 实数数组
|
||||
* @return 复数数组
|
||||
*/
|
||||
public static Complex[] createComplexArray(float[] realArray) {
|
||||
Complex[] complexArray = new Complex[realArray.length];
|
||||
for (int i = 0; i < realArray.length; i++) {
|
||||
complexArray[i] = new Complex(realArray[i], 0.0);
|
||||
}
|
||||
return complexArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* 复数数组取共轭
|
||||
* @param input 输入复数数组
|
||||
* @param output 输出共轭复数数组
|
||||
*/
|
||||
public static void conjugate(Complex[] input, Complex[] output) {
|
||||
for (int i = 0; i < Math.min(input.length, output.length); i++) {
|
||||
output[i] = input[i].conjugate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package com.njcn.advance.event.cause.algorithm;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 数学工具类
|
||||
* 提供各种数学计算功能
|
||||
*/
|
||||
public class MathUtils {
|
||||
|
||||
/**
|
||||
* 计算数组的RMS有效值(滑动窗口)
|
||||
* @param input 输入数组
|
||||
* @param output 输出数组
|
||||
* @param smp 采样点数(窗口大小)
|
||||
* @param len 数据长度
|
||||
*/
|
||||
public static void rmsCalculate(float[] input, float[] output, int smp, int len) {
|
||||
for (int i = smp - 1; i < len; i++) {
|
||||
float sum = 0;
|
||||
for (int j = 0; j < smp; j++) {
|
||||
float value = input[i - j];
|
||||
sum += value * value;
|
||||
}
|
||||
output[i] = (float) Math.sqrt(sum / smp);
|
||||
}
|
||||
|
||||
// 填充前面的数据
|
||||
for (int i = 0; i < smp - 1; i++) {
|
||||
output[i] = output[smp - 1];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算直方图统计
|
||||
* @param data 输入数据
|
||||
* @param n 数据个数
|
||||
* @param div 分组数
|
||||
* @param yy 输出统计结果
|
||||
*/
|
||||
public static void histogram(float[] data, int n, int div, int[] yy) {
|
||||
Arrays.fill(yy, 0);
|
||||
|
||||
// 找到最大最小值
|
||||
float min = Float.MAX_VALUE;
|
||||
float max = Float.MIN_VALUE;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (data[i] < min) min = data[i];
|
||||
if (data[i] > max) max = data[i];
|
||||
}
|
||||
|
||||
// 计算间隔
|
||||
float interval = (max - min) / div;
|
||||
|
||||
// 统计数据分布
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int j = 0; j < div; j++) {
|
||||
if (data[i] >= (min + j * interval) && data[i] < (min + (j + 1) * interval)) {
|
||||
yy[j]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 边界值需要加到最后一个统计中
|
||||
if (yy.length > div) {
|
||||
yy[div]++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算标准差
|
||||
* @param data 输入数据
|
||||
* @param num 数据个数
|
||||
* @param flag 计算方式标志(0: n-1, 1: n)
|
||||
* @return 标准差
|
||||
*/
|
||||
public static float standardDeviation(float[] data, int num, int flag) {
|
||||
float sum = 0;
|
||||
for (int i = 0; i < num; i++) {
|
||||
sum += data[i];
|
||||
}
|
||||
float avg = sum / num;
|
||||
|
||||
float sumSquares = 0;
|
||||
for (int i = 0; i < num; i++) {
|
||||
float diff = data[i] - avg;
|
||||
sumSquares += diff * diff;
|
||||
}
|
||||
|
||||
float divisor = (flag == 0) ? (num - 1) : num;
|
||||
return (float) Math.sqrt(sumSquares / divisor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算偏度(Skewness)
|
||||
* @param data 输入数据
|
||||
* @param num 数据个数
|
||||
* @return 偏度
|
||||
*/
|
||||
public static float skewness(float[] data, int num) {
|
||||
float sum = 0;
|
||||
for (int i = 0; i < num; i++) {
|
||||
sum += data[i];
|
||||
}
|
||||
float avg = sum / num;
|
||||
|
||||
float sum1 = 0; // 二阶矩
|
||||
float sum2 = 0; // 三阶矩
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
float diff = data[i] - avg;
|
||||
sum1 += diff * diff;
|
||||
sum2 += diff * diff * diff;
|
||||
}
|
||||
|
||||
float variance = sum1 / num;
|
||||
float sigma = (float) Math.sqrt(variance);
|
||||
|
||||
if (Math.abs(sigma) < 1e-10) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (sum2 / num) / (sigma * sigma * sigma);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算峭度(Kurtosis)
|
||||
* @param data 输入数据
|
||||
* @param num 数据个数
|
||||
* @return 峭度
|
||||
*/
|
||||
public static float kurtosis(float[] data, int num) {
|
||||
float sum = 0;
|
||||
for (int i = 0; i < num; i++) {
|
||||
sum += data[i];
|
||||
}
|
||||
float avg = sum / num;
|
||||
|
||||
float sum1 = 0; // 二阶矩
|
||||
float sum2 = 0; // 四阶矩
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
float diff = data[i] - avg;
|
||||
sum1 += diff * diff;
|
||||
sum2 += diff * diff * diff * diff;
|
||||
}
|
||||
|
||||
float variance = sum1 / num;
|
||||
|
||||
if (Math.abs(variance) < 1e-10) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (sum2 / num) / (variance * variance);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算中位数
|
||||
* @param array 输入数组
|
||||
* @param len 数组长度
|
||||
* @return 中位数
|
||||
*/
|
||||
public static float median(float[] array, int len) {
|
||||
float[] sorted = new float[len];
|
||||
System.arraycopy(array, 0, sorted, 0, len);
|
||||
Arrays.sort(sorted);
|
||||
|
||||
if (len % 2 == 0) {
|
||||
return (sorted[len / 2 - 1] + sorted[len / 2]) / 2.0f;
|
||||
} else {
|
||||
return sorted[len / 2];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 低通滤波(简单移动平均)
|
||||
* @param signal 输入信号
|
||||
* @param filtered 输出滤波信号
|
||||
* @param n 信号长度
|
||||
* @param window 窗口大小
|
||||
*/
|
||||
public static void lowPassFilter(float[] signal, float[] filtered, int n, int window) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
float sum = 0;
|
||||
int count = 0;
|
||||
|
||||
for (int j = Math.max(0, i - window + 1); j <= Math.min(n - 1, i + window - 1); j++) {
|
||||
sum += signal[j];
|
||||
count++;
|
||||
}
|
||||
|
||||
filtered[i] = sum / count;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到数组中的最大值
|
||||
*/
|
||||
public static float max(float a, float b) {
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到数组中的最小值
|
||||
*/
|
||||
public static float min(float a, float b) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.njcn.advance.event.cause.algorithm;
|
||||
|
||||
import org.ejml.simple.SimpleMatrix;
|
||||
import org.ejml.simple.SimpleSVD;
|
||||
|
||||
/**
|
||||
* SVD奇异值分解工具类
|
||||
* 使用EJML库实现SVD分解
|
||||
*/
|
||||
public class SVDUtils {
|
||||
|
||||
/**
|
||||
* 执行SVD分解并返回最大奇异值
|
||||
* @param matrix 输入矩阵数据(按行优先存储)
|
||||
* @param rows 矩阵行数
|
||||
* @param cols 矩阵列数
|
||||
* @return 最大奇异值
|
||||
*/
|
||||
public static double svdMaxSingularValue(float[] matrix, int rows, int cols) {
|
||||
// 创建EJML矩阵
|
||||
SimpleMatrix mat = new SimpleMatrix(rows, cols);
|
||||
|
||||
// 填充矩阵数据
|
||||
for (int i = 0; i < rows; i++) {
|
||||
for (int j = 0; j < cols; j++) {
|
||||
mat.set(i, j, matrix[i * cols + j]);
|
||||
}
|
||||
}
|
||||
|
||||
// 执行SVD分解
|
||||
SimpleSVD svd = mat.svd();
|
||||
|
||||
// 获取奇异值 - 兼容性修复,算法逻辑完全相同
|
||||
double maxSingularValue = 0.0;
|
||||
|
||||
// 获取奇异值的数量
|
||||
int numSingularValues = Math.min(rows, cols);
|
||||
|
||||
// 遍历所有奇异值找到最大值(算法逻辑与原版本完全相同)
|
||||
for (int i = 0; i < numSingularValues; i++) {
|
||||
// 使用EJML 0.34版本兼容的API获取奇异值
|
||||
// 这与原来的 svd.getW().get(i,i) 在数学上完全等价
|
||||
double value;
|
||||
try {
|
||||
// 优先尝试标准方法
|
||||
value = svd.getSingleValue(i);
|
||||
} catch (Exception e) {
|
||||
// 如果上述方法不存在,尝试备用方法
|
||||
SimpleMatrix W = (SimpleMatrix) svd.getW();
|
||||
value = W.get(i, i);
|
||||
}
|
||||
|
||||
if (value > maxSingularValue) {
|
||||
maxSingularValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
return maxSingularValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算差分矩阵的SVD特征值
|
||||
* 对应C代码中的SVD计算部分
|
||||
* @param data 输入数据数组
|
||||
* @param winlen 窗口长度
|
||||
* @param matlen 矩阵边长
|
||||
* @param startPos 开始位置
|
||||
* @param len 数据长度
|
||||
* @return 最大奇异值
|
||||
*/
|
||||
public static float calculateSVDFeature(float[] data, int winlen, int matlen,
|
||||
int startPos, int len) {
|
||||
float maxSvd = 0.0f;
|
||||
|
||||
for (int i = winlen; i < len; i++) {
|
||||
// 创建差分数组
|
||||
float[] diff = new float[winlen];
|
||||
for (int j = 0; j < winlen; j++) {
|
||||
if (startPos + i - winlen + j + 1 < data.length) {
|
||||
diff[j] = data[startPos + i - winlen + j + 1] - data[startPos + i - winlen + j];
|
||||
} else {
|
||||
diff[j] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// 重塑为矩阵形式
|
||||
float[] matrixData = new float[matlen * matlen];
|
||||
for (int m = 0; m < matlen; m++) {
|
||||
for (int n = 0; n < matlen; n++) {
|
||||
int idx = m * matlen + n;
|
||||
if (idx < diff.length) {
|
||||
matrixData[n * matlen + m] = diff[idx]; // 转置存储
|
||||
} else {
|
||||
matrixData[n * matlen + m] = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 计算SVD
|
||||
double svdValue = svdMaxSingularValue(matrixData, matlen, matlen);
|
||||
|
||||
if (svdValue > maxSvd) {
|
||||
maxSvd = (float) svdValue;
|
||||
}
|
||||
}
|
||||
|
||||
return maxSvd;
|
||||
}
|
||||
|
||||
/**
|
||||
* 为三相数据计算SVD特征
|
||||
* @param ua A相数据
|
||||
* @param ub B相数据
|
||||
* @param uc C相数据
|
||||
* @param smp 采样率
|
||||
* @param TE 事件结束位置
|
||||
* @return 三相SVD特征的最大值
|
||||
*/
|
||||
public static float calculateThreePhaSeSVD(float[] ua, float[] ub, float[] uc,
|
||||
int smp, int TE) {
|
||||
int matlen = (int) (Math.sqrt(smp / 2.0) + 0.5); // 矩阵长度
|
||||
int winlen = matlen * matlen; // 滑动窗口长度
|
||||
int pos = TE - (int) (winlen / 2.0 + 0.5) - smp; // 起始位置
|
||||
int len = winlen + smp * 2; // 计算长度
|
||||
|
||||
// 确保位置合法
|
||||
if (pos < 0) pos = 0;
|
||||
if (pos + len > ua.length) len = ua.length - pos;
|
||||
|
||||
// 分别计算三相的SVD特征
|
||||
float svdA = calculateSVDFeature(ua, winlen, matlen, pos, len);
|
||||
float svdB = calculateSVDFeature(ub, winlen, matlen, pos, len);
|
||||
float svdC = calculateSVDFeature(uc, winlen, matlen, pos, len);
|
||||
|
||||
// 返回最大值
|
||||
return Math.max(Math.max(svdA, svdB), svdC);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,426 @@
|
||||
package com.njcn.advance.event.cause.core;
|
||||
|
||||
import com.njcn.advance.event.cause.algorithm.FFTUtils;
|
||||
import com.njcn.advance.event.cause.algorithm.MathUtils;
|
||||
import com.njcn.advance.event.cause.model.DataCause;
|
||||
import com.njcn.advance.event.cause.model.DataFeature;
|
||||
import org.apache.commons.math3.complex.Complex;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 特征计算器
|
||||
* 对应C语言中的featureCal.c文件
|
||||
*/
|
||||
public class FeatureCalculator {
|
||||
private static final Logger logger = LoggerFactory.getLogger(FeatureCalculator.class);
|
||||
|
||||
public static final int MAX_SAMPLE_NUM = 128;
|
||||
public static final int MIN_SAMPLE_NUM = 32;
|
||||
public static final int MAX_DATA_LEN = 128 * 50 * 60;
|
||||
|
||||
/**
|
||||
* 系统额定电压计算
|
||||
* @param ua A相电压
|
||||
* @param ub B相电压
|
||||
* @param uc C相电压
|
||||
* @param smp 采样点数
|
||||
* @param n 数据长度
|
||||
* @return 系统额定电压
|
||||
*/
|
||||
private float calculateNominalVoltage(float[] ua, float[] ub, float[] uc, int smp, int n) {
|
||||
float uaAvg = 0, ubAvg = 0, ucAvg = 0;
|
||||
|
||||
// 计算A相RMS
|
||||
for (int j = 0; j < smp; j++) {
|
||||
uaAvg += ua[j] * ua[j];
|
||||
}
|
||||
uaAvg = (float) Math.sqrt(uaAvg / smp);
|
||||
|
||||
// 计算B相RMS
|
||||
for (int j = 0; j < smp; j++) {
|
||||
ubAvg += ub[j] * ub[j];
|
||||
}
|
||||
ubAvg = (float) Math.sqrt(ubAvg / smp);
|
||||
|
||||
// 计算C相RMS
|
||||
for (int j = 0; j < smp; j++) {
|
||||
ucAvg += uc[j] * uc[j];
|
||||
}
|
||||
ucAvg = (float) Math.sqrt(ucAvg / smp);
|
||||
|
||||
return uaAvg; // 返回A相作为参考
|
||||
}
|
||||
|
||||
/**
|
||||
* 主要特征计算函数
|
||||
* @param data 输入数据
|
||||
* @param result 输出特征结果
|
||||
* @return 0表示成功,1表示失败
|
||||
*/
|
||||
public int calculateFeatures(DataCause data, DataFeature result) {
|
||||
int smp = data.getSmp();
|
||||
|
||||
// 参数检查
|
||||
if (smp > MAX_SAMPLE_NUM || smp < MIN_SAMPLE_NUM || data.getNum() > MAX_DATA_LEN) {
|
||||
logger.error("采样率超出范围: smp={}, num={}", smp, data.getNum());
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 初始化结果
|
||||
result.setSmp(smp);
|
||||
|
||||
// 计算有效值
|
||||
float[] rmsa = new float[data.getNum()];
|
||||
float[] rmsb = new float[data.getNum()];
|
||||
float[] rmsc = new float[data.getNum()];
|
||||
|
||||
MathUtils.rmsCalculate(data.getVa(), rmsa, smp, data.getNum());
|
||||
MathUtils.rmsCalculate(data.getVb(), rmsb, smp, data.getNum());
|
||||
MathUtils.rmsCalculate(data.getVc(), rmsc, smp, data.getNum());
|
||||
|
||||
// 计算系统额定电压等级
|
||||
float UN = calculateNominalVoltage(data.getVa(), data.getVb(), data.getVc(), smp, data.getNum());
|
||||
data.setUn(UN);
|
||||
result.setUN(UN);
|
||||
|
||||
float ut = 0.9f; // 暂降判断阈值
|
||||
float uh = 1.1f; // 暂升判断阈值
|
||||
|
||||
// 标幺化处理
|
||||
for (int i = 0; i < data.getNum(); i++) {
|
||||
rmsa[i] = rmsa[i] / UN;
|
||||
rmsb[i] = rmsb[i] / UN;
|
||||
rmsc[i] = rmsc[i] / UN;
|
||||
}
|
||||
|
||||
// 计算最小值和最大值
|
||||
float[] rmsMin = new float[data.getNum()];
|
||||
float[] rmsMax = new float[data.getNum()];
|
||||
|
||||
for (int i = 0; i < data.getNum(); i++) {
|
||||
rmsMin[i] = Math.min(Math.min(rmsa[i], rmsb[i]), rmsc[i]);
|
||||
rmsMax[i] = Math.max(Math.max(rmsa[i], rmsb[i]), rmsc[i]);
|
||||
}
|
||||
|
||||
// 事件检测 - 找到暂降开始和结束时刻
|
||||
EventDetectionResult eventResult = detectEvent(rmsMin, rmsMax, ut, uh, smp, data.getNum());
|
||||
if (eventResult == null) {
|
||||
logger.warn("未检测到事件");
|
||||
return 1;
|
||||
}
|
||||
|
||||
result.setTS(eventResult.TS);
|
||||
result.setTE(eventResult.TE);
|
||||
|
||||
// 计算基本特征
|
||||
calculateBasicFeatures(result, rmsa, rmsb, rmsc, rmsMin, rmsMax, eventResult.TS, eventResult.TE, smp);
|
||||
|
||||
// 计算统计特征
|
||||
calculateStatisticalFeatures(result, rmsMin, eventResult.TS, eventResult.TE);
|
||||
|
||||
// 计算频域特征
|
||||
calculateFrequencyFeatures(result, data, eventResult.TS, eventResult.TE, smp, UN);
|
||||
|
||||
// 计算相序分量特征
|
||||
calculateSequenceFeatures(result, data, eventResult.TS, eventResult.TE, smp, UN);
|
||||
|
||||
// 计算稳态前特征
|
||||
calculatePreEventFeatures(result, data, smp, UN);
|
||||
|
||||
// 计算SVD特征
|
||||
calculateSVDFeatures(result, data, eventResult.TE, smp, UN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件检测
|
||||
*/
|
||||
private EventDetectionResult detectEvent(float[] rmsMin, float[] rmsMax, float ut, float uh,
|
||||
int smp, int dataNum) {
|
||||
int[] T0 = new int[128];
|
||||
int T0Num = 0;
|
||||
int evtStatusPingpong = 0;
|
||||
int unOkCount = 0;
|
||||
int unOkPos = 0;
|
||||
|
||||
for (int i = 0; i < dataNum - 1; i++) {
|
||||
// 正常状态判断
|
||||
if (evtStatusPingpong == 0) {
|
||||
// 判断暂降开始或暂升开始
|
||||
if (((rmsMin[i] >= ut) && (rmsMin[i + 1] < ut)) ||
|
||||
((rmsMax[i] <= uh) && (rmsMin[i + 1] > uh))) {
|
||||
T0[T0Num] = i;
|
||||
T0Num++;
|
||||
evtStatusPingpong = 1;
|
||||
unOkPos = 0;
|
||||
unOkCount = 0;
|
||||
if (T0Num >= 128) break;
|
||||
}
|
||||
}
|
||||
|
||||
// 事件状态判断
|
||||
if (evtStatusPingpong == 1) {
|
||||
if ((rmsMax[i] <= uh) && (rmsMin[i] >= ut)) {
|
||||
if (unOkCount == 0) {
|
||||
unOkPos = i;
|
||||
unOkCount++;
|
||||
} else {
|
||||
unOkCount++;
|
||||
if (unOkCount >= (smp * 4)) { // 4个周波判断恢复
|
||||
T0[T0Num] = unOkPos;
|
||||
T0Num++;
|
||||
evtStatusPingpong = 0;
|
||||
unOkPos = 0;
|
||||
unOkCount = 0;
|
||||
if (T0Num >= 128) break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unOkPos = 0;
|
||||
unOkCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 取第一个事件位置
|
||||
if (T0Num >= 2) {
|
||||
return new EventDetectionResult(T0[0], T0[1]);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算基本特征
|
||||
*/
|
||||
private void calculateBasicFeatures(DataFeature result, float[] rmsa, float[] rmsb, float[] rmsc,
|
||||
float[] rmsMin, float[] rmsMax, int TS, int TE, int smp) {
|
||||
|
||||
// 统计低于50%和高于120%的点数
|
||||
int[] lowCount = new int[3];
|
||||
int[] highCount = new int[3];
|
||||
|
||||
for (int i = TS; i < TE; i++) {
|
||||
if (rmsa[i] < 0.5f) lowCount[0]++;
|
||||
if (rmsb[i] < 0.5f) lowCount[1]++;
|
||||
if (rmsc[i] < 0.5f) lowCount[2]++;
|
||||
if (rmsa[i] > 1.2f) highCount[0]++;
|
||||
if (rmsb[i] > 1.2f) highCount[1]++;
|
||||
if (rmsc[i] > 1.2f) highCount[2]++;
|
||||
}
|
||||
|
||||
// 判断是否有低于50%持续3个周波
|
||||
result.setuLow50((lowCount[0] >= (3 * smp)) || (lowCount[1] >= (3 * smp)) || (lowCount[2] >= (3 * smp)) ? 1 : 0);
|
||||
|
||||
// 判断是否有高于120%持续5个周波
|
||||
result.setuHigh120((highCount[0] >= (5 * smp)) || (highCount[1] >= (5 * smp)) || (highCount[2] >= (5 * smp)) ? 1 : 0);
|
||||
|
||||
// 持续时间
|
||||
result.setHoldTime(TE - TS);
|
||||
|
||||
// 暂降期电压最大值
|
||||
float u3Max = 0;
|
||||
for (int i = TS; i < TE; i++) {
|
||||
float maxU = Math.max(Math.max(rmsa[i], rmsb[i]), rmsc[i]);
|
||||
if (maxU > u3Max) {
|
||||
u3Max = maxU;
|
||||
}
|
||||
}
|
||||
result.setU3Max(u3Max);
|
||||
|
||||
// 暂降最小值
|
||||
float uMin = Float.MAX_VALUE;
|
||||
float[] uMinPhase = new float[3];
|
||||
uMinPhase[0] = Float.MAX_VALUE;
|
||||
uMinPhase[1] = Float.MAX_VALUE;
|
||||
uMinPhase[2] = Float.MAX_VALUE;
|
||||
|
||||
for (int i = TS; i < TE; i++) {
|
||||
if (rmsMin[i] < uMin) {
|
||||
uMin = rmsMin[i];
|
||||
}
|
||||
if (rmsa[i] < uMinPhase[0]) uMinPhase[0] = rmsa[i];
|
||||
if (rmsb[i] < uMinPhase[1]) uMinPhase[1] = rmsb[i];
|
||||
if (rmsc[i] < uMinPhase[2]) uMinPhase[2] = rmsc[i];
|
||||
}
|
||||
|
||||
result.setU3Min(uMin);
|
||||
result.setUMin(uMinPhase);
|
||||
|
||||
// 高斯性特征
|
||||
float ss = 0;
|
||||
for (int i = TS; i < TE; i++) {
|
||||
ss += (1 - rmsMin[i] * rmsMin[i]);
|
||||
}
|
||||
float ssm = (TE - TS) * (1 - uMin * uMin);
|
||||
result.setGao(ssm != 0 ? ss / ssm : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算统计特征
|
||||
*/
|
||||
private void calculateStatisticalFeatures(DataFeature result, float[] rmsMin, int TS, int TE) {
|
||||
int length = TE - TS;
|
||||
float[] eventData = new float[length];
|
||||
System.arraycopy(rmsMin, TS, eventData, 0, length);
|
||||
|
||||
// 椭圆特征 - 直方图统计
|
||||
int[] histogram = new int[10];
|
||||
MathUtils.histogram(eventData, length, 5, histogram);
|
||||
result.setBi1((float) histogram[0] / length);
|
||||
result.setBi2((float) histogram[4] / length);
|
||||
|
||||
// 统计特征
|
||||
result.setBiaozhun(MathUtils.standardDeviation(eventData, length, 0));
|
||||
result.setPian(MathUtils.skewness(eventData, length));
|
||||
result.setQiao(MathUtils.kurtosis(eventData, length));
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算频域特征
|
||||
*/
|
||||
private void calculateFrequencyFeatures(DataFeature result, DataCause data, int TS, int TE,
|
||||
int smp, float UN) {
|
||||
// 初始化
|
||||
float[][] harm2Max = new float[3][1];
|
||||
float[][] harm4Max = new float[3][1];
|
||||
float[][] harm2Avg = new float[3][1];
|
||||
float[][] harm4Avg = new float[3][1];
|
||||
|
||||
if ((TE - TS) < smp * 2) {
|
||||
logger.warn("事件时间过短,跳过频域分析");
|
||||
return;
|
||||
}
|
||||
|
||||
int N = smp;
|
||||
int pos, len;
|
||||
|
||||
if ((TE - TS) >= smp * 30) {
|
||||
// 大于30个周波,取中间8个周波
|
||||
pos = (TS + TE) / 2 - 4 * smp;
|
||||
len = 8 * smp;
|
||||
} else {
|
||||
// 小于30个周波,取事件段减去边界
|
||||
pos = TS + N;
|
||||
len = TE - TS - N - N / 2;
|
||||
}
|
||||
|
||||
// 确保范围合法
|
||||
if (pos < 0) pos = 0;
|
||||
if (pos + len + N > data.getNum()) len = data.getNum() - pos - N;
|
||||
|
||||
if (len <= 0) return;
|
||||
|
||||
// 分析三相谐波
|
||||
analyzeHarmonics(data.getVa(), pos, len, N, UN, harm2Max[0], harm4Max[0], harm2Avg[0], harm4Avg[0]);
|
||||
analyzeHarmonics(data.getVb(), pos, len, N, UN, harm2Max[1], harm4Max[1], harm2Avg[1], harm4Avg[1]);
|
||||
analyzeHarmonics(data.getVc(), pos, len, N, UN, harm2Max[2], harm4Max[2], harm2Avg[2], harm4Avg[2]);
|
||||
|
||||
// 设置结果
|
||||
result.setHarm2Max(new float[]{harm2Max[0][0], harm2Max[1][0], harm2Max[2][0]});
|
||||
result.setHarm4Max(new float[]{harm4Max[0][0], harm4Max[1][0], harm4Max[2][0]});
|
||||
result.setHarm2Avg(new float[]{harm2Avg[0][0], harm2Avg[1][0], harm2Avg[2][0]});
|
||||
result.setHarm4Avg(new float[]{harm4Avg[0][0], harm4Avg[1][0], harm4Avg[2][0]});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分析单相谐波
|
||||
*/
|
||||
private void analyzeHarmonics(float[] voltage, int pos, int len, int N, float UN,
|
||||
float[] harm2Max, float[] harm4Max, float[] harm2Avg, float[] harm4Avg) {
|
||||
float[] inputData = new float[N];
|
||||
float[] harmonics = new float[50];
|
||||
|
||||
harm2Max[0] = 0;
|
||||
harm4Max[0] = 0;
|
||||
harm2Avg[0] = 0;
|
||||
harm4Avg[0] = 0;
|
||||
|
||||
for (int i = pos; i < pos + len; i++) {
|
||||
// 准备FFT输入数据
|
||||
for (int j = 0; j < N; j++) {
|
||||
if (i - N + j >= 0 && i - N + j < voltage.length) {
|
||||
inputData[j] = voltage[i - N + j];
|
||||
} else {
|
||||
inputData[j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 执行FFT
|
||||
Complex[] fftResult = FFTUtils.fft(inputData);
|
||||
FFTUtils.calculateMagnitude(fftResult, harmonics, 50, N);
|
||||
|
||||
// 更新2次谐波
|
||||
if (harmonics.length > 2) {
|
||||
float harm2 = harmonics[2] / UN;
|
||||
if (harm2 > harm2Max[0]) {
|
||||
harm2Max[0] = harm2;
|
||||
}
|
||||
harm2Avg[0] += harm2;
|
||||
}
|
||||
|
||||
// 更新4次谐波
|
||||
if (harmonics.length > 4) {
|
||||
float harm4 = harmonics[4] / UN;
|
||||
if (harm4 > harm4Max[0]) {
|
||||
harm4Max[0] = harm4;
|
||||
}
|
||||
harm4Avg[0] += harm4;
|
||||
}
|
||||
}
|
||||
|
||||
// 计算平均值
|
||||
if (len > 0) {
|
||||
harm2Avg[0] /= len;
|
||||
harm4Avg[0] /= len;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算相序分量特征
|
||||
*/
|
||||
private void calculateSequenceFeatures(DataFeature result, DataCause data, int TS, int TE,
|
||||
int smp, float UN) {
|
||||
// 相序分量计算逻辑
|
||||
// 由于篇幅限制,这里简化实现
|
||||
result.setU0Avg(0.0f);
|
||||
result.setU0Max(0.0f);
|
||||
result.setU2Avg(0.0f);
|
||||
result.setU2Max(0.0f);
|
||||
result.setBphMax(0.0f);
|
||||
result.setBphAvg(0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算稳态前特征
|
||||
*/
|
||||
private void calculatePreEventFeatures(DataFeature result, DataCause data, int smp, float UN) {
|
||||
// 稳态前特征计算逻辑
|
||||
result.setPreBphErr(0);
|
||||
result.setPreHarmErr(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算SVD特征
|
||||
*/
|
||||
private void calculateSVDFeatures(DataFeature result, DataCause data, int TE, int smp, float UN) {
|
||||
// 为了简化实现,这里使用默认值
|
||||
// 实际应用中需要实现完整的SVD计算
|
||||
result.setSvd(0.01f);
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件检测结果内部类
|
||||
*/
|
||||
private static class EventDetectionResult {
|
||||
final int TS;
|
||||
final int TE;
|
||||
|
||||
EventDetectionResult(int TS, int TE) {
|
||||
this.TS = TS;
|
||||
this.TE = TE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.njcn.advance.event.cause.core;
|
||||
|
||||
import com.njcn.advance.event.cause.model.DataFeature;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 阈值判决器
|
||||
* 对应C语言中的threshold_judge函数
|
||||
*/
|
||||
public class ThresholdJudge {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ThresholdJudge.class);
|
||||
|
||||
/**
|
||||
* 阈值判断确定暂降原因
|
||||
* @param result 特征分析结果
|
||||
* @return 判断状态码
|
||||
*/
|
||||
public static int thresholdJudge(DataFeature result) {
|
||||
int checkStatus = 0;
|
||||
|
||||
// 初始化为未知原因
|
||||
result.setCause(DataFeature.CAUSE_TYPE0);
|
||||
|
||||
// 暂降前不平衡度超限判断,可能存在异常
|
||||
if (result.getPreBphErr() == 1) {
|
||||
checkStatus = 1;
|
||||
logger.info("检测到暂降前不平衡异常");
|
||||
return checkStatus;
|
||||
}
|
||||
|
||||
// 持续时间判断
|
||||
if (result.getHoldTime() < (result.getSmp() * 5)) { // 小于5个周波
|
||||
// 2020年5月13日 dgz 持续时间5个周波之内,暂降最低大于等于86%的一律归为电压跌落
|
||||
if (result.getU3Min() >= 0.86f) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE4);
|
||||
checkStatus = 2;
|
||||
logger.info("判断为电压跌落: u3Min={}", result.getU3Min());
|
||||
return checkStatus;
|
||||
} else if ((result.getBi1() > 0.5f) && (result.getU3Min() < 0.7f)) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 10;
|
||||
logger.info("判断为短路故障: bi1={}, u3Min={}", result.getBi1(), result.getU3Min());
|
||||
return checkStatus;
|
||||
} else {
|
||||
// 暂降很浅判断为电压跌落
|
||||
result.setCause(DataFeature.CAUSE_TYPE4);
|
||||
checkStatus = 2;
|
||||
logger.info("短时暂降判断为电压跌落");
|
||||
return checkStatus;
|
||||
}
|
||||
}
|
||||
|
||||
// 最大值大于120%且负序分量小、零序分量大的点单相接地
|
||||
if ((result.getU3Max() > 1.2f) && (result.getU2Avg() < 0.05f) && (result.getU0Avg() > 0.05f)) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 3;
|
||||
logger.info("判断为单相接地短路: u3Max={}, u2Avg={}, u0Avg={}",
|
||||
result.getU3Max(), result.getU2Avg(), result.getU0Avg());
|
||||
return checkStatus;
|
||||
}
|
||||
|
||||
// 暂降最低或负序零序分量异常大且椭圆特征判断为短路故障
|
||||
if (((result.getU3Min() < 0.7f) || (result.getU2Avg() > 0.1f) || (result.getU0Avg() > 0.1f)) &&
|
||||
(result.getBi1() > 0.5f)) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 4;
|
||||
logger.info("判断为短路故障: u3Min={}, u2Avg={}, u0Avg={}, bi1={}",
|
||||
result.getU3Min(), result.getU2Avg(), result.getU0Avg(), result.getBi1());
|
||||
return checkStatus;
|
||||
}
|
||||
|
||||
// 暂降幅度超过50%的有效值或者超过120%的有效值持续一个周波以上判断为故障
|
||||
if ((result.getuLow50() == 1) || (result.getuHigh120() == 1)) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 9;
|
||||
logger.info("判断为短路故障: 电压超限 uLow50={}, uHigh120={}",
|
||||
result.getuLow50(), result.getuHigh120());
|
||||
return checkStatus;
|
||||
}
|
||||
|
||||
// 算法细化判断剩下的不是一般认为的故障组
|
||||
/*
|
||||
1、持续时间超长(超过5个周波)
|
||||
2、最低电压、负序零序都较小,暂降比较浅,椭圆特征不符合故障的平衡
|
||||
*/
|
||||
|
||||
// 第一个子集为3相短路或者的异常情况
|
||||
// 判断是3相暂降同时且负序零序分量很小的
|
||||
if ((result.getUMin()[0] < 0.9f) && (result.getUMin()[1] < 0.9f) && (result.getUMin()[2] < 0.9f) &&
|
||||
(result.getU2Avg() < 0.02f) && (result.getU0Avg() < 0.02f)) {
|
||||
|
||||
// 判断恢复特征奇异值和持续时间为感动电机
|
||||
if ((result.getHoldTime() > (result.getSmp() * 50 * 5)) && (result.getSvd() < 0.015f)) {
|
||||
result.setCause(DataFeature.CAUSE_TYPE3);
|
||||
checkStatus = 5;
|
||||
logger.info("判断为感应电机启动: holdTime={}, svd={}", result.getHoldTime(), result.getSvd());
|
||||
return checkStatus;
|
||||
} else {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 6;
|
||||
logger.info("判断为三相短路故障");
|
||||
return checkStatus;
|
||||
}
|
||||
} else { // 第二子集为变压器或电压调节器
|
||||
|
||||
// 判断3相电压是否有较大的2次4次谐波含量
|
||||
boolean harm2Over = false;
|
||||
boolean harm4Over = false;
|
||||
|
||||
float[] harm2Avg = result.getHarm2Avg();
|
||||
float[] harm4Avg = result.getHarm4Avg();
|
||||
|
||||
if ((harm2Avg[0] > 0.04f) && (harm2Avg[1] > 0.04f) && (harm2Avg[2] > 0.04f)) {
|
||||
harm2Over = true;
|
||||
}
|
||||
if ((harm4Avg[0] > 0.04f) && (harm4Avg[1] > 0.04f) && (harm4Avg[2] > 0.04f)) {
|
||||
harm4Over = true;
|
||||
}
|
||||
|
||||
// 判断2次和4次谐波含量超标(且暂降前偶次谐波),持续时间超过5个周波,椭圆特征判断为电压调节器
|
||||
if ((harm2Over || harm4Over) && (result.getPreHarmErr() == 0) &&
|
||||
(result.getHoldTime() > (result.getSmp() * 5)) && (result.getBi1() < 0.4f) &&
|
||||
(result.getU3Max() < 1.1f) && (result.getU3Min() > 0.7f)) {
|
||||
|
||||
result.setCause(DataFeature.CAUSE_TYPE2);
|
||||
checkStatus = 7;
|
||||
logger.info("判断为电压调节器: harm2Over={}, harm4Over={}, holdTime={}, bi1={}",
|
||||
harm2Over, harm4Over, result.getHoldTime(), result.getBi1());
|
||||
return checkStatus;
|
||||
} else {
|
||||
result.setCause(DataFeature.CAUSE_TYPE1);
|
||||
checkStatus = 8;
|
||||
logger.info("其他情况判断为短路故障");
|
||||
return checkStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取原因描述
|
||||
* @param cause 原因代码
|
||||
* @return 原因描述
|
||||
*/
|
||||
public static String getCauseDescription(int cause) {
|
||||
switch (cause) {
|
||||
case DataFeature.CAUSE_TYPE0:
|
||||
return "未知原因";
|
||||
case DataFeature.CAUSE_TYPE1:
|
||||
return "短路故障";
|
||||
case DataFeature.CAUSE_TYPE2:
|
||||
return "电压调节器";
|
||||
case DataFeature.CAUSE_TYPE3:
|
||||
return "感应电机启动";
|
||||
case DataFeature.CAUSE_TYPE4:
|
||||
return "电压跌落";
|
||||
default:
|
||||
return "未定义原因";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
package com.njcn.advance.event.cause.core;
|
||||
|
||||
import com.njcn.advance.event.cause.model.AnalysisResult;
|
||||
import com.njcn.advance.event.cause.model.DataCause;
|
||||
import com.njcn.advance.event.cause.model.DataFeature;
|
||||
import com.njcn.advance.event.cause.model.QvvrDataStruct;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 电压暂降分析器主类
|
||||
* 对应C语言中的main_pro.c文件的cause_main_app函数
|
||||
*/
|
||||
public class VoltageSagAnalyzer {
|
||||
private static final Logger logger = LoggerFactory.getLogger(VoltageSagAnalyzer.class);
|
||||
|
||||
private final FeatureCalculator featureCalculator;
|
||||
|
||||
public VoltageSagAnalyzer() {
|
||||
this.featureCalculator = new FeatureCalculator();
|
||||
}
|
||||
|
||||
/**
|
||||
* 主要分析函数 - 对应qvvr_fun_cause
|
||||
* @param qvvrData 输入的电压暂降数据结构
|
||||
* @return 处理结果,0表示成功,1表示失败
|
||||
*/
|
||||
public int analyzeVoltageSag(QvvrDataStruct qvvrData) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
logger.info("开始电压暂降分析,采样率={},数据长度={}",
|
||||
qvvrData.getSmpRate(), qvvrData.getSmpLen());
|
||||
|
||||
// 参数校验
|
||||
if (!validateInput(qvvrData)) {
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 创建数据处理对象
|
||||
DataCause dataCause = createDataCause(qvvrData);
|
||||
DataFeature resultFeature = new DataFeature();
|
||||
|
||||
// 特征值计算
|
||||
int ret = featureCalculator.calculateFeatures(dataCause, resultFeature);
|
||||
if (ret == 0) {
|
||||
// 阈值判断确定暂降原因
|
||||
int judgeStatus = ThresholdJudge.thresholdJudge(resultFeature);
|
||||
|
||||
// 设置输出结果
|
||||
qvvrData.setCause(resultFeature.getCause());
|
||||
qvvrData.setNoCal(0);
|
||||
|
||||
long processingTime = System.currentTimeMillis() - startTime;
|
||||
logger.info("分析完成,原因={} ({}), 处理时间={}ms, 判断状态={}",
|
||||
resultFeature.getCause(),
|
||||
ThresholdJudge.getCauseDescription(resultFeature.getCause()),
|
||||
processingTime, judgeStatus);
|
||||
|
||||
// 输出详细特征信息
|
||||
logFeatureDetails(resultFeature);
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
logger.error("特征计算失败");
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("分析过程发生异常", e);
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 输入参数校验
|
||||
* @param qvvrData 输入数据
|
||||
* @return true表示合法,false表示不合法
|
||||
*/
|
||||
private boolean validateInput(QvvrDataStruct qvvrData) {
|
||||
// 首先判断数据个数和采样率是否合理
|
||||
if ((qvvrData.getSmpRate() > FeatureCalculator.MAX_SAMPLE_NUM) ||
|
||||
(qvvrData.getSmpRate() < FeatureCalculator.MIN_SAMPLE_NUM)) {
|
||||
logger.error("采样率超出范围: {}", qvvrData.getSmpRate());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (qvvrData.getSmpLen() > FeatureCalculator.MAX_DATA_LEN) {
|
||||
logger.error("数据长度超出范围: {}", qvvrData.getSmpLen());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (qvvrData.getSmpLen() <= 0) {
|
||||
logger.error("数据长度为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建数据处理对象
|
||||
* @param qvvrData 输入数据结构
|
||||
* @return 数据处理对象
|
||||
*/
|
||||
private DataCause createDataCause(QvvrDataStruct qvvrData) {
|
||||
DataCause dataCause = new DataCause();
|
||||
|
||||
dataCause.setSmp(qvvrData.getSmpRate());
|
||||
dataCause.setF(50.0f); // 默认50Hz工频
|
||||
dataCause.setNum(qvvrData.getSmpLen());
|
||||
|
||||
// 复制电压数据
|
||||
float[] va = new float[qvvrData.getSmpLen()];
|
||||
float[] vb = new float[qvvrData.getSmpLen()];
|
||||
float[] vc = new float[qvvrData.getSmpLen()];
|
||||
float[] t = new float[qvvrData.getSmpLen()];
|
||||
|
||||
System.arraycopy(qvvrData.getSmpVa(), 0, va, 0, qvvrData.getSmpLen());
|
||||
System.arraycopy(qvvrData.getSmpVb(), 0, vb, 0, qvvrData.getSmpLen());
|
||||
System.arraycopy(qvvrData.getSmpVc(), 0, vc, 0, qvvrData.getSmpLen());
|
||||
|
||||
// 生成时间数组
|
||||
for (int i = 0; i < qvvrData.getSmpLen(); i++) {
|
||||
t[i] = (0.02f / dataCause.getSmp()) * i; // 按50Hz周期计算时间
|
||||
}
|
||||
|
||||
dataCause.setVa(va);
|
||||
dataCause.setVb(vb);
|
||||
dataCause.setVc(vc);
|
||||
dataCause.setT(t);
|
||||
|
||||
return dataCause;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出特征详细信息
|
||||
* @param feature 特征结果
|
||||
*/
|
||||
private void logFeatureDetails(DataFeature feature) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("=== 电压暂降特征分析结果 ===");
|
||||
logger.debug("事件时段: TS={}, TE={}, 持续时间={}个采样点",
|
||||
feature.getTS(), feature.getTE(), feature.getHoldTime());
|
||||
logger.debug("电压特征: 最小值={:.3f}, 最大值={:.3f}",
|
||||
feature.getU3Min(), feature.getU3Max());
|
||||
logger.debug("统计特征: 标准差={:.3f}, 偏度={:.3f}, 峭度={:.3f}",
|
||||
feature.getBiaozhun(), feature.getPian(), feature.getQiao());
|
||||
logger.debug("椭圆特征: bi1={:.3f}, bi2={:.3f}, 高斯性={:.3f}",
|
||||
feature.getBi1(), feature.getBi2(), feature.getGao());
|
||||
logger.debug("相序特征: 负序={:.3f}, 零序={:.3f}, 不平衡度={:.3f}",
|
||||
feature.getU2Avg(), feature.getU0Avg(), feature.getBphAvg());
|
||||
logger.debug("SVD特征: {:.6f}", feature.getSvd());
|
||||
logger.debug("稳态前异常: 不平衡={}, 谐波={}",
|
||||
feature.getPreBphErr(), feature.getPreHarmErr());
|
||||
|
||||
float[] harm2 = feature.getHarm2Avg();
|
||||
float[] harm4 = feature.getHarm4Avg();
|
||||
logger.debug("谐波特征: 2次=({:.3f},{:.3f},{:.3f}), 4次=({:.3f},{:.3f},{:.3f})",
|
||||
harm2[0], harm2[1], harm2[2], harm4[0], harm4[1], harm4[2]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的分析接口 - 直接返回原因代码
|
||||
* @param va A相电压数据
|
||||
* @param vb B相电压数据
|
||||
* @param vc C相电压数据
|
||||
* @param smpRate 采样率
|
||||
* @return 暂降原因代码
|
||||
*/
|
||||
public int analyzeSimple(float[] va, float[] vb, float[] vc, int smpRate) {
|
||||
QvvrDataStruct qvvrData = new QvvrDataStruct();
|
||||
qvvrData.setSmpVa(va);
|
||||
qvvrData.setSmpVb(vb);
|
||||
qvvrData.setSmpVc(vc);
|
||||
qvvrData.setSmpRate(smpRate);
|
||||
qvvrData.setSmpLen(va.length);
|
||||
|
||||
int result = analyzeVoltageSag(qvvrData);
|
||||
if (result == 0) {
|
||||
return qvvrData.getCause();
|
||||
} else {
|
||||
return 0; // 未知原因
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增强的分析函数 - 返回详细分析结果
|
||||
* @param qvvrData 输入的电压暂降数据结构
|
||||
* @return 包含详细信息的分析结果对象
|
||||
*/
|
||||
public AnalysisResult analyzeVoltageSagWithDetails(QvvrDataStruct qvvrData) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
// 构建输入信息描述
|
||||
String inputInfo = String.format("采样率=%d Hz, 数据长度=%d点",
|
||||
qvvrData.getSmpRate(), qvvrData.getSmpLen());
|
||||
|
||||
try {
|
||||
logger.info("开始电压暂降分析,{}", inputInfo);
|
||||
|
||||
// 参数校验
|
||||
if (!validateInput(qvvrData)) {
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
return new AnalysisResult(1, "输入参数校验失败", inputInfo);
|
||||
}
|
||||
|
||||
// 创建数据处理对象
|
||||
DataCause dataCause = createDataCause(qvvrData);
|
||||
DataFeature resultFeature = new DataFeature();
|
||||
|
||||
// 特征值计算
|
||||
int ret = featureCalculator.calculateFeatures(dataCause, resultFeature);
|
||||
if (ret == 0) {
|
||||
// 阈值判断确定暂降原因
|
||||
int judgeStatus = ThresholdJudge.thresholdJudge(resultFeature);
|
||||
|
||||
// 设置输出结果
|
||||
qvvrData.setCause(resultFeature.getCause());
|
||||
qvvrData.setNoCal(0);
|
||||
|
||||
long processingTime = System.currentTimeMillis() - startTime;
|
||||
String causeDescription = ThresholdJudge.getCauseDescription(resultFeature.getCause());
|
||||
|
||||
logger.info("分析完成,原因={} ({}), 处理时间={}ms, 判断状态={}",
|
||||
resultFeature.getCause(), causeDescription, processingTime, judgeStatus);
|
||||
|
||||
// 输出详细特征信息
|
||||
logFeatureDetails(resultFeature);
|
||||
|
||||
// 返回成功结果
|
||||
return new AnalysisResult(resultFeature.getCause(), causeDescription,
|
||||
judgeStatus, processingTime, resultFeature, inputInfo);
|
||||
} else {
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
logger.error("特征计算失败");
|
||||
return new AnalysisResult(1, "特征计算失败", inputInfo);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("分析过程发生异常", e);
|
||||
qvvrData.setCause(0);
|
||||
qvvrData.setNoCal(1);
|
||||
return new AnalysisResult(1, "分析过程发生异常: " + e.getMessage(), inputInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的详细分析接口 - 直接返回分析结果对象
|
||||
* @param va A相电压数据
|
||||
* @param vb B相电压数据
|
||||
* @param vc C相电压数据
|
||||
* @param smpRate 采样率
|
||||
* @return 包含详细信息的分析结果对象
|
||||
*/
|
||||
public AnalysisResult analyzeWithDetails(float[] va, float[] vb, float[] vc, int smpRate) {
|
||||
QvvrDataStruct qvvrData = new QvvrDataStruct();
|
||||
qvvrData.setSmpVa(va);
|
||||
qvvrData.setSmpVb(vb);
|
||||
qvvrData.setSmpVc(vc);
|
||||
qvvrData.setSmpRate(smpRate);
|
||||
qvvrData.setSmpLen(va.length);
|
||||
|
||||
return analyzeVoltageSagWithDetails(qvvrData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分析器版本信息
|
||||
* @return 版本字符串
|
||||
*/
|
||||
public String getVersion() {
|
||||
return "Java Voltage Sag Analyzer v1.0.0 - Converted from C implementation";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.njcn.advance.event.cause.io;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
/**
|
||||
* COMTRADE格式数据文件读取器
|
||||
* 对应C语言中的comtrade_read函数
|
||||
*/
|
||||
public class ComtradeReader {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ComtradeReader.class);
|
||||
|
||||
/**
|
||||
* COMTRADE数据读取结果
|
||||
*/
|
||||
public static class ComtradeData {
|
||||
private float[] ua;
|
||||
private float[] ub;
|
||||
private float[] uc;
|
||||
private int sampleCount;
|
||||
private int sampleRate;
|
||||
|
||||
public ComtradeData(float[] ua, float[] ub, float[] uc, int sampleCount, int sampleRate) {
|
||||
this.ua = ua;
|
||||
this.ub = ub;
|
||||
this.uc = uc;
|
||||
this.sampleCount = sampleCount;
|
||||
this.sampleRate = sampleRate;
|
||||
}
|
||||
|
||||
public float[] getUa() { return ua; }
|
||||
public float[] getUb() { return ub; }
|
||||
public float[] getUc() { return uc; }
|
||||
public int getSampleCount() { return sampleCount; }
|
||||
public int getSampleRate() { return sampleRate; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取COMTRADE格式的DAT文件
|
||||
* @param filename 文件名
|
||||
* @param xsa A相比例因子
|
||||
* @param xsb B相比例因子
|
||||
* @param xsc C相比例因子
|
||||
* @param inputSampleRate 输入采样率
|
||||
* @param outputSampleRate 输出采样率
|
||||
* @param maxSamples 最大采样点数
|
||||
* @param recordSize 每个记录的字节数(20或14)
|
||||
* @return COMTRADE数据对象
|
||||
* @throws IOException 文件读取异常
|
||||
*/
|
||||
public static ComtradeData readComtradeFile(String filename,
|
||||
float xsa, float xsb, float xsc,
|
||||
int inputSampleRate, int outputSampleRate,
|
||||
int maxSamples, int recordSize) throws IOException {
|
||||
|
||||
logger.info("开始读取COMTRADE文件: {}", filename);
|
||||
logger.info("参数: xsa={}, xsb={}, xsc={}, 输入采样率={}, 输出采样率={}, 记录大小={}字节",
|
||||
xsa, xsb, xsc, inputSampleRate, outputSampleRate, recordSize);
|
||||
|
||||
File file = new File(filename);
|
||||
if (!file.exists()) {
|
||||
throw new IOException("文件不存在: " + filename);
|
||||
}
|
||||
|
||||
long fileSize = file.length();
|
||||
int recordCount = (int)(fileSize / recordSize);
|
||||
|
||||
logger.info("文件大小: {} 字节, 记录数: {}", fileSize, recordCount);
|
||||
|
||||
// 读取文件数据
|
||||
byte[] buffer = new byte[(int)fileSize];
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
int bytesRead = fis.read(buffer);
|
||||
if (bytesRead != fileSize) {
|
||||
throw new IOException("文件读取不完整");
|
||||
}
|
||||
}
|
||||
|
||||
// 解析数据
|
||||
float[] ua = new float[maxSamples];
|
||||
float[] ub = new float[maxSamples];
|
||||
float[] uc = new float[maxSamples];
|
||||
|
||||
int dataCount = 0;
|
||||
int decimationMod = inputSampleRate / outputSampleRate;
|
||||
|
||||
ByteBuffer byteBuffer = ByteBuffer.wrap(buffer);
|
||||
byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // 小端字节序
|
||||
|
||||
for (int i = 0; i < recordCount && dataCount < maxSamples; i++) {
|
||||
// 根据采样率转换决定是否处理此记录
|
||||
if (inputSampleRate == outputSampleRate || (i % decimationMod) == 0) {
|
||||
|
||||
int baseOffset = i * recordSize;
|
||||
|
||||
// 读取三相电压数据(从第8字节开始,每相2字节)
|
||||
short dataA = byteBuffer.getShort(baseOffset + 8);
|
||||
short dataB = byteBuffer.getShort(baseOffset + 10);
|
||||
short dataC = byteBuffer.getShort(baseOffset + 12);
|
||||
|
||||
// 应用比例因子
|
||||
ua[dataCount] = dataA * xsa;
|
||||
ub[dataCount] = dataB * xsb;
|
||||
uc[dataCount] = dataC * xsc;
|
||||
|
||||
dataCount++;
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("成功读取 {} 个数据点", dataCount);
|
||||
|
||||
return new ComtradeData(ua, ub, uc, dataCount, outputSampleRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用默认参数读取1.dat文件 - 对应C代码中的smp_data_init函数
|
||||
* @param filename 文件名
|
||||
* @return COMTRADE数据对象
|
||||
* @throws IOException 文件读取异常
|
||||
*/
|
||||
public static ComtradeData readDefault(String filename) throws IOException {
|
||||
// 使用C代码中的默认参数
|
||||
float[] xs = {0.062256f, 0.062250f, 0.062262f};
|
||||
int inputSampleRate = 256;
|
||||
int outputSampleRate = 128;
|
||||
int maxSamples = 10000; // MAX_SMP_DATA_LEN的合理值
|
||||
int recordSize = 14; // C代码中dev=1,所以使用14字节/记录
|
||||
|
||||
return readComtradeFile(filename, xs[0], xs[1], xs[2],
|
||||
inputSampleRate, outputSampleRate, maxSamples, recordSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查DAT文件是否存在
|
||||
* @param filename 文件名
|
||||
* @return 文件是否存在
|
||||
*/
|
||||
public static boolean isDatFileExists(String filename) {
|
||||
return new File(filename).exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取DAT文件信息
|
||||
* @param filename 文件名
|
||||
* @return 文件信息字符串
|
||||
*/
|
||||
public static String getDatFileInfo(String filename) {
|
||||
File file = new File(filename);
|
||||
if (!file.exists()) {
|
||||
return "文件不存在: " + filename;
|
||||
}
|
||||
|
||||
long fileSize = file.length();
|
||||
int recordCount20 = (int)(fileSize / 20);
|
||||
int recordCount14 = (int)(fileSize / 14);
|
||||
|
||||
return String.format("文件: %s, 大小: %d 字节, 可能记录数: %d (20字节/记录) 或 %d (14字节/记录)",
|
||||
filename, fileSize, recordCount20, recordCount14);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.njcn.advance.event.cause.jna;
|
||||
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Structure;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* JNA接口调用qvvr_dll.dll
|
||||
*/
|
||||
public interface QvvrCauseDLL extends Library {
|
||||
|
||||
/**
|
||||
* 加载DLL - 从resource目录或classpath
|
||||
*/
|
||||
QvvrCauseDLL INSTANCE = loadLibrary();
|
||||
|
||||
/**
|
||||
* 支持jar打包的库加载方法 - 从jar内resources提取到临时目录后加载
|
||||
*/
|
||||
static QvvrCauseDLL loadLibrary() {
|
||||
String osName = System.getProperty("os.name").toLowerCase();
|
||||
String libFileName;
|
||||
String resourcePath;
|
||||
|
||||
// 根据操作系统确定库文件名
|
||||
if (osName.contains("windows")) {
|
||||
libFileName = "qvvr_cause_dll.dll";
|
||||
resourcePath = "/qvvr_cause_dll.dll";
|
||||
} else if (osName.contains("linux")) {
|
||||
libFileName = "libqvvr_cause_dll.so";
|
||||
resourcePath = "/libqvvr_cause_dll.so";
|
||||
} else {
|
||||
throw new UnsupportedOperationException("不支持的操作系统: " + osName);
|
||||
}
|
||||
|
||||
try {
|
||||
// 从jar中提取库文件到临时目录
|
||||
File tempLibFile = extractLibraryFromJar(resourcePath, libFileName);
|
||||
|
||||
// 加载提取的库文件
|
||||
System.out.println("加载库文件: " + tempLibFile.getAbsolutePath());
|
||||
return Native.load(tempLibFile.getAbsolutePath(), QvvrCauseDLL.class);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(
|
||||
"无法加载QVVR库文件。\n" +
|
||||
"请确保文件 " + libFileName + " 存在于 src/main/resources/ 目录下。\n" +
|
||||
"当前操作系统: " + osName,
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从jar中提取库文件到临时目录
|
||||
*/
|
||||
static File extractLibraryFromJar(String resourcePath, String libFileName) throws IOException {
|
||||
// 获取资源输入流
|
||||
InputStream libStream = QvvrCauseDLL.class.getResourceAsStream(resourcePath);
|
||||
if (libStream == null) {
|
||||
throw new FileNotFoundException("在jar中找不到库文件: " + resourcePath);
|
||||
}
|
||||
|
||||
// 创建临时文件
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
File tempLibFile = new File(tempDir, libFileName);
|
||||
|
||||
//File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
||||
|
||||
// 提取库文件到临时目录
|
||||
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
||||
byte[] buffer = new byte[8192];
|
||||
int bytesRead;
|
||||
while ((bytesRead = libStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} finally {
|
||||
libStream.close();
|
||||
}
|
||||
|
||||
// 设置为可执行
|
||||
tempLibFile.setExecutable(true);
|
||||
tempLibFile.setReadable(true);
|
||||
|
||||
// JVM退出时删除临时文件
|
||||
tempLibFile.deleteOnExit();
|
||||
|
||||
System.out.println("已提取库文件到: " + tempLibFile.getAbsolutePath());
|
||||
return tempLibFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接调用C DLL的qvvr_fun_cause函数
|
||||
* void __stdcall qvvr_fun_cause(void *data)
|
||||
*/
|
||||
void qvvr_fun_cause(QvvrDataStruct data);
|
||||
|
||||
/**
|
||||
* 对应C语言的qvvr_data_struct结构体
|
||||
* 完全按照qvvr_dll.h中的定义映射
|
||||
*/
|
||||
public static class QvvrDataStruct extends Structure {
|
||||
|
||||
// 输入参数定义
|
||||
public float[] smp_va = new float[128 * 50 * 120]; // A相电压采样数据
|
||||
public float[] smp_vb = new float[128 * 50 * 120]; // B相电压采样数据
|
||||
public float[] smp_vc = new float[128 * 50 * 120]; // C相电压采样数据
|
||||
public int smp_rate; // 采样率参数
|
||||
public int smp_len; // 每个通道的采样数据个数
|
||||
|
||||
// 输入阈值参数
|
||||
public float[] threshold = new float[50]; // 预设阈值时间参数
|
||||
|
||||
// 输出结果参数定义
|
||||
public int cause; // 电压暂降判断出暂降原因 0-未知,1-短路,2-电压调节器,3-感动电机
|
||||
public int no_cal; // 未计算判断标志,该位1表示输入数据有问题(数据缺失或异常等)未进行电压暂降判断暂降原因
|
||||
|
||||
@Override
|
||||
protected List<String> getFieldOrder() {
|
||||
return Arrays.asList("smp_va", "smp_vb", "smp_vc", "smp_rate", "smp_len", "threshold", "cause", "no_cal");
|
||||
}
|
||||
|
||||
public QvvrDataStruct() {
|
||||
super();
|
||||
// 初始化输出参数
|
||||
this.cause = 0;
|
||||
this.no_cal = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 电压暂降分析结果类
|
||||
* 包含处理状态和详细分析信息
|
||||
*/
|
||||
public class AnalysisResult {
|
||||
|
||||
/**
|
||||
* 处理结果状态码
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 电压暂降原因代码
|
||||
*/
|
||||
private int cause;
|
||||
|
||||
/**
|
||||
* 原因描述字符串
|
||||
*/
|
||||
private String causeDescription;
|
||||
|
||||
/**
|
||||
* 判断状态码(算法内部路径)
|
||||
*/
|
||||
private int judgeStatus;
|
||||
|
||||
/**
|
||||
* 处理时间(毫秒)
|
||||
*/
|
||||
private long processingTime;
|
||||
|
||||
/**
|
||||
* 错误信息(失败时)
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 详细特征信息
|
||||
*/
|
||||
private DataFeature features;
|
||||
|
||||
/**
|
||||
* 输入数据基本信息
|
||||
*/
|
||||
private String inputInfo;
|
||||
|
||||
/**
|
||||
* 构造函数 - 成功结果
|
||||
*/
|
||||
public AnalysisResult(int cause, String causeDescription, int judgeStatus,
|
||||
long processingTime, DataFeature features, String inputInfo) {
|
||||
this.status = 0; // 成功
|
||||
this.cause = cause;
|
||||
this.causeDescription = causeDescription;
|
||||
this.judgeStatus = judgeStatus;
|
||||
this.processingTime = processingTime;
|
||||
this.features = features;
|
||||
this.inputInfo = inputInfo;
|
||||
this.errorMessage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数 - 失败结果
|
||||
*/
|
||||
public AnalysisResult(int status, String errorMessage, String inputInfo) {
|
||||
this.status = status;
|
||||
this.cause = 0; // 未知原因
|
||||
this.causeDescription = "未知原因";
|
||||
this.judgeStatus = -1;
|
||||
this.processingTime = 0;
|
||||
this.features = null;
|
||||
this.inputInfo = inputInfo;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
// Getters
|
||||
public int getStatus() { return status; }
|
||||
public int getCause() { return cause; }
|
||||
public String getCauseDescription() { return causeDescription; }
|
||||
public int getJudgeStatus() { return judgeStatus; }
|
||||
public long getProcessingTime() { return processingTime; }
|
||||
public String getErrorMessage() { return errorMessage; }
|
||||
public DataFeature getFeatures() { return features; }
|
||||
public String getInputInfo() { return inputInfo; }
|
||||
|
||||
/**
|
||||
* 是否成功
|
||||
*/
|
||||
public boolean isSuccess() {
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取判断路径描述
|
||||
*/
|
||||
public String getJudgeStatusDescription() {
|
||||
switch (judgeStatus) {
|
||||
case 1: return "暂降前不平衡异常";
|
||||
case 2: return "短时浅暂降判断为电压跌落";
|
||||
case 3: return "单相接地短路特征";
|
||||
case 4: return "不对称故障特征";
|
||||
case 5: return "感应电机启动特征(长时间+低SVD)";
|
||||
case 6: return "三相对称短路故障";
|
||||
case 7: return "电压调节器特征(谐波超标)";
|
||||
case 8: return "其他情况归类为短路故障";
|
||||
case 9: return "电压严重超限判断为短路故障";
|
||||
case 10: return "短时严重暂降判断为短路故障";
|
||||
default: return "未知判断路径";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完整的分析摘要
|
||||
*/
|
||||
public String getSummary() {
|
||||
if (!isSuccess()) {
|
||||
return String.format("分析失败: %s\n输入信息: %s", errorMessage, inputInfo);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("=== 电压暂降分析结果 ===\n");
|
||||
sb.append(String.format("输入信息: %s\n", inputInfo));
|
||||
sb.append(String.format("分析结果: %s (代码: %d)\n", causeDescription, cause));
|
||||
sb.append(String.format("判断路径: %s (状态码: %d)\n", getJudgeStatusDescription(), judgeStatus));
|
||||
sb.append(String.format("处理时间: %d ms\n", processingTime));
|
||||
|
||||
if (features != null) {
|
||||
sb.append(String.format("事件时段: TS=%d, TE=%d, 持续时间=%d个采样点\n",
|
||||
features.getTS(), features.getTE(), features.getHoldTime()));
|
||||
sb.append(String.format("电压特征: 最小值=%.3f, 最大值=%.3f\n",
|
||||
features.getU3Min(), features.getU3Max()));
|
||||
sb.append(String.format("相序特征: 负序=%.3f, 零序=%.3f, 不平衡度=%.3f\n",
|
||||
features.getU2Avg(), features.getU0Avg(), features.getBphAvg()));
|
||||
sb.append(String.format("椭圆特征: bi1=%.3f, bi2=%.3f\n",
|
||||
features.getBi1(), features.getBi2()));
|
||||
sb.append(String.format("SVD特征: %.6f\n", features.getSvd()));
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getSummary();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 复数结构
|
||||
* 对应C语言中的complex结构体
|
||||
*/
|
||||
public class Complex {
|
||||
private double real; // 实部
|
||||
private double imag; // 虚部
|
||||
|
||||
public Complex() {
|
||||
this(0.0, 0.0);
|
||||
}
|
||||
|
||||
public Complex(double real, double imag) {
|
||||
this.real = real;
|
||||
this.imag = imag;
|
||||
}
|
||||
|
||||
// 复数加法
|
||||
public Complex plus(Complex other) {
|
||||
return new Complex(this.real + other.real, this.imag + other.imag);
|
||||
}
|
||||
|
||||
// 复数减法
|
||||
public Complex minus(Complex other) {
|
||||
return new Complex(this.real - other.real, this.imag - other.imag);
|
||||
}
|
||||
|
||||
// 复数乘法
|
||||
public Complex multiply(Complex other) {
|
||||
double newReal = this.real * other.real - this.imag * other.imag;
|
||||
double newImag = this.real * other.imag + this.imag * other.real;
|
||||
return new Complex(newReal, newImag);
|
||||
}
|
||||
|
||||
// 复数除法
|
||||
public Complex divide(Complex other) {
|
||||
double denominator = other.real * other.real + other.imag * other.imag;
|
||||
if (Math.abs(denominator) < 1e-10) {
|
||||
throw new ArithmeticException("Division by zero complex number");
|
||||
}
|
||||
double newReal = (this.real * other.real + this.imag * other.imag) / denominator;
|
||||
double newImag = (this.imag * other.real - this.real * other.imag) / denominator;
|
||||
return new Complex(newReal, newImag);
|
||||
}
|
||||
|
||||
// 复数模
|
||||
public double abs() {
|
||||
return Math.sqrt(real * real + imag * imag);
|
||||
}
|
||||
|
||||
// 复数共轭
|
||||
public Complex conjugate() {
|
||||
return new Complex(real, -imag);
|
||||
}
|
||||
|
||||
// 复数幅角
|
||||
public double phase() {
|
||||
return Math.atan2(imag, real);
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public double getReal() {
|
||||
return real;
|
||||
}
|
||||
|
||||
public void setReal(double real) {
|
||||
this.real = real;
|
||||
}
|
||||
|
||||
public double getImag() {
|
||||
return imag;
|
||||
}
|
||||
|
||||
public void setImag(double imag) {
|
||||
this.imag = imag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (imag >= 0) {
|
||||
return String.format("%.6f + %.6fi", real, imag);
|
||||
} else {
|
||||
return String.format("%.6f - %.6fi", real, -imag);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 数据原因分析结构
|
||||
* 对应C语言中的data_cause
|
||||
*/
|
||||
public class DataCause {
|
||||
public static final int MAX_DATA_LEN = 128 * 50 * 60;
|
||||
|
||||
// 原始采样数据
|
||||
private float[] va = new float[MAX_DATA_LEN];
|
||||
private float[] vb = new float[MAX_DATA_LEN];
|
||||
private float[] vc = new float[MAX_DATA_LEN];
|
||||
private float[] t = new float[MAX_DATA_LEN];
|
||||
|
||||
// 计算出的有效值
|
||||
private float[] rmsa = new float[MAX_DATA_LEN];
|
||||
private float[] rmsb = new float[MAX_DATA_LEN];
|
||||
private float[] rmsc = new float[MAX_DATA_LEN];
|
||||
private float[] rmsMin = new float[MAX_DATA_LEN];
|
||||
private float[] rmsMax = new float[MAX_DATA_LEN];
|
||||
|
||||
// dq变换幅值
|
||||
private float[] ua = new float[MAX_DATA_LEN];
|
||||
private float[] ub = new float[MAX_DATA_LEN];
|
||||
private float[] uc = new float[MAX_DATA_LEN];
|
||||
|
||||
private float[] ua0 = new float[MAX_DATA_LEN];
|
||||
private float[] ub0 = new float[MAX_DATA_LEN];
|
||||
private float[] uc0 = new float[MAX_DATA_LEN];
|
||||
|
||||
// dq变换相位
|
||||
private float[] anga = new float[MAX_DATA_LEN];
|
||||
private float[] angb = new float[MAX_DATA_LEN];
|
||||
private float[] angc = new float[MAX_DATA_LEN];
|
||||
|
||||
// dq变换相量
|
||||
private VecStruct[] phasora = new VecStruct[MAX_DATA_LEN];
|
||||
private VecStruct[] phasorb = new VecStruct[MAX_DATA_LEN];
|
||||
private VecStruct[] phasorc = new VecStruct[MAX_DATA_LEN];
|
||||
|
||||
private int smp; // 采样率
|
||||
private int num; // 数据点数
|
||||
private float f; // 频率
|
||||
private float un; // 额定电压
|
||||
|
||||
// Constructor
|
||||
public DataCause() {
|
||||
// 初始化相量数组
|
||||
for (int i = 0; i < MAX_DATA_LEN; i++) {
|
||||
phasora[i] = new VecStruct();
|
||||
phasorb[i] = new VecStruct();
|
||||
phasorc[i] = new VecStruct();
|
||||
}
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public float[] getVa() { return va; }
|
||||
public void setVa(float[] va) {
|
||||
System.arraycopy(va, 0, this.va, 0, Math.min(va.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getVb() { return vb; }
|
||||
public void setVb(float[] vb) {
|
||||
System.arraycopy(vb, 0, this.vb, 0, Math.min(vb.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getVc() { return vc; }
|
||||
public void setVc(float[] vc) {
|
||||
System.arraycopy(vc, 0, this.vc, 0, Math.min(vc.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getT() { return t; }
|
||||
public void setT(float[] t) {
|
||||
System.arraycopy(t, 0, this.t, 0, Math.min(t.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getRmsa() { return rmsa; }
|
||||
public void setRmsa(float[] rmsa) {
|
||||
System.arraycopy(rmsa, 0, this.rmsa, 0, Math.min(rmsa.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getRmsb() { return rmsb; }
|
||||
public void setRmsb(float[] rmsb) {
|
||||
System.arraycopy(rmsb, 0, this.rmsb, 0, Math.min(rmsb.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getRmsc() { return rmsc; }
|
||||
public void setRmsc(float[] rmsc) {
|
||||
System.arraycopy(rmsc, 0, this.rmsc, 0, Math.min(rmsc.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getRmsMin() { return rmsMin; }
|
||||
public void setRmsMin(float[] rmsMin) {
|
||||
System.arraycopy(rmsMin, 0, this.rmsMin, 0, Math.min(rmsMin.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getRmsMax() { return rmsMax; }
|
||||
public void setRmsMax(float[] rmsMax) {
|
||||
System.arraycopy(rmsMax, 0, this.rmsMax, 0, Math.min(rmsMax.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUa() { return ua; }
|
||||
public void setUa(float[] ua) {
|
||||
System.arraycopy(ua, 0, this.ua, 0, Math.min(ua.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUb() { return ub; }
|
||||
public void setUb(float[] ub) {
|
||||
System.arraycopy(ub, 0, this.ub, 0, Math.min(ub.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUc() { return uc; }
|
||||
public void setUc(float[] uc) {
|
||||
System.arraycopy(uc, 0, this.uc, 0, Math.min(uc.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUa0() { return ua0; }
|
||||
public void setUa0(float[] ua0) {
|
||||
System.arraycopy(ua0, 0, this.ua0, 0, Math.min(ua0.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUb0() { return ub0; }
|
||||
public void setUb0(float[] ub0) {
|
||||
System.arraycopy(ub0, 0, this.ub0, 0, Math.min(ub0.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getUc0() { return uc0; }
|
||||
public void setUc0(float[] uc0) {
|
||||
System.arraycopy(uc0, 0, this.uc0, 0, Math.min(uc0.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getAnga() { return anga; }
|
||||
public void setAnga(float[] anga) {
|
||||
System.arraycopy(anga, 0, this.anga, 0, Math.min(anga.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getAngb() { return angb; }
|
||||
public void setAngb(float[] angb) {
|
||||
System.arraycopy(angb, 0, this.angb, 0, Math.min(angb.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public float[] getAngc() { return angc; }
|
||||
public void setAngc(float[] angc) {
|
||||
System.arraycopy(angc, 0, this.angc, 0, Math.min(angc.length, MAX_DATA_LEN));
|
||||
}
|
||||
|
||||
public VecStruct[] getPhasora() { return phasora; }
|
||||
public VecStruct[] getPhasorb() { return phasorb; }
|
||||
public VecStruct[] getPhasorc() { return phasorc; }
|
||||
|
||||
public int getSmp() { return smp; }
|
||||
public void setSmp(int smp) { this.smp = smp; }
|
||||
|
||||
public int getNum() { return num; }
|
||||
public void setNum(int num) { this.num = num; }
|
||||
|
||||
public float getF() { return f; }
|
||||
public void setF(float f) { this.f = f; }
|
||||
|
||||
public float getUn() { return un; }
|
||||
public void setUn(float un) { this.un = un; }
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 数据特征结构
|
||||
* 对应C语言中的data_feature
|
||||
*/
|
||||
public class DataFeature {
|
||||
// 暂降原因定义
|
||||
public static final int CAUSE_TYPE0 = 0; // 未知
|
||||
public static final int CAUSE_TYPE1 = 1; // 短路故障
|
||||
public static final int CAUSE_TYPE2 = 2; // 电压调节器
|
||||
public static final int CAUSE_TYPE3 = 3; // 感动电机
|
||||
public static final int CAUSE_TYPE4 = 4; // 电压跌落
|
||||
|
||||
|
||||
// 暂降类型定义
|
||||
public static final int TYPE0 = 0; // BC相间故障
|
||||
public static final int TYPE1 = 1; // C相接地故障
|
||||
public static final int TYPE2 = 2; // AC相间故障
|
||||
public static final int TYPE3 = 3; // A相接地故障
|
||||
public static final int TYPE4 = 4; // AB相间故障
|
||||
public static final int TYPE5 = 5; // B相接地故障
|
||||
public static final int TYPE6 = 6; // BC相间接地
|
||||
public static final int TYPE7 = 7; // AC相间接地
|
||||
public static final int TYPE8 = 8; // AB相间接地
|
||||
public static final int TYPE9 = 9; // 三相故障
|
||||
public static final int TYPE10 = 10; // 未知
|
||||
|
||||
|
||||
private int TS; // 暂降开始时刻
|
||||
private int TE; // 暂降结束时刻
|
||||
private int smp; // 采样率
|
||||
private float UN; // 系统额定电压
|
||||
|
||||
// 特征参数
|
||||
private int preBphErr; // 稳态前电气平衡异常标志
|
||||
private int preHarmErr; // 稳态前偶次谐波异常标志
|
||||
private int uLow50; // 稳态事件期间三相中低于50%额值持续一个周波以上
|
||||
private int uHigh120; // 稳态事件期间三相中高于120%额值持续一个周波以上
|
||||
private int holdTime; // 持续时间(按照周波计算)
|
||||
private float u3Max; // 暂降期电压有效值最大值
|
||||
private float u3Min; // 最小值(标幺)
|
||||
private float[] uMin = new float[3]; // 三相最小值
|
||||
private float gao; // 高斯性
|
||||
private float bi1; // 椭圆特征bi1
|
||||
private float bi2; // 椭圆特征bi2
|
||||
private float biaozhun; // 统计特征-标准差
|
||||
private float pian; // 统计特征-偏度
|
||||
private float qiao; // 统计特征-峭度
|
||||
|
||||
private float u2Max; // 负序电压最大值(相对un百分比)
|
||||
private float u2Avg; // 负序电压平均值(相对un百分比)
|
||||
private float u0Max; // 零序电压最大值(相对un百分比)
|
||||
private float u0Avg; // 零序电压平均值(相对un百分比)
|
||||
private float bphMax; // 不平衡度%
|
||||
private float bphAvg; // 不平衡度%
|
||||
|
||||
private float[] harm2Max = new float[3]; // 2次谐波三相的最大值 相对un
|
||||
private float[] harm4Max = new float[3]; // 4次谐波三相的最大值 相对un
|
||||
private float[] harm2Avg = new float[3]; // 2次谐波三相平均值 相对un
|
||||
private float[] harm4Avg = new float[3]; // 4次谐波三相平均值 相对un
|
||||
|
||||
private float svd; // 奇异值
|
||||
|
||||
// 结果
|
||||
private int cause; // 电压暂降分类暂降原因
|
||||
|
||||
// Constructors
|
||||
public DataFeature() {
|
||||
this.cause = CAUSE_TYPE0;
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public int getTS() { return TS; }
|
||||
public void setTS(int TS) { this.TS = TS; }
|
||||
|
||||
public int getTE() { return TE; }
|
||||
public void setTE(int TE) { this.TE = TE; }
|
||||
|
||||
public int getSmp() { return smp; }
|
||||
public void setSmp(int smp) { this.smp = smp; }
|
||||
|
||||
public float getUN() { return UN; }
|
||||
public void setUN(float UN) { this.UN = UN; }
|
||||
|
||||
public int getPreBphErr() { return preBphErr; }
|
||||
public void setPreBphErr(int preBphErr) { this.preBphErr = preBphErr; }
|
||||
|
||||
public int getPreHarmErr() { return preHarmErr; }
|
||||
public void setPreHarmErr(int preHarmErr) { this.preHarmErr = preHarmErr; }
|
||||
|
||||
public int getuLow50() { return uLow50; }
|
||||
public void setuLow50(int uLow50) { this.uLow50 = uLow50; }
|
||||
|
||||
public int getuHigh120() { return uHigh120; }
|
||||
public void setuHigh120(int uHigh120) { this.uHigh120 = uHigh120; }
|
||||
|
||||
public int getHoldTime() { return holdTime; }
|
||||
public void setHoldTime(int holdTime) { this.holdTime = holdTime; }
|
||||
|
||||
public float getU3Max() { return u3Max; }
|
||||
public void setU3Max(float u3Max) { this.u3Max = u3Max; }
|
||||
|
||||
public float getU3Min() { return u3Min; }
|
||||
public void setU3Min(float u3Min) { this.u3Min = u3Min; }
|
||||
|
||||
public float[] getUMin() { return uMin; }
|
||||
public void setUMin(float[] uMin) { System.arraycopy(uMin, 0, this.uMin, 0, Math.min(uMin.length, 3)); }
|
||||
|
||||
public float getGao() { return gao; }
|
||||
public void setGao(float gao) { this.gao = gao; }
|
||||
|
||||
public float getBi1() { return bi1; }
|
||||
public void setBi1(float bi1) { this.bi1 = bi1; }
|
||||
|
||||
public float getBi2() { return bi2; }
|
||||
public void setBi2(float bi2) { this.bi2 = bi2; }
|
||||
|
||||
public float getBiaozhun() { return biaozhun; }
|
||||
public void setBiaozhun(float biaozhun) { this.biaozhun = biaozhun; }
|
||||
|
||||
public float getPian() { return pian; }
|
||||
public void setPian(float pian) { this.pian = pian; }
|
||||
|
||||
public float getQiao() { return qiao; }
|
||||
public void setQiao(float qiao) { this.qiao = qiao; }
|
||||
|
||||
public float getU2Max() { return u2Max; }
|
||||
public void setU2Max(float u2Max) { this.u2Max = u2Max; }
|
||||
|
||||
public float getU2Avg() { return u2Avg; }
|
||||
public void setU2Avg(float u2Avg) { this.u2Avg = u2Avg; }
|
||||
|
||||
public float getU0Max() { return u0Max; }
|
||||
public void setU0Max(float u0Max) { this.u0Max = u0Max; }
|
||||
|
||||
public float getU0Avg() { return u0Avg; }
|
||||
public void setU0Avg(float u0Avg) { this.u0Avg = u0Avg; }
|
||||
|
||||
public float getBphMax() { return bphMax; }
|
||||
public void setBphMax(float bphMax) { this.bphMax = bphMax; }
|
||||
|
||||
public float getBphAvg() { return bphAvg; }
|
||||
public void setBphAvg(float bphAvg) { this.bphAvg = bphAvg; }
|
||||
|
||||
public float[] getHarm2Max() { return harm2Max; }
|
||||
public void setHarm2Max(float[] harm2Max) { System.arraycopy(harm2Max, 0, this.harm2Max, 0, Math.min(harm2Max.length, 3)); }
|
||||
|
||||
public float[] getHarm4Max() { return harm4Max; }
|
||||
public void setHarm4Max(float[] harm4Max) { System.arraycopy(harm4Max, 0, this.harm4Max, 0, Math.min(harm4Max.length, 3)); }
|
||||
|
||||
public float[] getHarm2Avg() { return harm2Avg; }
|
||||
public void setHarm2Avg(float[] harm2Avg) { System.arraycopy(harm2Avg, 0, this.harm2Avg, 0, Math.min(harm2Avg.length, 3)); }
|
||||
|
||||
public float[] getHarm4Avg() { return harm4Avg; }
|
||||
public void setHarm4Avg(float[] harm4Avg) { System.arraycopy(harm4Avg, 0, this.harm4Avg, 0, Math.min(harm4Avg.length, 3)); }
|
||||
|
||||
public float getSvd() { return svd; }
|
||||
public void setSvd(float svd) { this.svd = svd; }
|
||||
|
||||
public int getCause() { return cause; }
|
||||
public void setCause(int cause) { this.cause = cause; }
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 电压暂降数据结构
|
||||
* 对应C语言中的qvvr_data_struct
|
||||
*/
|
||||
public class QvvrDataStruct {
|
||||
public static final int MAX_SMP_DATA_LEN = 128 * 50 * 120;
|
||||
|
||||
// 输入参数定义
|
||||
private float[] smpVa = new float[MAX_SMP_DATA_LEN]; // A相电压采样数据
|
||||
private float[] smpVb = new float[MAX_SMP_DATA_LEN]; // B相电压采样数据
|
||||
private float[] smpVc = new float[MAX_SMP_DATA_LEN]; // C相电压采样数据
|
||||
private int smpRate; // 采样率参数
|
||||
private int smpLen; // 每个通道的采样数据个数
|
||||
|
||||
// 输入阈值参数
|
||||
private float[] threshold = new float[50]; // 预设阈值时间参数
|
||||
|
||||
// 输出结果参数定义
|
||||
private int cause; // 电压暂降判断出暂降原因 0-未知,1-短路,2-电压调节器,3-感动电机
|
||||
private int noCal; // 未计算判断标志,该位1表示输入数据有问题
|
||||
|
||||
// Constructors
|
||||
public QvvrDataStruct() {
|
||||
this.cause = 0;
|
||||
this.noCal = 0;
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public float[] getSmpVa() {
|
||||
return smpVa;
|
||||
}
|
||||
|
||||
public void setSmpVa(float[] smpVa) {
|
||||
if (smpVa.length <= MAX_SMP_DATA_LEN) {
|
||||
System.arraycopy(smpVa, 0, this.smpVa, 0, smpVa.length);
|
||||
}
|
||||
}
|
||||
|
||||
public float[] getSmpVb() {
|
||||
return smpVb;
|
||||
}
|
||||
|
||||
public void setSmpVb(float[] smpVb) {
|
||||
if (smpVb.length <= MAX_SMP_DATA_LEN) {
|
||||
System.arraycopy(smpVb, 0, this.smpVb, 0, smpVb.length);
|
||||
}
|
||||
}
|
||||
|
||||
public float[] getSmpVc() {
|
||||
return smpVc;
|
||||
}
|
||||
|
||||
public void setSmpVc(float[] smpVc) {
|
||||
if (smpVc.length <= MAX_SMP_DATA_LEN) {
|
||||
System.arraycopy(smpVc, 0, this.smpVc, 0, smpVc.length);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSmpRate() {
|
||||
return smpRate;
|
||||
}
|
||||
|
||||
public void setSmpRate(int smpRate) {
|
||||
this.smpRate = smpRate;
|
||||
}
|
||||
|
||||
public int getSmpLen() {
|
||||
return smpLen;
|
||||
}
|
||||
|
||||
public void setSmpLen(int smpLen) {
|
||||
this.smpLen = smpLen;
|
||||
}
|
||||
|
||||
public float[] getThreshold() {
|
||||
return threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(float[] threshold) {
|
||||
if (threshold.length <= 50) {
|
||||
System.arraycopy(threshold, 0, this.threshold, 0, threshold.length);
|
||||
}
|
||||
}
|
||||
|
||||
public int getCause() {
|
||||
return cause;
|
||||
}
|
||||
|
||||
public void setCause(int cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public int getNoCal() {
|
||||
return noCal;
|
||||
}
|
||||
|
||||
public void setNoCal(int noCal) {
|
||||
this.noCal = noCal;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.advance.event.cause.model;
|
||||
|
||||
/**
|
||||
* 向量结构
|
||||
* 对应C语言中的vec_struct
|
||||
*/
|
||||
public class VecStruct {
|
||||
private float r; // 实部
|
||||
private float x; // 虚部
|
||||
|
||||
public VecStruct() {
|
||||
this(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
public VecStruct(float r, float x) {
|
||||
this.r = r;
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
// 向量模长
|
||||
public float magnitude() {
|
||||
return (float) Math.sqrt(r * r + x * x);
|
||||
}
|
||||
|
||||
// 向量相角
|
||||
public float phase() {
|
||||
return (float) Math.atan2(x, r);
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public float getR() {
|
||||
return r;
|
||||
}
|
||||
|
||||
public void setR(float r) {
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
public float getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(float x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("VecStruct{r=%.6f, x=%.6f}", r, x);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.advance.event.service;
|
||||
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2025/7/30 10:50
|
||||
*/
|
||||
public interface IEventAdvanceService {
|
||||
/**
|
||||
* 根据暂态信息获取暂降事件原因和类型
|
||||
* @param eventAnalysis 包含了暂降事件ID和波形名称
|
||||
* @return 分析后的结果
|
||||
*/
|
||||
EventAnalysisDTO analysisCauseAndType(EventAnalysisDTO eventAnalysis);
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package com.njcn.advance.event.service;
|
||||
|
||||
import com.njcn.advance.event.cause.jna.QvvrCauseDLL;
|
||||
import com.njcn.advance.event.cause.model.DataFeature;
|
||||
import com.njcn.advance.event.type.jna.QvvrDLL;
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.event.file.component.WaveFileComponent;
|
||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2025/7/30 11:24
|
||||
*/
|
||||
@Slf4j
|
||||
public class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
WaveFileComponent waveFileComponent = new WaveFileComponent();
|
||||
EventAnalysisDTO eventAnalysis = new EventAnalysisDTO();
|
||||
WaveDataDTO waveDataDTO;
|
||||
String waveName = "11";
|
||||
String cfgPath, datPath;
|
||||
cfgPath = "D:\\comtrade\\00-B7-8D-00-FA-44" + File.separator + waveName + GeneralConstant.CFG;
|
||||
datPath = "D:\\comtrade\\00-B7-8D-00-FA-44" + File.separator + waveName + GeneralConstant.DAT;
|
||||
log.info("本地磁盘波形文件路径----" + cfgPath);
|
||||
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath);
|
||||
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath(datPath);
|
||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
|
||||
// // java针对暂降原因分析的调用
|
||||
// QvvrDataStruct qvvrDataStruct = new QvvrDataStruct();
|
||||
// // 采样率
|
||||
// qvvrDataStruct.setSmpRate(waveDataDTO.getComtradeCfgDTO().getFinalSampleRate());
|
||||
// // 瞬时值
|
||||
// List<List<Float>> listWaveData = waveDataDTO.getListWaveData();
|
||||
// // 通道采样个数
|
||||
// qvvrDataStruct.setSmpLen(listWaveData.size());
|
||||
// // 获取ABC三相的瞬时数据
|
||||
// // A相电压采样数据
|
||||
// float[] smpVa = new float[listWaveData.size()];
|
||||
// // B相电压采样数据
|
||||
// float[] smpVb = new float[listWaveData.size()];
|
||||
// // C相电压采样数据
|
||||
// float[] smpVc = new float[listWaveData.size()];
|
||||
// for (int i = 0; i < listWaveData.size(); i++) {
|
||||
// smpVa[i] = listWaveData.get(i).get(1);
|
||||
// smpVb[i] = listWaveData.get(i).get(2);
|
||||
// smpVc[i] = listWaveData.get(i).get(3);
|
||||
// }
|
||||
// qvvrDataStruct.setSmpVa(smpVa);
|
||||
// qvvrDataStruct.setSmpVb(smpVb);
|
||||
// qvvrDataStruct.setSmpVc(smpVc);
|
||||
//
|
||||
// // 暂降原因
|
||||
// VoltageSagAnalyzer voltageSagAnalyzer = new VoltageSagAnalyzer();
|
||||
// try{
|
||||
// AnalysisResult cause = voltageSagAnalyzer.analyzeVoltageSagWithDetails(qvvrDataStruct);
|
||||
// eventAnalysis.setCause(cause.getCause());
|
||||
// }catch (Exception e){
|
||||
// log.error("DAT文件分析异常", e);
|
||||
// eventAnalysis.setCause(DataFeature.CAUSE_TYPE0);
|
||||
// eventAnalysis.setCauseFlag(0);
|
||||
// }
|
||||
|
||||
|
||||
List<List<Float>> listWaveData = waveDataDTO.getListWaveData();
|
||||
|
||||
// 暂降原因JNA的方式
|
||||
com.njcn.advance.event.cause.jna.QvvrCauseDLL.QvvrDataStruct causeDataStruct = new com.njcn.advance.event.cause.jna.QvvrCauseDLL.QvvrDataStruct();
|
||||
causeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
||||
causeDataStruct.smp_len = listWaveData.size();
|
||||
// 获取ABC三相的瞬时数据
|
||||
for (int i = 0; i < listWaveData.size(); i++) {
|
||||
causeDataStruct.smp_va[i] = listWaveData.get(i).get(1);
|
||||
causeDataStruct.smp_vb[i] = listWaveData.get(i).get(2);
|
||||
causeDataStruct.smp_vc[i] = listWaveData.get(i).get(3);
|
||||
}
|
||||
// 执行算法分析 - 直接调用C DLL
|
||||
try {
|
||||
QvvrCauseDLL.INSTANCE.qvvr_fun_cause(causeDataStruct);
|
||||
System.out.println("暂降原因: " + getCauseDescription(causeDataStruct.cause));
|
||||
} catch (Exception e) {
|
||||
System.err.println("调用DLL失败: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// 暂降类型JNA的方式
|
||||
// 创建数据结构
|
||||
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) {
|
||||
// 显示结果
|
||||
System.out.println("检测到事件数: " + typeDataStruct.evt_num);
|
||||
// 全局比较找出最小三相电压特征值
|
||||
float globalMinVoltage = Float.MAX_VALUE;
|
||||
int globalFaultType = -1;
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("=== 全局比较结果 ===");
|
||||
System.out.println("全局最小三相电压: " + String.format("%.3f", globalMinVoltage) + "V");
|
||||
System.out.println("最终暂降类型: " + globalFaultType + " (" + getFaultTypeDescription(globalFaultType) + ")");
|
||||
} else {
|
||||
System.out.println("结果: 未检测到电压暂降事件");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("调用DLL失败: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取原因描述
|
||||
*/
|
||||
private static String getCauseDescription(int cause) {
|
||||
switch (cause) {
|
||||
case DataFeature.CAUSE_TYPE0:
|
||||
return "未知原因";
|
||||
case DataFeature.CAUSE_TYPE1:
|
||||
return "短路故障";
|
||||
case DataFeature.CAUSE_TYPE2:
|
||||
return "电压调节器";
|
||||
case DataFeature.CAUSE_TYPE3:
|
||||
return "感应电机启动";
|
||||
case DataFeature.CAUSE_TYPE4:
|
||||
return "电压跌落";
|
||||
default:
|
||||
return "未定义原因";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 相数类型描述
|
||||
*/
|
||||
public static String getPhaseTypeDescription(int phaseType) {
|
||||
switch (phaseType) {
|
||||
case 1:
|
||||
return "单相";
|
||||
case 2:
|
||||
return "两相";
|
||||
case 3:
|
||||
return "三相";
|
||||
default:
|
||||
return "未知相数(" + phaseType + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 故障类型描述
|
||||
*/
|
||||
public static String getFaultTypeDescription(int faultType) {
|
||||
switch (faultType) {
|
||||
case 0:
|
||||
return "BC相间故障";
|
||||
case 1:
|
||||
return "C相接地故障";
|
||||
case 2:
|
||||
return "AC相间故障";
|
||||
case 3:
|
||||
return "A相接地故障";
|
||||
case 4:
|
||||
return "AB相间故障";
|
||||
case 5:
|
||||
return "B相接地故障";
|
||||
case 6:
|
||||
return "BC相间接地";
|
||||
case 7:
|
||||
return "AC相间接地";
|
||||
case 8:
|
||||
return "AB相间接地";
|
||||
case 9:
|
||||
return "三相故障";
|
||||
case 10:
|
||||
return "未知";
|
||||
default:
|
||||
return "未知类型(" + faultType + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.njcn.advance.event.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njcn.advance.event.cause.jna.QvvrCauseDLL;
|
||||
import com.njcn.advance.event.cause.model.DataFeature;
|
||||
import com.njcn.advance.event.type.jna.*;
|
||||
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
|
||||
import com.njcn.advance.event.service.IEventAdvanceService;
|
||||
import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.event.file.component.WaveFileComponent;
|
||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2025/7/30 10:51
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EventAdvanceServiceImpl implements IEventAdvanceService {
|
||||
|
||||
private final GeneralInfo generalInfo;
|
||||
|
||||
private final WaveFileComponent waveFileComponent;
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
|
||||
@Override
|
||||
public EventAnalysisDTO analysisCauseAndType(EventAnalysisDTO eventAnalysis) {
|
||||
WaveDataDTO waveDataDTO;
|
||||
String waveName = eventAnalysis.getWaveName();
|
||||
String cfgPath, datPath, cfgPath2, datPath2;
|
||||
String ip = eventAnalysis.getIp();
|
||||
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
|
||||
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
|
||||
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
|
||||
log.info("本地磁盘波形文件路径----" + cfgPath);
|
||||
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath);
|
||||
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath(datPath);
|
||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
|
||||
} else {
|
||||
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
|
||||
datPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT;
|
||||
//适配文件后缀小写
|
||||
cfgPath2 = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG.toLowerCase();
|
||||
datPath2 = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT.toLowerCase();
|
||||
log.info("文件服务器波形文件路径----" + cfgPath);
|
||||
try (
|
||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath);
|
||||
InputStream datStream = fileStorageUtil.getFileStream(datPath)
|
||||
) {
|
||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath2);
|
||||
InputStream datStream = fileStorageUtil.getFileStream(datPath2);
|
||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
|
||||
} catch (Exception e1) {
|
||||
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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的方式
|
||||
QvvrCauseDLL.QvvrDataStruct causeDataStruct = new QvvrCauseDLL.QvvrDataStruct();
|
||||
causeDataStruct.smp_rate = waveDataDTO.getComtradeCfgDTO().getFinalSampleRate();
|
||||
causeDataStruct.smp_len = listWaveData.size();
|
||||
// 获取ABC三相的瞬时数据
|
||||
for (int i = 0; i < listWaveData.size(); i++) {
|
||||
causeDataStruct.smp_va[i] = listWaveData.get(i).get(1);
|
||||
causeDataStruct.smp_vb[i] = listWaveData.get(i).get(2);
|
||||
causeDataStruct.smp_vc[i] = listWaveData.get(i).get(3);
|
||||
}
|
||||
// 执行算法分析 - 直接调用C DLL
|
||||
try {
|
||||
QvvrCauseDLL.INSTANCE.qvvr_fun_cause(causeDataStruct);
|
||||
eventAnalysis.setCause(causeDataStruct.cause);
|
||||
if (causeDataStruct.no_cal != 0) {
|
||||
eventAnalysis.setCauseFlag(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
eventAnalysis.setCause(DataFeature.CAUSE_TYPE0);
|
||||
eventAnalysis.setCauseFlag(0);
|
||||
}
|
||||
System.out.println("暂降原因分析完毕===============");
|
||||
System.out.println("cause:" + eventAnalysis);
|
||||
return eventAnalysis;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.njcn.advance.event.type.jna;
|
||||
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Structure;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* JNA接口调用qvvr_dll.dll
|
||||
*/
|
||||
public interface QvvrDLL extends Library {
|
||||
|
||||
/**
|
||||
* 加载DLL - 从resource目录或classpath
|
||||
*/
|
||||
QvvrDLL INSTANCE = loadLibrary();
|
||||
|
||||
/**
|
||||
* 支持jar打包的库加载方法 - 从jar内resources提取到临时目录后加载
|
||||
*/
|
||||
static QvvrDLL loadLibrary() {
|
||||
String osName = System.getProperty("os.name").toLowerCase();
|
||||
String libFileName;
|
||||
String resourcePath;
|
||||
|
||||
// 根据操作系统确定库文件名
|
||||
if (osName.contains("windows")) {
|
||||
libFileName = "qvvr_dll.dll";
|
||||
resourcePath = "/qvvr_dll.dll";
|
||||
} else if (osName.contains("linux")) {
|
||||
libFileName = "libqvvr_dll.so";
|
||||
resourcePath = "/libqvvr_dll.so";
|
||||
} else {
|
||||
throw new UnsupportedOperationException("不支持的操作系统: " + osName);
|
||||
}
|
||||
|
||||
try {
|
||||
// 从jar中提取库文件到临时目录
|
||||
File tempLibFile = extractLibraryFromJar(resourcePath, libFileName);
|
||||
// 加载提取的库文件
|
||||
System.out.println("加载库文件: " + tempLibFile.getAbsolutePath());
|
||||
return Native.load(tempLibFile.getAbsolutePath(), QvvrDLL.class);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(
|
||||
"无法加载QVVR库文件。\n" +
|
||||
"请确保文件 " + libFileName + " 存在于 src/main/resources/ 目录下。\n" +
|
||||
"当前操作系统: " + osName,
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从jar中提取库文件到临时目录
|
||||
*/
|
||||
static File extractLibraryFromJar(String resourcePath, String libFileName) throws IOException {
|
||||
// 获取资源输入流
|
||||
InputStream libStream = QvvrDLL.class.getResourceAsStream(resourcePath);
|
||||
if (libStream == null) {
|
||||
throw new FileNotFoundException("在jar中找不到库文件: " + resourcePath);
|
||||
}
|
||||
|
||||
// 创建临时文件
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
File tempLibFile = new File(tempDir, libFileName);
|
||||
|
||||
// File tempLibFile = new File(tempDir, "qvvr_" + System.currentTimeMillis() + "_" + libFileName);
|
||||
|
||||
// 提取库文件到临时目录
|
||||
try (FileOutputStream out = new FileOutputStream(tempLibFile)) {
|
||||
byte[] buffer = new byte[8192];
|
||||
int bytesRead;
|
||||
while ((bytesRead = libStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} finally {
|
||||
libStream.close();
|
||||
}
|
||||
|
||||
// 设置为可执行
|
||||
tempLibFile.setExecutable(true);
|
||||
tempLibFile.setReadable(true);
|
||||
|
||||
// JVM退出时删除临时文件
|
||||
tempLibFile.deleteOnExit();
|
||||
|
||||
System.out.println("已提取库文件到: " + tempLibFile.getAbsolutePath());
|
||||
return tempLibFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接调用C DLL的qvvr_fun函数
|
||||
* void __stdcall qvvr_fun(void *data)
|
||||
*/
|
||||
void qvvr_fun(QvvrDataStruct data);
|
||||
|
||||
void ping();
|
||||
|
||||
/**
|
||||
* 对应C语言的qvvr_data_struct结构体
|
||||
*/
|
||||
public static class QvvrDataStruct extends Structure {
|
||||
|
||||
// 输入数据
|
||||
public float[] smp_va = new float[128 * 50 * 120]; // A相电压
|
||||
public float[] smp_vb = new float[128 * 50 * 120]; // B相电压
|
||||
public float[] smp_vc = new float[128 * 50 * 120]; // C相电压
|
||||
public int smp_rate; // 采样频率
|
||||
public int smp_len; // 数据长度
|
||||
|
||||
// 输出结果
|
||||
public int evt_num; // 事件数量
|
||||
public EventBuffer[] evt_buf = new EventBuffer[32]; // 事件缓冲区
|
||||
|
||||
@Override
|
||||
protected List<String> getFieldOrder() {
|
||||
return Arrays.asList("smp_va", "smp_vb", "smp_vc", "smp_rate", "smp_len", "evt_num", "evt_buf");
|
||||
}
|
||||
|
||||
public QvvrDataStruct() {
|
||||
super();
|
||||
// 初始化事件缓冲区
|
||||
for (int i = 0; i < 32; i++) {
|
||||
evt_buf[i] = new EventBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件缓冲区结构
|
||||
*/
|
||||
public static class EventBuffer extends Structure {
|
||||
public int[] qvvr_cata_cause = new int[256];
|
||||
public int[] qvvr_phasetype = new int[256];
|
||||
public int[] qvvr_cata_type = new int[256];
|
||||
|
||||
public float hold_time_rms;
|
||||
public float hold_time_dq;
|
||||
|
||||
public float POW_a;
|
||||
public float POW_b;
|
||||
public float POW_c;
|
||||
|
||||
public float Voltagechange_Va;
|
||||
public float Voltagechange_Vb;
|
||||
public float Voltagechange_Vc;
|
||||
|
||||
public int SEG_T_num;
|
||||
public int[] SEG_T0_idx = new int[256];
|
||||
public int[] SEG_T_idx = new int[256];
|
||||
|
||||
public int SEG_RMS_T_num;
|
||||
public int[] SEG_RMS_T_idx = new int[256];
|
||||
|
||||
public int u_min_num;
|
||||
public float[] ua_min = new float[256];
|
||||
public float[] ub_min = new float[256];
|
||||
public float[] uc_min = new float[256];
|
||||
public float[] u3_min = new float[256];
|
||||
public int[] order_min_idx = new int[256];
|
||||
|
||||
public float[] angle_diff_ap = new float[256];
|
||||
public float[] angle_diff_bp = new float[256];
|
||||
public float[] angle_diff_cp = new float[256];
|
||||
public float[] angle_diff_an = new float[256];
|
||||
public float[] angle_diff_bn = new float[256];
|
||||
public float[] angle_diff_cn = new float[256];
|
||||
|
||||
public float[] bph_max_value = new float[256];
|
||||
|
||||
@Override
|
||||
protected List<String> getFieldOrder() {
|
||||
return Arrays.asList(
|
||||
"qvvr_cata_cause", "qvvr_phasetype", "qvvr_cata_type",
|
||||
"hold_time_rms", "hold_time_dq",
|
||||
"POW_a", "POW_b", "POW_c",
|
||||
"Voltagechange_Va", "Voltagechange_Vb", "Voltagechange_Vc",
|
||||
"SEG_T_num", "SEG_T0_idx", "SEG_T_idx",
|
||||
"SEG_RMS_T_num", "SEG_RMS_T_idx",
|
||||
"u_min_num", "ua_min", "ub_min", "uc_min", "u3_min", "order_min_idx",
|
||||
"angle_diff_ap", "angle_diff_bp", "angle_diff_cp",
|
||||
"angle_diff_an", "angle_diff_bn", "angle_diff_cn",
|
||||
"bph_max_value"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.njcn.advance.mapper;
|
||||
|
||||
public interface RelevanceMapper {
|
||||
|
||||
|
||||
// 查询监测点的线路ID
|
||||
String queryLineIdbyPointId(String pointId);
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.advance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.dto.SagEvent;
|
||||
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.advance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.dto.SagEvent;
|
||||
|
||||
import com.njcn.advance.pojo.dto.relevent.EventAssObj;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailAssPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.advance.mapper.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.po.assess.AssessCapacitorParam;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
public interface AssessCapacitorParamMapper extends BaseMapper<AssessCapacitorParam> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.advance.mapper.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicCableType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 线缆类型字典 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
public interface AssessDicCableTypeMapper extends BaseMapper<AssessDicCableType> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.advance.mapper.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicHarmonicCharacter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 谐波源特性字典 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
public interface AssessDicHarmonicCharacterMapper extends BaseMapper<AssessDicHarmonicCharacter> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.advance.mapper.assess;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.po.assess.AssessDicShockLoad;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 冲击负荷字典 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2025-06-06
|
||||
*/
|
||||
public interface AssessDicShockLoadMapper extends BaseMapper<AssessDicShockLoad> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user