surverytest新增otherreport字段
This commit is contained in:
@@ -24,7 +24,7 @@ public class EventNewStationVo implements Serializable {
|
|||||||
private String newStationName;
|
private String newStationName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "开始时间")
|
@ApiModelProperty(value = "开始时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime startTime;
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "特征幅值")
|
@ApiModelProperty(value = "特征幅值")
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class VoltageRideThroughEventController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
||||||
@PostMapping("/eventQueryPage")
|
@PostMapping("/voltageRideThroughEventQueryPage")
|
||||||
@ApiOperation("高低电压穿越暂态事件分页")
|
@ApiOperation("查询高低电压穿越暂态事件列表")
|
||||||
public HttpResult<List<EventNewStationVo>> voltageRideThroughEventQueryPage(@RequestBody @Validated VoltageRideThroughQueryParam voltageRideThroughQueryParam) {
|
public HttpResult<List<EventNewStationVo>> voltageRideThroughEventQueryPage(@RequestBody @Validated VoltageRideThroughQueryParam voltageRideThroughQueryParam) {
|
||||||
String methodDescribe = getMethodDescribe("voltageRideThroughEventQueryPage");
|
String methodDescribe = getMethodDescribe("voltageRideThroughEventQueryPage");
|
||||||
LogUtil.njcnDebug(log, "{},查询对象为:{}", methodDescribe, voltageRideThroughQueryParam);
|
LogUtil.njcnDebug(log, "{},查询对象为:{}", methodDescribe, voltageRideThroughQueryParam);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.njcn.event.service.majornetwork.Impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.njcn.device.biz.commApi.CommLineClient;
|
import com.njcn.device.biz.commApi.CommLineClient;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
|
||||||
import com.njcn.device.pq.api.DeptLineFeignClient;
|
import com.njcn.device.pq.api.DeptLineFeignClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.api.NewStationClient;
|
import com.njcn.device.pq.api.NewStationClient;
|
||||||
@@ -26,6 +25,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,40 +64,26 @@ public class VoltageRideThroughEventServiceImpl implements VoltageRideThroughEve
|
|||||||
VoltageRideThroughVo voltageRideThroughVo = new VoltageRideThroughVo();
|
VoltageRideThroughVo voltageRideThroughVo = new VoltageRideThroughVo();
|
||||||
//赋值子部门名称及ID
|
//赋值子部门名称及ID
|
||||||
BeanUtils.copyProperties(deptDTO,voltageRideThroughVo);
|
BeanUtils.copyProperties(deptDTO,voltageRideThroughVo);
|
||||||
//根据子部门的area获取经纬度
|
//根据部门的area获取经纬度
|
||||||
Area area = areaFeignClient.selectIdArea(deptDTO.getArea()).getData();
|
Area area = areaFeignClient.selectIdArea(deptDTO.getArea()).getData();
|
||||||
if(area != null){
|
if(area != null){
|
||||||
voltageRideThroughVo.setLat(area.getLat());
|
voltageRideThroughVo.setLat(area.getLat());
|
||||||
voltageRideThroughVo.setLng(area.getLng());
|
voltageRideThroughVo.setLng(area.getLng());
|
||||||
}
|
}
|
||||||
|
voltageRideThroughVo.setHighPressure(new Random().nextInt()+1+"");
|
||||||
|
voltageRideThroughVo.setLowPressure(new Random().nextInt()+1+"");
|
||||||
//开始计算每个地区高低压穿越次数
|
//开始计算每个地区高低压穿越次数
|
||||||
//获取当前部门下所有的监测点(当然也会根据选择的新能源场站类型进行过滤)
|
//获取当前部门下所有的监测点(当然也会根据选择的新能源场站类型进行过滤)
|
||||||
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(deptDTO.getId(),voltageRideThroughQueryParam.getType()).getData();
|
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(deptDTO.getId(),voltageRideThroughQueryParam.getType()).getData();
|
||||||
for(String lineId : lineIds){
|
for(String lineId : lineIds){
|
||||||
//监测点信息
|
|
||||||
LineDTO lineDTO = commLineClient.getLineDetail(lineId).getData();
|
|
||||||
if(lineDTO == null){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
//监测点绑定的暂降事件
|
//监测点绑定的暂降事件
|
||||||
List<EventDetail> eventDetails = eventDetailService.getEventDetailData(lineId,voltageRideThroughQueryParam.getSearchBeginTime()+Param.BEGIN,voltageRideThroughQueryParam.getSearchEndTime()+Param.END);
|
List<EventDetail> eventDetails = eventDetailService.getEventDetailData(lineId,voltageRideThroughQueryParam.getSearchBeginTime()+Param.BEGIN,voltageRideThroughQueryParam.getSearchEndTime()+Param.END);
|
||||||
//取出事件类型为:暂升
|
//取出事件类型为:暂升
|
||||||
List<EventDetail> upperEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.UPPEREVENT)).collect(Collectors.toList());
|
List<EventDetail> upperEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.UPPEREVENT)).collect(Collectors.toList());
|
||||||
//取出事件类型为:暂降
|
//取出事件类型为:暂降
|
||||||
List<EventDetail> lowerEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.LOWEREVENT)).collect(Collectors.toList());
|
List<EventDetail> lowerEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.LOWEREVENT)).collect(Collectors.toList());
|
||||||
//当前监测点为:光伏电站
|
|
||||||
if(Param.PHOTOVOLTAICPOWER.equals(lineDTO.getStationType())){
|
|
||||||
//计算 光伏电站 暂升次数
|
|
||||||
for(EventDetail eventDetail : upperEventDetails){
|
|
||||||
|
|
||||||
}
|
|
||||||
//计算 光伏电站 暂降次数
|
|
||||||
for(EventDetail eventDetail : lowerEventDetails){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//当前监测点为:风电场
|
//当前监测点为:风电场
|
||||||
if(Param.WINDFARM.equals(lineDTO.getStationType())){
|
if("1".equals(voltageRideThroughQueryParam.getType())){
|
||||||
//计算 风电场 暂升次数
|
//计算 风电场 暂升次数
|
||||||
for(EventDetail eventDetail : upperEventDetails){
|
for(EventDetail eventDetail : upperEventDetails){
|
||||||
|
|
||||||
@@ -105,6 +91,17 @@ public class VoltageRideThroughEventServiceImpl implements VoltageRideThroughEve
|
|||||||
//计算 风电场 暂降次数
|
//计算 风电场 暂降次数
|
||||||
for(EventDetail eventDetail : lowerEventDetails){
|
for(EventDetail eventDetail : lowerEventDetails){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//当前监测点为:光伏电站
|
||||||
|
if("2".equals(voltageRideThroughQueryParam.getType())){
|
||||||
|
//计算 光伏电站 暂升次数
|
||||||
|
for(EventDetail eventDetail : upperEventDetails){
|
||||||
|
|
||||||
|
}
|
||||||
|
//计算 光伏电站 暂降次数
|
||||||
|
for(EventDetail eventDetail : lowerEventDetails){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,13 @@ public class SurveyTestVO extends BaseEntity implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 普测测试管理表id
|
* 其他报告
|
||||||
*/
|
*/
|
||||||
|
private String otherReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 普测测试管理表id
|
||||||
|
*/
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
|||||||
surveyTest.setSupervisionReport(surveyTestParam.getSupervisionReport());
|
surveyTest.setSupervisionReport(surveyTestParam.getSupervisionReport());
|
||||||
surveyTest.setProblemFlag(surveyTestParam.getProblemFlag());
|
surveyTest.setProblemFlag(surveyTestParam.getProblemFlag());
|
||||||
surveyTest.setProblemDetail(surveyTestParam.getProblemDetail());
|
surveyTest.setProblemDetail(surveyTestParam.getProblemDetail());
|
||||||
|
surveyTest.setOtherReport(surveyTestParam.getOtherReport());
|
||||||
//设置状态
|
//设置状态
|
||||||
if(Objects.equals(surveyTestParam.getSaveOrCheckflag(),"1")){
|
if(Objects.equals(surveyTestParam.getSaveOrCheckflag(),"1")){
|
||||||
surveyTest.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
surveyTest.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||||
|
|||||||
Reference in New Issue
Block a user