暂降原因

This commit is contained in:
hzj
2025-08-01 10:48:04 +08:00
parent 7c1b07feba
commit 0a6b4e9aca
8 changed files with 165 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
package com.njcn.advance.event.controller;
import com.njcn.advance.event.pojo.EventAnalysisDTO;
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
import com.njcn.advance.event.service.IEventAdvanceService;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
@@ -13,11 +13,10 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author hongawen
* @version 1.0
@@ -35,7 +34,7 @@ public class EventCauseController extends BaseController {
@PostMapping(value = "/analysisCauseAndType")
@ApiOperation("分析暂降事件的原因和类型")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
public HttpResult<EventAnalysisDTO> analysisCauseAndType(EventAnalysisDTO eventAnalysis) {
public HttpResult<EventAnalysisDTO> analysisCauseAndType(@RequestBody EventAnalysisDTO eventAnalysis) {
String methodDescribe = getMethodDescribe("analysisCauseAndType");
eventAnalysis = eventAdvanceService.analysisCauseAndType(eventAnalysis);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventAnalysis, methodDescribe);

View File

@@ -1,76 +0,0 @@
package com.njcn.advance.event.pojo;
import lombok.Data;
/**
*
* 暂降事件的高级分析,包括暂降原因和暂降类型
*
* @author hongawen
* @version 1.0
* @data 2025/7/30 10:43
*/
@Data
public class EventAnalysisDTO {
/**
* lineId
*/
private String lineId;
/**
* 监测点IP
*/
private String ip;
/**
* 事件ID
*/
private String eventId;
/**
* 文件名称
*/
private String waveName;
/**
* 暂降原因
* (0) //未知
* (1) //短路故障
* (2) //电压调节器
* (3) //感动电机
* (4) //电压跌落
*/
private Integer cause;
/**
* 可能分析失败,虽然返回的原因为未知,可能程序执行异常导致的
* 0 异常计算
* 1 正常计算
*/
private Integer causeFlag = 1;
/**
* 暂降类型
* TYPE0 = 0; // BC相间故障
* TYPE1 = 1; // C相接地故障
* TYPE2 = 2; // AC相间故障
* TYPE3 = 3; // A相接地故障
* TYPE4 = 4; // AB相间故障
* TYPE5 = 5; // B相接地故障
* TYPE6 = 6; // BC相间接地
* TYPE7 = 7; // AC相间接地
* TYPE8 = 8; // AB相间接地
* TYPE9 = 9; // 三相故障
* TYPE10 = 10; // 未知
*/
private Integer type;
/**
* 可能分析失败,虽然返回的原因为未知,可能程序执行异常导致的
* 0 异常计算
* 1 正常计算
*/
private Integer typeFlag = 1;
}

View File

@@ -1,6 +1,6 @@
package com.njcn.advance.event.service;
import com.njcn.advance.event.pojo.EventAnalysisDTO;
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
/**
* @author hongawen

View File

@@ -5,7 +5,7 @@ import com.njcn.advance.event.cause.core.VoltageSagAnalyzer;
import com.njcn.advance.event.cause.model.AnalysisResult;
import com.njcn.advance.event.cause.model.DataFeature;
import com.njcn.advance.event.cause.model.QvvrDataStruct;
import com.njcn.advance.event.pojo.EventAnalysisDTO;
import com.njcn.advance.pojo.dto.EventAnalysisDTO;
import com.njcn.advance.event.service.IEventAdvanceService;
import com.njcn.advance.event.type.jna.QvvrDLL;
import com.njcn.common.config.GeneralInfo;