Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f1f42f8d7 | |||
| 3ac18b896a | |||
| f86e7f0183 | |||
|
|
c99a97fff1 | ||
|
|
0f712c45fd | ||
|
|
d738116968 | ||
|
|
e322eb2413 | ||
|
|
0200607c0c | ||
|
|
a6c536cf45 | ||
|
|
e61269e489 | ||
|
|
01e95e71fb | ||
|
|
b4f4037987 | ||
| a5be610a6a | |||
| f8e88b87d0 | |||
|
|
6ee4da4422 | ||
|
|
20e1b8cce7 | ||
|
|
b3b5e64e07 | ||
| 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 |
@@ -37,7 +37,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
.antMatchers("/oauth/getPublicKey","/oauth/logout","/auth/getImgCode","/judgeToken/guangZhou","/judgeToken/heBei","/oauth/autoLogin").permitAll()
|
.antMatchers("/oauth/getPublicKey","/oauth/logout","/auth/getImgCode","/judgeToken/guangZhou","/judgeToken/heBei","/oauth/autoLogin","/judgeToken/productionManagementCheck").permitAll()
|
||||||
// @link https://gitee.com/xiaoym/knife4j/issues/I1Q5X6 (接口文档knife4j需要放行的规则)
|
// @link https://gitee.com/xiaoym/knife4j/issues/I1Q5X6 (接口文档knife4j需要放行的规则)
|
||||||
.antMatchers("/webjars/**","/doc.html","/swagger-resources/**","/v2/api-docs").permitAll()
|
.antMatchers("/webjars/**","/doc.html","/swagger-resources/**","/v2/api-docs").permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
|
|||||||
@@ -76,6 +76,93 @@ public class JudgeThirdToken extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产管理系统token校验
|
||||||
|
* @param token
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/productionManagementCheck")
|
||||||
|
@ApiOperation("生产管理系统token校验")
|
||||||
|
@ApiImplicitParam(name = "token", required = true)
|
||||||
|
public HttpResult<Object> productionManagementCheck (String token) {
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
String methodDescribe = getMethodDescribe("productionManagementCheck");
|
||||||
|
LogUtil.njcnDebug(log, "{},token:{}", methodDescribe, token);
|
||||||
|
|
||||||
|
// 请求地址
|
||||||
|
String url = "http://10.120.192.72:80/head-auth-service/oauth/check_token";
|
||||||
|
|
||||||
|
// 请求头设置,x-www-form-urlencoded格式的数据
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
||||||
|
|
||||||
|
//提交参数设置
|
||||||
|
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||||
|
map.add("token", token);
|
||||||
|
|
||||||
|
// 组装请求体
|
||||||
|
HttpEntity<MultiValueMap<String, String>> request =
|
||||||
|
new HttpEntity<>(map, headers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功
|
||||||
|
* {
|
||||||
|
* "sub": "40a21660947c44a6a40030109214f313",
|
||||||
|
* "ver": "JWT1.0",
|
||||||
|
* "user_name": "web",
|
||||||
|
* "pri": [
|
||||||
|
* "MASTER_ADMIN",
|
||||||
|
* "znxs",
|
||||||
|
* "root",
|
||||||
|
* "ADMIN"
|
||||||
|
* ],
|
||||||
|
* "last_login": 1744875032,
|
||||||
|
* "scope": [
|
||||||
|
* "all"
|
||||||
|
* ],
|
||||||
|
* "iss": "nrec",
|
||||||
|
* "active": true,
|
||||||
|
* "exp": 1744961431,
|
||||||
|
* "jti": "32add77a-43f0-4d67-82a2-8376fed6fc3d",
|
||||||
|
* "client_id": "frontend"
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* 失败
|
||||||
|
*
|
||||||
|
* {
|
||||||
|
* "msg": "Cannot convert access token to JSON",
|
||||||
|
* "path": "/auth-service/oauth/check_token",
|
||||||
|
* "code": "2500",
|
||||||
|
* "succ": false,
|
||||||
|
* "error": "Internal Server Error",
|
||||||
|
* "timestamp": 1744879150627
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
||||||
|
try {
|
||||||
|
String result = restTemplate.postForObject(url, request, String.class);
|
||||||
|
JSONObject resultJson = new JSONObject(result);
|
||||||
|
if (resultJson.containsKey("code")) {
|
||||||
|
//失败
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.info(e.toString());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
@PostMapping("/heBei")
|
@PostMapping("/heBei")
|
||||||
|
|||||||
@@ -143,13 +143,15 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
//流程状态排除不通过的,不通过会放在待办中,一直到该流程通过
|
//流程状态排除不通过的,不通过会放在待办中,一直到该流程通过
|
||||||
processInstanceQuery.variableValueNotEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmTaskStatusEnum.REJECT.getStatus());
|
processInstanceQuery.variableValueNotEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmTaskStatusEnum.REJECT.getStatus());
|
||||||
|
|
||||||
|
if (Objects.nonNull(bpmProcessInstancePageParam.getSearchBeginTime()) && Objects.nonNull(bpmProcessInstancePageParam.getSearchEndTime())) {
|
||||||
String beginTimeStr = bpmProcessInstancePageParam.getSearchBeginTime();
|
String beginTimeStr = bpmProcessInstancePageParam.getSearchBeginTime();
|
||||||
String endTimeStr = bpmProcessInstancePageParam.getSearchEndTime();
|
String endTimeStr = bpmProcessInstancePageParam.getSearchEndTime();
|
||||||
LocalDateTime beginTime = LocalDateTimeUtil.parse(beginTimeStr, DatePattern.NORM_DATE_PATTERN);
|
LocalDateTime beginTime = LocalDateTimeUtil.parse(beginTimeStr, DatePattern.NORM_DATE_PATTERN);
|
||||||
LocalDateTime endTime = PubUtils.endTimeToLocalDateTime(endTimeStr);
|
LocalDateTime endTime = PubUtils.endTimeToLocalDateTime(endTimeStr);
|
||||||
processInstanceQuery.startedBefore(DateUtils.of(endTime));
|
processInstanceQuery.startedBefore(DateUtils.of(endTime));
|
||||||
processInstanceQuery.startedAfter(DateUtils.of(beginTime));
|
processInstanceQuery.startedAfter(DateUtils.of(beginTime));
|
||||||
|
}
|
||||||
|
|
||||||
// 查询数量
|
// 查询数量
|
||||||
long processInstanceCount = processInstanceQuery.count();
|
long processInstanceCount = processInstanceQuery.count();
|
||||||
if (processInstanceCount == 0) {
|
if (processInstanceCount == 0) {
|
||||||
|
|||||||
@@ -142,12 +142,14 @@ public class BpmTaskServiceImpl implements IBpmTaskService {
|
|||||||
if (StrUtil.isNotBlank(bpmTaskQueryParam.getSearchValue())) {
|
if (StrUtil.isNotBlank(bpmTaskQueryParam.getSearchValue())) {
|
||||||
taskQuery.processDefinitionNameLike("%" + bpmTaskQueryParam.getSearchValue() + "%");
|
taskQuery.processDefinitionNameLike("%" + bpmTaskQueryParam.getSearchValue() + "%");
|
||||||
}
|
}
|
||||||
|
if (Objects.nonNull(bpmTaskQueryParam.getSearchBeginTime()) && Objects.nonNull(bpmTaskQueryParam.getSearchEndTime())) {
|
||||||
String beginTimeStr = bpmTaskQueryParam.getSearchBeginTime();
|
String beginTimeStr = bpmTaskQueryParam.getSearchBeginTime();
|
||||||
String endTimeStr = bpmTaskQueryParam.getSearchEndTime();
|
String endTimeStr = bpmTaskQueryParam.getSearchEndTime();
|
||||||
LocalDateTime beginTime = LocalDateTimeUtil.parse(beginTimeStr, DatePattern.NORM_DATE_PATTERN);
|
LocalDateTime beginTime = LocalDateTimeUtil.parse(beginTimeStr, DatePattern.NORM_DATE_PATTERN);
|
||||||
LocalDateTime endTime = PubUtils.endTimeToLocalDateTime(endTimeStr);
|
LocalDateTime endTime = PubUtils.endTimeToLocalDateTime(endTimeStr);
|
||||||
taskQuery.taskCreatedBefore(DateUtils.of(endTime));
|
taskQuery.taskCreatedBefore(DateUtils.of(endTime));
|
||||||
taskQuery.taskCreatedAfter(DateUtils.of(beginTime));
|
taskQuery.taskCreatedAfter(DateUtils.of(beginTime));
|
||||||
|
}
|
||||||
// 执行查询
|
// 执行查询
|
||||||
long count = taskQuery.count();
|
long count = taskQuery.count();
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class GenerateCode {
|
|||||||
|
|
||||||
private static final String TARGET_DIR = "D://code";
|
private static final String TARGET_DIR = "D://code";
|
||||||
|
|
||||||
private static final String DB_URL = "jdbc:mysql://192.168.1.24:13306/pqsinfo_zl";
|
private static final String DB_URL = "jdbc:mysql://192.168.1.24:13306/pqs9100";
|
||||||
// private static final String DB_URL = "jdbc:oracle:thin:@192.168.1.170:1521:pqsbase";
|
// private static final String DB_URL = "jdbc:oracle:thin:@192.168.1.170:1521:pqsbase";
|
||||||
|
|
||||||
private static final String USERNAME = "root";
|
private static final String USERNAME = "root";
|
||||||
@@ -30,9 +30,9 @@ public class GenerateCode {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
List<Module> modules = Stream.of(
|
List<Module> modules = Stream.of(
|
||||||
new Module("xy", "com.njcn.supervision", "survey", Stream.of(
|
new Module("hongawen", "com.njcn.gather", "", Stream.of(
|
||||||
"app_version"
|
"pq_dev_type"
|
||||||
).collect(Collectors.toList()), "supervision_")
|
).collect(Collectors.toList()), "pq_")
|
||||||
).collect(Collectors.toList());
|
).collect(Collectors.toList());
|
||||||
generateJavaFile(modules);
|
generateJavaFile(modules);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ public interface PatternRegex {
|
|||||||
/**
|
/**
|
||||||
* 描述32
|
* 描述32
|
||||||
*/
|
*/
|
||||||
String DES32_REGEX = "^.{0,10}$";
|
String DES32_REGEX = "^.{0,32}$";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述64
|
* 描述64
|
||||||
|
|||||||
@@ -51,5 +51,16 @@ public interface ServerInfo {
|
|||||||
|
|
||||||
String DATA_PLATFORM = "data-platform-boot";
|
String DATA_PLATFORM = "data-platform-boot";
|
||||||
|
|
||||||
|
String PLATFORM_STAT_BOOT = "stat-boot";
|
||||||
|
|
||||||
|
String PLATFORM_RT_BOOT = "rt-boot";
|
||||||
|
String PLATFORM_EVENT_BOOT = "event-boot";
|
||||||
|
|
||||||
|
String PLATFORM_DATA_PROCESSING_BOOT = "data-processing-boot";
|
||||||
|
|
||||||
|
String PLATFORM_MESSAGE_BOOT = "message-boot";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package com.njcn.common.utils;
|
package com.njcn.common.utils;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.Max;
|
import javax.validation.constraints.Max;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.njcn.echarts.json.LineGenerator;
|
|||||||
import com.njcn.echarts.json.PieGenerator;
|
import com.njcn.echarts.json.PieGenerator;
|
||||||
import com.njcn.web.utils.RestTemplateUtil;
|
import com.njcn.web.utils.RestTemplateUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
@@ -23,7 +24,8 @@ import java.util.*;
|
|||||||
public class DrawPicUtil {
|
public class DrawPicUtil {
|
||||||
|
|
||||||
//目前写死,后续作为配置
|
//目前写死,后续作为配置
|
||||||
private final String URL = "http://192.168.1.24:5174/picture";
|
@Value("${DrawPicUtil.URL:http://192.168.1.24:5174/picture}")
|
||||||
|
private String URL;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
30
pqs-common/common-echarts/src/main/resources/bootstrap.yml
Normal file
30
pqs-common/common-echarts/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
spring:
|
||||||
|
#nacos注册中心以及配置中心的指定
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
ip: @service.server.url@
|
||||||
|
server-addr: @nacos.url@
|
||||||
|
namespace: @nacos.namespace@
|
||||||
|
config:
|
||||||
|
server-addr: @nacos.url@
|
||||||
|
namespace: @nacos.namespace@
|
||||||
|
file-extension: yaml
|
||||||
|
shared-configs:
|
||||||
|
- data-id: share-config.yaml
|
||||||
|
refresh: true
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 100MB
|
||||||
|
max-request-size: 100MB
|
||||||
|
jackson:
|
||||||
|
time-zone: GMT+8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -400,6 +400,7 @@ public class ExcelUtil {
|
|||||||
* @param pullDowns
|
* @param pullDowns
|
||||||
*/
|
*/
|
||||||
private static void setTopLevel(Workbook workbook, List<PullDown> pullDowns) {
|
private static void setTopLevel(Workbook workbook, List<PullDown> pullDowns) {
|
||||||
|
if(CollUtil.isNotEmpty(pullDowns)){
|
||||||
int num = 0;
|
int num = 0;
|
||||||
for (PullDown pullDown : pullDowns) {
|
for (PullDown pullDown : pullDowns) {
|
||||||
if (!pullDown.getIsText()) {
|
if (!pullDown.getIsText()) {
|
||||||
@@ -437,6 +438,8 @@ public class ExcelUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取根据数值获取列字母(1=A,2=B,3=C,.......,27=AA)
|
* 获取根据数值获取列字母(1=A,2=B,3=C,.......,27=AA)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ public class Knife4jSwaggerConfig {
|
|||||||
"com.njcn.cloud.controller",
|
"com.njcn.cloud.controller",
|
||||||
"com.njcn.zlevent.controller",
|
"com.njcn.zlevent.controller",
|
||||||
"com.njcn.prepare",
|
"com.njcn.prepare",
|
||||||
"com.njcn.supervision.controller"
|
"com.njcn.supervision.controller",
|
||||||
|
"com.njcn.algorithm",
|
||||||
|
"com.njcn.dataProcess"
|
||||||
)
|
)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<GrantType> grantTypes = new ArrayList<>();
|
List<GrantType> grantTypes = new ArrayList<>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.device.biz.commApi.fallback.CommLineClientFallbackFactory;
|
|||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -36,6 +37,14 @@ public interface CommLineClient {
|
|||||||
@GetMapping("/getLineDetail")
|
@GetMapping("/getLineDetail")
|
||||||
HttpResult<LineDTO> getLineDetail(@RequestParam("id") String id);
|
HttpResult<LineDTO> getLineDetail(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取污区值监测点相关信息
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
*/
|
||||||
|
@GetMapping("/getPollutionLineInfo")
|
||||||
|
HttpResult<List<PollutionLineInfoDTO>> getPollutionLineInfo(@RequestParam("id") List<String> id);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 批量获取监测点信息
|
* 批量获取监测点信息
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.njcn.device.biz.commApi.CommLineClient;
|
|||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -39,6 +40,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<PollutionLineInfoDTO>> getPollutionLineInfo(List<String> id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取污区值监测点相关信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<LineDTO>> getLineDetailBatch(List<String> ids) {
|
public HttpResult<List<LineDTO>> getLineDetailBatch(List<String> ids) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "批量获取监测点信息", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "批量获取监测点信息", throwable.toString());
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.njcn.device.biz.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PollutionLineInfoDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电公司名称
|
||||||
|
*/
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属变电站
|
||||||
|
*/
|
||||||
|
private String subStationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端名称
|
||||||
|
*/
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端厂家
|
||||||
|
*/
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯状态
|
||||||
|
*/
|
||||||
|
private Integer comFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端投运时间
|
||||||
|
*/
|
||||||
|
private String loginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置,电网侧&非电网侧
|
||||||
|
*/
|
||||||
|
private String powerFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型
|
||||||
|
*/
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类型
|
||||||
|
*/
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测id
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测对象
|
||||||
|
*/
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站
|
||||||
|
*/
|
||||||
|
private String powerSubstationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
private String lineVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置id
|
||||||
|
*/
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上送国网编号
|
||||||
|
*/
|
||||||
|
private String monitorId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pms.pojo.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,7 +29,7 @@ public class PushMonitorDTO {
|
|||||||
private String customName;
|
private String customName;
|
||||||
private String status;
|
private String status;
|
||||||
private Date ctime;
|
private Date ctime;
|
||||||
private Date updateTime;
|
private LocalDateTime updateTime;
|
||||||
private String lineId;
|
private String lineId;
|
||||||
private String chv;
|
private String chv;
|
||||||
private String chi;
|
private String chi;
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ public class TerminalQueryParam extends BaseParam {
|
|||||||
@ApiModelProperty(value = "监测对象类型")
|
@ApiModelProperty(value = "监测对象类型")
|
||||||
private String objType;
|
private String objType;
|
||||||
|
|
||||||
|
private List<String> objTypeList;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否上送国网监测点")
|
@ApiModelProperty(value = "是否上送国网监测点")
|
||||||
private Integer isUpToGrid;
|
private Integer isUpToGrid;
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ package com.njcn.device.pms.pojo.po;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
@@ -72,16 +75,34 @@ public class Monitor extends BaseEntity {
|
|||||||
private String lineName;
|
private String lineName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监测线路ID
|
* 监测母线
|
||||||
*/
|
*/
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测线路号
|
||||||
|
*/
|
||||||
|
private Integer lineNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投运日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate putDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 中台母线ID
|
* 中台母线ID
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String busId;
|
private String busId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中台母线ID
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String midStation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级(字典)
|
* 电压等级(字典)
|
||||||
*/
|
*/
|
||||||
@@ -190,7 +211,6 @@ public class Monitor extends BaseEntity {
|
|||||||
* 监测终端接线方式(字典)
|
* 监测终端接线方式(字典)
|
||||||
*/
|
*/
|
||||||
private String terminalWiringMethod;
|
private String terminalWiringMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是上送国网监测点,0-否 1-是
|
* 是否是上送国网监测点,0-否 1-是
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,10 +28,19 @@ public class MonitorStatisticsController extends BaseController {
|
|||||||
|
|
||||||
@PostMapping("/objType")
|
@PostMapping("/objType")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("国网上送接口")
|
@ApiOperation("查询主网用户分类")
|
||||||
public HttpResult< List<List<String>>> objType(String deptId){
|
public HttpResult< List<List<String>>> objType(String deptId,Integer up){
|
||||||
String methodDescribe = getMethodDescribe("objType");
|
String methodDescribe = getMethodDescribe("objType");
|
||||||
List<List<String>> gwMonitorStatistics = monitorStatisticsService.getGwMonitorStatistics(deptId);
|
List<List<String>> gwMonitorStatistics = monitorStatisticsService.getGwMonitorStatistics(deptId,up);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gwMonitorStatistics, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/objTypeStatis")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("查询主网用户分类")
|
||||||
|
public HttpResult< List<List<String>>> objTypeStatis(String deptId){
|
||||||
|
String methodDescribe = getMethodDescribe("objTypeStatis");
|
||||||
|
List<List<String>> gwMonitorStatistics = monitorStatisticsService.objTypeStatistic(deptId);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gwMonitorStatistics, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gwMonitorStatistics, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,22 @@ public class PmsMonitorController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitor, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitor, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页获取所有主网用户台账
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/11/25
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getAllMainUserPageList")
|
||||||
|
@ApiOperation("分页获取所有主网用户台账")
|
||||||
|
@ApiImplicitParam(name = "baseParam",required = true)
|
||||||
|
public HttpResult<Page<Monitor>> getAllMainUserPageList(@RequestBody TerminalQueryParam baseParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getAllMainUserPageList");
|
||||||
|
Page<Monitor> monitor= monitorService.getAllMainUserPageList(baseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitor, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有主网监测点
|
* 获取所有主网监测点
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.common.utils.LogUtil;
|
|||||||
import com.njcn.device.pms.annotation.TerminalOperationLogDesc;
|
import com.njcn.device.pms.annotation.TerminalOperationLogDesc;
|
||||||
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
||||||
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
||||||
import com.njcn.device.pms.pojo.vo.PVCapacity;
|
import com.njcn.device.pms.pojo.vo.PVCapacity;
|
||||||
import com.njcn.device.pms.service.majornetwork.IPowerDistributionareaService;
|
import com.njcn.device.pms.service.majornetwork.IPowerDistributionareaService;
|
||||||
@@ -58,7 +59,7 @@ public class PmsPowerDistributionareaController extends BaseController {
|
|||||||
@PostMapping("getPowerDistributionAreaList")
|
@PostMapping("getPowerDistributionAreaList")
|
||||||
@ApiOperation("分页查询台区所有信息")
|
@ApiOperation("分页查询台区所有信息")
|
||||||
@ApiImplicitParam(name = "baseParam",value = "查询台区信息",required = true)
|
@ApiImplicitParam(name = "baseParam",value = "查询台区信息",required = true)
|
||||||
public HttpResult<Page<PowerDistributionarea>> getList(@RequestBody @Validated BaseParam baseParam){
|
public HttpResult<Page<PowerDistributionarea>> getList(@RequestBody TaiZhangParam baseParam){
|
||||||
String methodDescribe = getMethodDescribe("getList");
|
String methodDescribe = getMethodDescribe("getList");
|
||||||
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, baseParam);
|
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, baseParam);
|
||||||
Page<PowerDistributionarea> res = iPowerDistributionareaService.getList(baseParam);
|
Page<PowerDistributionarea> res = iPowerDistributionareaService.getList(baseParam);
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
monitor.Org_Id AS orgId,
|
monitor.Org_Id AS orgId,
|
||||||
monitor.Org_Name AS orgName,
|
monitor.Org_Name AS orgName,
|
||||||
monitor.Powerr_Id AS powerId,
|
monitor.`Powerr_Id` AS powerId,
|
||||||
monitor.Powerr_Name AS powerName,
|
monitor.`Powerr_Name` AS powerName,
|
||||||
monitor.id AS monitorId,
|
monitor.id AS monitorId,
|
||||||
monitor.Name AS monitorName,
|
monitor.`Name` AS monitorName,
|
||||||
monitor.Line_Id,
|
monitor.Line_Id,
|
||||||
monitor.Line_Name,
|
monitor.Line_Name,
|
||||||
pdm.Monitor_Sort AS monitorSort,
|
pdm.Monitor_Sort AS monitorSort,
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
pdm.Update_By AS updateBy,
|
pdm.Update_By AS updateBy,
|
||||||
pdm.Update_Time AS updateTime
|
pdm.Update_Time AS updateTime
|
||||||
FROM
|
FROM
|
||||||
((
|
(
|
||||||
SELECT
|
SELECT
|
||||||
pm.id,
|
pm.id,
|
||||||
pm.Name,
|
pm.`Name`,
|
||||||
pm.Status,
|
pm.`Status`,
|
||||||
pm.Org_Id,
|
pm.Org_Id,
|
||||||
pm.Org_Name,
|
pm.Org_Name,
|
||||||
pm.Powerr_Id,
|
pm.Powerr_Id,
|
||||||
@@ -48,57 +48,11 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
) UNION ALL
|
) AS monitor
|
||||||
/* (
|
|
||||||
SELECT
|
|
||||||
ppd.id,
|
|
||||||
ppd.Name,
|
|
||||||
ppd.Status,
|
|
||||||
ppd.Org_Id,
|
|
||||||
ppd.Org_Name,
|
|
||||||
ppd.Power_Station_Id,
|
|
||||||
ppd.Powerr_Name,
|
|
||||||
ppd.Line_Id,
|
|
||||||
ppd.Line_Name
|
|
||||||
FROM
|
|
||||||
pms_power_distributionarea AS ppd
|
|
||||||
) UNION ALL*/
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
ppc.id,
|
|
||||||
ppc.Name,
|
|
||||||
ppc.Status,
|
|
||||||
ppc.Org_Id,
|
|
||||||
ppc.Org_Name,
|
|
||||||
ppc.Power_Station_Id,
|
|
||||||
ps.Power_Name,
|
|
||||||
ppc.Line_Id,
|
|
||||||
0
|
|
||||||
FROM
|
|
||||||
pms_power_client AS ppc
|
|
||||||
INNER JOIN pms_statation_stat ps ON ps.Power_Id = ppc.Power_Station_Id
|
|
||||||
AND ppc.Org_Id = ps.Org_Id
|
|
||||||
) UNION ALL
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
ppgu.id,
|
|
||||||
ppgu.Name,
|
|
||||||
ppgu.Status,
|
|
||||||
ppgu.Org_Id,
|
|
||||||
ppgu.Org_Name,
|
|
||||||
ppgu.Power_Station_Id,
|
|
||||||
pss.Power_Name,
|
|
||||||
ppgu.Line_Id,
|
|
||||||
0
|
|
||||||
FROM
|
|
||||||
pms_power_generation_user AS ppgu
|
|
||||||
INNER JOIN pms_statation_stat AS pss ON pss.Power_Id = ppgu.Power_Station_Id
|
|
||||||
AND ppgu.Org_Id = pss.Org_Id
|
|
||||||
)) AS monitor
|
|
||||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||||
WHERE
|
WHERE
|
||||||
monitor.Status = 1
|
monitor.`Status` = 1
|
||||||
AND pdm.Status = 1
|
AND pdm.`Status` = 1
|
||||||
AND monitor.Org_Id IN
|
AND monitor.Org_Id IN
|
||||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||||
#{orgId}
|
#{orgId}
|
||||||
@@ -131,9 +85,10 @@
|
|||||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||||
</if>
|
</if>
|
||||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
monitor.Org_Id AS orgId,
|
monitor.Org_Id AS orgId,
|
||||||
@@ -176,27 +131,12 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
) /*UNION ALL
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
ppd.id,
|
|
||||||
ppd.Name,
|
|
||||||
ppd.Status,
|
|
||||||
ppd.Org_Id,
|
|
||||||
ppd.Org_Name,
|
|
||||||
ppd.Power_Station_Id,
|
|
||||||
ppd.Powerr_Name,
|
|
||||||
ppd.Line_Id,
|
|
||||||
ppd.Line_Name
|
|
||||||
FROM
|
|
||||||
pms_power_distributionarea AS ppd
|
|
||||||
)
|
)
|
||||||
) AS monitor*/
|
INNER JOIN pms_distribution_monitor AS pdm ON pm.id = pdm.Monitor_Id
|
||||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
|
||||||
WHERE
|
WHERE
|
||||||
monitor.Status = 1
|
pm.Status = 1
|
||||||
AND pdm.Status = 1
|
AND pdm.Status = 1
|
||||||
AND monitor.Org_Id IN
|
AND pm.Org_Id IN
|
||||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||||
#{orgId}
|
#{orgId}
|
||||||
</foreach>
|
</foreach>
|
||||||
@@ -228,7 +168,7 @@
|
|||||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||||
</if>
|
</if>
|
||||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
AND pm.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
package com.njcn.device.pms.mapper.majornetwork;
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO;
|
import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
|
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
|
||||||
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
import com.njcn.device.pms.pojo.param.*;
|
||||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
|
||||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
|
||||||
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
|
|
||||||
import com.njcn.device.pms.pojo.po.Monitor;
|
import com.njcn.device.pms.pojo.po.Monitor;
|
||||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -108,4 +106,13 @@ public interface MonitorMapper extends BaseMapper<Monitor> {
|
|||||||
|
|
||||||
List<Monitor> selectMonitorAndNewEnergy(@Param("orgIds")List<String> orgIds,
|
List<Monitor> selectMonitorAndNewEnergy(@Param("orgIds")List<String> orgIds,
|
||||||
@Param("objIds")List<String> objIds);
|
@Param("objIds")List<String> objIds);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页获取用户对象
|
||||||
|
*/
|
||||||
|
Page<Monitor> getAllObjUser(@Param("page") Page<Monitor> page, @Param("baseParam")TerminalQueryParam baseParam);
|
||||||
|
|
||||||
|
List<Monitor> getAllObjUser(@Param("baseParam")TerminalQueryParam baseParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,4 +259,42 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getAllObjUser" resultType="com.njcn.device.pms.pojo.po.Monitor">
|
||||||
|
SELECT
|
||||||
|
monitor.Id,
|
||||||
|
monitor.NAME,
|
||||||
|
monitor.Org_Id,
|
||||||
|
monitor.Org_Name,
|
||||||
|
monitor.Operation_Name,
|
||||||
|
monitor.Powerr_Name,
|
||||||
|
monitor.Line_Name,
|
||||||
|
monitor.Voltage_Level,
|
||||||
|
monitor.Monitor_Tag,
|
||||||
|
monitor.Obj_Type,
|
||||||
|
monitor.Monitor_Object_Name,
|
||||||
|
monitor.trade_Code,
|
||||||
|
monitor.Is_Special_Supply_Electricity
|
||||||
|
|
||||||
|
FROM
|
||||||
|
pms_monitor monitor
|
||||||
|
INNER JOIN
|
||||||
|
(
|
||||||
|
SELECT max( id ) id, Monitor_Object_Name
|
||||||
|
FROM pms_monitor
|
||||||
|
where Monitor_Object_Name is not null
|
||||||
|
and Status = 1
|
||||||
|
<if test="baseParam.monitorTag!=null and baseParam.monitorTag!=''">
|
||||||
|
and monitor.Monitor_Tag = #{baseParam.monitorTag}
|
||||||
|
</if>
|
||||||
|
<if test="baseParam.objTypeList !=null and baseParam.objTypeList.size() != 0">
|
||||||
|
and monitor.Obj_Type in
|
||||||
|
<foreach collection="baseParam.objTypeList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
GROUP BY Monitor_Object_Name
|
||||||
|
) t ON monitor.id = t.id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -19,7 +19,15 @@ public interface MonitorStatisticsService {
|
|||||||
* @Author: wr
|
* @Author: wr
|
||||||
* @Date: 2024/3/22 9:49
|
* @Date: 2024/3/22 9:49
|
||||||
*/
|
*/
|
||||||
List<List<String>> getGwMonitorStatistics(String deptId);
|
List<List<String>> getGwMonitorStatistics(String deptId,Integer up);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 国网上送统计类型数量统计
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2024/3/22 9:49
|
||||||
|
*/
|
||||||
|
List<List<String>> objTypeStatistic(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 国网上送新能源场站统计
|
* @Description: 国网上送新能源场站统计
|
||||||
|
|||||||
@@ -222,12 +222,7 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* if (tranMap.containsKey(item.getPotentialTransFormerType())) {
|
pushMonitorDTO.setUpdateTime(item.getUpdateTime());
|
||||||
pushMonitorDTO.setEvtType(tranMap.get(item.getPotentialTransFormerType()).getValue());
|
|
||||||
}
|
|
||||||
if (pointMap.containsKey(item.getNeutralGroundingMode())) {
|
|
||||||
pushMonitorDTO.setNeutralGround(pointMap.get(item.getNeutralGroundingMode()).getValue());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(item.getOrgName())) {
|
if (StrUtil.isNotBlank(item.getOrgName())) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.njcn.device.pms.mapper.majornetwork.MonitorMapper;
|
|||||||
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper;
|
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.RStatIntegrityDMapper;
|
import com.njcn.device.pms.mapper.majornetwork.RStatIntegrityDMapper;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
|
import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
|
||||||
|
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||||
import com.njcn.device.pms.pojo.param.gw.GwStatisticalParam;
|
import com.njcn.device.pms.pojo.param.gw.GwStatisticalParam;
|
||||||
import com.njcn.device.pms.pojo.param.gw.GwTerminalParam;
|
import com.njcn.device.pms.pojo.param.gw.GwTerminalParam;
|
||||||
import com.njcn.device.pms.pojo.po.*;
|
import com.njcn.device.pms.pojo.po.*;
|
||||||
@@ -67,7 +68,7 @@ public class MonitorStatisticsServiceImpl implements MonitorStatisticsService {
|
|||||||
private final ITerminalService terminalService;
|
private final ITerminalService terminalService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<List<String>> getGwMonitorStatistics(String deptId) {
|
public List<List<String>> getGwMonitorStatistics(String deptId,Integer up) {
|
||||||
List<List<String>> info = new ArrayList<>();
|
List<List<String>> info = new ArrayList<>();
|
||||||
//查询所有一级树字典
|
//查询所有一级树字典
|
||||||
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
@@ -105,6 +106,7 @@ public class MonitorStatisticsServiceImpl implements MonitorStatisticsService {
|
|||||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
deptGetLineParam.setDeptId(deptId);
|
deptGetLineParam.setDeptId(deptId);
|
||||||
deptGetLineParam.setMonitorStateRunning(false);
|
deptGetLineParam.setMonitorStateRunning(false);
|
||||||
|
deptGetLineParam.setSystemType(0);
|
||||||
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalService.deptGetLine(deptGetLineParam);
|
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalService.deptGetLine(deptGetLineParam);
|
||||||
//部门信息循环
|
//部门信息循环
|
||||||
List<String> line;
|
List<String> line;
|
||||||
@@ -115,8 +117,12 @@ public class MonitorStatisticsServiceImpl implements MonitorStatisticsService {
|
|||||||
if (CollUtil.isEmpty(lineBaseList)) {
|
if (CollUtil.isEmpty(lineBaseList)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<LineDevGetDTO> upToGridList = lineBaseList.stream().filter(item -> Objects.equals(item.getIsUpToGrid(), DataStateEnum.ENABLE.getCode()))
|
List<LineDevGetDTO> upToGridList;
|
||||||
.collect(Collectors.toList());
|
if(Objects.isNull(up) || up == 1){
|
||||||
|
upToGridList = lineBaseList.stream().filter(item -> Objects.equals(item.getIsUpToGrid(), DataStateEnum.ENABLE.getCode())).collect(Collectors.toList());
|
||||||
|
}else {
|
||||||
|
upToGridList = lineBaseList;
|
||||||
|
}
|
||||||
addmetWorkList(metWorkMap, upToGridList, line);
|
addmetWorkList(metWorkMap, upToGridList, line);
|
||||||
addSourceLoadList(sourceLoadMap, upToGridList, line);
|
addSourceLoadList(sourceLoadMap, upToGridList, line);
|
||||||
info.add(line);
|
info.add(line);
|
||||||
@@ -124,6 +130,54 @@ public class MonitorStatisticsServiceImpl implements MonitorStatisticsService {
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<List<String>> objTypeStatistic(String deptId) {
|
||||||
|
List<List<String>> info = new ArrayList<>();
|
||||||
|
//查询所有一级树字典
|
||||||
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
|
|
||||||
|
//监测点大类
|
||||||
|
List<SysDicTreePO> broadCategory = sysDicTreePOList.stream()
|
||||||
|
.filter(item -> Objects.equals(item.getPid(), "0"))
|
||||||
|
.filter(item -> !Objects.equals(item.getCode(), DicDataTypeEnum.DEVICE_UNIT.getCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
broadCategory.sort(Comparator.comparing(SysDicTreePO::getSort));
|
||||||
|
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add("单位");
|
||||||
|
List<String> collect = broadCategory.stream().map(SysDicTreePO::getName).collect(Collectors.toList());
|
||||||
|
list.addAll(collect);
|
||||||
|
list.add("合计");
|
||||||
|
//获取主网监测统计
|
||||||
|
Map<String, List<String>> metWorkMap = mapDicIds(broadCategory, sysDicTreePOList);
|
||||||
|
info.add(list);
|
||||||
|
|
||||||
|
TerminalQueryParam baseParam = new TerminalQueryParam();
|
||||||
|
List<Monitor> monitorList = monitorMapper.getAllObjUser(baseParam);
|
||||||
|
//筛选出国网统计信息
|
||||||
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
|
deptGetLineParam.setDeptId(deptId);
|
||||||
|
deptGetLineParam.setMonitorStateRunning(false);
|
||||||
|
deptGetLineParam.setSystemType(0);
|
||||||
|
List<DeptGetBase> deptGetChildrenMoreDTOS = commTerminalService.getDeptChildrenByParent(deptGetLineParam);
|
||||||
|
//部门信息循环
|
||||||
|
for (DeptGetBase dept : deptGetChildrenMoreDTOS) {
|
||||||
|
List<String> line = new ArrayList<>();
|
||||||
|
line.add(dept.getUnitName());
|
||||||
|
List<String> deptIds = dept.getUnitChildrenList();
|
||||||
|
if (CollUtil.isEmpty(deptIds)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Monitor> temList = monitorList.stream().filter(it->deptIds.contains(it.getOrgId())).collect(Collectors.toList());
|
||||||
|
metWorkMap.forEach((k,v)->{
|
||||||
|
long count = temList.stream().filter(i->v.contains(i.getObjType())).count();
|
||||||
|
line.add(String.valueOf(count));
|
||||||
|
});
|
||||||
|
info.add(line);
|
||||||
|
}
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MonitorEnergy> getGwMonitorEnergy(String deptId) {
|
public List<MonitorEnergy> getGwMonitorEnergy(String deptId) {
|
||||||
List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ public interface IMonitorService extends IService<Monitor> {
|
|||||||
|
|
||||||
Page<Monitor> getAllMonitorPageList(TerminalQueryParam baseParam);
|
Page<Monitor> getAllMonitorPageList(TerminalQueryParam baseParam);
|
||||||
|
|
||||||
|
Page<Monitor> getAllMainUserPageList(TerminalQueryParam baseParam);
|
||||||
|
|
||||||
|
|
||||||
List<Monitor> getMonitorList(List<String> monitorIds);
|
List<Monitor> getMonitorList(List<String> monitorIds);
|
||||||
|
|
||||||
List<Monitor> getMonitorListByMid(List<String> midIds);
|
List<Monitor> getMonitorListByMid(List<String> midIds);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
||||||
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
||||||
import com.njcn.device.pms.pojo.vo.PVCapacity;
|
import com.njcn.device.pms.pojo.vo.PVCapacity;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
@@ -28,7 +29,7 @@ public interface IPowerDistributionareaService extends IService<PowerDistributio
|
|||||||
* 分页查询所有
|
* 分页查询所有
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<PowerDistributionarea> getList(BaseParam baseParam);
|
Page<PowerDistributionarea> getList(TaiZhangParam baseParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有
|
* 查询所有
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -148,10 +150,8 @@ public class DataQualityStatServiceImpl implements DataQualityStatService {
|
|||||||
vo.setOrgName(deptDTOMap.get(vo.getOrgNo()).getName());
|
vo.setOrgName(deptDTOMap.get(vo.getOrgNo()).getName());
|
||||||
if(vo.getMeasurementCount()!=0&&vo.getMeasurementCount()!=null){
|
if(vo.getMeasurementCount()!=0&&vo.getMeasurementCount()!=null){
|
||||||
vo.setEffectiveAccessRate(
|
vo.setEffectiveAccessRate(
|
||||||
Double.parseDouble(
|
BigDecimal.valueOf((vo.getEffectiveAccessMeasurementCount() * 1.0/ (vo.getMeasurementCount() * 1.0))*100).setScale(2, RoundingMode.HALF_UP).doubleValue()
|
||||||
df.format((vo.getEffectiveAccessMeasurementCount() * 1.0)
|
);
|
||||||
/ (vo.getMeasurementCount() * 1.0))
|
|
||||||
) * 100);
|
|
||||||
}else{
|
}else{
|
||||||
vo.setEffectiveAccessRate(0.0);
|
vo.setEffectiveAccessRate(0.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,9 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
List<GeneratrixWire> generatrixWireList = generatrixWireMapper.selectList(new LambdaQueryWrapper<GeneratrixWire>().in(GeneratrixWire::getId, busIds));
|
List<GeneratrixWire> generatrixWireList = generatrixWireMapper.selectList(new LambdaQueryWrapper<GeneratrixWire>().in(GeneratrixWire::getId, busIds));
|
||||||
Map<String, GeneratrixWire> mapBus = generatrixWireList.stream().collect(Collectors.toMap(GeneratrixWire::getId, Function.identity()));
|
Map<String, GeneratrixWire> mapBus = generatrixWireList.stream().collect(Collectors.toMap(GeneratrixWire::getId, Function.identity()));
|
||||||
|
|
||||||
|
List<String> powerIds = temList.stream().map(Monitor::getPowerrId).distinct().collect(Collectors.toList());
|
||||||
|
List<StatationStat> statationStatList = statationStatMapper.selectList(new LambdaQueryWrapper<StatationStat>().in(StatationStat::getPowerId,powerIds));
|
||||||
|
Map<String,StatationStat> statMap = statationStatList.stream().collect(Collectors.toMap(StatationStat::getPowerId,Function.identity()));
|
||||||
|
|
||||||
temList = temList.stream().peek(item -> {
|
temList = temList.stream().peek(item -> {
|
||||||
if (mapTerminal.containsKey(item.getTerminalId())) {
|
if (mapTerminal.containsKey(item.getTerminalId())) {
|
||||||
@@ -271,7 +273,9 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
item.setDevIp(mapTerminal.get(item.getTerminalId()).getIp());
|
item.setDevIp(mapTerminal.get(item.getTerminalId()).getIp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (statMap.containsKey(item.getPowerrId())) {
|
||||||
|
item.setMidStation(statMap.get(item.getPowerrId()).getMidStationId());
|
||||||
|
}
|
||||||
|
|
||||||
if (mapBus.containsKey(item.getLineId())) {
|
if (mapBus.containsKey(item.getLineId())) {
|
||||||
item.setBusId(mapBus.get(item.getLineId()).getMidBusId());
|
item.setBusId(mapBus.get(item.getLineId()).getMidBusId());
|
||||||
@@ -287,6 +291,42 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<Monitor> getAllMainUserPageList(TerminalQueryParam baseParam) {
|
||||||
|
|
||||||
|
|
||||||
|
List<String> objTypeIds = new ArrayList<>();
|
||||||
|
if(StrUtil.isNotBlank(baseParam.getObjType())){
|
||||||
|
if(baseParam.getObjType().equals("987654321")){
|
||||||
|
//特殊处理
|
||||||
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
|
|
||||||
|
List<SysDicTreePO> typicDic =sysDicTreePOList.stream().filter(item->Objects.equals(DicTreeEnum.Power_Station.getCode(),item.getCode())||Objects.equals(DicTreeEnum.Ele_Railways.getCode(),item.getCode())||
|
||||||
|
Objects.equals(DicTreeEnum.Wind_Farms.getCode(),item.getCode())||Objects.equals(DicTreeEnum.Imp_Users.getCode(),item.getCode())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for(SysDicTreePO sysDicTreePO : typicDic){
|
||||||
|
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
||||||
|
List<String> ids = temList.stream().map(DictTreeVO::getId).collect(Collectors.toList());
|
||||||
|
objTypeIds.addAll(ids);
|
||||||
|
objTypeIds.add(sysDicTreePO.getId());
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
SysDicTreePO sysDicTreePO = dictTreeFeignClient.queryById(baseParam.getObjType()).getData();
|
||||||
|
if(sysDicTreePO.getPid().equals("0")){
|
||||||
|
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
||||||
|
List<String> ids = temList.stream().map(DictTreeVO::getId).collect(Collectors.toList());
|
||||||
|
objTypeIds.addAll(ids);
|
||||||
|
}
|
||||||
|
objTypeIds.add(sysDicTreePO.getId());
|
||||||
|
}
|
||||||
|
baseParam.setObjTypeList(objTypeIds);
|
||||||
|
}
|
||||||
|
Page<Monitor> page = this.baseMapper.getAllObjUser(new Page<>(baseParam.getPageNum(), baseParam.getPageSize()),baseParam);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Monitor> getMonitorList(List<String> monitorIds) {
|
public List<Monitor> getMonitorList(List<String> monitorIds) {
|
||||||
List<Monitor> monitorList = new ArrayList<>();
|
List<Monitor> monitorList = new ArrayList<>();
|
||||||
@@ -1273,37 +1313,38 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化字典数据的通用方法
|
||||||
|
private Map<String, DictData> initDictData(DicDataTypeEnum type) {
|
||||||
|
return dicDataFeignClient.getDicDataByTypeCode(type.getCode()).getData()
|
||||||
|
.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String dealData(List<OracleTerminalExcel> oracleTerminalExcelList) {
|
private String dealData(List<OracleTerminalExcel> oracleTerminalExcelList) {
|
||||||
List<OracleTerminalExcel.OracleTerminalExcelMsg> oracleTerminalExcelMsg = new ArrayList<>();
|
List<OracleTerminalExcel.OracleTerminalExcelMsg> oracleTerminalExcelMsg = new ArrayList<>();
|
||||||
|
|
||||||
List<DeptDTO> allDept = deptFeignClient.getDeptDescendantIndexes(deptFeignClient.getRootDept().getData().getId(), Stream.of(0, 1, 2).collect(Collectors.toList())).getData();
|
List<DeptDTO> allDept = deptFeignClient.getDeptDescendantIndexes(deptFeignClient.getRootDept().getData().getId(), Stream.of(0, 1, 2).collect(Collectors.toList())).getData();
|
||||||
Map<String, DeptDTO> mapDept = allDept.stream().collect(Collectors.toMap(DeptDTO::getName, Function.identity()));
|
Map<String, DeptDTO> mapDept = allDept.stream().collect(Collectors.toMap(DeptDTO::getName, Function.identity()));
|
||||||
|
|
||||||
List<DictData> voltageLevelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
Map<String, DictData> voltageLevelMap = initDictData(DicDataTypeEnum.DEV_VOLTAGE);
|
||||||
Map<String, DictData> voltageLevelMap = voltageLevelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
//装置型号
|
//装置型号
|
||||||
List<DictData> devTypelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_TYPE.getCode()).getData();
|
Map<String, DictData> devTypelDicMap = initDictData(DicDataTypeEnum.DEV_TYPE);
|
||||||
Map<String, DictData> devTypelDicMap = devTypelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
//装置类别
|
|
||||||
DictData devCategoryDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_CATEGORY.getName(), DicDataEnum.Monitor_Terminals.getName()).getData();
|
|
||||||
|
|
||||||
//装置状态
|
//装置状态
|
||||||
List<DictData> devStatelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_STATUS.getCode()).getData();
|
Map<String, DictData> devStateDicMap = initDictData(DicDataTypeEnum.DEV_STATUS);
|
||||||
Map<String, DictData> devStateDicMap = devStatelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
//监测点状态
|
//监测点状态
|
||||||
List<DictData> monitorStatelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
Map<String, DictData> monitorStateDicMap = initDictData(DicDataTypeEnum.LINE_STATE);
|
||||||
Map<String, DictData> monitorStateDicMap = monitorStatelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
//监测点标签
|
//监测点标签
|
||||||
List<DictData> objTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
Map<String, DictData> objTypeDicMap = initDictData(DicDataTypeEnum.MONITORING_LABELS);
|
||||||
Map<String, DictData> objTypeDicMap = objTypeList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
//装置厂家
|
//装置厂家
|
||||||
List<DictData> manList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_MANUFACTURER.getCode()).getData();
|
Map<String, DictData> manDicMap = initDictData(DicDataTypeEnum.DEV_MANUFACTURER);
|
||||||
Map<String, DictData> manDicMap = manList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
//接线方式
|
||||||
|
Map<String, DictData> wireListMap = initDictData(DicDataTypeEnum.DEV_CONNECT);
|
||||||
|
|
||||||
//装作等级
|
//装作等级
|
||||||
DictData devGrade = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_GRADE.getName(), DicDataEnum.MOST_IMPORMENT.getName()).getData();
|
DictData devGrade = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_GRADE.getName(), DicDataEnum.MOST_IMPORMENT.getName()).getData();
|
||||||
@@ -1314,25 +1355,22 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
//监测点类型
|
//监测点类型
|
||||||
DictData monitorType = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_TYPE.getName(), DicDataEnum.Power_Supply_Point.getName()).getData();
|
DictData monitorType = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_TYPE.getName(), DicDataEnum.Power_Supply_Point.getName()).getData();
|
||||||
|
|
||||||
//接线方式
|
|
||||||
List<DictData> wireList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_CONNECT.getCode()).getData();
|
|
||||||
Map<String, DictData> wireListMap = wireList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
DictData potentialDic = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.Cap_V.getCode(),DicDataTypeEnum.VOLTAGE_TRANSFORMER.getCode()).getData();
|
DictData potentialDic = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.Cap_V.getCode(),DicDataTypeEnum.VOLTAGE_TRANSFORMER.getCode()).getData();
|
||||||
|
|
||||||
DictData neutralDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.Neutral_Point.getName(), DicDataEnum.Ground_Res.getName()).getData();
|
DictData neutralDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.Neutral_Point.getName(), DicDataEnum.Ground_Res.getName()).getData();
|
||||||
|
//装置类别
|
||||||
|
DictData devCategoryDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_CATEGORY.getName(), DicDataEnum.Monitor_Terminals.getName()).getData();
|
||||||
|
|
||||||
|
|
||||||
List<DictData> businessType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.BUSINESS_TYPE.getCode()).getData();
|
//对象类型
|
||||||
Map<String, DictData> businessDicMap = businessType.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
|
||||||
|
|
||||||
|
|
||||||
//TODO 零时处理
|
|
||||||
List<SysDicTreePO> dicTree = dictTreeFeignClient.queryAll().getData();
|
List<SysDicTreePO> dicTree = dictTreeFeignClient.queryAll().getData();
|
||||||
dicTree = dicTree.stream().filter(item->item.getCode()!="Device_Unit" && !item.getCode().contains("@")).collect(Collectors.toList());
|
dicTree = dicTree.stream().filter(item->item.getCode()!="Device_Unit" && !item.getCode().contains("@")).collect(Collectors.toList());
|
||||||
Map<String,SysDicTreePO> objTypeMap = dicTree.stream().collect(Collectors.toMap(SysDicTreePO::getName,Function.identity()));
|
Map<String,SysDicTreePO> objTypeMap = dicTree.stream().collect(Collectors.toMap(SysDicTreePO::getName,Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcelList) {
|
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcelList) {
|
||||||
|
|
||||||
//单位
|
//单位
|
||||||
if (oracleTerminalExcel.getGdName().equals("省检修")) {
|
if (oracleTerminalExcel.getGdName().equals("省检修")) {
|
||||||
oracleTerminalExcel.setGdName("国网河北超高压公司本部");
|
oracleTerminalExcel.setGdName("国网河北超高压公司本部");
|
||||||
@@ -1347,7 +1385,6 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
//判断是否操作过该条记录
|
//判断是否操作过该条记录
|
||||||
LineBak lineBak = lineBakMapper.selectOne(new LambdaQueryWrapper<LineBak>().eq(LineBak::getLineId, oracleTerminalExcel.getId()));
|
LineBak lineBak = lineBakMapper.selectOne(new LambdaQueryWrapper<LineBak>().eq(LineBak::getLineId, oracleTerminalExcel.getId()));
|
||||||
|
|
||||||
DeviceBak deviceBak = deviceBakMapper.selectOne(new LambdaQueryWrapper<DeviceBak>().eq(DeviceBak::getDevId, oracleTerminalExcel.getDeviceId()));
|
DeviceBak deviceBak = deviceBakMapper.selectOne(new LambdaQueryWrapper<DeviceBak>().eq(DeviceBak::getDevId, oracleTerminalExcel.getDeviceId()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1416,14 +1453,6 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* if (devTypelDicMap.containsKey(oracleTerminalExcel.getDevType())) {
|
|
||||||
pmsTerminalPO.setTerminalState(devTypelDicMap.get(oracleTerminalExcel.getDevType()).getId());
|
|
||||||
} else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典终端状态不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//终端状态
|
//终端状态
|
||||||
String devState = null;
|
String devState = null;
|
||||||
switch (oracleTerminalExcel.getRunFlag()) {
|
switch (oracleTerminalExcel.getRunFlag()) {
|
||||||
@@ -1473,16 +1502,10 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
deviceBakMapper.insert(deviceBakPO);
|
deviceBakMapper.insert(deviceBakPO);
|
||||||
terminalMapper.updateById(pmsTerminalPO);
|
terminalMapper.updateById(pmsTerminalPO);
|
||||||
devId = pmsTerminal.getId();
|
devId = pmsTerminal.getId();
|
||||||
} else if (Objects.isNull(pmsTerminal)) {
|
|
||||||
terminalMapper.deleteById(deviceBak.getId());
|
|
||||||
pmsTerminalPO.setId(deviceBak.getId());
|
|
||||||
terminalMapper.insert(pmsTerminalPO);
|
|
||||||
devId = pmsTerminalPO.getId();
|
|
||||||
} else {
|
} else {
|
||||||
devId = pmsTerminal.getId();
|
devId = deviceBak.getId();
|
||||||
pmsTerminalPO.setId(devId);
|
pmsTerminalPO.setId(devId);
|
||||||
terminalMapper.updateById(pmsTerminalPO);
|
terminalMapper.updateById(pmsTerminalPO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1494,8 +1517,6 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
GeneratrixWire generatrixWire = generatrixWireMapper.selectOne(generatrixWireLambdaQueryWrapper);
|
GeneratrixWire generatrixWire = generatrixWireMapper.selectOne(generatrixWireLambdaQueryWrapper);
|
||||||
|
|
||||||
String lineId = null, lineName = null, genScale = null;
|
String lineId = null, lineName = null, genScale = null;
|
||||||
|
|
||||||
|
|
||||||
GeneratrixWire generatrixWirePO = new GeneratrixWire();
|
GeneratrixWire generatrixWirePO = new GeneratrixWire();
|
||||||
generatrixWirePO.setGeneratrixName(oracleTerminalExcel.getSubvName());
|
generatrixWirePO.setGeneratrixName(oracleTerminalExcel.getSubvName());
|
||||||
generatrixWirePO.setStatus(DataStateEnum.ENABLE.getCode());
|
generatrixWirePO.setStatus(DataStateEnum.ENABLE.getCode());
|
||||||
@@ -1521,7 +1542,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
} else {
|
} else {
|
||||||
generatrixWirePO.setId(generatrixWire.getId());
|
generatrixWirePO.setId(generatrixWire.getId());
|
||||||
generatrixWireMapper.updateById(generatrixWirePO);
|
generatrixWireMapper.updateById(generatrixWirePO);
|
||||||
lineId = generatrixWire.getId();
|
lineId = generatrixWirePO.getId();
|
||||||
lineName = generatrixWirePO.getName();
|
lineName = generatrixWirePO.getName();
|
||||||
genScale = generatrixWirePO.getScale();
|
genScale = generatrixWirePO.getScale();
|
||||||
}
|
}
|
||||||
@@ -1530,11 +1551,8 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
monitorLambdaQueryWrapper.eq(Monitor::getLineId, lineId)
|
monitorLambdaQueryWrapper.eq(Monitor::getLineId, lineId)
|
||||||
.eq(Monitor::getName, oracleTerminalExcel.getLineName());
|
.eq(Monitor::getName, oracleTerminalExcel.getLineName());
|
||||||
List<Monitor> monitorList = monitorMapper.selectList(monitorLambdaQueryWrapper);
|
Monitor monitor = monitorMapper.selectOne(monitorLambdaQueryWrapper);
|
||||||
|
|
||||||
if(CollUtil.isNotEmpty(monitorList)) {
|
|
||||||
|
|
||||||
for (Monitor monitor : monitorList) {
|
|
||||||
|
|
||||||
//当前电站下面没有监测点,可以新增
|
//当前电站下面没有监测点,可以新增
|
||||||
Monitor monitorPO = new Monitor();
|
Monitor monitorPO = new Monitor();
|
||||||
@@ -1555,6 +1573,8 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
one = "06";
|
one = "06";
|
||||||
} else if (deptDTO.getName().contains("超高压")) {
|
} else if (deptDTO.getName().contains("超高压")) {
|
||||||
one = "07";
|
one = "07";
|
||||||
|
} else if (deptDTO.getName().contains("雄安")) {
|
||||||
|
one = "08";
|
||||||
} else {
|
} else {
|
||||||
one = "3.14159";
|
one = "3.14159";
|
||||||
}
|
}
|
||||||
@@ -1563,7 +1583,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
monitorPO.setMonitorId(monitorId + one + last);
|
monitorPO.setMonitorId(monitorId + one + last);
|
||||||
|
|
||||||
|
monitorPO.setLineNum(oracleTerminalExcel.getLineNum());
|
||||||
monitorPO.setName(oracleTerminalExcel.getLineName());
|
monitorPO.setName(oracleTerminalExcel.getLineName());
|
||||||
monitorPO.setPowerrName(stationName);
|
monitorPO.setPowerrName(stationName);
|
||||||
monitorPO.setPowerrId(stationId);
|
monitorPO.setPowerrId(stationId);
|
||||||
@@ -1600,7 +1620,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
monitorPO.setPutDate(oracleTerminalExcel.getLoginTime());
|
||||||
monitorPO.setMonitorType(monitorType.getId());
|
monitorPO.setMonitorType(monitorType.getId());
|
||||||
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
||||||
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
||||||
@@ -1620,7 +1640,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
||||||
|
|
||||||
|
|
||||||
if (oracleTerminalExcel.getLoadType().equals("电加热负荷") ||oracleTerminalExcel.getLoadType().equals("轧机") || oracleTerminalExcel.getLoadType().equals("其他非线性负荷")) {
|
if (oracleTerminalExcel.getLoadType().equals("电加热负荷") || oracleTerminalExcel.getLoadType().equals("轧机") || oracleTerminalExcel.getLoadType().equals("其他非线性负荷")|| oracleTerminalExcel.getLoadType().equals("变频调速负荷")) {
|
||||||
if (objTypeDicMap.containsKey("冶炼负荷")) {
|
if (objTypeDicMap.containsKey("冶炼负荷")) {
|
||||||
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
@@ -1628,7 +1648,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "冶炼负荷字典监测标签不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "冶炼负荷字典监测标签不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷")) {
|
} else if (oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷")|| "电动汽车充电站".equals(oracleTerminalExcel.getLoadType()) ||"轨道交通".equals(oracleTerminalExcel.getLoadType())) {
|
||||||
if (objTypeDicMap.containsKey("城市商业")) {
|
if (objTypeDicMap.containsKey("城市商业")) {
|
||||||
String objTypeId = objTypeDicMap.get("城市商业").getId();
|
String objTypeId = objTypeDicMap.get("城市商业").getId();
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
@@ -1637,7 +1657,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (oracleTerminalExcel.getLoadType().equals("半导体制造") || oracleTerminalExcel.getLoadType().equals("精密加工")) {
|
} else if (oracleTerminalExcel.getLoadType().equals("半导体制造") || oracleTerminalExcel.getLoadType().equals("精密加工") || oracleTerminalExcel.getLoadType().equals("党政机关")||"敏感/重要/高危用户".equals(oracleTerminalExcel.getLoadType())) {
|
||||||
if (objTypeDicMap.containsKey("敏感用户")) {
|
if (objTypeDicMap.containsKey("敏感用户")) {
|
||||||
String objTypeId = objTypeDicMap.get("敏感用户").getId();
|
String objTypeId = objTypeDicMap.get("敏感用户").getId();
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
@@ -1651,7 +1671,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
String objTypeId = objTypeDicMap.get("主变高压侧").getId();
|
String objTypeId = objTypeDicMap.get("主变高压侧").getId();
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
} else {
|
} else {
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "主变高压侧字典监测标签不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (oracleTerminalExcel.getLoadType().equals("跨省计量关口")) {
|
} else if (oracleTerminalExcel.getLoadType().equals("跨省计量关口")) {
|
||||||
@@ -1672,42 +1692,55 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else if (oracleTerminalExcel.getLoadType().equals("风电场")) {
|
||||||
|
if (objTypeDicMap.containsKey("陆上风电")) {
|
||||||
|
String objTypeId = objTypeDicMap.get("陆上风电").getId();
|
||||||
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "风电场字典监测标签不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if (oracleTerminalExcel.getLoadType().equals("其他发电厂")) {
|
||||||
|
if (objTypeDicMap.containsKey("其他电源")) {
|
||||||
|
String objTypeId = objTypeDicMap.get("其他电源").getId();
|
||||||
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "其他电源监测标签不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||||
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
} else {
|
} else {
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType()+"字典监测标签不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//监测点对象类型
|
//监测点对象类型
|
||||||
|
|
||||||
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||||
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||||
monitorPO.setObjType(objTypeId);
|
monitorPO.setObjType(objTypeId);
|
||||||
} else if (oracleTerminalExcel.getLoadType().equals("电加热负荷")) {
|
} else if (oracleTerminalExcel.getLoadType().equals("电加热负荷")) {
|
||||||
String objTypeId = objTypeMap.get("电加热负荷(含电弧炉、中频炉、电热炉、单/多晶硅生产设备)").getId();
|
String objTypeId = objTypeMap.get("电加热负荷(含电弧炉、中频炉、电热炉、单/多晶硅生产设备)").getId();
|
||||||
monitorPO.setObjType(objTypeId);
|
monitorPO.setObjType(objTypeId);
|
||||||
|
} else if (oracleTerminalExcel.getLoadType().equals("变频调速负荷")) {
|
||||||
|
String objTypeId = objTypeMap.get("变频调速负荷(变频电机、变频水泵等)").getId();
|
||||||
|
monitorPO.setObjType(objTypeId);
|
||||||
|
} else if (oracleTerminalExcel.getLoadType().equals("敏感/重要/高危用户")) {
|
||||||
|
String objTypeId = objTypeMap.get("敏感/重要/高危用户").getId();
|
||||||
|
monitorPO.setObjType(objTypeId);
|
||||||
} else {
|
} else {
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType() + "字典监测点对象类型不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType() + "字典监测点对象类型不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//行业类型
|
|
||||||
/* if (businessDicMap.containsKey(oracleTerminalExcel.getBusinessType())) {
|
|
||||||
String busTypeId = businessDicMap.get(oracleTerminalExcel.getBusinessType()).getId();
|
|
||||||
monitorPO.setTradeCode(busTypeId);
|
|
||||||
} else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getBusinessType()+"字典行业类型不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//TODO 监测点对象名称
|
//TODO 监测点对象名称
|
||||||
|
|
||||||
|
|
||||||
String wireMethod = "";
|
String wireMethod = "";
|
||||||
switch (oracleTerminalExcel.getPtType()) {
|
switch (oracleTerminalExcel.getPtType()) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -1748,7 +1781,6 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
monitorPO.setPowerFlag("102");
|
monitorPO.setPowerFlag("102");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
||||||
monitorPO.setIsUpToGrid(0);
|
monitorPO.setIsUpToGrid(0);
|
||||||
monitorMapper.insert(monitorPO);
|
monitorMapper.insert(monitorPO);
|
||||||
@@ -1765,23 +1797,23 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
lineBakPO.setId(monitorPO.getId());
|
lineBakPO.setId(monitorPO.getId());
|
||||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||||
lineBakMapper.insert(lineBakPO);
|
lineBakMapper.insert(lineBakPO);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (Objects.isNull(lineBak)) {
|
if (Objects.isNull(lineBak)) {
|
||||||
|
|
||||||
|
lineBakMapper.delete(new LambdaQueryWrapper<LineBak>().eq(LineBak::getId,monitor.getId()));
|
||||||
LineBak lineBakPO = new LineBak();
|
LineBak lineBakPO = new LineBak();
|
||||||
lineBakPO.setId(monitor.getId());
|
lineBakPO.setId(monitor.getId());
|
||||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||||
|
System.out.println(oracleTerminalExcel.getId());
|
||||||
lineBakMapper.insert(lineBakPO);
|
lineBakMapper.insert(lineBakPO);
|
||||||
monitorMapper.updateById(monitorPO);
|
monitorMapper.updateById(monitorPO);
|
||||||
} else if (Objects.isNull(monitor)) {
|
|
||||||
monitorPO.setIsUpToGrid(0);
|
|
||||||
monitorMapper.deleteById(lineBak.getId());
|
|
||||||
monitorPO.setId(lineBak.getId());
|
|
||||||
monitorMapper.insert(monitorPO);
|
|
||||||
} else {
|
} else {
|
||||||
monitorPO.setId(lineBak.getId());
|
monitorPO.setId(lineBak.getId());
|
||||||
monitorMapper.updateById(monitorPO);
|
monitorMapper.updateById(monitorPO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||||
overlimit.setId(monitorPO.getId());
|
overlimit.setId(monitorPO.getId());
|
||||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||||
@@ -1792,13 +1824,10 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(oracleTerminalExcelMsg)) {
|
if (CollectionUtil.isNotEmpty(oracleTerminalExcelMsg)) {
|
||||||
ExcelUtil.exportExcel("失败列表.xlsx", OracleTerminalExcel.OracleTerminalExcelMsg.class, oracleTerminalExcelMsg);
|
ExcelUtil.exportExcel("失败列表.xlsx", OracleTerminalExcel.OracleTerminalExcelMsg.class, oracleTerminalExcelMsg);
|
||||||
return null;
|
return null;
|
||||||
@@ -1809,11 +1838,11 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
private String dealVoltageLevel(String voltage) {
|
private String dealVoltageLevel(String voltage) {
|
||||||
float scale = Float.parseFloat(voltage.substring(0, voltage.indexOf("kV")));
|
float scale = Float.parseFloat(voltage.substring(0, voltage.indexOf("kV")));
|
||||||
if (scale < 500) {
|
//if (scale < 500) {
|
||||||
return "交流" + voltage;
|
return "交流" + voltage;
|
||||||
} else {
|
//} else {
|
||||||
return "直流" + voltage;
|
// return "直流" + voltage;
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.njcn.device.pms.mapper.majornetwork.PowerDistributionareaMapper;
|
|||||||
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
import com.njcn.device.pms.pojo.excel.PowerDistributionAreaExcel;
|
||||||
import com.njcn.device.pms.pojo.excel.PowerGenerationUserExcel;
|
import com.njcn.device.pms.pojo.excel.PowerGenerationUserExcel;
|
||||||
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.TaiZhangParam;
|
||||||
import com.njcn.device.pms.pojo.po.GeneratrixWire;
|
import com.njcn.device.pms.pojo.po.GeneratrixWire;
|
||||||
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
||||||
import com.njcn.device.pms.pojo.po.PowerGenerationUser;
|
import com.njcn.device.pms.pojo.po.PowerGenerationUser;
|
||||||
@@ -82,16 +83,18 @@ public class PowerDistributionareaServiceImpl extends ServiceImpl<PowerDistribut
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<PowerDistributionarea> getList(BaseParam baseParam) {
|
public Page<PowerDistributionarea> getList(TaiZhangParam baseParam) {
|
||||||
List<Dept> deptInfo = deptFeignClient.getAllDept().getData();
|
List<String> deptInfo = deptFeignClient.getDepSonSelfCodetByDeptId(baseParam.getOrgId()).getData();
|
||||||
List<String> deptIds = deptInfo.stream().map(Dept::getCode).collect(Collectors.toList());
|
|
||||||
LambdaQueryWrapper<PowerDistributionarea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PowerDistributionarea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(PowerDistributionarea::getStatus,DataStateEnum.ENABLE.getCode())
|
lambdaQueryWrapper.eq(PowerDistributionarea::getStatus,DataStateEnum.ENABLE.getCode())
|
||||||
.in(CollUtil.isNotEmpty(deptIds),PowerDistributionarea::getOrgId,deptIds)
|
.in(CollUtil.isNotEmpty(deptInfo),PowerDistributionarea::getOrgId,deptInfo)
|
||||||
.and(StrUtil.isNotBlank(baseParam.getSearchValue()),
|
.and(StrUtil.isNotBlank(baseParam.getSearchValue()),
|
||||||
i->i.like(PowerDistributionarea::getName,baseParam.getSearchValue())
|
i->i.like(PowerDistributionarea::getName,baseParam.getSearchValue())
|
||||||
.or()
|
.or()
|
||||||
.like(PowerDistributionarea::getPowerrName,baseParam.getSearchValue())
|
.like(PowerDistributionarea::getPowerrName,baseParam.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like(PowerDistributionarea::getLineName,baseParam.getSearchValue())
|
||||||
|
|
||||||
.or()
|
.or()
|
||||||
.like(PowerDistributionarea::getOrgName,baseParam.getSearchValue())).orderByDesc(PowerDistributionarea::getCreateTime);
|
.like(PowerDistributionarea::getOrgName,baseParam.getSearchValue())).orderByDesc(PowerDistributionarea::getCreateTime);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pq.api.fallback.CvtRelationFeignClientFallbackFactory;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警管理Feign客户端
|
||||||
|
*
|
||||||
|
* @author yzh
|
||||||
|
* @date 2022/9/19
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.DEVICE, path = "/cvtBind", fallbackFactory = CvtRelationFeignClientFallbackFactory.class, contextId = "cvtBind")
|
||||||
|
public interface CvtRelationFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("queryByLineId")
|
||||||
|
HttpResult<CvtHarmonicCorrectionFactorsDTO> queryByLineId(@RequestParam("lineId") String lineId);
|
||||||
|
}
|
||||||
@@ -1,12 +1,16 @@
|
|||||||
package com.njcn.device.pq.api;
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.device.pq.api.fallback.DeviceFeignClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.DeviceFeignClientFallbackFactory;
|
||||||
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||||
|
import com.njcn.device.pq.pojo.dto.DevComFlagDTO;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,4 +37,8 @@ public interface DeviceFeignClient {
|
|||||||
@RequestParam("thisTimeCheck") String thisTimeCheck,
|
@RequestParam("thisTimeCheck") String thisTimeCheck,
|
||||||
@RequestParam("nextTimeCheck") String nextTimeCheck);
|
@RequestParam("nextTimeCheck") String nextTimeCheck);
|
||||||
|
|
||||||
|
@PostMapping("/updateDevComFlag")
|
||||||
|
@ApiOperation("修改装置通讯状态")
|
||||||
|
HttpResult<Boolean> updateDevComFlag(@RequestBody DevComFlagDTO devComFlagDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.njcn.device.pq.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
|
import com.njcn.device.pq.api.CvtRelationFeignClient;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警管理熔断降级
|
||||||
|
* @author yzh
|
||||||
|
* @date 2022/9/19
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class CvtRelationFeignClientFallbackFactory implements FallbackFactory<CvtRelationFeignClient> {
|
||||||
|
@Override
|
||||||
|
public CvtRelationFeignClient create(Throwable throwable) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (throwable.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||||
|
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new CvtRelationFeignClient() {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CvtHarmonicCorrectionFactorsDTO> queryByLineId(String lineId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "监测点获取Cvt系数", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import com.njcn.device.pq.api.DeviceFeignClient;
|
import com.njcn.device.pq.api.DeviceFeignClient;
|
||||||
|
import com.njcn.device.pq.pojo.dto.DevComFlagDTO;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -31,6 +32,12 @@ public class DeviceFeignClientFallbackFactory implements FallbackFactory<DeviceF
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "技术监督修改装置定检时间", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "技术监督修改装置定检时间", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> updateDevComFlag(DevComFlagDTO devComFlagDTO) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "修改设备状态", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ public enum PvDeviceResponseEnum {
|
|||||||
PROJECT_OR_NOT("A00550","项目名称为空,请检查信息是否存在!"),
|
PROJECT_OR_NOT("A00550","项目名称为空,请检查信息是否存在!"),
|
||||||
PROVINCE_OR_NOT("A00550","省级名称为空,请检查信息是否存在!"),
|
PROVINCE_OR_NOT("A00550","省级名称为空,请检查信息是否存在!"),
|
||||||
GD_OR_NOT("A00550","供电公司名称为空,请检查信息是否存在!"),
|
GD_OR_NOT("A00550","供电公司名称为空,请检查信息是否存在!"),
|
||||||
|
OVER_LIMIT("A00550","前置机配置设备过多"),
|
||||||
|
NO_DEVICE("A00550","前置机下无设备"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package com.njcn.device.pq.pojo.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CvtHarmonicCorrectionFactorsDTO {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt名称
|
||||||
|
*/
|
||||||
|
private String cvtName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt型号
|
||||||
|
*/
|
||||||
|
private String cvtModel;
|
||||||
|
|
||||||
|
private BigDecimal h2;
|
||||||
|
|
||||||
|
private BigDecimal h3;
|
||||||
|
|
||||||
|
private BigDecimal h4;
|
||||||
|
|
||||||
|
private BigDecimal h5;
|
||||||
|
|
||||||
|
private BigDecimal h6;
|
||||||
|
|
||||||
|
private BigDecimal h7;
|
||||||
|
|
||||||
|
private BigDecimal h8;
|
||||||
|
|
||||||
|
private BigDecimal h9;
|
||||||
|
|
||||||
|
private BigDecimal h10;
|
||||||
|
|
||||||
|
private BigDecimal h11;
|
||||||
|
|
||||||
|
private BigDecimal h12;
|
||||||
|
|
||||||
|
private BigDecimal h13;
|
||||||
|
|
||||||
|
private BigDecimal h14;
|
||||||
|
|
||||||
|
private BigDecimal h15;
|
||||||
|
|
||||||
|
private BigDecimal h16;
|
||||||
|
|
||||||
|
private BigDecimal h17;
|
||||||
|
|
||||||
|
private BigDecimal h18;
|
||||||
|
|
||||||
|
private BigDecimal h19;
|
||||||
|
|
||||||
|
private BigDecimal h20;
|
||||||
|
|
||||||
|
private BigDecimal h21;
|
||||||
|
|
||||||
|
private BigDecimal h22;
|
||||||
|
|
||||||
|
private BigDecimal h23;
|
||||||
|
|
||||||
|
private BigDecimal h24;
|
||||||
|
|
||||||
|
private BigDecimal h25;
|
||||||
|
|
||||||
|
private BigDecimal h26;
|
||||||
|
|
||||||
|
private BigDecimal h27;
|
||||||
|
|
||||||
|
private BigDecimal h28;
|
||||||
|
|
||||||
|
private BigDecimal h29;
|
||||||
|
|
||||||
|
private BigDecimal h30;
|
||||||
|
|
||||||
|
private BigDecimal h31;
|
||||||
|
|
||||||
|
private BigDecimal h32;
|
||||||
|
|
||||||
|
private BigDecimal h33;
|
||||||
|
|
||||||
|
private BigDecimal h34;
|
||||||
|
|
||||||
|
private BigDecimal h35;
|
||||||
|
|
||||||
|
private BigDecimal h36;
|
||||||
|
|
||||||
|
private BigDecimal h37;
|
||||||
|
|
||||||
|
private BigDecimal h38;
|
||||||
|
|
||||||
|
private BigDecimal h39;
|
||||||
|
|
||||||
|
private BigDecimal h40;
|
||||||
|
|
||||||
|
private BigDecimal h41;
|
||||||
|
|
||||||
|
private BigDecimal h42;
|
||||||
|
|
||||||
|
private BigDecimal h43;
|
||||||
|
|
||||||
|
private BigDecimal h44;
|
||||||
|
|
||||||
|
private BigDecimal h45;
|
||||||
|
|
||||||
|
private BigDecimal h46;
|
||||||
|
|
||||||
|
private BigDecimal h47;
|
||||||
|
|
||||||
|
private BigDecimal h48;
|
||||||
|
|
||||||
|
private BigDecimal h49;
|
||||||
|
|
||||||
|
private BigDecimal h50;
|
||||||
|
/**
|
||||||
|
* 创建用户
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -38,6 +38,8 @@ public class DeviceInfo {
|
|||||||
private String series;
|
private String series;
|
||||||
//终端识别码
|
//终端识别码
|
||||||
private String devKey;
|
private String devKey;
|
||||||
|
|
||||||
|
private Integer processNo;
|
||||||
//
|
//
|
||||||
private List<MonitorInfo> monitorData;
|
private List<MonitorInfo> monitorData;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,212 @@
|
|||||||
|
package com.njcn.device.pq.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
|
import com.njcn.web.constant.ValidMessage;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CvtHarmonicCorrectionFactorsParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt名称
|
||||||
|
*/
|
||||||
|
@Pattern(regexp = PatternRegex.DES32_REGEX, message = "cvt名称过长")
|
||||||
|
private String cvtName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt型号
|
||||||
|
*/
|
||||||
|
@Pattern(regexp = PatternRegex.DES32_REGEX, message = "cvt型号")
|
||||||
|
private String cvtModel;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h2;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h3;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h4;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h5;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h6;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h7;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h8;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h9;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h10;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h11;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h12;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h13;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h14;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h15;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h16;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h17;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h18;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h19;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h20;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h21;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h22;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h23;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h24;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h25;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h26;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h27;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h28;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h29;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h30;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h31;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h32;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h33;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h34;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h35;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h36;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h37;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h38;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h39;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h40;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h41;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h42;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h43;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h44;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h45;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h46;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h47;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h48;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h49;
|
||||||
|
@Digits(integer = 2, fraction = 4, message = "CVT参数格式错误,应为X.XXXX")
|
||||||
|
@NotNull(message = "CVT参数不能不为空")
|
||||||
|
private BigDecimal h50;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class CvtHarmonicCorrectionFactorsParamUpdateParam extends CvtHarmonicCorrectionFactorsParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表Id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||||
|
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置查询
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class CvtHarmonicCorrectionFactorsParamQueryParam extends BaseParam {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.njcn.device.pq.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
|
import com.njcn.web.constant.ValidMessage;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:22【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CvtLineRelationParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt系数表id
|
||||||
|
*/
|
||||||
|
private String cvtId;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class CvtLineRelationUpdateParam extends CvtLineRelationParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表Id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||||
|
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,7 +23,6 @@ import java.util.List;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class NodeDeviceParam {
|
public class NodeDeviceParam {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器IP
|
* 服务器IP
|
||||||
*/
|
*/
|
||||||
@@ -31,4 +30,6 @@ public class NodeDeviceParam {
|
|||||||
private String ip;
|
private String ip;
|
||||||
|
|
||||||
private List<Integer> runFlag;
|
private List<Integer> runFlag;
|
||||||
|
|
||||||
|
private String devId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,187 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@TableName(value = "cvt_harmonic_correction_factors")
|
||||||
|
@Data
|
||||||
|
public class CvtHarmonicCorrectionFactors extends BaseEntity {
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "cvt_name")
|
||||||
|
private String cvtName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt型号
|
||||||
|
*/
|
||||||
|
@TableField(value = "cvt_model")
|
||||||
|
private String cvtModel;
|
||||||
|
|
||||||
|
@TableField(value = "h2")
|
||||||
|
private BigDecimal h2;
|
||||||
|
|
||||||
|
@TableField(value = "h3")
|
||||||
|
private BigDecimal h3;
|
||||||
|
|
||||||
|
@TableField(value = "h4")
|
||||||
|
private BigDecimal h4;
|
||||||
|
|
||||||
|
@TableField(value = "h5")
|
||||||
|
private BigDecimal h5;
|
||||||
|
|
||||||
|
@TableField(value = "h6")
|
||||||
|
private BigDecimal h6;
|
||||||
|
|
||||||
|
@TableField(value = "h7")
|
||||||
|
private BigDecimal h7;
|
||||||
|
|
||||||
|
@TableField(value = "h8")
|
||||||
|
private BigDecimal h8;
|
||||||
|
|
||||||
|
@TableField(value = "h9")
|
||||||
|
private BigDecimal h9;
|
||||||
|
|
||||||
|
@TableField(value = "h10")
|
||||||
|
private BigDecimal h10;
|
||||||
|
|
||||||
|
@TableField(value = "h11")
|
||||||
|
private BigDecimal h11;
|
||||||
|
|
||||||
|
@TableField(value = "h12")
|
||||||
|
private BigDecimal h12;
|
||||||
|
|
||||||
|
@TableField(value = "h13")
|
||||||
|
private BigDecimal h13;
|
||||||
|
|
||||||
|
@TableField(value = "h14")
|
||||||
|
private BigDecimal h14;
|
||||||
|
|
||||||
|
@TableField(value = "h15")
|
||||||
|
private BigDecimal h15;
|
||||||
|
|
||||||
|
@TableField(value = "h16")
|
||||||
|
private BigDecimal h16;
|
||||||
|
|
||||||
|
@TableField(value = "h17")
|
||||||
|
private BigDecimal h17;
|
||||||
|
|
||||||
|
@TableField(value = "h18")
|
||||||
|
private BigDecimal h18;
|
||||||
|
|
||||||
|
@TableField(value = "h19")
|
||||||
|
private BigDecimal h19;
|
||||||
|
|
||||||
|
@TableField(value = "h20")
|
||||||
|
private BigDecimal h20;
|
||||||
|
|
||||||
|
@TableField(value = "h21")
|
||||||
|
private BigDecimal h21;
|
||||||
|
|
||||||
|
@TableField(value = "h22")
|
||||||
|
private BigDecimal h22;
|
||||||
|
|
||||||
|
@TableField(value = "h23")
|
||||||
|
private BigDecimal h23;
|
||||||
|
|
||||||
|
@TableField(value = "h24")
|
||||||
|
private BigDecimal h24;
|
||||||
|
|
||||||
|
@TableField(value = "h25")
|
||||||
|
private BigDecimal h25;
|
||||||
|
|
||||||
|
@TableField(value = "h26")
|
||||||
|
private BigDecimal h26;
|
||||||
|
|
||||||
|
@TableField(value = "h27")
|
||||||
|
private BigDecimal h27;
|
||||||
|
|
||||||
|
@TableField(value = "h28")
|
||||||
|
private BigDecimal h28;
|
||||||
|
|
||||||
|
@TableField(value = "h29")
|
||||||
|
private BigDecimal h29;
|
||||||
|
|
||||||
|
@TableField(value = "h30")
|
||||||
|
private BigDecimal h30;
|
||||||
|
|
||||||
|
@TableField(value = "h31")
|
||||||
|
private BigDecimal h31;
|
||||||
|
|
||||||
|
@TableField(value = "h32")
|
||||||
|
private BigDecimal h32;
|
||||||
|
|
||||||
|
@TableField(value = "h33")
|
||||||
|
private BigDecimal h33;
|
||||||
|
|
||||||
|
@TableField(value = "h34")
|
||||||
|
private BigDecimal h34;
|
||||||
|
|
||||||
|
@TableField(value = "h35")
|
||||||
|
private BigDecimal h35;
|
||||||
|
|
||||||
|
@TableField(value = "h36")
|
||||||
|
private BigDecimal h36;
|
||||||
|
|
||||||
|
@TableField(value = "h37")
|
||||||
|
private BigDecimal h37;
|
||||||
|
|
||||||
|
@TableField(value = "h38")
|
||||||
|
private BigDecimal h38;
|
||||||
|
|
||||||
|
@TableField(value = "h39")
|
||||||
|
private BigDecimal h39;
|
||||||
|
|
||||||
|
@TableField(value = "h40")
|
||||||
|
private BigDecimal h40;
|
||||||
|
|
||||||
|
@TableField(value = "h41")
|
||||||
|
private BigDecimal h41;
|
||||||
|
|
||||||
|
@TableField(value = "h42")
|
||||||
|
private BigDecimal h42;
|
||||||
|
|
||||||
|
@TableField(value = "h43")
|
||||||
|
private BigDecimal h43;
|
||||||
|
|
||||||
|
@TableField(value = "h44")
|
||||||
|
private BigDecimal h44;
|
||||||
|
|
||||||
|
@TableField(value = "h45")
|
||||||
|
private BigDecimal h45;
|
||||||
|
|
||||||
|
@TableField(value = "h46")
|
||||||
|
private BigDecimal h46;
|
||||||
|
|
||||||
|
@TableField(value = "h47")
|
||||||
|
private BigDecimal h47;
|
||||||
|
|
||||||
|
@TableField(value = "h48")
|
||||||
|
private BigDecimal h48;
|
||||||
|
|
||||||
|
@TableField(value = "h49")
|
||||||
|
private BigDecimal h49;
|
||||||
|
|
||||||
|
@TableField(value = "h50")
|
||||||
|
private BigDecimal h50;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:22【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "cvt_line_relation")
|
||||||
|
public class CvtLineRelation {
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt系数表id
|
||||||
|
*/
|
||||||
|
@TableField(value = "cvt_id")
|
||||||
|
private String cvtId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.device.pq.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/01/22 下午 1:53【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("pq_device_process")
|
||||||
|
public class DeviceProcess implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//设备id
|
||||||
|
private String id;
|
||||||
|
//设备设备所在前置机进程号
|
||||||
|
private Integer processNo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -55,6 +55,14 @@ public class Node extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer nodeDevNum;
|
private Integer nodeDevNum;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置机支持最大进程数量
|
||||||
|
*/
|
||||||
|
private Integer maxProcessNum;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CvtHarmonicCorrectionFactorsVO {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt名称
|
||||||
|
*/
|
||||||
|
private String cvtName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cvt型号
|
||||||
|
*/
|
||||||
|
private String cvtModel;
|
||||||
|
|
||||||
|
private BigDecimal h2;
|
||||||
|
|
||||||
|
private BigDecimal h3;
|
||||||
|
|
||||||
|
private BigDecimal h4;
|
||||||
|
|
||||||
|
private BigDecimal h5;
|
||||||
|
|
||||||
|
private BigDecimal h6;
|
||||||
|
|
||||||
|
private BigDecimal h7;
|
||||||
|
|
||||||
|
private BigDecimal h8;
|
||||||
|
|
||||||
|
private BigDecimal h9;
|
||||||
|
|
||||||
|
private BigDecimal h10;
|
||||||
|
|
||||||
|
private BigDecimal h11;
|
||||||
|
|
||||||
|
private BigDecimal h12;
|
||||||
|
|
||||||
|
private BigDecimal h13;
|
||||||
|
|
||||||
|
private BigDecimal h14;
|
||||||
|
|
||||||
|
private BigDecimal h15;
|
||||||
|
|
||||||
|
private BigDecimal h16;
|
||||||
|
|
||||||
|
private BigDecimal h17;
|
||||||
|
|
||||||
|
private BigDecimal h18;
|
||||||
|
|
||||||
|
private BigDecimal h19;
|
||||||
|
|
||||||
|
private BigDecimal h20;
|
||||||
|
|
||||||
|
private BigDecimal h21;
|
||||||
|
|
||||||
|
private BigDecimal h22;
|
||||||
|
|
||||||
|
private BigDecimal h23;
|
||||||
|
|
||||||
|
private BigDecimal h24;
|
||||||
|
|
||||||
|
private BigDecimal h25;
|
||||||
|
|
||||||
|
private BigDecimal h26;
|
||||||
|
|
||||||
|
private BigDecimal h27;
|
||||||
|
|
||||||
|
private BigDecimal h28;
|
||||||
|
|
||||||
|
private BigDecimal h29;
|
||||||
|
|
||||||
|
private BigDecimal h30;
|
||||||
|
|
||||||
|
private BigDecimal h31;
|
||||||
|
|
||||||
|
private BigDecimal h32;
|
||||||
|
|
||||||
|
private BigDecimal h33;
|
||||||
|
|
||||||
|
private BigDecimal h34;
|
||||||
|
|
||||||
|
private BigDecimal h35;
|
||||||
|
|
||||||
|
private BigDecimal h36;
|
||||||
|
|
||||||
|
private BigDecimal h37;
|
||||||
|
|
||||||
|
private BigDecimal h38;
|
||||||
|
|
||||||
|
private BigDecimal h39;
|
||||||
|
|
||||||
|
private BigDecimal h40;
|
||||||
|
|
||||||
|
private BigDecimal h41;
|
||||||
|
|
||||||
|
private BigDecimal h42;
|
||||||
|
|
||||||
|
private BigDecimal h43;
|
||||||
|
|
||||||
|
private BigDecimal h44;
|
||||||
|
|
||||||
|
private BigDecimal h45;
|
||||||
|
|
||||||
|
private BigDecimal h46;
|
||||||
|
|
||||||
|
private BigDecimal h47;
|
||||||
|
|
||||||
|
private BigDecimal h48;
|
||||||
|
|
||||||
|
private BigDecimal h49;
|
||||||
|
|
||||||
|
private BigDecimal h50;
|
||||||
|
/**
|
||||||
|
* 创建用户
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@ public class DeviceUtil {
|
|||||||
public static String decoderString(Integer cd,String content){
|
public static String decoderString(Integer cd,String content){
|
||||||
String seriesTmp = null;
|
String seriesTmp = null;
|
||||||
if (cd == 0) {
|
if (cd == 0) {
|
||||||
seriesTmp = Base64.decodeBase64(content).toString();
|
seriesTmp = new String(Base64.decodeBase64(content));
|
||||||
} else if (cd == 1) {
|
} else if (cd == 1) {
|
||||||
seriesTmp = ThreeDesUtil.decryptThreeDes(content);
|
seriesTmp = ThreeDesUtil.decryptThreeDes(content);
|
||||||
} else if (cd == 2) {
|
} else if (cd == 2) {
|
||||||
|
|||||||
@@ -45,6 +45,15 @@
|
|||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn.platform</groupId>
|
||||||
|
<artifactId>message-api</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.pq.service.LineService;
|
import com.njcn.device.pq.service.LineService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -41,6 +42,15 @@ public class CommLineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@GetMapping("/getPollutionLineInfo")
|
||||||
|
@ApiOperation("获取污区值监测点相关信息")
|
||||||
|
public HttpResult<List<PollutionLineInfoDTO>> getPollutionLineInfo(@RequestParam("id") List<String> id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getPollutionLineInfo");
|
||||||
|
List<PollutionLineInfoDTO> result = lineService.getPollutionLineInfo(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@GetMapping("/getLineAllDetail")
|
@GetMapping("/getLineAllDetail")
|
||||||
@ApiOperation("获取监测点id取超标监测点信息")
|
@ApiOperation("获取监测点id取超标监测点信息")
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class CommTerminalController extends BaseController {
|
|||||||
public HttpResult<List<DeptGetDeviceDTO>> deptGetDevice(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
public HttpResult<List<DeptGetDeviceDTO>> deptGetDevice(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
||||||
TimeInterval timer = new TimeInterval();
|
TimeInterval timer = new TimeInterval();
|
||||||
String methodDescribe = getMethodDescribe("deptGetDevice");
|
String methodDescribe = getMethodDescribe("deptGetDevice");
|
||||||
List<DeptGetDeviceDTO> result = commTerminalService.deptGetDevice(deptGetLineParam,0);
|
List<DeptGetDeviceDTO> result = commTerminalService.deptGetDevice(deptGetLineParam,3);
|
||||||
log.info("运行时长" + timer.intervalSecond());
|
log.info("运行时长" + timer.intervalSecond());
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.njcn.device.pq.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtHarmonicCorrectionFactorsParam;
|
||||||
|
import com.njcn.device.pq.pojo.param.NodeParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO;
|
||||||
|
import com.njcn.device.pq.service.CvtHarmonicCorrectionFactorsService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:53【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "cvt系数配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cvt")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CvtHarmonicCorrectionFactorsController extends BaseController {
|
||||||
|
|
||||||
|
private final CvtHarmonicCorrectionFactorsService cvtHarmonicCorrectionFactorsService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("新增cvt系数")
|
||||||
|
@ApiImplicitParam(value = "cvt系数信息",name = "cvtHarmonicCorrectionFactorsParam",required = true)
|
||||||
|
@PostMapping("add")
|
||||||
|
public HttpResult<Boolean> add(@Validated @RequestBody CvtHarmonicCorrectionFactorsParam cvtHarmonicCorrectionFactorsParam){
|
||||||
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
boolean result = cvtHarmonicCorrectionFactorsService.add(cvtHarmonicCorrectionFactorsParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("修改cvt系数")
|
||||||
|
@ApiImplicitParam(value = "cvt系数信息",name = "updateParam",required = true)
|
||||||
|
@PostMapping("updateCvt")
|
||||||
|
public HttpResult<Boolean> updateCvt(@Validated @RequestBody CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamUpdateParam updateParam){
|
||||||
|
String methodDescribe = getMethodDescribe("updateCvt");
|
||||||
|
boolean result = cvtHarmonicCorrectionFactorsService.updateCvt(updateParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@ApiImplicitParam(value = "cvt系数信息",name = "queryParam",required = true)
|
||||||
|
@PostMapping("queryPage")
|
||||||
|
public HttpResult<Page<CvtHarmonicCorrectionFactorsVO>> queryPage(@Validated @RequestBody CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam){
|
||||||
|
String methodDescribe = getMethodDescribe("queryPage");
|
||||||
|
Page<CvtHarmonicCorrectionFactorsVO> result = cvtHarmonicCorrectionFactorsService.queryPage(queryParam);
|
||||||
|
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("列表查询")
|
||||||
|
@PostMapping("queryList")
|
||||||
|
public HttpResult<List<CvtHarmonicCorrectionFactorsDTO>> queryList( @Validated @RequestBody CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam){
|
||||||
|
String methodDescribe = getMethodDescribe("queryList");
|
||||||
|
List<CvtHarmonicCorrectionFactorsDTO> result = cvtHarmonicCorrectionFactorsService.queryList(queryParam);
|
||||||
|
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("根据id查询")
|
||||||
|
@PostMapping("queryById")
|
||||||
|
public HttpResult<CvtHarmonicCorrectionFactorsDTO> queryById( @RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("queryById");
|
||||||
|
CvtHarmonicCorrectionFactorsDTO result = new CvtHarmonicCorrectionFactorsDTO();
|
||||||
|
CvtHarmonicCorrectionFactors cvt = cvtHarmonicCorrectionFactorsService.getById(id);
|
||||||
|
BeanUtils.copyProperties(result,cvt);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("根据id删除")
|
||||||
|
@PostMapping("deleteById")
|
||||||
|
public HttpResult<Boolean> deleteById( @RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("deleteById");
|
||||||
|
boolean result = cvtHarmonicCorrectionFactorsService.removeById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.njcn.device.pq.controller;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtHarmonicCorrectionFactorsParam;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtLineRelationParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO;
|
||||||
|
import com.njcn.device.pq.service.CvtHarmonicCorrectionFactorsService;
|
||||||
|
import com.njcn.device.pq.service.CvtLineRelationService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:29【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "cvt系数绑定")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cvtBind")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CvtLineRelationController extends BaseController {
|
||||||
|
private final CvtLineRelationService cvtLineRelationService;
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("新增cvt系数绑定")
|
||||||
|
@ApiImplicitParam(value = "cvt系数绑定信息",name = "cvtLineRelationParam",required = true)
|
||||||
|
@PostMapping("add")
|
||||||
|
public HttpResult<Boolean> add(@Validated @RequestBody CvtLineRelationParam cvtLineRelationParam){
|
||||||
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
boolean result = cvtLineRelationService.add(cvtLineRelationParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("根据监测点id查询绑定cvt系数")
|
||||||
|
@PostMapping("queryByLineId")
|
||||||
|
public HttpResult<CvtHarmonicCorrectionFactorsDTO> queryByLineId(@RequestParam String lineId){
|
||||||
|
String methodDescribe = getMethodDescribe("queryByLineId");
|
||||||
|
CvtHarmonicCorrectionFactorsDTO result = cvtLineRelationService.queryByLineId(lineId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,14 @@ public class NodeDeviceController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("一键分配装置所属进程号")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@PostMapping("oneKeyDistribution")
|
||||||
|
public HttpResult<Boolean> oneKeyDistribution(@RequestParam("nodeId") String nodeId){
|
||||||
|
String methodDescribe = getMethodDescribe("oneKeyDistribution");
|
||||||
|
nodeDeviceService.oneKeyDistribution(nodeId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,14 @@ import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
|||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
import com.njcn.device.pq.pojo.po.Line;
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.device.pq.pojo.vo.LineWiringDiagramVO;
|
import com.njcn.device.pq.pojo.vo.LineWiringDiagramVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalBaseVO;
|
import com.njcn.device.pq.pojo.vo.TerminalBaseVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalVO;
|
import com.njcn.device.pq.pojo.vo.TerminalVO;
|
||||||
|
import com.njcn.device.pq.service.LineService;
|
||||||
import com.njcn.device.pq.service.TerminalBaseService;
|
import com.njcn.device.pq.service.TerminalBaseService;
|
||||||
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
||||||
|
import com.njcn.message.constant.DeviceRebootType;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@@ -56,7 +59,7 @@ public class TerminalBaseController extends BaseController {
|
|||||||
|
|
||||||
private final TerminalBaseService terminalBaseService;
|
private final TerminalBaseService terminalBaseService;
|
||||||
private final GeneralDeviceService generalDeviceService;
|
private final GeneralDeviceService generalDeviceService;
|
||||||
|
private final LineService lineService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端新增操作
|
* 终端新增操作
|
||||||
@@ -117,6 +120,15 @@ public class TerminalBaseController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
terminalBaseService.addTerminal(addTerminalParam);
|
terminalBaseService.addTerminal(addTerminalParam);
|
||||||
|
//新增终端后发送消息给前置重启设备
|
||||||
|
if (Objects.nonNull(addTerminalParam.getDeviceParam())) {
|
||||||
|
addTerminalParam.getDeviceParam().forEach(temp->{
|
||||||
|
Line line = terminalBaseService.queryTerminalByName(temp.getName());
|
||||||
|
terminalBaseService.askRestartDevice(line.getId(), DeviceRebootType.ADD_TERMINAL);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +157,14 @@ public class TerminalBaseController extends BaseController {
|
|||||||
@GetMapping("/terminalSyncDeleteFly")
|
@GetMapping("/terminalSyncDeleteFly")
|
||||||
public HttpResult<Boolean> terminalSyncDeleteFly(@RequestParam("lineId") String lineId) {
|
public HttpResult<Boolean> terminalSyncDeleteFly(@RequestParam("lineId") String lineId) {
|
||||||
String methodDescribe = getMethodDescribe("terminalSyncDeleteFly");
|
String methodDescribe = getMethodDescribe("terminalSyncDeleteFly");
|
||||||
|
//获取设备id
|
||||||
|
LineDetailDataVO lineDetailData = lineService.getLineDetailData(lineId);
|
||||||
|
String devId =lineDetailData.getDevId();
|
||||||
|
|
||||||
Boolean b = terminalBaseService.terminalSyncDeleteFly(lineId);
|
Boolean b = terminalBaseService.terminalSyncDeleteFly(lineId);
|
||||||
|
//删除监测点即修改终端通知前置重启
|
||||||
|
terminalBaseService.askRestartDevice(devId,DeviceRebootType.LEDGER_MODIFY);
|
||||||
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,6 +211,8 @@ public class TerminalBaseController extends BaseController {
|
|||||||
public HttpResult<Object> delTerminal(@RequestParam("id") String id) {
|
public HttpResult<Object> delTerminal(@RequestParam("id") String id) {
|
||||||
String methodDescribe = getMethodDescribe("delTerminal");
|
String methodDescribe = getMethodDescribe("delTerminal");
|
||||||
terminalBaseService.delTerminal(id);
|
terminalBaseService.delTerminal(id);
|
||||||
|
|
||||||
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,4 +433,31 @@ public class TerminalBaseController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("请求前置重启进程")
|
||||||
|
@PostMapping(value = "askRestartProcess")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "processNo", value = "进程号", required = true),
|
||||||
|
@ApiImplicitParam(name = "deviceRebootType", value = "重启类型", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<Object> askRestartProcess(@RequestParam("processNo")Integer processNo,@RequestParam("processType")String processType,@RequestParam("deviceRebootType")String deviceRebootType) {
|
||||||
|
String methodDescribe = getMethodDescribe("askRestartProcess");
|
||||||
|
terminalBaseService.askRestartProcess(processNo,processType,deviceRebootType);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("请求前置设备进程")
|
||||||
|
@PostMapping(value = "askRestartDevice")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||||
|
@ApiImplicitParam(name = "deviceRebootType", value = "重启类型", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<Object> askRestartDevice(@RequestParam("devId")String devId,@RequestParam("deviceRebootType")String deviceRebootType) {
|
||||||
|
String methodDescribe = getMethodDescribe("askRestartDevice");
|
||||||
|
terminalBaseService.askRestartDevice(devId,deviceRebootType);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface CvtHarmonicCorrectionFactorsMapper extends BaseMapper<CvtHarmonicCorrectionFactors> {
|
||||||
|
Page<CvtHarmonicCorrectionFactorsVO> queryPage(Page<Object> objectPage,@Param("ew") QueryWrapper<CvtHarmonicCorrectionFactorsVO> queryWrapper);
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtLineRelation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:22【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface CvtLineRelationMapper extends BaseMapper<CvtLineRelation> {
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.pq.pojo.po.Device;
|
import com.njcn.device.pq.pojo.po.Device;
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||||
import com.njcn.device.pq.pojo.vo.LineInfluxDbOnlineVO;
|
import com.njcn.device.pq.pojo.vo.LineInfluxDbOnlineVO;
|
||||||
@@ -85,4 +86,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
|||||||
List<DevDetail> selectDevByIds(@Param("ids") List<String> ids);
|
List<DevDetail> selectDevByIds(@Param("ids") List<String> ids);
|
||||||
|
|
||||||
void updateDeviceRunFlag(@Param("id")String deviceId, @Param("runFlag")Integer status);
|
void updateDeviceRunFlag(@Param("id")String deviceId, @Param("runFlag")Integer status);
|
||||||
|
|
||||||
|
List<PollutionLineInfoDTO> getPollutionDeviceInfo(@Param("id")List<String> devId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.device.pq.pojo.po.Device;
|
||||||
|
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
||||||
|
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineInfluxDbOnlineVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.RunManageVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.RunTimeVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2022-01-04
|
||||||
|
*/
|
||||||
|
public interface DeviceProcessMapper extends BaseMapper<DeviceProcess> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pq.mapper.CvtHarmonicCorrectionFactorsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table cvt_harmonic_correction_factors-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="cvt_name" jdbcType="VARCHAR" property="cvtName" />
|
||||||
|
<result column="cvt_model" jdbcType="VARCHAR" property="cvtModel" />
|
||||||
|
<result column="h2" jdbcType="DECIMAL" property="h2" />
|
||||||
|
<result column="h3" jdbcType="DECIMAL" property="h3" />
|
||||||
|
<result column="h4" jdbcType="DECIMAL" property="h4" />
|
||||||
|
<result column="h5" jdbcType="DECIMAL" property="h5" />
|
||||||
|
<result column="h6" jdbcType="DECIMAL" property="h6" />
|
||||||
|
<result column="h7" jdbcType="DECIMAL" property="h7" />
|
||||||
|
<result column="h8" jdbcType="DECIMAL" property="h8" />
|
||||||
|
<result column="h9" jdbcType="DECIMAL" property="h9" />
|
||||||
|
<result column="h10" jdbcType="DECIMAL" property="h10" />
|
||||||
|
<result column="h11" jdbcType="DECIMAL" property="h11" />
|
||||||
|
<result column="h12" jdbcType="DECIMAL" property="h12" />
|
||||||
|
<result column="h13" jdbcType="DECIMAL" property="h13" />
|
||||||
|
<result column="h14" jdbcType="DECIMAL" property="h14" />
|
||||||
|
<result column="h15" jdbcType="DECIMAL" property="h15" />
|
||||||
|
<result column="h16" jdbcType="DECIMAL" property="h16" />
|
||||||
|
<result column="h17" jdbcType="DECIMAL" property="h17" />
|
||||||
|
<result column="h18" jdbcType="DECIMAL" property="h18" />
|
||||||
|
<result column="h19" jdbcType="DECIMAL" property="h19" />
|
||||||
|
<result column="h20" jdbcType="DECIMAL" property="h20" />
|
||||||
|
<result column="h21" jdbcType="DECIMAL" property="h21" />
|
||||||
|
<result column="h22" jdbcType="DECIMAL" property="h22" />
|
||||||
|
<result column="h23" jdbcType="DECIMAL" property="h23" />
|
||||||
|
<result column="h24" jdbcType="DECIMAL" property="h24" />
|
||||||
|
<result column="h25" jdbcType="DECIMAL" property="h25" />
|
||||||
|
<result column="h26" jdbcType="DECIMAL" property="h26" />
|
||||||
|
<result column="h27" jdbcType="DECIMAL" property="h27" />
|
||||||
|
<result column="h28" jdbcType="DECIMAL" property="h28" />
|
||||||
|
<result column="h29" jdbcType="DECIMAL" property="h29" />
|
||||||
|
<result column="h30" jdbcType="DECIMAL" property="h30" />
|
||||||
|
<result column="h31" jdbcType="DECIMAL" property="h31" />
|
||||||
|
<result column="h32" jdbcType="DECIMAL" property="h32" />
|
||||||
|
<result column="h33" jdbcType="DECIMAL" property="h33" />
|
||||||
|
<result column="h34" jdbcType="DECIMAL" property="h34" />
|
||||||
|
<result column="h35" jdbcType="DECIMAL" property="h35" />
|
||||||
|
<result column="h36" jdbcType="DECIMAL" property="h36" />
|
||||||
|
<result column="h37" jdbcType="DECIMAL" property="h37" />
|
||||||
|
<result column="h38" jdbcType="DECIMAL" property="h38" />
|
||||||
|
<result column="h39" jdbcType="DECIMAL" property="h39" />
|
||||||
|
<result column="h40" jdbcType="DECIMAL" property="h40" />
|
||||||
|
<result column="h41" jdbcType="DECIMAL" property="h41" />
|
||||||
|
<result column="h42" jdbcType="DECIMAL" property="h42" />
|
||||||
|
<result column="h43" jdbcType="DECIMAL" property="h43" />
|
||||||
|
<result column="h44" jdbcType="DECIMAL" property="h44" />
|
||||||
|
<result column="h45" jdbcType="DECIMAL" property="h45" />
|
||||||
|
<result column="h46" jdbcType="DECIMAL" property="h46" />
|
||||||
|
<result column="h47" jdbcType="DECIMAL" property="h47" />
|
||||||
|
<result column="h48" jdbcType="DECIMAL" property="h48" />
|
||||||
|
<result column="h49" jdbcType="DECIMAL" property="h49" />
|
||||||
|
<result column="h50" jdbcType="DECIMAL" property="h50" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, cvt_name, cvt_model, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14,
|
||||||
|
h15, h16, h17, h18, h19, h20, h21, h22, h23, h24, h25, h26, h27, h28, h29, h30, h31,
|
||||||
|
h32, h33, h34, h35, h36, h37, h38, h39, h40, h41, h42, h43, h44, h45, h46, h47, h48,
|
||||||
|
h49, h50, Create_By, Create_Time, Update_By, Update_Time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryPage" resultType="com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO">
|
||||||
|
SELECT cvt_harmonic_correction_factors.*
|
||||||
|
FROM cvt_harmonic_correction_factors cvt_harmonic_correction_factors
|
||||||
|
WHERE ${ew.sqlSegment}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pq.mapper.CvtLineRelationMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.device.pq.pojo.po.CvtLineRelation">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table cvt_line_relation-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||||
|
<result column="cvt_id" jdbcType="VARCHAR" property="cvtId" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, line_id, cvt_id
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -340,4 +340,45 @@
|
|||||||
bdName,
|
bdName,
|
||||||
devName
|
devName
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPollutionDeviceInfo" resultType="com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO">
|
||||||
|
SELECT
|
||||||
|
line.id lineId,
|
||||||
|
gdinfo.NAME AS gdName,
|
||||||
|
substation.NAME AS subStationName,
|
||||||
|
device.NAME AS devName,
|
||||||
|
deviceDetail.Com_Flag AS comFlag,
|
||||||
|
lineDetail.power_Flag AS powerFlag,
|
||||||
|
lineDetail.business_type AS businessType,
|
||||||
|
lineDetail.load_type AS loadtype,
|
||||||
|
lineDetail.obj_name AS objName,
|
||||||
|
lineDetail.power_substation_name AS powerSubstationName,
|
||||||
|
deviceDetail.manufacturer AS manufacturer,
|
||||||
|
deviceDetail.dev_Type AS devType,
|
||||||
|
deviceDetail.login_Time AS loginTime,
|
||||||
|
deviceDetail.id deviceId,
|
||||||
|
pv.scale lineVoltage,
|
||||||
|
lineDetail.monitor_id monitorId
|
||||||
|
FROM
|
||||||
|
pq_line line,
|
||||||
|
pq_line_detail lineDetail,
|
||||||
|
pq_line subv,
|
||||||
|
pq_line device,
|
||||||
|
pq_device deviceDetail,
|
||||||
|
pq_line substation,
|
||||||
|
pq_line gdinfo,
|
||||||
|
pq_voltage pv
|
||||||
|
WHERE line.id in
|
||||||
|
<foreach collection="id" close=")" item="item" open="(" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
AND line.id = lineDetail.id
|
||||||
|
AND line.pid = subv.id
|
||||||
|
AND subv.pid = device.id
|
||||||
|
AND device.id = deviceDetail.id
|
||||||
|
AND device.pid = substation.id
|
||||||
|
AND substation.pid = gdinfo.id
|
||||||
|
AND subv.id = pv.id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pq.mapper.DeviceProcessMapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -1802,7 +1802,7 @@
|
|||||||
line.Name name,
|
line.Name name,
|
||||||
pq_line_detail.Num lineNo,
|
pq_line_detail.Num lineNo,
|
||||||
s1.Name voltageLevel,
|
s1.Name voltageLevel,
|
||||||
pq_line_detail.PT_Phase_Type ptType,
|
pq_line_detail.PT_Type ptType,
|
||||||
pq_line_detail.Run_Flag status
|
pq_line_detail.Run_Flag status
|
||||||
FROM
|
FROM
|
||||||
pq_line_detail
|
pq_line_detail
|
||||||
|
|||||||
@@ -14,17 +14,22 @@
|
|||||||
s2.Name manufacturer,
|
s2.Name manufacturer,
|
||||||
pq_device.Com_Flag status,
|
pq_device.Com_Flag status,
|
||||||
pq_device.Series series,
|
pq_device.Series series,
|
||||||
|
pq_device_process.process_no processNo,
|
||||||
pq_device.Dev_Key devKey
|
pq_device.Dev_Key devKey
|
||||||
FROM
|
FROM
|
||||||
pq_node
|
pq_device
|
||||||
LEFT JOIN pq_device ON pq_node.Id = pq_device.Node_Id
|
LEFT JOIN pq_node ON pq_node.Id = pq_device.Node_Id
|
||||||
LEFT JOIN pq_line on pq_device.id = pq_line.id
|
LEFT JOIN pq_line on pq_device.id = pq_line.id
|
||||||
|
LEFT JOIN pq_device_process on pq_device_process.id = pq_device.id
|
||||||
LEFT JOIN sys_dict_data s1 ON pq_device.Dev_Type = s1.id
|
LEFT JOIN sys_dict_data s1 ON pq_device.Dev_Type = s1.id
|
||||||
LEFT JOIN sys_dict_data s2 ON pq_device.Manufacturer = s2.id
|
LEFT JOIN sys_dict_data s2 ON pq_device.Manufacturer = s2.id
|
||||||
<where>
|
<where>
|
||||||
<if test="nodeDeviceParam.ip!=null and nodeDeviceParam.ip != ''">
|
<if test="nodeDeviceParam.ip!=null and nodeDeviceParam.ip != ''">
|
||||||
pq_node.ip=#{nodeDeviceParam.ip}
|
pq_node.ip=#{nodeDeviceParam.ip}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="nodeDeviceParam.devId!=null and nodeDeviceParam.devId != ''">
|
||||||
|
pq_device.id=#{nodeDeviceParam.devId}
|
||||||
|
</if>
|
||||||
<if test="nodeDeviceParam.runFlag!=null and nodeDeviceParam.runFlag.size()!=0">
|
<if test="nodeDeviceParam.runFlag!=null and nodeDeviceParam.runFlag.size()!=0">
|
||||||
AND pq_device.Run_Flag in
|
AND pq_device.Run_Flag in
|
||||||
<foreach collection="nodeDeviceParam.runFlag" open="(" close=")" item="item" separator=",">
|
<foreach collection="nodeDeviceParam.runFlag" open="(" close=")" item="item" separator=",">
|
||||||
|
|||||||
@@ -158,8 +158,10 @@
|
|||||||
gd.name electricPowerCompany,
|
gd.name electricPowerCompany,
|
||||||
b.IP DeviceIP,
|
b.IP DeviceIP,
|
||||||
b.id deviceId,
|
b.id deviceId,
|
||||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
-- ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
||||||
ifnull(convert(m.Actual_Value/1024/1024,decimal(7,2)),0) statisValue
|
-- ifnull(convert(m.Actual_Value/1024/1024,decimal(7,2)),0) statisValue
|
||||||
|
COALESCE(d.flow, (SELECT flow FROM cld_flow_meal WHERE type = 0 AND flag = 1)) + COALESCE(d1.flow, 0) AS flowMeal,
|
||||||
|
COALESCE(CAST(m.Actual_Value / 1024 / 1024 AS DECIMAL(7, 2)), 0) AS statisValue
|
||||||
FROM pq_line a
|
FROM pq_line a
|
||||||
INNER JOIN pq_line sub ON sub.id = a.pid
|
INNER JOIN pq_line sub ON sub.id = a.pid
|
||||||
INNER JOIN pq_line gd ON gd.id = sub.pid
|
INNER JOIN pq_line gd ON gd.id = sub.pid
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.device.pq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtHarmonicCorrectionFactorsParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface CvtHarmonicCorrectionFactorsService extends IService<CvtHarmonicCorrectionFactors>{
|
||||||
|
|
||||||
|
|
||||||
|
boolean add(CvtHarmonicCorrectionFactorsParam cvtHarmonicCorrectionFactorsParam);
|
||||||
|
|
||||||
|
boolean updateCvt(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamUpdateParam updateParam);
|
||||||
|
|
||||||
|
Page<CvtHarmonicCorrectionFactorsVO> queryPage(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam);
|
||||||
|
|
||||||
|
List<CvtHarmonicCorrectionFactorsDTO> queryList(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.device.pq.service;
|
||||||
|
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtLineRelationParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtLineRelation;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:22【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface CvtLineRelationService extends IService<CvtLineRelation>{
|
||||||
|
|
||||||
|
|
||||||
|
boolean add(CvtLineRelationParam cvtLineRelationParam);
|
||||||
|
|
||||||
|
CvtHarmonicCorrectionFactorsDTO queryByLineId(String lineId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.device.pq.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.biz.pojo.po.DeviceBak;
|
||||||
|
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点类
|
||||||
|
* @author denghuajun
|
||||||
|
* @date 2022/2/23
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface DeviceProcessService extends IService<DeviceProcess> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
@@ -234,4 +235,10 @@ public interface LineService extends IService<Line> {
|
|||||||
|
|
||||||
List<String> getLevelMonitorByDept(@RequestParam("level") String level, @RequestParam("deptId")String deptId);
|
List<String> getLevelMonitorByDept(@RequestParam("level") String level, @RequestParam("deptId")String deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取污区值监测点相关信息
|
||||||
|
* @author hongawen
|
||||||
|
*/
|
||||||
|
List<PollutionLineInfoDTO> getPollutionLineInfo(List<String> id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface NodeDeviceService {
|
public interface NodeDeviceService {
|
||||||
List<DeviceInfo> nodeDeviceList(NodeDeviceParam nodeDeviceParam);
|
List<DeviceInfo> nodeDeviceList(NodeDeviceParam nodeDeviceParam);
|
||||||
|
|
||||||
|
void oneKeyDistribution(String nodeId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,14 @@ public interface TerminalBaseService {
|
|||||||
*/
|
*/
|
||||||
TerminalVO queryTerminal(String id);
|
TerminalVO queryTerminal(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端查询操作
|
||||||
|
* @param devName 设备名称
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/7/19
|
||||||
|
*/
|
||||||
|
Line queryTerminalByName(String devName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端删除操作
|
* 终端删除操作
|
||||||
* @param id 设备id
|
* @param id 设备id
|
||||||
@@ -275,4 +283,9 @@ public interface TerminalBaseService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean terminalSyncDeleteFly(String lineId);
|
Boolean terminalSyncDeleteFly(String lineId);
|
||||||
|
|
||||||
|
//通知前置重启设备
|
||||||
|
void askRestartProcess(Integer processNo,String processType,String deviceRebootType);
|
||||||
|
|
||||||
|
void askRestartDevice(String devId, String deviceRebootType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
public List<DeptGetDeviceDTO> deptGetDevice(DeptGetLineParam deptGetLineParam,Integer type) {
|
public List<DeptGetDeviceDTO> deptGetDevice(DeptGetLineParam deptGetLineParam,Integer type) {
|
||||||
List<DeptGetDeviceDTO> result = new ArrayList<>();
|
List<DeptGetDeviceDTO> result = new ArrayList<>();
|
||||||
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
||||||
Map<String, List<LineDevGetDTO>> map = deptLineService.lineDevGet(filterDataTypeNew(deptGetLineParam.getServerName()),3,deptGetLineParam.getLineRunFlag());
|
Map<String, List<LineDevGetDTO>> map = deptLineService.lineDevGet(filterDataTypeNew(deptGetLineParam.getServerName()),type,deptGetLineParam.getLineRunFlag());
|
||||||
temDept.forEach(item -> {
|
temDept.forEach(item -> {
|
||||||
DeptGetDeviceDTO deptGetDeviceDTO = new DeptGetDeviceDTO();
|
DeptGetDeviceDTO deptGetDeviceDTO = new DeptGetDeviceDTO();
|
||||||
deptGetDeviceDTO.setUnitId(item.getUnitId());
|
deptGetDeviceDTO.setUnitId(item.getUnitId());
|
||||||
|
|||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package com.njcn.device.pq.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.device.pms.pojo.po.Monitor;
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtHarmonicCorrectionFactorsParam;
|
||||||
|
import com.njcn.device.pq.pojo.vo.CvtHarmonicCorrectionFactorsVO;
|
||||||
|
import com.njcn.web.constant.ValidMessage;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import com.njcn.web.utils.RequestUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.pq.mapper.CvtHarmonicCorrectionFactorsMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.njcn.device.pq.service.CvtHarmonicCorrectionFactorsService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/10 下午 1:45【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CvtHarmonicCorrectionFactorsServiceImpl extends ServiceImpl<CvtHarmonicCorrectionFactorsMapper, CvtHarmonicCorrectionFactors> implements CvtHarmonicCorrectionFactorsService{
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean add(CvtHarmonicCorrectionFactorsParam cvtHarmonicCorrectionFactorsParam) {
|
||||||
|
//校验
|
||||||
|
checkParam(cvtHarmonicCorrectionFactorsParam, false);
|
||||||
|
CvtHarmonicCorrectionFactors cvtHarmonicCorrectionFactors = new CvtHarmonicCorrectionFactors();
|
||||||
|
BeanUtils.copyProperties(cvtHarmonicCorrectionFactorsParam,cvtHarmonicCorrectionFactors);
|
||||||
|
boolean save = this.save(cvtHarmonicCorrectionFactors);
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateCvt(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamUpdateParam updateParam) {
|
||||||
|
//校验
|
||||||
|
checkParam(updateParam, true);
|
||||||
|
CvtHarmonicCorrectionFactors cvtHarmonicCorrectionFactors = new CvtHarmonicCorrectionFactors();
|
||||||
|
BeanUtils.copyProperties(updateParam,cvtHarmonicCorrectionFactors);
|
||||||
|
boolean update = this.updateById(cvtHarmonicCorrectionFactors);
|
||||||
|
return update;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<CvtHarmonicCorrectionFactorsVO> queryPage(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam) {
|
||||||
|
|
||||||
|
QueryWrapper<CvtHarmonicCorrectionFactorsVO> queryWrapper = new QueryWrapper<>();
|
||||||
|
if (Objects.nonNull(queryParam)) {
|
||||||
|
if (StringUtils.isNotEmpty(queryParam.getSearchBeginTime()) && StringUtils.isNotEmpty(queryParam.getSearchEndTime())) {
|
||||||
|
queryWrapper.between("cvt_harmonic_correction_factors.create_time",
|
||||||
|
DateUtil.beginOfDay(DateUtil.parse(queryParam.getSearchBeginTime())),
|
||||||
|
DateUtil.endOfDay(DateUtil.parse(queryParam.getSearchEndTime())));
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWrapper.and(temp->temp.like("cvt_harmonic_correction_factors.cvt_name", queryParam.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("cvt_harmonic_correction_factors.cvt_model", queryParam.getSearchValue()));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
queryWrapper
|
||||||
|
.orderByDesc("cvt_harmonic_correction_factors.Update_Time");
|
||||||
|
Page<CvtHarmonicCorrectionFactorsVO> page = this.baseMapper.queryPage(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CvtHarmonicCorrectionFactorsDTO> queryList(CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamQueryParam queryParam) {
|
||||||
|
List<CvtHarmonicCorrectionFactorsDTO> result = new ArrayList<>();
|
||||||
|
List<CvtHarmonicCorrectionFactors> list = this.lambdaQuery().and(item -> item.like(CvtHarmonicCorrectionFactors::getCvtName, queryParam.getSearchValue()).or()
|
||||||
|
.like(CvtHarmonicCorrectionFactors::getCvtModel, queryParam.getSearchValue())).list();
|
||||||
|
if(CollectionUtil.isNotEmpty(list)){
|
||||||
|
result = list.stream().map(temp->{
|
||||||
|
CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO = new CvtHarmonicCorrectionFactorsDTO();
|
||||||
|
BeanUtils.copyProperties(temp,cvtHarmonicCorrectionFactorsDTO);
|
||||||
|
return cvtHarmonicCorrectionFactorsDTO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkParam(CvtHarmonicCorrectionFactorsParam cvtHarmonicCorrectionFactorsParam, Boolean updateFlag) {
|
||||||
|
|
||||||
|
// Pattern pattern = Pattern.compile(PatternRegex.SPECIALCHARACTER);
|
||||||
|
// if(pattern.matcher(cvtHarmonicCorrectionFactorsParam.getCvtName()).find()){
|
||||||
|
// throw new BusinessException(ValidMessage.NAME_SPECIAL_REGEX);
|
||||||
|
// }
|
||||||
|
// if(pattern.matcher(cvtHarmonicCorrectionFactorsParam.getCvtModel()).find()){
|
||||||
|
// throw new BusinessException(ValidMessage.NAME_SPECIAL_REGEX);
|
||||||
|
// }
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CvtHarmonicCorrectionFactors> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.and(item->item.eq(CvtHarmonicCorrectionFactors::getCvtName,cvtHarmonicCorrectionFactorsParam.getCvtName()).or()
|
||||||
|
.eq(CvtHarmonicCorrectionFactors::getCvtModel,cvtHarmonicCorrectionFactorsParam.getCvtModel()));
|
||||||
|
|
||||||
|
if (updateFlag) {
|
||||||
|
if (cvtHarmonicCorrectionFactorsParam instanceof CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamUpdateParam) {
|
||||||
|
//修改
|
||||||
|
lambdaQueryWrapper.ne(CvtHarmonicCorrectionFactors::getId, ((CvtHarmonicCorrectionFactorsParam.CvtHarmonicCorrectionFactorsParamUpdateParam) cvtHarmonicCorrectionFactorsParam).getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
if (count > 0) {
|
||||||
|
throw new BusinessException("存在同名cvt名称或cvt型号");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.device.pq.service.impl;
|
||||||
|
|
||||||
|
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||||
|
import com.njcn.device.pq.pojo.param.CvtLineRelationParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtHarmonicCorrectionFactors;
|
||||||
|
import com.njcn.device.pq.service.CvtHarmonicCorrectionFactorsService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.pq.pojo.po.CvtLineRelation;
|
||||||
|
import com.njcn.device.pq.mapper.CvtLineRelationMapper;
|
||||||
|
import com.njcn.device.pq.service.CvtLineRelationService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/02/11 上午 9:22【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CvtLineRelationServiceImpl extends ServiceImpl<CvtLineRelationMapper, CvtLineRelation> implements CvtLineRelationService{
|
||||||
|
|
||||||
|
private final CvtHarmonicCorrectionFactorsService cvtHarmonicCorrectionFactorsService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean add(CvtLineRelationParam cvtLineRelationParam) {
|
||||||
|
CvtLineRelation one = this.lambdaQuery().eq(CvtLineRelation::getLineId, cvtLineRelationParam.getLineId()).one();
|
||||||
|
if(Objects.isNull(one)){
|
||||||
|
CvtLineRelation cvtLineRelation = new CvtLineRelation();
|
||||||
|
BeanUtils.copyProperties(cvtLineRelationParam,cvtLineRelation);
|
||||||
|
|
||||||
|
this.save(cvtLineRelation);
|
||||||
|
}else {
|
||||||
|
one.setCvtId(cvtLineRelationParam.getCvtId());
|
||||||
|
this.updateById(one);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CvtHarmonicCorrectionFactorsDTO queryByLineId(String lineId) {
|
||||||
|
CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO = new CvtHarmonicCorrectionFactorsDTO();
|
||||||
|
CvtLineRelation one = this.lambdaQuery().eq(CvtLineRelation::getLineId, lineId).one();
|
||||||
|
if(Objects.nonNull(one)&& StringUtils.isNotEmpty(one.getCvtId())){
|
||||||
|
CvtHarmonicCorrectionFactors byId = cvtHarmonicCorrectionFactorsService.getById(one.getCvtId());
|
||||||
|
BeanUtils.copyProperties(byId,cvtHarmonicCorrectionFactorsDTO);
|
||||||
|
}
|
||||||
|
return cvtHarmonicCorrectionFactorsDTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.device.pq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.biz.pojo.po.DeviceBak;
|
||||||
|
import com.njcn.device.pq.mapper.DeviceBakMapper;
|
||||||
|
import com.njcn.device.pq.mapper.DeviceProcessMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.Device;
|
||||||
|
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
||||||
|
import com.njcn.device.pq.service.DeviceProcessService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/01/22 下午 1:59【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class DeviceProcessServiceImpl extends ServiceImpl<DeviceProcessMapper, DeviceProcess> implements DeviceProcessService {
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ import com.njcn.common.utils.PubUtils;
|
|||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||||
import com.njcn.device.pq.mapper.*;
|
import com.njcn.device.pq.mapper.*;
|
||||||
@@ -738,6 +739,39 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PollutionLineInfoDTO> getPollutionLineInfo(List<String> lineId) {
|
||||||
|
List<PollutionLineInfoDTO> pollutionLineInfoDTOList;
|
||||||
|
// 获取终端信息
|
||||||
|
pollutionLineInfoDTOList = deviceMapper.getPollutionDeviceInfo(lineId);
|
||||||
|
List<DictData> manufacturerList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_MANUFACTURER.getCode()).getData();
|
||||||
|
List<DictData> devTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_TYPE.getCode()).getData();
|
||||||
|
List<DictData> businessTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.BUSINESS_TYPE.getCode()).getData();
|
||||||
|
List<DictData> loadTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INTERFERENCE_SOURCE_TYPE.getCode()).getData();
|
||||||
|
List<DictData> voltageList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||||
|
for (PollutionLineInfoDTO pollutionLineInfoDTO : pollutionLineInfoDTOList) {
|
||||||
|
// 制造厂商
|
||||||
|
Optional<DictData> temp = manufacturerList.stream().filter(item -> item.getId().equals(pollutionLineInfoDTO.getManufacturer())).findAny();
|
||||||
|
pollutionLineInfoDTO.setManufacturer(temp.map(DictData::getName).orElse(null));
|
||||||
|
// 终端类型
|
||||||
|
Optional<DictData> temp1 = devTypeList.stream().filter(item -> item.getId().equals(pollutionLineInfoDTO.getDevType())).findAny();
|
||||||
|
pollutionLineInfoDTO.setDevType(temp1.map(DictData::getName).orElse(null));
|
||||||
|
// 行业类型
|
||||||
|
Optional<DictData> temp2 = businessTypeList.stream().filter(item -> item.getId().equals(pollutionLineInfoDTO.getBusinessType())).findAny();
|
||||||
|
pollutionLineInfoDTO.setBusinessType(temp2.map(DictData::getName).orElse(null));
|
||||||
|
// 干扰源类型
|
||||||
|
Optional<DictData> temp3 = loadTypeList.stream().filter(item -> item.getId().equals(pollutionLineInfoDTO.getLoadType())).findAny();
|
||||||
|
pollutionLineInfoDTO.setLoadType(temp3.map(DictData::getName).orElse(null));
|
||||||
|
// 电压等级
|
||||||
|
Optional<DictData> temp4 = voltageList.stream().filter(item -> item.getId().equals(pollutionLineInfoDTO.getLineVoltage())).findAny();
|
||||||
|
pollutionLineInfoDTO.setLineVoltage(temp4.map(DictData::getName).orElse(null));
|
||||||
|
|
||||||
|
// 电网侧
|
||||||
|
pollutionLineInfoDTO.setPowerFlag(pollutionLineInfoDTO.getPowerFlag().equals("0") ? "电网侧" : "非电网侧");
|
||||||
|
}
|
||||||
|
return pollutionLineInfoDTOList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||||
|
|||||||
@@ -1,15 +1,28 @@
|
|||||||
package com.njcn.device.pq.service.impl;
|
package com.njcn.device.pq.service.impl;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.device.pq.enums.PvDeviceResponseEnum;
|
||||||
|
import com.njcn.device.pq.mapper.DeviceMapper;
|
||||||
import com.njcn.device.pq.mapper.LineMapper;
|
import com.njcn.device.pq.mapper.LineMapper;
|
||||||
import com.njcn.device.pq.mapper.NodeMapper;
|
import com.njcn.device.pq.mapper.NodeMapper;
|
||||||
import com.njcn.device.pq.pojo.dto.DeviceInfo;
|
import com.njcn.device.pq.pojo.dto.DeviceInfo;
|
||||||
import com.njcn.device.pq.pojo.dto.MonitorInfo;
|
import com.njcn.device.pq.pojo.dto.MonitorInfo;
|
||||||
import com.njcn.device.pq.pojo.param.NodeDeviceParam;
|
import com.njcn.device.pq.pojo.param.NodeDeviceParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.Device;
|
||||||
|
import com.njcn.device.pq.pojo.po.DeviceProcess;
|
||||||
|
import com.njcn.device.pq.pojo.po.Node;
|
||||||
|
import com.njcn.device.pq.service.DeviceProcessService;
|
||||||
|
import com.njcn.device.pq.service.IDeviceService;
|
||||||
import com.njcn.device.pq.service.NodeDeviceService;
|
import com.njcn.device.pq.service.NodeDeviceService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
@@ -23,6 +36,8 @@ import java.util.List;
|
|||||||
public class NodeDeviceServiceImpl implements NodeDeviceService {
|
public class NodeDeviceServiceImpl implements NodeDeviceService {
|
||||||
private final NodeMapper nodeMapper;
|
private final NodeMapper nodeMapper;
|
||||||
private final LineMapper lineMapper;
|
private final LineMapper lineMapper;
|
||||||
|
private final IDeviceService iDeviceService;
|
||||||
|
private final DeviceProcessService deviceProcessService;
|
||||||
@Override
|
@Override
|
||||||
public List<DeviceInfo> nodeDeviceList(NodeDeviceParam nodeDeviceParam) {
|
public List<DeviceInfo> nodeDeviceList(NodeDeviceParam nodeDeviceParam) {
|
||||||
|
|
||||||
@@ -34,4 +49,37 @@ public class NodeDeviceServiceImpl implements NodeDeviceService {
|
|||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void oneKeyDistribution(String nodeId) {
|
||||||
|
Node node = nodeMapper.selectById(nodeId);
|
||||||
|
Integer nodeDevNum = node.getNodeDevNum();
|
||||||
|
Integer maxProcessNum = node.getMaxProcessNum();
|
||||||
|
List<Device> list = iDeviceService.lambdaQuery().eq(Device::getNodeId, nodeId).list();
|
||||||
|
if(CollectionUtils.isEmpty(list)){
|
||||||
|
throw new BusinessException(PvDeviceResponseEnum.NO_DEVICE);
|
||||||
|
|
||||||
|
}
|
||||||
|
List<String> deviceIdList = list.stream().map(Device::getId).collect(Collectors.toList());
|
||||||
|
List<DeviceProcess> deviceProcessList = deviceProcessService.lambdaQuery().in(DeviceProcess::getId, deviceIdList).list();
|
||||||
|
Integer devNum = list.size();
|
||||||
|
if(nodeDevNum<devNum){
|
||||||
|
throw new BusinessException(PvDeviceResponseEnum.OVER_LIMIT);
|
||||||
|
}
|
||||||
|
//单个进程支持最大装置数
|
||||||
|
int maxDevNum = nodeDevNum / maxProcessNum;
|
||||||
|
|
||||||
|
List<List<DeviceProcess>> partition = ListUtils.partition(deviceProcessList, maxProcessNum);
|
||||||
|
for (int i = 0; i < partition.size(); i++) {
|
||||||
|
int processNo = i+1;
|
||||||
|
partition.get(i).forEach(temp->{
|
||||||
|
temp.setProcessNo(processNo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
List<DeviceProcess> collect = partition.stream().flatMap(List::stream).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//更新进程号
|
||||||
|
deviceProcessService.updateBatchById(collect);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import com.njcn.device.pq.pojo.bo.excel.NodeExcel;
|
|||||||
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.OverLimitExcel;
|
import com.njcn.device.pq.pojo.bo.excel.OverLimitExcel;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||||
|
import com.njcn.device.pq.pojo.dto.DeviceInfo;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
import com.njcn.device.pq.pojo.param.oracle.*;
|
import com.njcn.device.pq.pojo.param.oracle.*;
|
||||||
@@ -45,6 +46,10 @@ import com.njcn.device.pq.pojo.vo.*;
|
|||||||
import com.njcn.device.pq.service.*;
|
import com.njcn.device.pq.service.*;
|
||||||
import com.njcn.device.pq.utils.DeviceUtil;
|
import com.njcn.device.pq.utils.DeviceUtil;
|
||||||
import com.njcn.device.pq.utils.ExcelStyleUtil;
|
import com.njcn.device.pq.utils.ExcelStyleUtil;
|
||||||
|
import com.njcn.message.api.ProduceFeignClient;
|
||||||
|
import com.njcn.message.constant.DeviceRebootType;
|
||||||
|
import com.njcn.message.message.DeviceRebootMessage;
|
||||||
|
import com.njcn.message.message.ProcessRebootMessage;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
@@ -88,7 +93,6 @@ import java.util.stream.Stream;
|
|||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> implements TerminalBaseService {
|
public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> implements TerminalBaseService {
|
||||||
|
|
||||||
private final DeviceMapper deviceMapper;
|
private final DeviceMapper deviceMapper;
|
||||||
private final SuperDataMapper superDataMapper;
|
private final SuperDataMapper superDataMapper;
|
||||||
private final IPqsTerminalLogsService iPqsTerminalLogsService;
|
private final IPqsTerminalLogsService iPqsTerminalLogsService;
|
||||||
@@ -107,7 +111,9 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
private final RedisUtil redisUtil;
|
private final RedisUtil redisUtil;
|
||||||
|
|
||||||
|
private final NodeDeviceService nodeDeviceService;
|
||||||
|
private final DeviceProcessService deviceProcessService;
|
||||||
|
private final ProduceFeignClient produceFeignClient;
|
||||||
@Value("${oracle.isSync}")
|
@Value("${oracle.isSync}")
|
||||||
private Boolean isSync;
|
private Boolean isSync;
|
||||||
|
|
||||||
@@ -274,8 +280,41 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
deviceDetail.setUpdateTime(LocalDateTime.now());
|
deviceDetail.setUpdateTime(LocalDateTime.now());
|
||||||
|
|
||||||
//处理装置识别码秘钥
|
//处理装置识别码秘钥
|
||||||
coderM3d(deviceDetail);
|
coderM3d(deviceDetail, false);
|
||||||
deviceMapper.insert(deviceDetail);
|
deviceMapper.insert(deviceDetail);
|
||||||
|
//添加装置进程号
|
||||||
|
Node nodeById = nodeService.getNodeById(deviceDetail.getNodeId());
|
||||||
|
List<Device> devices = deviceMapper.selectList(new QueryWrapper<Device>().lambda().eq(Device::getNodeId, deviceDetail.getNodeId()));
|
||||||
|
Integer maxNodeDevNum = nodeById.getNodeDevNum();
|
||||||
|
Integer maxProcessNum = nodeById.getMaxProcessNum();
|
||||||
|
if (devices.size() >= maxNodeDevNum) {
|
||||||
|
throw new BusinessException(PvDeviceResponseEnum.OVER_LIMIT);
|
||||||
|
}
|
||||||
|
List<String> deviceIdList = devices.stream().map(Device::getId).collect(Collectors.toList());
|
||||||
|
List<DeviceProcess> deviceProcessList = deviceProcessService.lambdaQuery().in(DeviceProcess::getId, deviceIdList).list();
|
||||||
|
Map<Integer, Integer> processCountMap = null;
|
||||||
|
if (Objects.nonNull(maxProcessNum)) {
|
||||||
|
processCountMap = new HashMap<>();
|
||||||
|
for (int i = 0; i < maxProcessNum; i++) {
|
||||||
|
Integer processNum = i + 1;
|
||||||
|
long count = deviceProcessList.stream().filter(temp -> Objects.equals(temp.getProcessNo(), processNum)).count();
|
||||||
|
Integer processCount = Math.toIntExact(count);
|
||||||
|
processCountMap.put(processNum, processCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
processCountMap = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取数量最少的线程号
|
||||||
|
Optional<Integer> minKey = processCountMap.entrySet()
|
||||||
|
.stream()
|
||||||
|
.min(Comparator.comparingInt(e -> e.getValue()))
|
||||||
|
.map(Map.Entry::getKey);
|
||||||
|
DeviceProcess deviceProcess = new DeviceProcess();
|
||||||
|
deviceProcess.setId(device.getId());
|
||||||
|
deviceProcess.setProcessNo(minKey.orElse(1));
|
||||||
|
deviceProcessService.saveOrUpdate(deviceProcess);
|
||||||
//装置功能
|
//装置功能
|
||||||
List<DictData> funList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.DEV_FUN.getName()).getData();
|
List<DictData> funList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.DEV_FUN.getName()).getData();
|
||||||
if (CollectionUtil.isEmpty(funList)) {
|
if (CollectionUtil.isEmpty(funList)) {
|
||||||
@@ -633,7 +672,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
Device deviceDetail = new Device();
|
Device deviceDetail = new Device();
|
||||||
BeanUtils.copyProperties(updateDeviceParam, deviceDetail);
|
BeanUtils.copyProperties(updateDeviceParam, deviceDetail);
|
||||||
deviceDetail.setId(updateDeviceParam.getDevIndex());
|
deviceDetail.setId(updateDeviceParam.getDevIndex());
|
||||||
coderM3d(deviceDetail);
|
coderM3d(deviceDetail,true);
|
||||||
this.updateById(device);
|
this.updateById(device);
|
||||||
deviceMapper.updateById(deviceDetail);
|
deviceMapper.updateById(deviceDetail);
|
||||||
}
|
}
|
||||||
@@ -813,7 +852,17 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void coderM3d(Device deviceDetail){
|
private void coderM3d(Device deviceDetail,Boolean updateFlag){
|
||||||
|
if(updateFlag){
|
||||||
|
Device deviceRes = deviceMapper.selectById(deviceDetail.getId());
|
||||||
|
if(StrUtil.isNotBlank(deviceDetail.getDevKey()) && !deviceRes.getDevKey().equals(deviceDetail.getDevKey())){
|
||||||
|
deviceDetail.setDevKey(DeviceUtil.encodeString(devCD,deviceDetail.getDevKey()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StrUtil.isNotBlank(deviceDetail.getSeries()) && !deviceRes.getSeries().equals(deviceDetail.getSeries())){
|
||||||
|
deviceDetail.setSeries(DeviceUtil.encodeString(devCD,deviceDetail.getSeries()));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
if(StrUtil.isNotBlank(deviceDetail.getDevKey())){
|
if(StrUtil.isNotBlank(deviceDetail.getDevKey())){
|
||||||
deviceDetail.setDevKey(DeviceUtil.encodeString(devCD,deviceDetail.getDevKey()));
|
deviceDetail.setDevKey(DeviceUtil.encodeString(devCD,deviceDetail.getDevKey()));
|
||||||
}
|
}
|
||||||
@@ -821,6 +870,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
deviceDetail.setSeries(DeviceUtil.encodeString(devCD,deviceDetail.getSeries()));
|
deviceDetail.setSeries(DeviceUtil.encodeString(devCD,deviceDetail.getSeries()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
private void decoderM3d(Device deviceDetail){
|
private void decoderM3d(Device deviceDetail){
|
||||||
if(StrUtil.isNotBlank(deviceDetail.getDevKey())){
|
if(StrUtil.isNotBlank(deviceDetail.getDevKey())){
|
||||||
deviceDetail.setDevKey(DeviceUtil.decoderString(devCD,deviceDetail.getDevKey()));
|
deviceDetail.setDevKey(DeviceUtil.decoderString(devCD,deviceDetail.getDevKey()));
|
||||||
@@ -951,7 +1002,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
Device deviceDetail = deviceMapper.selectById(device.getId());
|
Device deviceDetail = deviceMapper.selectById(device.getId());
|
||||||
//解密
|
//解密
|
||||||
decoderM3d(deviceDetail);
|
//decoderM3d(deviceDetail);
|
||||||
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
||||||
deviceVO.setDevIndex(device.getId());
|
deviceVO.setDevIndex(device.getId());
|
||||||
//母线
|
//母线
|
||||||
@@ -1011,7 +1062,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
Device deviceDetail = deviceMapper.selectById(obj.getId());
|
Device deviceDetail = deviceMapper.selectById(obj.getId());
|
||||||
//解密
|
//解密
|
||||||
decoderM3d(deviceDetail);
|
//decoderM3d(deviceDetail);
|
||||||
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
||||||
deviceVO.setDevIndex(obj.getId());
|
deviceVO.setDevIndex(obj.getId());
|
||||||
|
|
||||||
@@ -1107,7 +1158,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
deviceVO.setSort(device.getSort());
|
deviceVO.setSort(device.getSort());
|
||||||
Device deviceDetail = deviceMapper.selectById(device.getId());
|
Device deviceDetail = deviceMapper.selectById(device.getId());
|
||||||
//解密
|
//解密
|
||||||
decoderM3d(deviceDetail);
|
//decoderM3d(deviceDetail);
|
||||||
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
||||||
deviceVO.setDevIndex(device.getId());
|
deviceVO.setDevIndex(device.getId());
|
||||||
|
|
||||||
@@ -1158,7 +1209,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
Device deviceDetail = deviceMapper.selectById(device.getId());
|
Device deviceDetail = deviceMapper.selectById(device.getId());
|
||||||
//解密
|
//解密
|
||||||
decoderM3d(deviceDetail);
|
//decoderM3d(deviceDetail);
|
||||||
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
BeanUtils.copyProperties(deviceDetail, deviceVO);
|
||||||
deviceVO.setDevIndex(device.getId());
|
deviceVO.setDevIndex(device.getId());
|
||||||
|
|
||||||
@@ -1180,6 +1231,12 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Line queryTerminalByName(String devName) {
|
||||||
|
Line one = this.lambdaQuery().eq(Line::getName, devName).one();
|
||||||
|
return one;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean delTerminal(String id) {
|
public Boolean delTerminal(String id) {
|
||||||
@@ -1455,7 +1512,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
LambdaQueryWrapper<DeptLine> lineLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DeptLine> lineLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lineLambdaQueryWrapper.in(DeptLine::getLineId, lineIndexList);
|
lineLambdaQueryWrapper.in(DeptLine::getLineId, lineIndexList);
|
||||||
deptLineMapper.delete(lineLambdaQueryWrapper);
|
deptLineMapper.delete(lineLambdaQueryWrapper);
|
||||||
|
// 删除终端通知前置重启
|
||||||
|
this.askRestartDevice(id,DeviceRebootType.DELETE_TERMINAL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1476,7 +1534,9 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
LambdaQueryWrapper<DeptLine> lineLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DeptLine> lineLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lineLambdaQueryWrapper.in(DeptLine::getLineId, lineIndexList);
|
lineLambdaQueryWrapper.in(DeptLine::getLineId, lineIndexList);
|
||||||
deptLineMapper.delete(lineLambdaQueryWrapper);
|
deptLineMapper.delete(lineLambdaQueryWrapper);
|
||||||
|
//通知前置删除监测点
|
||||||
|
String[] split = obj.getPids().split(",");
|
||||||
|
this.askRestartDevice(split[4],DeviceRebootType.LEDGER_MODIFY);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1486,6 +1546,9 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
lineDetailMapper.deleteById(obj.getId());
|
lineDetailMapper.deleteById(obj.getId());
|
||||||
overlimitMapper.deleteById(obj.getId());
|
overlimitMapper.deleteById(obj.getId());
|
||||||
deptLineMapper.deleteById(obj.getId());
|
deptLineMapper.deleteById(obj.getId());
|
||||||
|
//通知前置删除监测点
|
||||||
|
String[] split = obj.getPids().split(",");
|
||||||
|
this.askRestartDevice(split[4],DeviceRebootType.LEDGER_MODIFY);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||||
@@ -3503,5 +3566,69 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
throw new BusinessException("字典转换异常");
|
throw new BusinessException("字典转换异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void askRestartProcess(Integer processNum,String processType, String processRebootType) {
|
||||||
|
|
||||||
|
ProcessRebootMessage procesRebootMessage = new ProcessRebootMessage();
|
||||||
|
procesRebootMessage.setIndex(processNum);
|
||||||
|
List<ProcessRebootMessage.RebootData> list = new ArrayList<>();
|
||||||
|
ProcessRebootMessage.RebootData rebootData = new ProcessRebootMessage.RebootData();
|
||||||
|
|
||||||
|
rebootData.setFun(processType);
|
||||||
|
rebootData.setProcessNum(processNum);
|
||||||
|
rebootData.setFrontType(processRebootType);
|
||||||
|
list.add(rebootData);
|
||||||
|
procesRebootMessage.setData(list);
|
||||||
|
produceFeignClient.askRestartProcess(procesRebootMessage);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Async
|
||||||
|
public void askRestartDevice(String devId, String deviceRebootType) {
|
||||||
|
DeviceProcess one = deviceProcessService.lambdaQuery().eq(DeviceProcess::getId, devId).one();
|
||||||
|
|
||||||
|
DeviceRebootMessage deviceRebootMessage = new DeviceRebootMessage();
|
||||||
|
deviceRebootMessage.setCode(deviceRebootType);
|
||||||
|
if(Objects.equals(deviceRebootType, DeviceRebootType.DELETE_TERMINAL)){
|
||||||
|
DeviceRebootMessage.DeviceInfo deviceInfo = new DeviceRebootMessage.DeviceInfo();
|
||||||
|
deviceInfo.setId(devId);
|
||||||
|
List<DeviceRebootMessage.DeviceInfo> list = new ArrayList<>();
|
||||||
|
list.add(deviceInfo);
|
||||||
|
deviceRebootMessage.setData(list);
|
||||||
|
deviceRebootMessage.setIndex(one.getProcessNo());
|
||||||
|
produceFeignClient.askRestartDevice(deviceRebootMessage);
|
||||||
|
//删除设备进程关系
|
||||||
|
deviceProcessService.removeById(devId);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
NodeDeviceParam nodeDeviceParam = new NodeDeviceParam();
|
||||||
|
nodeDeviceParam.setDevId(devId);
|
||||||
|
List<DeviceInfo> deviceInfos = nodeDeviceService.nodeDeviceList(nodeDeviceParam);
|
||||||
|
if (CollectionUtil.isNotEmpty(deviceInfos)){
|
||||||
|
deviceRebootMessage.setIndex(one.getProcessNo());
|
||||||
|
DeviceInfo deviceInfo = deviceInfos.get(0);
|
||||||
|
DeviceRebootMessage.DeviceInfo deviceInfo1 = new DeviceRebootMessage.DeviceInfo();
|
||||||
|
BeanUtils.copyProperties(deviceInfo,deviceInfo1);
|
||||||
|
List<DeviceRebootMessage.DeviceInfo.MonitorInfo> monitorInfoList=deviceInfo.getMonitorData().stream().map(tempMonitorInfo->{
|
||||||
|
DeviceRebootMessage.DeviceInfo.MonitorInfo m = new DeviceRebootMessage.DeviceInfo.MonitorInfo();
|
||||||
|
BeanUtils.copyProperties(tempMonitorInfo,m);
|
||||||
|
return m;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
deviceInfo1.setMonitorData(monitorInfoList);
|
||||||
|
List<DeviceRebootMessage.DeviceInfo> list = new ArrayList<>();
|
||||||
|
list.add(deviceInfo1);
|
||||||
|
deviceRebootMessage.setData(list);
|
||||||
|
produceFeignClient.askRestartDevice(deviceRebootMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.njcn.event.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EventCount implements Serializable {
|
||||||
|
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂升次数 1.1~1.8
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int upCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂降次数 0.1~0.9
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int downCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时中断 0~0.1
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int breakCounts;
|
||||||
|
|
||||||
|
public EventCount(String lineId) {
|
||||||
|
this.lineId = lineId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.njcn.event.utils;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:暂态事件工具类
|
||||||
|
* Date: 2025/03/12 上午 9:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public class EventUtil {
|
||||||
|
/**
|
||||||
|
* @Description: 暂态严重度计算
|
||||||
|
* @Param: persisttime持续时间毫秒,eventvaule暂减深度
|
||||||
|
* @return: java.lang.String
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2025/03/12
|
||||||
|
*/
|
||||||
|
public static String getYzd(Float persisttime, Float eventvaule) {
|
||||||
|
float yzd;
|
||||||
|
DecimalFormat df = new DecimalFormat("0.000");// 格式化小数
|
||||||
|
if (persisttime <= 20) {
|
||||||
|
yzd = 1 - eventvaule;
|
||||||
|
} else if (persisttime > 20 && persisttime <= 200) {
|
||||||
|
yzd = 2 * (1 - eventvaule);
|
||||||
|
} else if (persisttime > 200 && persisttime <= 500) {
|
||||||
|
yzd = 3.3f * (1 - eventvaule);
|
||||||
|
} else if (persisttime > 500 && persisttime <= 10000) {
|
||||||
|
yzd = 5 * (1 - eventvaule);
|
||||||
|
} else {
|
||||||
|
yzd = 10 * (1 - eventvaule);
|
||||||
|
}
|
||||||
|
return df.format(yzd);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.event.utils.EventUtil;
|
||||||
import com.njcn.event.mapper.majornetwork.EventDetailMapper;
|
import com.njcn.event.mapper.majornetwork.EventDetailMapper;
|
||||||
import com.njcn.event.pojo.dto.EventDeatilDTO;
|
import com.njcn.event.pojo.dto.EventDeatilDTO;
|
||||||
import com.njcn.event.pojo.po.EventDetail;
|
import com.njcn.event.pojo.po.EventDetail;
|
||||||
@@ -133,10 +134,12 @@ public class EventDetailServiceImpl extends ServiceImpl<EventDetailMapper, RmpEv
|
|||||||
rmpEventDetailPO.setEventType(data.getId());
|
rmpEventDetailPO.setEventType(data.getId());
|
||||||
rmpEventDetailPO.setStartTime(deatilDTO.getStartTime());
|
rmpEventDetailPO.setStartTime(deatilDTO.getStartTime());
|
||||||
rmpEventDetailPO.setDuration(deatilDTO.getDuration()/1000);
|
rmpEventDetailPO.setDuration(deatilDTO.getDuration()/1000);
|
||||||
rmpEventDetailPO.setFeatureAmplitude(deatilDTO.getAmplitude());
|
rmpEventDetailPO.setFeatureAmplitude(deatilDTO.getAmplitude()/100);
|
||||||
rmpEventDetailPO.setPhase(deatilDTO.getPhase());
|
rmpEventDetailPO.setPhase(deatilDTO.getPhase());
|
||||||
rmpEventDetailPO.setWavePath(deatilDTO.getWavePath());
|
rmpEventDetailPO.setWavePath(deatilDTO.getWavePath());
|
||||||
rmpEventDetailPO.setEventDescribe(" ");
|
rmpEventDetailPO.setEventDescribe(" ");
|
||||||
|
String severity = EventUtil.getYzd(deatilDTO.getDuration().floatValue(),(deatilDTO.getAmplitude().floatValue()/100));
|
||||||
|
rmpEventDetailPO.setSeverity(Double.valueOf(severity));
|
||||||
rmpEventDetailPO.setCreateTime(LocalDateTime.now());
|
rmpEventDetailPO.setCreateTime(LocalDateTime.now());
|
||||||
|
|
||||||
RmpEventDetailPO one = this.lambdaQuery().eq(RmpEventDetailPO::getLineId, rmpEventDetailPO.getLineId()).eq(RmpEventDetailPO::getStartTime, rmpEventDetailPO.getStartTime()).one();
|
RmpEventDetailPO one = this.lambdaQuery().eq(RmpEventDetailPO::getLineId, rmpEventDetailPO.getLineId()).eq(RmpEventDetailPO::getStartTime, rmpEventDetailPO.getStartTime()).one();
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
ip = monitorVO.getIp();
|
ip = monitorVO.getIp();
|
||||||
}
|
}
|
||||||
String waveName = eventDetail.getWavePath();
|
String waveName = eventDetail.getWavePath();
|
||||||
String cfgPath, datPath;
|
String cfgPath, datPath,cfgPath2,datPath2;
|
||||||
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
|
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
|
||||||
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
|
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
|
||||||
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
|
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
|
||||||
@@ -210,6 +210,9 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
} else {
|
} else {
|
||||||
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
|
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
|
||||||
datPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT;
|
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);
|
log.info("文件服务器波形文件路径----"+cfgPath);
|
||||||
try (
|
try (
|
||||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath);
|
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath);
|
||||||
@@ -220,8 +223,18 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
}
|
}
|
||||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
|
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
|
||||||
} catch (Exception e) {
|
} 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, 1);
|
||||||
|
}catch (Exception e1){
|
||||||
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
|
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
waveDataDTO = waveFileComponent.getValidData(waveDataDTO);
|
waveDataDTO = waveFileComponent.getValidData(waveDataDTO);
|
||||||
if (param.getSystemType() == 0) {
|
if (param.getSystemType() == 0) {
|
||||||
@@ -382,7 +395,7 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
List<DictData> typeList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName()).getData();
|
List<DictData> typeList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName()).getData();
|
||||||
for (EventDetailNew eventDetail : eventDetailData) {
|
for (EventDetailNew eventDetail : eventDetailData) {
|
||||||
DecimalFormat df = new DecimalFormat("#0.000");
|
DecimalFormat df = new DecimalFormat("#0.000");
|
||||||
eventDetail.setSeverity(Double.parseDouble(df.format(eventDetail.getSeverity())));
|
eventDetail.setSeverity(Double.parseDouble(df.format(Objects.isNull(eventDetail.getSeverity())?0.00:eventDetail.getSeverity())));
|
||||||
for (AreaLineInfoVO areaLineInfoVO : r) {
|
for (AreaLineInfoVO areaLineInfoVO : r) {
|
||||||
if (eventDetail.getLineId().equals(areaLineInfoVO.getLineId())) {
|
if (eventDetail.getLineId().equals(areaLineInfoVO.getLineId())) {
|
||||||
eventDetail.setLineId(areaLineInfoVO.getLineId());
|
eventDetail.setLineId(areaLineInfoVO.getLineId());
|
||||||
|
|||||||
@@ -215,7 +215,8 @@ whitelist:
|
|||||||
- /pqs-auth/oauth/getPublicKey
|
- /pqs-auth/oauth/getPublicKey
|
||||||
- /pqs-auth/judgeToken/heBei
|
- /pqs-auth/judgeToken/heBei
|
||||||
- /pqs-auth/judgeToken/guangZhou
|
- /pqs-auth/judgeToken/guangZhou
|
||||||
|
- /pqs-auth/judgeToken/productionManagementCheck
|
||||||
|
-
|
||||||
- /webjars/**
|
- /webjars/**
|
||||||
- /doc.html
|
- /doc.html
|
||||||
- /swagger-resources/**
|
- /swagger-resources/**
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ import com.njcn.harmonic.pojo.param.RMpBenchmarkLevelParam;
|
|||||||
import com.njcn.harmonic.pojo.po.RMpBenchmarkLevelM;
|
import com.njcn.harmonic.pojo.po.RMpBenchmarkLevelM;
|
||||||
import com.njcn.harmonic.pojo.vo.PwRMpBenchmarkLevelVO;
|
import com.njcn.harmonic.pojo.vo.PwRMpBenchmarkLevelVO;
|
||||||
import com.njcn.harmonic.service.distribution.PwRMpBenchmarkLevelMService;
|
import com.njcn.harmonic.service.distribution.PwRMpBenchmarkLevelMService;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -26,6 +30,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jianghf
|
* @author jianghf
|
||||||
@@ -43,6 +48,8 @@ public class PwRMpBenchmarkLevelMServiceImpl extends ServiceImpl<PwRMpBenchmarkL
|
|||||||
|
|
||||||
private final DistributionMonitorClient distributionMonitorClient;
|
private final DistributionMonitorClient distributionMonitorClient;
|
||||||
|
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 配网-全网基准水平
|
* 配网-全网基准水平
|
||||||
@@ -71,6 +78,10 @@ public class PwRMpBenchmarkLevelMServiceImpl extends ServiceImpl<PwRMpBenchmarkL
|
|||||||
pwPmsMonitorParam.setOrgId(id); //单位id
|
pwPmsMonitorParam.setOrgId(id); //单位id
|
||||||
pwPmsMonitorParam.setVoltageLevels(voltageLevelParamList); //电压等级
|
pwPmsMonitorParam.setVoltageLevels(voltageLevelParamList); //电压等级
|
||||||
|
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.THREE_LINE.getCode(), DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||||
|
pwPmsMonitorParam.setMonitorSort(Stream.of(dictData.getId()).collect(Collectors.toList()));
|
||||||
|
|
||||||
|
//临时调整为查询三类测点
|
||||||
List<String> monitorIds = pmsGeneralDeviceInfoClient.getPwPmsMonitorIds(pwPmsMonitorParam).getData();
|
List<String> monitorIds = pmsGeneralDeviceInfoClient.getPwPmsMonitorIds(pwPmsMonitorParam).getData();
|
||||||
if (CollUtil.isEmpty(monitorIds)) {
|
if (CollUtil.isEmpty(monitorIds)) {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.njcn.harmonic.pojo.po.RStatPwPermeabilityM;
|
|||||||
import com.njcn.harmonic.pojo.vo.RStatPwPermeabilityMVO;
|
import com.njcn.harmonic.pojo.vo.RStatPwPermeabilityMVO;
|
||||||
import com.njcn.harmonic.service.distribution.RStatPwPermeabilityMService;
|
import com.njcn.harmonic.service.distribution.RStatPwPermeabilityMService;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -24,6 +25,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 各渗透率光伏台区基准水平
|
* 各渗透率光伏台区基准水平
|
||||||
@@ -68,6 +70,8 @@ public class RStatPwPermeabilityMServiceImpl extends ServiceImpl<RStatPwPermeabi
|
|||||||
//根据条件查询单位下面的所有配网监测点
|
//根据条件查询单位下面的所有配网监测点
|
||||||
PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam();
|
PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam();
|
||||||
pwPmsMonitorParam.setOrgId(id); //单位id
|
pwPmsMonitorParam.setOrgId(id); //单位id
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.THREE_LINE.getCode(), DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||||
|
pwPmsMonitorParam.setMonitorSort(Stream.of(dictData.getId()).collect(Collectors.toList()));
|
||||||
List<String> monitorIds = pmsGeneralDeviceInfoClient.getPwPmsMonitorIds(pwPmsMonitorParam).getData();
|
List<String> monitorIds = pmsGeneralDeviceInfoClient.getPwPmsMonitorIds(pwPmsMonitorParam).getData();
|
||||||
if (CollUtil.isEmpty(monitorIds)) {
|
if (CollUtil.isEmpty(monitorIds)) {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
|
|||||||
@@ -237,91 +237,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
objectListData.add(list);
|
objectListData.add(list);
|
||||||
|
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
//下面代码稳定后可删除
|
|
||||||
/* List<HarmonicHistoryData> aList = harmonicHistoryDataList.stream()
|
|
||||||
.filter(temp -> temp.getPhasicType().equalsIgnoreCase(InfluxDBTableConstant.PHASE_TYPE_A))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
List<HarmonicHistoryData> bList = harmonicHistoryDataList.stream()
|
|
||||||
.filter(temp -> temp.getPhasicType().equalsIgnoreCase(InfluxDBTableConstant.PHASE_TYPE_B))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
List<HarmonicHistoryData> cList = harmonicHistoryDataList.stream()
|
|
||||||
.filter(temp -> temp.getPhasicType().equalsIgnoreCase(InfluxDBTableConstant.PHASE_TYPE_C))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
|
|
||||||
int maxSize = Math.max(aList.size(), Math.max(bList.size(), cList.size()));
|
|
||||||
if (maxSize == aList.size()) {
|
|
||||||
time = aList.stream()
|
|
||||||
.map(temp -> PubUtils.instantToDate(temp.getTime()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
} else if (maxSize == bList.size()) {
|
|
||||||
time = bList.stream()
|
|
||||||
.map(temp -> PubUtils.instantToDate(temp.getTime()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
} else {
|
|
||||||
time = cList.stream()
|
|
||||||
.map(temp -> PubUtils.instantToDate(temp.getTime()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
aValue = aList.stream()
|
|
||||||
.map(temp -> BigDecimal.valueOf(temp.getAValue()).setScale(4, RoundingMode.HALF_UP).floatValue())
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
bValue = bList.stream()
|
|
||||||
.map(temp -> BigDecimal.valueOf(temp.getAValue()).setScale(4, RoundingMode.HALF_UP).floatValue())
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
cValue = cList.stream()
|
|
||||||
.map(temp -> BigDecimal.valueOf(temp.getAValue()).setScale(4, RoundingMode.HALF_UP).floatValue())
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
//组装二维数组
|
|
||||||
|
|
||||||
boolean flagA = true,flagB = true,flagC =true;
|
|
||||||
if(CollectionUtil.isEmpty(aValue)){
|
|
||||||
flagA = false;
|
|
||||||
}
|
|
||||||
if(CollectionUtil.isEmpty(bValue)){
|
|
||||||
flagB = false;
|
|
||||||
}
|
|
||||||
if(CollectionUtil.isEmpty(cValue)){
|
|
||||||
flagC = false;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < time.size(); i++) {
|
|
||||||
List<Object> objects = new ArrayList<>();
|
|
||||||
//指定
|
|
||||||
objects.add(time.get(i));
|
|
||||||
if(flagA){
|
|
||||||
objects.add(aValue.get(i));
|
|
||||||
}
|
|
||||||
if(flagB) {
|
|
||||||
objects.add(bValue.get(i));
|
|
||||||
}
|
|
||||||
if(flagC) {
|
|
||||||
objects.add(cValue.get(i));
|
|
||||||
}
|
|
||||||
objectListData.add(objects);
|
|
||||||
}
|
|
||||||
Float aValueMin = CollectionUtil.isEmpty(aValue) ? null : Collections.min(aValue);
|
|
||||||
Float bValueMin = CollectionUtil.isEmpty(bValue) ? null : Collections.min(bValue);
|
|
||||||
Float cValueMin = CollectionUtil.isEmpty(cValue) ? null : Collections.min(cValue);
|
|
||||||
Float aValueMax = CollectionUtil.isEmpty(aValue) ? null : Collections.max(aValue);
|
|
||||||
Float bValueMax = CollectionUtil.isEmpty(bValue) ? null : Collections.max(bValue);
|
|
||||||
Float cValueMax = CollectionUtil.isEmpty(cValue) ? null : Collections.max(cValue);
|
|
||||||
List<Float> list = Arrays.asList(aValueMin, bValueMin, cValueMin, aValueMax, bValueMax, cValueMax);
|
|
||||||
Optional<Float> min = list.stream()
|
|
||||||
.filter(Objects::nonNull) // 过滤掉null值
|
|
||||||
.min(Float::compareTo);
|
|
||||||
if (min.isPresent()) {
|
|
||||||
historyDataResultVO.setMinValue(min.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
Optional<Float> max = list.stream()
|
|
||||||
.filter(Objects::nonNull) // 过滤掉null值
|
|
||||||
.max(Float::compareTo);
|
|
||||||
if (min.isPresent()) {
|
|
||||||
historyDataResultVO.setMaxValue(max.get());
|
|
||||||
}*/
|
|
||||||
historyDataResultVO.setMaxValue(maxI);
|
historyDataResultVO.setMaxValue(maxI);
|
||||||
historyDataResultVO.setMinValue(minI);
|
historyDataResultVO.setMinValue(minI);
|
||||||
historyDataResultVO.setTopLimit(queryResultLimitVO.getTopLimit());
|
historyDataResultVO.setTopLimit(queryResultLimitVO.getTopLimit());
|
||||||
@@ -526,14 +442,19 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
case 40:
|
case 40:
|
||||||
//谐波电压含有率
|
//谐波电压含有率
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
sql = "SELECT time as time, v_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_v WHERE " + stringBuilder +
|
targetName = "基波电压幅值";
|
||||||
|
//修改幅值表
|
||||||
|
sql = "SELECT time as time, v_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_v WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
unit.add(pqsDeviceUnit.getPhaseVoltage());
|
||||||
} else {
|
} else {
|
||||||
|
targetName = "谐波电压含有率";
|
||||||
sql = "SELECT time as time, v_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_v WHERE " + stringBuilder +
|
sql = "SELECT time as time, v_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_v WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
if (number < 26) {
|
if (number < 26) {
|
||||||
topLimit = PubUtils.getValueByMethod(overlimit, "getUharm", number);
|
topLimit = PubUtils.getValueByMethod(overlimit, "getUharm", number);
|
||||||
}
|
}
|
||||||
|
unit.add("%");
|
||||||
}
|
}
|
||||||
if (ptType == 0) {
|
if (ptType == 0) {
|
||||||
phasicType.add("A相");
|
phasicType.add("A相");
|
||||||
@@ -544,23 +465,28 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
phasicType.add("BC相");
|
phasicType.add("BC相");
|
||||||
phasicType.add("CA相");
|
phasicType.add("CA相");
|
||||||
}
|
}
|
||||||
unit.add("%");
|
|
||||||
targetName = "谐波电压含有率";
|
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
//谐波电流含有率
|
//谐波电流含有率
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
|
targetName = "谐波电流幅值";
|
||||||
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
|
||||||
|
unit.add("A");
|
||||||
} else {
|
} else {
|
||||||
|
targetName = "谐波电流含有率";
|
||||||
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmrate_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
unit.add("%");
|
||||||
}
|
}
|
||||||
phasicType.add("A相");
|
phasicType.add("A相");
|
||||||
phasicType.add("B相");
|
phasicType.add("B相");
|
||||||
phasicType.add("C相");
|
phasicType.add("C相");
|
||||||
unit.add("%");
|
|
||||||
targetName = "谐波电流含有率";
|
|
||||||
break;
|
break;
|
||||||
case 42:
|
case 42:
|
||||||
//谐波电压幅值
|
//谐波电压幅值
|
||||||
@@ -582,28 +508,34 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
}
|
}
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
unit.add(pqsDeviceUnit.getVfundEffective());
|
unit.add(pqsDeviceUnit.getVfundEffective());
|
||||||
|
targetName = "基波电压幅值";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
unit.add("V");
|
unit.add("V");
|
||||||
}
|
|
||||||
targetName = "谐波电压幅值";
|
targetName = "谐波电压幅值";
|
||||||
|
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 43:
|
case 43:
|
||||||
//谐波电流幅值
|
//谐波电流幅值
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
targetName = "基波电流幅值";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
if (number < 26) {
|
if (number < 26) {
|
||||||
topLimit = PubUtils.getValueByMethod(overlimit, "getIharm", number);
|
topLimit = PubUtils.getValueByMethod(overlimit, "getIharm", number);
|
||||||
}
|
}
|
||||||
|
targetName = "谐波电流幅值";
|
||||||
|
|
||||||
}
|
}
|
||||||
phasicType.add("A相");
|
phasicType.add("A相");
|
||||||
phasicType.add("B相");
|
phasicType.add("B相");
|
||||||
phasicType.add("C相");
|
phasicType.add("C相");
|
||||||
unit.add("A");
|
unit.add("A");
|
||||||
targetName = "谐波电流幅值";
|
|
||||||
break;
|
break;
|
||||||
case 44:
|
case 44:
|
||||||
//谐波电压相角
|
//谐波电压相角
|
||||||
@@ -615,31 +547,37 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
}
|
}
|
||||||
if (ptType == 0) {
|
if (ptType == 0) {
|
||||||
|
targetName = "基波电压相角";
|
||||||
|
|
||||||
phasicType.add("A相");
|
phasicType.add("A相");
|
||||||
phasicType.add("B相");
|
phasicType.add("B相");
|
||||||
phasicType.add("C相");
|
phasicType.add("C相");
|
||||||
} else {
|
} else {
|
||||||
|
targetName = "谐波电压相角";
|
||||||
|
|
||||||
phasicType.add("AB相");
|
phasicType.add("AB相");
|
||||||
phasicType.add("BC相");
|
phasicType.add("BC相");
|
||||||
phasicType.add("CA相");
|
phasicType.add("CA相");
|
||||||
}
|
}
|
||||||
unit.add("°");
|
unit.add("°");
|
||||||
targetName = "谐波电压相角";
|
|
||||||
break;
|
break;
|
||||||
case 45:
|
case 45:
|
||||||
//谐波电流相角
|
//谐波电流相角
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmphasic_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_1 as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmphasic_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
targetName = "基波电流相角";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmphasic_i WHERE " + stringBuilder +
|
sql = "SELECT time as time, i_" + number + " as aValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_harmphasic_i WHERE " + stringBuilder +
|
||||||
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
" and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') order by time asc tz('Asia/Shanghai');";
|
||||||
|
targetName = "谐波电流相角";
|
||||||
|
|
||||||
}
|
}
|
||||||
phasicType.add("A相");
|
phasicType.add("A相");
|
||||||
phasicType.add("B相");
|
phasicType.add("B相");
|
||||||
phasicType.add("C相");
|
phasicType.add("C相");
|
||||||
unit.add("°");
|
unit.add("°");
|
||||||
targetName = "谐波电流相角";
|
|
||||||
break;
|
break;
|
||||||
case 46:
|
case 46:
|
||||||
//间谐波电压含有率
|
//间谐波电压含有率
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class RStatOrgMServiceImpl extends ServiceImpl<RStatOrgMMapper, RStatOrgM
|
|||||||
if(rStatOrgM.getHarmonicMeasurementAverage()!=null&&rStatOrgM.getEffectiveMeasurementAverage()!=null&&
|
if(rStatOrgM.getHarmonicMeasurementAverage()!=null&&rStatOrgM.getEffectiveMeasurementAverage()!=null&&
|
||||||
rStatOrgM.getHarmonicMeasurementAverage()!=0&&rStatOrgM.getEffectiveMeasurementAverage()!=0){
|
rStatOrgM.getHarmonicMeasurementAverage()!=0&&rStatOrgM.getEffectiveMeasurementAverage()!=0){
|
||||||
Float harmonicMeasurementRatioAverage = Float.parseFloat(
|
Float harmonicMeasurementRatioAverage = Float.parseFloat(
|
||||||
df.format(rStatOrgM.getHarmonicMeasurementAverage()*100.0 / rStatOrgM.getEffectiveMeasurementAverage()));
|
df.format(rStatOrgM.getHarmonicMeasurementAverage() / rStatOrgM.getEffectiveMeasurementAverage()));
|
||||||
rStatOrgVO.setHarmonicMeasurementRatioAverage(harmonicMeasurementRatioAverage);
|
rStatOrgVO.setHarmonicMeasurementRatioAverage(harmonicMeasurementRatioAverage);
|
||||||
}else{
|
}else{
|
||||||
rStatOrgVO.setHarmonicMeasurementRatioAverage(0.0f);
|
rStatOrgVO.setHarmonicMeasurementRatioAverage(0.0f);
|
||||||
@@ -101,7 +101,7 @@ public class RStatOrgMServiceImpl extends ServiceImpl<RStatOrgMMapper, RStatOrgM
|
|||||||
if(rStatOrgM.getHarmonicMeasurementAccrued()!=null&&rStatOrgM.getEffectiveMeasurementAccrued()!=null&&
|
if(rStatOrgM.getHarmonicMeasurementAccrued()!=null&&rStatOrgM.getEffectiveMeasurementAccrued()!=null&&
|
||||||
rStatOrgM.getHarmonicMeasurementAccrued()!=0&&rStatOrgM.getEffectiveMeasurementAccrued()!=0){
|
rStatOrgM.getHarmonicMeasurementAccrued()!=0&&rStatOrgM.getEffectiveMeasurementAccrued()!=0){
|
||||||
Float harmonicMeasurementRatioAccrued = Float.parseFloat(
|
Float harmonicMeasurementRatioAccrued = Float.parseFloat(
|
||||||
df.format(rStatOrgM.getHarmonicMeasurementAccrued()*100.0 / rStatOrgM.getEffectiveMeasurementAccrued() ));
|
df.format(rStatOrgM.getHarmonicMeasurementAccrued() / rStatOrgM.getEffectiveMeasurementAccrued() ));
|
||||||
rStatOrgVO.setHarmonicMeasurementRatioAccrued(harmonicMeasurementRatioAccrued);
|
rStatOrgVO.setHarmonicMeasurementRatioAccrued(harmonicMeasurementRatioAccrued);
|
||||||
}else{
|
}else{
|
||||||
rStatOrgVO.setHarmonicMeasurementRatioAccrued(0.0f);
|
rStatOrgVO.setHarmonicMeasurementRatioAccrued(0.0f);
|
||||||
|
|||||||
@@ -56,13 +56,12 @@ public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMM
|
|||||||
@Override
|
@Override
|
||||||
public Page<RMpWpPowerDetailVO> getWindFarmDetailInfo(PowerQualityParam.PowerQualityInfoParam param) {
|
public Page<RMpWpPowerDetailVO> getWindFarmDetailInfo(PowerQualityParam.PowerQualityInfoParam param) {
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<DeptDTO> deptDTOS = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
List<String> codeIds = deptFeignClient.getDepSonSelfCodetByDeptId(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOS.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
|
||||||
|
|
||||||
//根据条件查询单位下面的所有配网监测点
|
//根据条件查询单位下面的所有配网监测点
|
||||||
PmsMonitorParam pmsMonitorParam = new PmsMonitorParam();
|
PmsMonitorParam pmsMonitorParam = new PmsMonitorParam();
|
||||||
//单位id
|
//单位id
|
||||||
pmsMonitorParam.setOrgIds(deptIds);
|
pmsMonitorParam.setOrgIds(codeIds);
|
||||||
pmsMonitorParam.setMonitorTag(param.getMonitorTag());
|
pmsMonitorParam.setMonitorTag(param.getMonitorTag());
|
||||||
pmsMonitorParam.setIsSpecialMonitor(1);
|
pmsMonitorParam.setIsSpecialMonitor(1);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.njcn.harmonic.service.upload.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.advance.pojo.dto.waveAnalysis.AnalyWave;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.harmonic.api.UploadGwDataFeignClient;
|
||||||
|
import com.njcn.harmonic.pojo.param.UploadParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.upload.RUploadDataLog;
|
||||||
|
import com.njcn.harmonic.service.upload.IPointStatisticalDataService;
|
||||||
|
import com.njcn.harmonic.service.upload.IRUploadDataLogService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2025-04-21
|
||||||
|
* @Description: 主网测点失败尝试
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@EnableScheduling
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class FailedAttemptJob {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(FailedAttemptJob.class);
|
||||||
|
|
||||||
|
private final IRUploadDataLogService irUploadDataLogService;
|
||||||
|
|
||||||
|
private final IPointStatisticalDataService iPointStatisticalDataService;
|
||||||
|
|
||||||
|
|
||||||
|
// 每天早上 8 点执行
|
||||||
|
@Scheduled(cron = "0 05 8 * * ?")
|
||||||
|
public void executeAtEight() {
|
||||||
|
commFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 每天早上 9 点执行
|
||||||
|
@Scheduled(cron = "0 10 8 * * ?")
|
||||||
|
public void executeAtNine() {
|
||||||
|
commFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 每天早上 10 点执行
|
||||||
|
@Scheduled(cron = "0 15 8 * * ?")
|
||||||
|
public void executeAtTen() {
|
||||||
|
commFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void commFunction(){
|
||||||
|
System.out.println("早上定时任务执行(主网测点失败尝试):" + LocalDateTime.now());
|
||||||
|
LambdaQueryWrapper<RUploadDataLog> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(RUploadDataLog::getStatisticDate, LocalDate.now().minusDays(1)).eq(RUploadDataLog::getBigType,0).eq(RUploadDataLog::getSmallType,1);
|
||||||
|
RUploadDataLog rUploadDataLog = irUploadDataLogService.getOne(lambdaQueryWrapper);
|
||||||
|
if(Objects.nonNull(rUploadDataLog)){
|
||||||
|
if(rUploadDataLog.getResult().equals(0)){
|
||||||
|
//失败了需要重试
|
||||||
|
UploadParam param = new UploadParam();
|
||||||
|
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
|
iPointStatisticalDataService.uploadPointStatisticalData(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.harmonic.service.upload.impl;
|
package com.njcn.harmonic.service.upload.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -27,7 +28,7 @@ public class RUploadDataLogServiceImpl extends MppServiceImpl<RUploadDataLogMapp
|
|||||||
@Override
|
@Override
|
||||||
public Page<RUploadDataLog> getList(BaseParam baseParam) {
|
public Page<RUploadDataLog> getList(BaseParam baseParam) {
|
||||||
LambdaQueryWrapper<RUploadDataLog> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RUploadDataLog> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.between(RUploadDataLog::getCreateTime,baseParam.getSearchBeginTime(),baseParam.getSearchEndTime())
|
lambdaQueryWrapper.between(RUploadDataLog::getStatisticDate, DateUtil.beginOfDay(DateUtil.parse(baseParam.getSearchBeginTime())),DateUtil.endOfDay(DateUtil.parse(baseParam.getSearchEndTime())))
|
||||||
.orderByDesc(RUploadDataLog::getStatisticDate);
|
.orderByDesc(RUploadDataLog::getStatisticDate);
|
||||||
if(StrUtil.isNotBlank(baseParam.getSearchValue())){
|
if(StrUtil.isNotBlank(baseParam.getSearchValue())){
|
||||||
lambdaQueryWrapper.eq(RUploadDataLog::getSmallType,Integer.parseInt(baseParam.getSearchValue()));
|
lambdaQueryWrapper.eq(RUploadDataLog::getSmallType,Integer.parseInt(baseParam.getSearchValue()));
|
||||||
|
|||||||
@@ -23,9 +23,13 @@ spring:
|
|||||||
ip: @service.server.url@
|
ip: @service.server.url@
|
||||||
server-addr: @nacos.url@
|
server-addr: @nacos.url@
|
||||||
namespace: @nacos.namespace@
|
namespace: @nacos.namespace@
|
||||||
|
#username: @nacos.username@
|
||||||
|
#password: @nacos.password@
|
||||||
config:
|
config:
|
||||||
server-addr: @nacos.url@
|
server-addr: @nacos.url@
|
||||||
namespace: @nacos.namespace@
|
namespace: @nacos.namespace@
|
||||||
|
#username: @nacos.username@
|
||||||
|
#password: @nacos.password@
|
||||||
file-extension: yaml
|
file-extension: yaml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: share-config.yaml
|
- data-id: share-config.yaml
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.njcn.harmonic.mapper.upload.PmsTemProcessApprovalMapper">
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
obj_id, temp_user_dossier_id, approval_join_user_id, approval_join_user_name, approval_advise,
|
|
||||||
create_time, update_time, legacy_problem, rectification_status, rectification_time,
|
|
||||||
rectification_user_id, rectification_user_name, rectification_measure
|
|
||||||
</sql>
|
|
||||||
</mapper>
|
|
||||||
@@ -6,6 +6,7 @@ import com.njcn.prepare.harmonic.api.liteflow.fallback.LiteFlowFeignClientFallba
|
|||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@@ -23,6 +24,9 @@ public interface LiteFlowFeignClient {
|
|||||||
@PostMapping("/measurementPointExecutor")
|
@PostMapping("/measurementPointExecutor")
|
||||||
void measurementPointExecutor(@RequestBody BaseParam baseParam);
|
void measurementPointExecutor(@RequestBody BaseParam baseParam);
|
||||||
|
|
||||||
|
@ApiOperation("监测点算法执行链(按小时执行的任务)")
|
||||||
|
@PostMapping("/measurementPointExecutorByHour")
|
||||||
|
public void measurementPointExecutorByHour(@RequestBody BaseParam baseParam);
|
||||||
@ApiOperation("单位监测点算法执行链")
|
@ApiOperation("单位监测点算法执行链")
|
||||||
@PostMapping("/orgPointExecutor")
|
@PostMapping("/orgPointExecutor")
|
||||||
void orgPointExecutor(@RequestBody BaseParam baseParam);
|
void orgPointExecutor(@RequestBody BaseParam baseParam);
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class LiteFlowFeignClientFallbackFactory implements FallbackFactory<LiteF
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void measurementPointExecutorByHour(BaseParam baseParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "监测点算法(按小时)执行链: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void orgPointExecutor(BaseParam baseParam) {
|
public void orgPointExecutor(BaseParam baseParam) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "单位监测点算法执行链: ", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "单位监测点算法执行链: ", throwable.toString());
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ public class BaseParam implements Serializable {
|
|||||||
private boolean repair;
|
private boolean repair;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "beginTime",value = "补招起始日期_yyyy-MM-dd")
|
@ApiModelProperty(name = "beginTime",value = "补招起始日期_yyyy-MM-dd(按小时跑的任务可加时分秒)")
|
||||||
private String beginTime;
|
private String beginTime;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "endTime",value = "补招截止日期_yyyy-MM-dd")
|
@ApiModelProperty(name = "endTime",value = "补招截止日期_yyyy-MM-dd(按小时跑的任务可加时分秒)")
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "dataDate",value = "时间日期_yyyy-MM-dd")
|
@ApiModelProperty(name = "dataDate",value = "时间日期_yyyy-MM-dd(按小时跑的任务可加时分秒)")
|
||||||
private String dataDate;
|
private String dataDate;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.bo.excel;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GdPollution implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电公司名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "供电公司", width = 30, needMerge = true)
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站集合
|
||||||
|
* name不要赋值
|
||||||
|
*/
|
||||||
|
@ExcelCollection(name = "")
|
||||||
|
private List<SubstationPollution> substationPollutionList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.bo.excel;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LineItemPollution implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端名称", width = 30, replace = "/_null")
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端厂家
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端厂家", width = 30, replace = "/_null")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端型号", width = 30, replace = "/_null")
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端投运时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "投运时间", width = 30, replace = "/_null")
|
||||||
|
private String loginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点名称", width = 30, replace = "/_null")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计间隔
|
||||||
|
*/
|
||||||
|
@Excel(name = "统计间隔", width = 30, replace = "/_null")
|
||||||
|
private Integer interval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压污染值
|
||||||
|
*/
|
||||||
|
@Excel(name = "污染值", width = 20, replace = "/_null")
|
||||||
|
private String vHarmonicValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂升次数 1.1~1.8
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int upCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂降次数 0.1~0.9
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压暂降(次)", width = 20)
|
||||||
|
private int downCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时中断 0~0.1
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "短时中断(次)", width = 20)
|
||||||
|
private int breakCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Excel(name = "备注", width = 30, replace = "/_null")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.bo.excel;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LinePollution implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电公司名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "供电公司", width = 30)
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属变电站
|
||||||
|
*/
|
||||||
|
@Excel(name = "变电站", width = 30)
|
||||||
|
private String subStationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端名称", width = 30)
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端厂家
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端厂家", width = 30)
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端型号", width = 30)
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端投运时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "投运时间", width = 30)
|
||||||
|
private String loginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点索引
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点名称", width = 30)
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置,电网侧&非电网侧
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测位置", width = 30)
|
||||||
|
private String powerFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* 监测点电压等级
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点电压等级", width = 30)
|
||||||
|
private String lineVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "干扰源类型", width = 30)
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测对象
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测对象名称", width = 30)
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计间隔
|
||||||
|
*/
|
||||||
|
@Excel(name = "统计间隔", width = 30)
|
||||||
|
private Integer interval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* 在线率
|
||||||
|
*/
|
||||||
|
@Excel(name = "在线率(%)", width = 30)
|
||||||
|
private Double onlineRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* 完整性
|
||||||
|
*/
|
||||||
|
@Excel(name = "完整率(%)", width = 30)
|
||||||
|
private Double integrity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压污染值
|
||||||
|
*/
|
||||||
|
@Excel(name = "污染值", width = 20)
|
||||||
|
private String vHarmonicValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂升次数 1.1~1.8
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int upCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂降次数 0.1~0.9
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压暂降(次)", width = 20)
|
||||||
|
private int downCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时中断 0~0.1
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "短时中断(次)", width = 20)
|
||||||
|
private int breakCounts;
|
||||||
|
|
||||||
|
@Excel(name = "是否关联敏感用户", width = 30, replace = "/_null")
|
||||||
|
private String isMg;
|
||||||
|
|
||||||
|
@Excel(name = "敏感及重要用户", width = 30,replace = "/_null")
|
||||||
|
private String importUser;
|
||||||
|
|
||||||
|
@Excel(name = "一类监测点", width = 30,replace = "/_null")
|
||||||
|
private String monitorId;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 备注
|
||||||
|
// */
|
||||||
|
// @Excel(name = "备注", width = 30, replace = "/_null")
|
||||||
|
// private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.bo.excel;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LoadTypeLineItemPollution implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属变电站
|
||||||
|
*/
|
||||||
|
@Excel(name = "变电站", width = 30, needMerge = true)
|
||||||
|
private String subStationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端名称", width = 30, replace = "/_null")
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端厂家
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端厂家", width = 30, replace = "/_null")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@Excel(name = "终端型号", width = 30, replace = "/_null")
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端投运时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "投运时间", width = 30, replace = "/_null")
|
||||||
|
private String loginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点名称", width = 30, replace = "/_null")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计间隔
|
||||||
|
*/
|
||||||
|
@Excel(name = "统计间隔", width = 30, replace = "/_null")
|
||||||
|
private Integer interval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压污染值
|
||||||
|
*/
|
||||||
|
@Excel(name = "测点污染值", width = 20, replace = "/_null")
|
||||||
|
private String vHarmonicValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂升次数 1.1~1.8
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
private int upCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂降次数 0.1~0.9
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压暂降(次)", width = 20)
|
||||||
|
private int downCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时中断 0~0.1
|
||||||
|
* 10ms ~ 1min
|
||||||
|
*/
|
||||||
|
@Excel(name = "短时中断(次)", width = 20)
|
||||||
|
private int breakCounts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Excel(name = "备注", width = 30, replace = "/_null")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user